summaryrefslogtreecommitdiff
path: root/ace/OS_Memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/OS_Memory.h')
-rw-r--r--ace/OS_Memory.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ace/OS_Memory.h b/ace/OS_Memory.h
index 11f1371e521..89616c74d81 100644
--- a/ace/OS_Memory.h
+++ b/ace/OS_Memory.h
@@ -69,6 +69,13 @@ typedef void *ACE_MALLOC_T;
// being used).
// ============================================================================
+// If new(std::nothrow) is defined then, by definition, new throws exceptions.
+#if defined (ACE_HAS_NEW_NOTHROW)
+# if !defined (ACE_NEW_THROWS_EXCEPTIONS)
+# define ACE_NEW_THROWS_EXCEPTIONS
+# endif
+#endif
+
#if defined (ACE_NEW_THROWS_EXCEPTIONS)
// Since new() throws exceptions, we need a way to avoid passing
@@ -121,7 +128,7 @@ typedef void *ACE_MALLOC_T;
# define ACE_bad_alloc std::bad_alloc
# define ACE_throw_bad_alloc throw ACE_bad_alloc ()
# endif /* __SUNPRO_CC < 0x500 */
-# elif defined (__BORLANDC__) || defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
+# elif defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
# include /**/ <new>
# define ACE_bad_alloc std::bad_alloc
# define ACE_nothrow std::nothrow