diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-15 18:50:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-06-15 18:50:51 +0200 |
commit | 13dd928ae18ef9610bc820b7b3e65629addea1d2 (patch) | |
tree | d9ee8ef03e3ee5a3be9925de08537b03cf29320b /odb/details/shared-ptr/base.hxx | |
parent | b33321c4d05c0ac759bf3fcf647a568af8bfca0c (diff) |
Get rid of C++11 deprecation warnings for auto_ptr, exception specs
In particular, std::auto_ptr is no longer mapped in C++11.
Diffstat (limited to 'odb/details/shared-ptr/base.hxx')
-rw-r--r-- | odb/details/shared-ptr/base.hxx | 20 |
1 files changed, 17 insertions, 3 deletions
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 <new> #include <cstddef> // std::size_t +#include <odb/details/config.hxx> // ODB_CXX11, ODB_NOTHROW_NOEXCEPT #include <odb/details/export.hxx> #include <odb/details/shared-ptr/counter-type.hxx> @@ -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 { |