|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-07-13 15:26:26
Author: danieljames
Date: 2008-07-13 15:26:26 EDT (Sun, 13 Jul 2008)
New Revision: 47396
URL: http://svn.boost.org/trac/boost/changeset/47396
Log:
Use the container_fwd header from Boost.Hash
Text files modified:
sandbox/move/boost/move/detail/has_swap_overload.hpp | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
Modified: sandbox/move/boost/move/detail/has_swap_overload.hpp
==============================================================================
--- sandbox/move/boost/move/detail/has_swap_overload.hpp (original)
+++ sandbox/move/boost/move/detail/has_swap_overload.hpp 2008-07-13 15:26:26 EDT (Sun, 13 Jul 2008)
@@ -9,6 +9,7 @@
# include <boost/mpl/aux_/lambda_support.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/detail/workaround.hpp>
+# include <boost/functional/detail/container_fwd.hpp>
// Must be the last include
# include <boost/type_traits/detail/bool_trait_def.hpp>
@@ -25,14 +26,6 @@
// std::vector.
template <class T>
char stdIsAnAssociatedNamespace(T const&, int);
-
- // Forward declare some known types that have a fast swap. Also
- // illegal last I checked.
- template <class T, class A> class vector;
- template <class T, class A> class deque;
- template <class T, class A> class list;
- template <class T, class A, class C> class set;
- template <class T, class U, class C, class A> class map;
}
namespace boost { namespace detail {
@@ -129,6 +122,8 @@
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_swap_overload,(T))
};
+template <class Char, class Traits, class A>
+struct has_swap_overload<std::basic_string<Char, Traits, A> > : mpl::true_{};
template <class T, class A>
struct has_swap_overload<std::vector<T,A> > : mpl::true_{};
@@ -142,9 +137,15 @@
template <class T, class A, class C>
struct has_swap_overload<std::set<T,A,C> > : mpl::true_{};
+template <class T, class A, class C>
+struct has_swap_overload<std::multiset<T,A,C> > : mpl::true_{};
+
template <class K, class V, class C, class A>
struct has_swap_overload<std::map<K,V,C,A> > : mpl::true_{};
+template <class K, class V, class C, class A>
+struct has_swap_overload<std::multimap<K,V,C,A> > : mpl::true_{};
+
} // namespace detail
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::has_swap_overload)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk