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.ixx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'odb/details/shared-ptr/base.ixx') diff --git a/odb/details/shared-ptr/base.ixx b/odb/details/shared-ptr/base.ixx index 9bf7c94..3ed1339 100644 --- a/odb/details/shared-ptr/base.ixx +++ b/odb/details/shared-ptr/base.ixx @@ -63,6 +63,19 @@ namespace odb return counter_; } +#ifdef ODB_CXX11 + inline void* shared_base:: + operator new (std::size_t n) + { + return ::operator new (n); + } + + inline void* shared_base:: + operator new (std::size_t n, share) + { + return ::operator new (n); + } +#else inline void* shared_base:: operator new (std::size_t n) throw (std::bad_alloc) { @@ -74,15 +87,16 @@ namespace odb { return ::operator new (n); } +#endif inline void shared_base:: - operator delete (void* p, share) throw () + operator delete (void* p, share) ODB_NOTHROW_NOEXCEPT { ::operator delete (p); } inline void shared_base:: - operator delete (void* p) throw () + operator delete (void* p) ODB_NOTHROW_NOEXCEPT { ::operator delete (p); } -- cgit v1.1