aboutsummaryrefslogtreecommitdiff
path: root/odb/details/shared-ptr/base.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-06-15 18:50:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-06-15 18:50:51 +0200
commit13dd928ae18ef9610bc820b7b3e65629addea1d2 (patch)
treed9ee8ef03e3ee5a3be9925de08537b03cf29320b /odb/details/shared-ptr/base.ixx
parentb33321c4d05c0ac759bf3fcf647a568af8bfca0c (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.ixx')
-rw-r--r--odb/details/shared-ptr/base.ixx18
1 files changed, 16 insertions, 2 deletions
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);
}