From 44fde85b2496750b78939247d1d19a67c5b3dc71 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 14 Nov 2016 15:24:14 +0200 Subject: C++11-compatibility fixes and improvements --- cutl/shared-ptr/base.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cutl/shared-ptr/base.cxx') diff --git a/cutl/shared-ptr/base.cxx b/cutl/shared-ptr/base.cxx index 1ff8469..4541e39 100644 --- a/cutl/shared-ptr/base.cxx +++ b/cutl/shared-ptr/base.cxx @@ -16,7 +16,7 @@ cutl::share exclusive = cutl::share (2); namespace cutl { char const* not_shared:: - what () const throw () + what () const LIBCUTL_NOTHROW_NOEXCEPT { return "object is not shared"; } @@ -25,7 +25,10 @@ namespace cutl // // void* -operator new (size_t n, cutl::share s) throw (std::bad_alloc) +operator new (size_t n, cutl::share s) +#ifndef LIBCUTL_CXX11 + throw (std::bad_alloc) +#endif { if (s == shared) { @@ -45,7 +48,7 @@ operator new (size_t n, cutl::share s) throw (std::bad_alloc) } void -operator delete (void* p, cutl::share s) throw () +operator delete (void* p, cutl::share s) LIBCUTL_NOTHROW_NOEXCEPT { // This version of operator delete is only called when the c-tor // fails. In this case there is no object and we can just free the -- cgit v1.1