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/lazy-ptr.hxx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'odb/lazy-ptr.hxx') diff --git a/odb/lazy-ptr.hxx b/odb/lazy-ptr.hxx index ccc6c3c..2fca33a 100644 --- a/odb/lazy-ptr.hxx +++ b/odb/lazy-ptr.hxx @@ -116,6 +116,7 @@ namespace odb // std::auto_ptr lazy version. // +#ifndef ODB_CXX11 template struct lazy_auto_ptr_ref { @@ -203,11 +204,7 @@ namespace odb template void reset (DB&, T*); template void reset (DB&, std::auto_ptr&); -#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT - template -#else template -#endif typename object_traits::id_type object_id () const; database_type& database () const; @@ -223,6 +220,7 @@ namespace odb mutable std::auto_ptr p_; mutable lazy_ptr_impl i_; }; +#endif #ifdef ODB_CXX11 @@ -251,7 +249,7 @@ namespace odb lazy_unique_ptr (lazy_unique_ptr&&) /*noexcept*/; template lazy_unique_ptr (lazy_unique_ptr&&) /*noexcept*/; - template lazy_unique_ptr (std::auto_ptr&&) /*noexcept*/; + //template lazy_unique_ptr (std::auto_ptr&&) /*noexcept*/; #ifdef ODB_CXX11_NULLPTR lazy_unique_ptr& operator= (std::nullptr_t) /*noexcept*/; @@ -325,12 +323,12 @@ namespace odb template lazy_unique_ptr (DB&, pointer, const deleter_type&); template lazy_unique_ptr (DB&, pointer, deleter_type&&); template lazy_unique_ptr (DB&, std::unique_ptr&&); - template lazy_unique_ptr (DB&, std::auto_ptr&&); + //template lazy_unique_ptr (DB&, std::auto_ptr&&); template void reset (DB&, const ID&); template void reset (DB&, pointer); template void reset (DB&, std::unique_ptr&&); - template void reset (DB&, std::auto_ptr&&); + //template void reset (DB&, std::auto_ptr&&); #ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT template @@ -413,7 +411,7 @@ namespace odb lazy_shared_ptr (lazy_shared_ptr&&) /*noexcept*/; template lazy_shared_ptr (lazy_shared_ptr&&) /*noexcept*/; template explicit lazy_shared_ptr (const lazy_weak_ptr&); - template explicit lazy_shared_ptr (std::auto_ptr&&); + //template explicit lazy_shared_ptr (std::auto_ptr&&); template lazy_shared_ptr (std::unique_ptr&&); ~lazy_shared_ptr (); @@ -422,7 +420,7 @@ namespace odb template lazy_shared_ptr& operator= (const lazy_shared_ptr&) /*noexcept*/; lazy_shared_ptr& operator= (lazy_shared_ptr&&) /*noexcept*/; template lazy_shared_ptr& operator= (lazy_shared_ptr&&) /*noexcept*/; - template lazy_shared_ptr& operator= (std::auto_ptr&&); + //template lazy_shared_ptr& operator= (std::auto_ptr&&); template lazy_shared_ptr& operator= (std::unique_ptr&&); void swap (lazy_shared_ptr&) /*noexcept*/; @@ -488,7 +486,7 @@ namespace odb template lazy_shared_ptr (DB&, Y*); template lazy_shared_ptr (DB&, Y*, D); template lazy_shared_ptr (DB&, Y*, D, A); - template lazy_shared_ptr (DB&, std::auto_ptr&&); + //template lazy_shared_ptr (DB&, std::auto_ptr&&); template lazy_shared_ptr (DB&, const std::shared_ptr&); template lazy_shared_ptr (DB&, std::shared_ptr&&); template lazy_shared_ptr (DB&, const std::weak_ptr&); @@ -497,7 +495,7 @@ namespace odb template void reset (DB&, Y*); template void reset (DB&, Y*, D); template void reset (DB&, Y*, D, A); - template void reset (DB&, std::auto_ptr&&); + //template void reset (DB&, std::auto_ptr&&); template void reset (DB&, const std::shared_ptr&); template void reset (DB&, std::shared_ptr&&); @@ -661,7 +659,10 @@ namespace odb namespace common { using odb::lazy_ptr; + +#ifndef ODB_CXX11 using odb::lazy_auto_ptr; +#endif #ifdef ODB_CXX11 using odb::lazy_unique_ptr; -- cgit v1.1