summaryrefslogtreecommitdiff
path: root/boost/ptr_container/detail/associative_ptr_container.hpp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:12:59 +0900
commitb8cf34c691623e4ec329053cbbf68522a855882d (patch)
tree34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/ptr_container/detail/associative_ptr_container.hpp
parent3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff)
downloadboost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz
boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2
boost-b8cf34c691623e4ec329053cbbf68522a855882d.zip
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/ptr_container/detail/associative_ptr_container.hpp')
-rw-r--r--boost/ptr_container/detail/associative_ptr_container.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/boost/ptr_container/detail/associative_ptr_container.hpp b/boost/ptr_container/detail/associative_ptr_container.hpp
index c2033fa39d..a170fb727d 100644
--- a/boost/ptr_container/detail/associative_ptr_container.hpp
+++ b/boost/ptr_container/detail/associative_ptr_container.hpp
@@ -18,6 +18,12 @@
#endif
#include <boost/ptr_container/detail/reversible_ptr_container.hpp>
+#include <boost/ptr_container/detail/ptr_container_disable_deprecated.hpp>
+
+#if defined(BOOST_PTR_CONTAINER_DISABLE_DEPRECATED)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
namespace boost
{
@@ -103,10 +109,18 @@ namespace ptr_container_detail
: base_type( first, last, hash, pred, a )
{ }
+#ifndef BOOST_NO_AUTO_PTR
template< class PtrContainer >
explicit associative_ptr_container( std::auto_ptr<PtrContainer> r )
: base_type( r )
{ }
+#endif
+#ifndef BOOST_NO_CXX11_SMART_PTR
+ template< class PtrContainer >
+ explicit associative_ptr_container( std::unique_ptr<PtrContainer> r )
+ : base_type( std::move( r ) )
+ { }
+#endif
associative_ptr_container( const associative_ptr_container& r )
: base_type( r.begin(), r.end(), container_type() )
@@ -117,12 +131,22 @@ namespace ptr_container_detail
: base_type( r.begin(), r.end(), container_type() )
{ }
+#ifndef BOOST_NO_AUTO_PTR
template< class PtrContainer >
associative_ptr_container& operator=( std::auto_ptr<PtrContainer> r ) // nothrow
{
base_type::operator=( r );
return *this;
}
+#endif
+#ifndef BOOST_NO_CXX11_SMART_PTR
+ template< class PtrContainer >
+ associative_ptr_container& operator=( std::unique_ptr<PtrContainer> r ) // nothrow
+ {
+ base_type::operator=( std::move( r ) );
+ return *this;
+ }
+#endif
associative_ptr_container& operator=( associative_ptr_container r ) // strong
{
@@ -407,5 +431,8 @@ namespace ptr_container_detail
} // namespace 'boost'
+#if defined(BOOST_PTR_CONTAINER_DISABLE_DEPRECATED)
+#pragma GCC diagnostic pop
+#endif
#endif