2022-02-11 02:00:59 +00:00
|
|
|
---
|
|
|
|
testoperators.cpp | 16 ++++++++--------
|
|
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
|
|
|
|
--- a/testoperators.cpp
|
|
|
|
+++ b/testoperators.cpp
|
2021-05-01 08:21:42 +00:00
|
|
|
@@ -37,26 +37,26 @@
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/* 1x : SINGLE OBJECT FORM - NO DEBUG INFORMATION */
|
|
|
|
- void * operator new( DUMA_SIZE_T ) throw(std::bad_alloc);
|
|
|
|
+ void * operator new( DUMA_SIZE_T ) NEW_THROW_SPEC;
|
|
|
|
void * operator new( DUMA_SIZE_T , const std::nothrow_t & ) throw();
|
|
|
|
void operator delete( void * ) throw();
|
|
|
|
void operator delete( void * , const std::nothrow_t & ) throw();
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
/* 2x : ARRAY OBJECT FORM - NO DEBUG INFORMATION */
|
|
|
|
- void * operator new[]( DUMA_SIZE_T ) throw(std::bad_alloc);
|
|
|
|
+ void * operator new[]( DUMA_SIZE_T ) NEW_THROW_SPEC;
|
|
|
|
void * operator new[]( DUMA_SIZE_T , const std::nothrow_t & ) throw();
|
|
|
|
void operator delete[]( void * ) throw();
|
|
|
|
void operator delete[]( void *, const std::nothrow_t & ) throw();
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
#ifndef DUMA_NO_LEAKDETECTION
|
|
|
|
/* 3x : SINGLE OBJECT FORM - WITH DEBUG INFORMATION */
|
|
|
|
- void * operator new( DUMA_SIZE_T, const char *, int ) throw( std::bad_alloc );
|
|
|
|
+ void * operator new( DUMA_SIZE_T, const char *, int ) NEW_THROW_SPEC;
|
|
|
|
void * operator new( DUMA_SIZE_T, const std::nothrow_t &, const char *, int ) throw();
|
|
|
|
void operator delete( void *, const char *, int ) throw();
|
|
|
|
void operator delete( void *, const std::nothrow_t &, const char *, int ) throw();
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
/* 4x : ARRAY OBJECT FORM - WITH DEBUG INFORMATION */
|
|
|
|
- void * operator new[]( DUMA_SIZE_T, const char *, int ) throw( std::bad_alloc );
|
|
|
|
+ void * operator new[]( DUMA_SIZE_T, const char *, int ) NEW_THROW_SPEC;
|
|
|
|
void * operator new[]( DUMA_SIZE_T, const std::nothrow_t &, const char *, int ) throw();
|
|
|
|
void operator delete[]( void *, const char *, int ) throw();
|
|
|
|
void operator delete[]( void *, const std::nothrow_t &, const char *, int ) throw();
|
|
|
|
@@ -70,7 +70,7 @@
|
|
|
|
/* 1x : SINGLE OBJECT FORM - NO DEBUG INFORMATION */
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
void * optest::operator new( DUMA_SIZE_T s )
|
|
|
|
-throw(std::bad_alloc)
|
|
|
|
+NEW_THROW_SPEC
|
|
|
|
{
|
|
|
|
(void)s;
|
|
|
|
return ::new optest;
|
|
|
|
@@ -101,7 +101,7 @@
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
/* 2x : ARRAY OBJECT FORM - NO DEBUG INFORMATION */
|
|
|
|
void * optest::operator new[]( DUMA_SIZE_T s )
|
|
|
|
-throw(std::bad_alloc)
|
|
|
|
+NEW_THROW_SPEC
|
|
|
|
{
|
|
|
|
return ::new optest[ s / sizeof(optest) ]; // "s / sizeof()" not correct but works for this test
|
|
|
|
}
|
|
|
|
@@ -129,7 +129,7 @@
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
/* 3x : SINGLE OBJECT FORM - WITH DEBUG INFORMATION */
|
|
|
|
void * optest::operator new( DUMA_SIZE_T s, const char * f, int l )
|
|
|
|
-throw( std::bad_alloc )
|
|
|
|
+NEW_THROW_SPEC
|
|
|
|
{
|
|
|
|
(void)s;
|
|
|
|
return ::new(f,l) optest;
|
|
|
|
@@ -157,7 +157,7 @@
|
2022-02-11 02:00:59 +00:00
|
|
|
|
2021-05-01 08:21:42 +00:00
|
|
|
/* 4x : ARRAY OBJECT FORM - WITH DEBUG INFORMATION */
|
|
|
|
void * optest::operator new[]( DUMA_SIZE_T s, const char * f, int l )
|
|
|
|
-throw( std::bad_alloc )
|
|
|
|
+NEW_THROW_SPEC
|
|
|
|
{
|
|
|
|
return ::new(f,l) optest[s / sizeof(optest)]; // "s / sizeof()" not correct but works for this test
|
|
|
|
}
|