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.hxx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'odb/details/shared-ptr/base.hxx') diff --git a/odb/details/shared-ptr/base.hxx b/odb/details/shared-ptr/base.hxx index 4a38945..90053e8 100644 --- a/odb/details/shared-ptr/base.hxx +++ b/odb/details/shared-ptr/base.hxx @@ -10,6 +10,7 @@ #include #include // std::size_t +#include // ODB_CXX11, ODB_NOTHROW_NOEXCEPT #include #include @@ -34,11 +35,16 @@ namespace odb } } +#ifdef ODB_CXX11 +LIBODB_EXPORT void* +operator new (std::size_t, odb::details::share); +#else LIBODB_EXPORT void* operator new (std::size_t, odb::details::share) throw (std::bad_alloc); +#endif LIBODB_EXPORT void -operator delete (void*, odb::details::share) throw (); +operator delete (void*, odb::details::share) ODB_NOTHROW_NOEXCEPT; namespace odb { @@ -61,17 +67,25 @@ namespace odb std::size_t _ref_count () const; +#ifdef ODB_CXX11 + void* + operator new (std::size_t); + + void* + operator new (std::size_t, share); +#else void* operator new (std::size_t) throw (std::bad_alloc); void* operator new (std::size_t, share) throw (std::bad_alloc); +#endif void - operator delete (void*, share) throw (); + operator delete (void*, share) ODB_NOTHROW_NOEXCEPT; void - operator delete (void*) throw (); + operator delete (void*) ODB_NOTHROW_NOEXCEPT; struct refcount_callback { -- cgit v1.1