From 13dd928ae18ef9610bc820b7b3e65629addea1d2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jun 2016 18:50:51 +0200 Subject: Get rid of C++11 deprecation warnings for auto_ptr, exception specs In particular, std::auto_ptr is no longer mapped in C++11. --- odb/details/shared-ptr/base.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'odb/details/shared-ptr/base.cxx') diff --git a/odb/details/shared-ptr/base.cxx b/odb/details/shared-ptr/base.cxx index b95797b..5bfc0af 100644 --- a/odb/details/shared-ptr/base.cxx +++ b/odb/details/shared-ptr/base.cxx @@ -15,7 +15,7 @@ namespace odb share exclusive = share (2); const char* not_shared:: - what () const throw () + what () const ODB_NOTHROW_NOEXCEPT { return "object is not shared"; } @@ -54,7 +54,11 @@ namespace odb } void* +#ifdef ODB_CXX11 +operator new (size_t n, odb::details::share s) +#else operator new (size_t n, odb::details::share s) throw (std::bad_alloc) +#endif { if (s == odb::details::shared) { @@ -74,7 +78,7 @@ operator new (size_t n, odb::details::share s) throw (std::bad_alloc) } void -operator delete (void* p, odb::details::share s) throw () +operator delete (void* p, odb::details::share s) ODB_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