From 1652ce786e3f76875cfa9008ac83682c4828d6a6 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sun, 6 Jun 2021 10:29:02 +0200 Subject: All compilers we support provide ACE_HAS_NEW_NOTHROW * ACE/ace/CORBA_macros.h: * ACE/ace/OS_Memory.h: * ACE/ace/README: * ACE/ace/Svc_Handler.cpp: * ACE/ace/Svc_Handler.h: * ACE/ace/config-all.h: * ACE/ace/config-g++-common.h: * ACE/ace/config-hpux-11.00.h: * ACE/ace/config-lynxos.h: * ACE/ace/config-sunos5.5.h: * ACE/ace/config-win32-borland.h: * ACE/ace/config-win32-msvc-14.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: --- ACE/tests/DLL_Test_Impl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ACE/tests/DLL_Test_Impl.cpp') diff --git a/ACE/tests/DLL_Test_Impl.cpp b/ACE/tests/DLL_Test_Impl.cpp index 06b093a852d..8d323651131 100644 --- a/ACE/tests/DLL_Test_Impl.cpp +++ b/ACE/tests/DLL_Test_Impl.cpp @@ -52,8 +52,7 @@ Hello_Impl::operator new (size_t bytes) return ::new char[bytes]; } -#if defined (ACE_HAS_NEW_NOTHROW) - /// Overloaded new operator, nothrow_t variant. +/// Overloaded new operator, nothrow_t variant. void * Hello_Impl::operator new (size_t bytes, const ACE_nothrow_t &nt) { @@ -68,8 +67,6 @@ Hello_Impl::operator delete (void *ptr, const ACE_nothrow_t&) throw () ::delete [] static_cast (ptr); } -#endif /* ACE_HAS_NEW_NOTHROW */ - void Hello_Impl::operator delete (void *ptr) { -- cgit v1.2.1 From a436568e52a5a78afe7b039b4c6b1e089369eba6 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sun, 6 Jun 2021 18:04:12 +0200 Subject: 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: --- ACE/tests/DLL_Test_Impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ACE/tests/DLL_Test_Impl.cpp') 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 (ptr); -- cgit v1.2.1