summaryrefslogtreecommitdiff
path: root/boost/container/detail/pair.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/container/detail/pair.hpp')
-rw-r--r--boost/container/detail/pair.hpp41
1 files changed, 31 insertions, 10 deletions
diff --git a/boost/container/detail/pair.hpp b/boost/container/detail/pair.hpp
index 2a20ed13ec..b7ad84c80e 100644
--- a/boost/container/detail/pair.hpp
+++ b/boost/container/detail/pair.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2005-2012.
+// (C) Copyright Ion Gaztanaga 2005-2013.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -13,11 +13,11 @@
#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_HPP
#define BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
-#include "config_begin.hpp"
+#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
#include <boost/container/detail/mpl.hpp>
@@ -26,9 +26,10 @@
#include <boost/container/detail/type_traits.hpp>
#include <utility> //std::pair
+#include <algorithm> //std::swap
+
+#include <boost/move/utility_core.hpp>
-#include <boost/move/move.hpp>
-#include <boost/type_traits/is_class.hpp>
#ifndef BOOST_CONTAINER_PERFECT_FORWARDING
#include <boost/container/detail/preprocessor.hpp>
@@ -329,22 +330,42 @@ struct is_enum< ::boost::container::container_detail::pair<T, U> >
static const bool value = false;
};
+template <class T>
+struct is_class;
+
//This specialization is needed to avoid instantiation of pair in
//is_class, and allow recursive maps.
template <class T1, class T2>
struct is_class< ::boost::container::container_detail::pair<T1, T2> >
- : public ::boost::true_type
-{};
+{
+ static const bool value = true;
+};
-#ifdef BOOST_NO_RVALUE_REFERENCES
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
template<class T1, class T2>
struct has_move_emulation_enabled< ::boost::container::container_detail::pair<T1, T2> >
- : ::boost::true_type
-{};
+{
+ static const bool value = true;
+};
#endif
+namespace move_detail{
+
+template<class T>
+struct is_class_or_union;
+
+template <class T1, class T2>
+struct is_class_or_union< ::boost::container::container_detail::pair<T1, T2> >
+//This specialization is needed to avoid instantiation of pair in
+//is_class, and allow recursive maps.
+{
+ static const bool value = true;
+};
+
+
+} //namespace move_detail{
} //namespace boost {