summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-06-06 18:04:12 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-06-06 18:04:12 +0200
commita436568e52a5a78afe7b039b4c6b1e089369eba6 (patch)
treec8c6807d415468364d64c4989fd8a24fa7146f05
parent1652ce786e3f76875cfa9008ac83682c4828d6a6 (diff)
downloadATCD-a436568e52a5a78afe7b039b4c6b1e089369eba6.tar.gz
Make use of std::nothrow/std::nothrow_t/std::badalloc, ACE macros for these are kept for backward compatiblity
* ACE/ace/CORBA_macros.h: * ACE/ace/OS_Memory.h: * ACE/ace/Svc_Handler.cpp: * ACE/ace/Svc_Handler.h: * ACE/examples/DLL/Newsweek.cpp: * ACE/examples/DLL/Newsweek.h: * ACE/examples/DLL/Today.cpp: * ACE/examples/DLL/Today.h: * ACE/examples/Shared_Malloc/test_persistence.cpp: * ACE/tests/DLL_Test_Impl.cpp: * ACE/tests/DLL_Test_Impl.h: * ACE/tests/Dynamic_Test.cpp: * TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp: * TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp: * TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp: * TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context_Factory.cpp: * TAO/tao/Var_Size_Argument_T.cpp: * TAO/tests/POA/DSI/Database_i.cpp: * TAO/tests/POA/DSI/Database_i.h:
-rw-r--r--ACE/ace/CORBA_macros.h4
-rw-r--r--ACE/ace/OS_Memory.h72
-rw-r--r--ACE/ace/Svc_Handler.cpp6
-rw-r--r--ACE/ace/Svc_Handler.h4
-rw-r--r--ACE/examples/DLL/Newsweek.cpp6
-rw-r--r--ACE/examples/DLL/Newsweek.h4
-rw-r--r--ACE/examples/DLL/Today.cpp6
-rw-r--r--ACE/examples/DLL/Today.h4
-rw-r--r--ACE/examples/Shared_Malloc/test_persistence.cpp4
-rw-r--r--ACE/tests/DLL_Test_Impl.cpp4
-rw-r--r--ACE/tests/DLL_Test_Impl.h4
-rw-r--r--ACE/tests/Dynamic_Test.cpp10
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context_Factory.cpp2
-rw-r--r--TAO/tao/Var_Size_Argument_T.cpp2
-rw-r--r--TAO/tests/POA/DSI/Database_i.cpp4
-rw-r--r--TAO/tests/POA/DSI/Database_i.h13
19 files changed, 53 insertions, 106 deletions
diff --git a/ACE/ace/CORBA_macros.h b/ACE/ace/CORBA_macros.h
index 06da1889ace..88b8fcffe50 100644
--- a/ACE/ace/CORBA_macros.h
+++ b/ACE/ace/CORBA_macros.h
@@ -42,8 +42,8 @@
#endif
#define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \
- do { POINTER = new (ACE_nothrow) CONSTRUCTOR; \
- if (POINTER == 0) { throw EXCEPTION; } \
+ do { POINTER = new (std::nothrow) CONSTRUCTOR; \
+ if (!POINTER) { throw EXCEPTION; } \
} while (0)
// FUZZ: disable check_for_ACE_Guard
diff --git a/ACE/ace/OS_Memory.h b/ACE/ace/OS_Memory.h
index f4bf3fe93f3..36e17e2c728 100644
--- a/ACE/ace/OS_Memory.h
+++ b/ACE/ace/OS_Memory.h
@@ -82,6 +82,12 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# define ACE_del_bad_alloc
#endif
+// For backwards compatibility, we except all compilers to support these
+#include /**/ <new>
+#define ACE_bad_alloc std::bad_alloc
+#define ACE_nothrow std::nothrow
+#define ACE_nothrow_t std::nothrow_t
+
// Since new() throws exceptions, we need a way to avoid passing
// exceptions past the call to new because ACE counts on having a 0
// return value for a failed allocation. Some compilers offer the
@@ -90,74 +96,16 @@ ACE_END_VERSIONED_NAMESPACE_DECL
// and then below we'll do a try/catch around the new to catch it and
// return a 0 pointer instead.
# if defined (__HP_aCC)
- // I know this works for HP aC++... if <stdexcept> is used, it
- // introduces other stuff that breaks things, like <memory>, which
- // screws up auto_ptr.
-# include /**/ <new>
- // _HP_aCC was first defined at aC++ 03.13 on HP-UX 11. Prior to that
- // (03.10 and before) a failed new threw bad_alloc. After that (03.13
- // and above) the exception thrown is dependent on the below settings.
-# if (HPUX_VERS >= 1100)
-# if ((__HP_aCC < 32500 && !defined (RWSTD_NO_NAMESPACE)) || \
- defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB))
-# define ACE_bad_alloc ::std::bad_alloc
-# define ACE_nothrow ::std::nothrow
-# define ACE_nothrow_t ::std::nothrow_t
-# else
-# define ACE_bad_alloc bad_alloc
-# define ACE_nothrow nothrow
-# define ACE_nothrow_t nothrow_t
-# endif /* __HP_aCC */
-# elif ((__HP_aCC < 12500 && !defined (RWSTD_NO_NAMESPACE)) || \
- defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB))
-# define ACE_bad_alloc ::std::bad_alloc
-# define ACE_nothrow ::std::nothrow
-# define ACE_nothrow_t ::std::nothrow_t
-# else
-# define ACE_bad_alloc bad_alloc
-# define ACE_nothrow nothrow
-# define ACE_nothrow_t nothrow_t
-# endif /* HPUX_VERS < 1100 */
# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
# elif defined (__SUNPRO_CC)
-# if (__SUNPRO_CC < 0x500) || (__SUNPRO_CC_COMPAT == 4)
-# include /**/ <exception.h>
- // Note: we catch ::xalloc rather than just xalloc because of
- // a name clash with unsafe_ios::xalloc()
-# define ACE_bad_alloc ::xalloc
-# define ACE_throw_bad_alloc throw ACE_bad_alloc ("no more memory")
-# else
-# include /**/ <new>
-# define ACE_bad_alloc ::std::bad_alloc
-# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-# define ACE_nothrow ::std::nothrow
-# define ACE_nothrow_t ::std::nothrow_t
-# else
-# define ACE_nothrow nothrow
-# define ACE_nothrow_t nothrow_t
-# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */
-# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
-# endif /* __SUNPRO_CC < 0x500 */
+# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
# elif defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
-# include /**/ <new>
-# if !defined (ACE_bad_alloc)
-# define ACE_bad_alloc ::std::bad_alloc
-# endif
-# define ACE_nothrow ::std::nothrow
-# define ACE_nothrow_t ::std::nothrow_t
- // MFC changes the behavior of operator new at all MSVC versions from 6 up.
# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC == 1)
# define ACE_throw_bad_alloc AfxThrowMemoryException ()
# else
# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
# endif
# else
-# include /**/ <new>
-# if !defined (ACE_bad_alloc)
-# define ACE_bad_alloc bad_alloc
-# endif
-# define ACE_nothrow nothrow
-# define ACE_nothrow_t nothrow_t
// MFC changes the behavior of operator new at all MSVC versions from 6 up.
# if defined (ACE_HAS_MFC) && (ACE_HAS_MFC == 1)
# define ACE_throw_bad_alloc AfxThrowMemoryException ()
@@ -167,15 +115,15 @@ ACE_END_VERSIONED_NAMESPACE_DECL
# endif /* __HP_aCC */
#define ACE_NEW_RETURN(POINTER,CONSTRUCTOR,RET_VAL) \
- do { POINTER = new (ACE_nothrow) CONSTRUCTOR; \
+ do { POINTER = new (std::nothrow) CONSTRUCTOR; \
if (POINTER == 0) { errno = ENOMEM; return RET_VAL; } \
} while (0)
#define ACE_NEW(POINTER,CONSTRUCTOR) \
- do { POINTER = new(ACE_nothrow) CONSTRUCTOR; \
+ do { POINTER = new(std::nothrow) CONSTRUCTOR; \
if (POINTER == 0) { errno = ENOMEM; return; } \
} while (0)
#define ACE_NEW_NORETURN(POINTER,CONSTRUCTOR) \
- do { POINTER = new(ACE_nothrow) CONSTRUCTOR; \
+ do { POINTER = new(std::nothrow) CONSTRUCTOR; \
if (POINTER == 0) { errno = ENOMEM; } \
} while (0)
diff --git a/ACE/ace/Svc_Handler.cpp b/ACE/ace/Svc_Handler.cpp
index 5d424969ea2..8b796a2754e 100644
--- a/ACE/ace/Svc_Handler.cpp
+++ b/ACE/ace/Svc_Handler.cpp
@@ -56,7 +56,7 @@ ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::operator new (size_t n)
template <typename PEER_STREAM, typename SYNCH_TRAITS> void *
ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::operator new (size_t n,
- const ACE_nothrow_t&) throw()
+ const std::nothrow_t&) throw()
{
ACE_TRACE ("ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::operator new(nothrow)");
@@ -77,13 +77,13 @@ ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::operator new (size_t n,
// storage, depending on config flags).
dynamic_instance->set ();
- return ::new(ACE_nothrow) char[n];
+ return ::new(std::nothrow) char[n];
}
}
template <typename PEER_STREAM, typename SYNCH_TRAITS> void
ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::operator delete (void *p,
- const ACE_nothrow_t&) throw()
+ const std::nothrow_t&) throw()
{
ACE_TRACE("ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::operator delete(nothrow)");
::delete [] static_cast <char *> (p);
diff --git a/ACE/ace/Svc_Handler.h b/ACE/ace/Svc_Handler.h
index 9fb174e16b6..f4db11ea9a5 100644
--- a/ACE/ace/Svc_Handler.h
+++ b/ACE/ace/Svc_Handler.h
@@ -174,8 +174,8 @@ public:
/// <Svc_Handler> is allocated dynamically, which allows it to clean
/// itself up correctly whether or not it's allocated statically or
/// dynamically.
- void *operator new (size_t n, const ACE_nothrow_t&) throw();
- void operator delete (void *p, const ACE_nothrow_t&) throw ();
+ void *operator new (size_t n, const std::nothrow_t&) throw();
+ void operator delete (void *p, const std::nothrow_t&) throw ();
/// This operator permits "placement new" on a per-object basis.
void * operator new (size_t n, void *p);
diff --git a/ACE/examples/DLL/Newsweek.cpp b/ACE/examples/DLL/Newsweek.cpp
index 34df2b16113..65856fe18c6 100644
--- a/ACE/examples/DLL/Newsweek.cpp
+++ b/ACE/examples/DLL/Newsweek.cpp
@@ -19,12 +19,12 @@ Newsweek::operator new (size_t bytes)
return ::new char[bytes];
}
void *
-Newsweek::operator new (size_t bytes, const ACE_nothrow_t&)
+Newsweek::operator new (size_t bytes, const std::nothrow_t&)
{
- return ::new (ACE_nothrow) char[bytes];
+ return ::new (std::nothrow) char[bytes];
}
void
-Newsweek::operator delete (void *p, const ACE_nothrow_t&) throw ()
+Newsweek::operator delete (void *p, const std::nothrow_t&) throw ()
{
delete [] static_cast <char *> (p);
}
diff --git a/ACE/examples/DLL/Newsweek.h b/ACE/examples/DLL/Newsweek.h
index e5845056107..dad7ce52fdb 100644
--- a/ACE/examples/DLL/Newsweek.h
+++ b/ACE/examples/DLL/Newsweek.h
@@ -42,8 +42,8 @@ public:
// DLL/SO.
void *operator new (size_t bytes);
// Overloaded new operator, nothrow_t variant.
- void *operator new (size_t bytes, const ACE_nothrow_t&);
- void operator delete (void *p, const ACE_nothrow_t&) throw ();
+ void *operator new (size_t bytes, const std::nothrow_t&);
+ void operator delete (void *p, const std::nothrow_t&) throw ();
void operator delete (void *ptr);
};
diff --git a/ACE/examples/DLL/Today.cpp b/ACE/examples/DLL/Today.cpp
index da2f5e9256e..2c48b1053b8 100644
--- a/ACE/examples/DLL/Today.cpp
+++ b/ACE/examples/DLL/Today.cpp
@@ -20,12 +20,12 @@ Today::operator new (size_t bytes)
return ::new char[bytes];
}
void *
-Today::operator new (size_t bytes, const ACE_nothrow_t&)
+Today::operator new (size_t bytes, const std::nothrow_t&)
{
- return ::new (ACE_nothrow) char[bytes];
+ return ::new (std::nothrow) char[bytes];
}
void
-Today::operator delete (void *p, const ACE_nothrow_t&) throw ()
+Today::operator delete (void *p, const std::nothrow_t&) throw ()
{
delete [] static_cast <char *> (p);
}
diff --git a/ACE/examples/DLL/Today.h b/ACE/examples/DLL/Today.h
index 48711a3d993..b59fb1ff505 100644
--- a/ACE/examples/DLL/Today.h
+++ b/ACE/examples/DLL/Today.h
@@ -43,8 +43,8 @@ public:
// DLL/SO.
void *operator new (size_t bytes);
// Overloaded new operator, nothrow_t variant.
- void *operator new (size_t bytes, const ACE_nothrow_t&);
- void operator delete (void *p, const ACE_nothrow_t&) throw ();
+ void *operator new (size_t bytes, const std::nothrow_t&);
+ void operator delete (void *p, const std::nothrow_t&) throw ();
void operator delete (void *ptr);
};
diff --git a/ACE/examples/Shared_Malloc/test_persistence.cpp b/ACE/examples/Shared_Malloc/test_persistence.cpp
index 87d062a20d9..5635297da03 100644
--- a/ACE/examples/Shared_Malloc/test_persistence.cpp
+++ b/ACE/examples/Shared_Malloc/test_persistence.cpp
@@ -59,11 +59,11 @@ public:
return shmem_allocator->malloc (sizeof (Employee));
}
- void *operator new (size_t, const ACE_nothrow_t&)
+ void *operator new (size_t, const std::nothrow_t&)
{
return shmem_allocator->malloc (sizeof (Employee));
}
- void operator delete (void *p, const ACE_nothrow_t&) throw ()
+ void operator delete (void *p, const std::nothrow_t&) throw ()
{
shmem_allocator->free (p);
}
diff --git a/ACE/tests/DLL_Test_Impl.cpp b/ACE/tests/DLL_Test_Impl.cpp
index 8d323651131..8457a82623f 100644
--- a/ACE/tests/DLL_Test_Impl.cpp
+++ b/ACE/tests/DLL_Test_Impl.cpp
@@ -54,14 +54,14 @@ Hello_Impl::operator new (size_t bytes)
/// Overloaded new operator, nothrow_t variant.
void *
-Hello_Impl::operator new (size_t bytes, const ACE_nothrow_t &nt)
+Hello_Impl::operator new (size_t bytes, const std::nothrow_t &nt)
{
ACE_DEBUG ((LM_INFO, "Hello_Impl::new\n"));
return ::new (nt) char[bytes];
}
void
-Hello_Impl::operator delete (void *ptr, const ACE_nothrow_t&) throw ()
+Hello_Impl::operator delete (void *ptr, const std::nothrow_t&) throw ()
{
ACE_DEBUG ((LM_INFO, "Hello_Impl::delete\n"));
::delete [] static_cast<char *> (ptr);
diff --git a/ACE/tests/DLL_Test_Impl.h b/ACE/tests/DLL_Test_Impl.h
index 4ba42e5763b..97db4904e42 100644
--- a/ACE/tests/DLL_Test_Impl.h
+++ b/ACE/tests/DLL_Test_Impl.h
@@ -51,8 +51,8 @@ public:
void *operator new (size_t bytes);
/// Overloaded new operator, nothrow_t variant.
- void *operator new (size_t bytes, const ACE_nothrow_t &nt);
- void operator delete (void *p, const ACE_nothrow_t&) throw ();
+ void *operator new (size_t bytes, const std::nothrow_t &nt);
+ void operator delete (void *p, const std::nothrow_t&) throw ();
void operator delete (void *ptr);
};
diff --git a/ACE/tests/Dynamic_Test.cpp b/ACE/tests/Dynamic_Test.cpp
index 62d7080ea0e..958ac6fa10e 100644
--- a/ACE/tests/Dynamic_Test.cpp
+++ b/ACE/tests/Dynamic_Test.cpp
@@ -24,8 +24,8 @@ public:
void *operator new (size_t n);
- void *operator new (size_t n, const ACE_nothrow_t&) throw();
- void operator delete (void *p, const ACE_nothrow_t&) throw ();
+ void *operator new (size_t n, const std::nothrow_t&) throw();
+ void operator delete (void *p, const std::nothrow_t&) throw ();
void * operator new (size_t n, void *p);
void operator delete (void *);
@@ -61,7 +61,7 @@ A::operator new (size_t n)
}
void*
-A::operator new (size_t n, const ACE_nothrow_t&) throw()
+A::operator new (size_t n, const std::nothrow_t&) throw()
{
ACE_Dynamic *const dynamic_instance = ACE_Dynamic::instance ();
@@ -80,12 +80,12 @@ A::operator new (size_t n, const ACE_nothrow_t&) throw()
// storage, depending on config flags).
dynamic_instance->set ();
- return ::new(ACE_nothrow) char[n];
+ return ::new(std::nothrow) char[n];
}
}
void
-A::operator delete (void *p, const ACE_nothrow_t&) throw()
+A::operator delete (void *p, const std::nothrow_t&) throw()
{
::delete [] static_cast <char *> (p);
}
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp
index 3bdab065dc5..74d4a7e7cff 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp
@@ -689,13 +689,13 @@ TAO_FT_Naming_Server::fini ()
TAO_Storable_Naming_Context_Factory *
TAO_FT_Naming_Server::storable_naming_context_factory (size_t context_size)
{
- return new (ACE_nothrow) TAO_FT_Storable_Naming_Context_Factory (context_size, this->replicator_);
+ return new (std::nothrow) TAO_FT_Storable_Naming_Context_Factory (context_size, this->replicator_);
}
TAO_Persistent_Naming_Context_Factory *
TAO_FT_Naming_Server::persistent_naming_context_factory ()
{
- return new (ACE_nothrow) TAO_FT_Persistent_Naming_Context_Factory;
+ return new (std::nothrow) TAO_FT_Persistent_Naming_Context_Factory;
}
/// Return the IOR for the registered replication manager
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp
index 66b36bebf29..1a399836ca8 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Persistent_Naming_Context_Factory.cpp
@@ -28,7 +28,7 @@ TAO_FT_Persistent_Naming_Context_Factory::create_naming_context_impl (
{
// Construct the naming context, forwarding the map and counter even if they
// are defaulted
- return new (ACE_nothrow) TAO_FT_Persistent_Naming_Context (poa,
+ return new (std::nothrow) TAO_FT_Persistent_Naming_Context (poa,
poa_id,
context_index,
map,
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
index 79cd28d7408..d71070a501c 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
@@ -754,13 +754,13 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb,
TAO_Storable_Naming_Context_Factory *
TAO_Naming_Server::storable_naming_context_factory (size_t context_size)
{
- return new (ACE_nothrow) TAO_Storable_Naming_Context_Factory (context_size);
+ return new (std::nothrow) TAO_Storable_Naming_Context_Factory (context_size);
}
TAO_Persistent_Naming_Context_Factory *
TAO_Naming_Server::persistent_naming_context_factory ()
{
- return new (ACE_nothrow) TAO_Persistent_Naming_Context_Factory;
+ return new (std::nothrow) TAO_Persistent_Naming_Context_Factory;
}
int
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context_Factory.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context_Factory.cpp
index ec5923e775d..771c2bed9c2 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context_Factory.cpp
@@ -27,7 +27,7 @@ TAO_Persistent_Naming_Context_Factory::create_naming_context_impl (
{
// Construct the naming context, forwarding the map and counter even if they
// are defaulted
- return new (ACE_nothrow) TAO_Persistent_Naming_Context (poa,
+ return new (std::nothrow) TAO_Persistent_Naming_Context (poa,
poa_id,
context_index,
map,
diff --git a/TAO/tao/Var_Size_Argument_T.cpp b/TAO/tao/Var_Size_Argument_T.cpp
index 666a4831cd2..a736630c989 100644
--- a/TAO/tao/Var_Size_Argument_T.cpp
+++ b/TAO/tao/Var_Size_Argument_T.cpp
@@ -98,7 +98,7 @@ TAO::Out_Var_Size_Argument_T<S,Insert_Policy>::demarshal (
TAO_InputCDR & cdr
)
{
- this->x_ = new (ACE_nothrow) S;
+ this->x_ = new (std::nothrow) S;
return cdr >> *this->x_;
}
diff --git a/TAO/tests/POA/DSI/Database_i.cpp b/TAO/tests/POA/DSI/Database_i.cpp
index f4b2088a376..79999c36573 100644
--- a/TAO/tests/POA/DSI/Database_i.cpp
+++ b/TAO/tests/POA/DSI/Database_i.cpp
@@ -353,13 +353,13 @@ DatabaseImpl::Employee::operator delete (void *pointer)
/// Overloaded new operator, nothrow_t variant.
void *
-DatabaseImpl::Employee::operator new (size_t size, const ACE_nothrow_t &)
+DatabaseImpl::Employee::operator new (size_t size, const std::nothrow_t &)
{
return DATABASE::instance ()->malloc (size);
}
void
-DatabaseImpl::Employee::operator delete (void *ptr, const ACE_nothrow_t&) throw ()
+DatabaseImpl::Employee::operator delete (void *ptr, const std::nothrow_t&) throw ()
{
DATABASE::instance ()->free (ptr);
}
diff --git a/TAO/tests/POA/DSI/Database_i.h b/TAO/tests/POA/DSI/Database_i.h
index b9655f16600..309adea7bbd 100644
--- a/TAO/tests/POA/DSI/Database_i.h
+++ b/TAO/tests/POA/DSI/Database_i.h
@@ -101,10 +101,9 @@ public:
class Employee
{
public:
- Employee (const char* name,
- CORBA::Long id);
+ Employee (const char* name, CORBA::Long id);
- ~Employee (void);
+ ~Employee ();
const char *name () const;
void name (const char* name);
@@ -113,16 +112,16 @@ public:
void id (CORBA::Long id);
/// Overloaded new operator, nothrow_t variant.
- void *operator new (size_t bytes, const ACE_nothrow_t &nt);
- void operator delete (void *p, const ACE_nothrow_t&) throw ();
+ void *operator new (size_t bytes, const std::nothrow_t &nt);
+ void operator delete (void *p, const std::nothrow_t&) throw ();
void *operator new (size_t);
void operator delete (void *pointer);
private:
- CORBA::Long id_;
// Employee ID.
+ CORBA::Long id_;
- char *name_;
// Employee name.
+ char *name_;
};
};