|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72905 - in trunk: boost/unordered boost/unordered/detail libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2011-07-04 17:52:18
Author: danieljames
Date: 2011-07-04 17:52:17 EDT (Mon, 04 Jul 2011)
New Revision: 72905
URL: http://svn.boost.org/trac/boost/changeset/72905
Log:
Unordered: Import functions into boost namespace.
Text files modified:
trunk/boost/unordered/detail/fwd.hpp | 37 -------------------------------------
trunk/boost/unordered/unordered_map_fwd.hpp | 26 ++++++++++++++++++++++++++
trunk/boost/unordered/unordered_set_fwd.hpp | 26 ++++++++++++++++++++++++++
trunk/libs/unordered/test/unordered/compile_tests.hpp | 3 +++
4 files changed, 55 insertions(+), 37 deletions(-)
Modified: trunk/boost/unordered/detail/fwd.hpp
==============================================================================
--- trunk/boost/unordered/detail/fwd.hpp (original)
+++ trunk/boost/unordered/detail/fwd.hpp 2011-07-04 17:52:17 EDT (Mon, 04 Jul 2011)
@@ -25,15 +25,6 @@
class P = std::equal_to<K>,
class A = std::allocator<std::pair<const K, T> > >
class unordered_map;
- template <class K, class T, class H, class P, class A>
- inline bool operator==(unordered_map<K, T, H, P, A> const&,
- unordered_map<K, T, H, P, A> const&);
- template <class K, class T, class H, class P, class A>
- inline bool operator!=(unordered_map<K, T, H, P, A> const&,
- unordered_map<K, T, H, P, A> const&);
- template <class K, class T, class H, class P, class A>
- inline void swap(unordered_map<K, T, H, P, A>&,
- unordered_map<K, T, H, P, A>&);
template <class K,
class T,
@@ -41,46 +32,18 @@
class P = std::equal_to<K>,
class A = std::allocator<std::pair<const K, T> > >
class unordered_multimap;
- template <class K, class T, class H, class P, class A>
- inline bool operator==(unordered_multimap<K, T, H, P, A> const&,
- unordered_multimap<K, T, H, P, A> const&);
- template <class K, class T, class H, class P, class A>
- inline bool operator!=(unordered_multimap<K, T, H, P, A> const&,
- unordered_multimap<K, T, H, P, A> const&);
- template <class K, class T, class H, class P, class A>
- inline void swap(unordered_multimap<K, T, H, P, A>&,
- unordered_multimap<K, T, H, P, A>&);
template <class T,
class H = hash<T>,
class P = std::equal_to<T>,
class A = std::allocator<T> >
class unordered_set;
- template <class T, class H, class P, class A>
- inline bool operator==(unordered_set<T, H, P, A> const&,
- unordered_set<T, H, P, A> const&);
- template <class T, class H, class P, class A>
- inline bool operator!=(unordered_set<T, H, P, A> const&,
- unordered_set<T, H, P, A> const&);
- template <class T, class H, class P, class A>
- inline void swap(unordered_set<T, H, P, A> &m1,
- unordered_set<T, H, P, A> &m2);
template <class T,
class H = hash<T>,
class P = std::equal_to<T>,
class A = std::allocator<T> >
class unordered_multiset;
- template <class T, class H, class P, class A>
- inline bool operator==(unordered_multiset<T, H, P, A> const&,
- unordered_multiset<T, H, P, A> const&);
- template <class T, class H, class P, class A>
- inline bool operator!=(unordered_multiset<T, H, P, A> const&,
- unordered_multiset<T, H, P, A> const&);
- template <class T, class H, class P, class A>
- inline void swap(unordered_multiset<T, H, P, A> &m1,
- unordered_multiset<T, H, P, A> &m2);
-
}
}
Modified: trunk/boost/unordered/unordered_map_fwd.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map_fwd.hpp (original)
+++ trunk/boost/unordered/unordered_map_fwd.hpp 2011-07-04 17:52:17 EDT (Mon, 04 Jul 2011)
@@ -14,8 +14,34 @@
namespace boost
{
+ namespace unordered
+ {
+ template <class K, class T, class H, class P, class A>
+ inline bool operator==(unordered_map<K, T, H, P, A> const&,
+ unordered_map<K, T, H, P, A> const&);
+ template <class K, class T, class H, class P, class A>
+ inline bool operator!=(unordered_map<K, T, H, P, A> const&,
+ unordered_map<K, T, H, P, A> const&);
+ template <class K, class T, class H, class P, class A>
+ inline void swap(unordered_map<K, T, H, P, A>&,
+ unordered_map<K, T, H, P, A>&);
+
+ template <class K, class T, class H, class P, class A>
+ inline bool operator==(unordered_multimap<K, T, H, P, A> const&,
+ unordered_multimap<K, T, H, P, A> const&);
+ template <class K, class T, class H, class P, class A>
+ inline bool operator!=(unordered_multimap<K, T, H, P, A> const&,
+ unordered_multimap<K, T, H, P, A> const&);
+ template <class K, class T, class H, class P, class A>
+ inline void swap(unordered_multimap<K, T, H, P, A>&,
+ unordered_multimap<K, T, H, P, A>&);
+ }
+
using ::boost::unordered::unordered_map;
using ::boost::unordered::unordered_multimap;
+ using ::boost::unordered::swap;
+ using ::boost::unordered::operator==;
+ using ::boost::unordered::operator!=;
}
#endif
Modified: trunk/boost/unordered/unordered_set_fwd.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set_fwd.hpp (original)
+++ trunk/boost/unordered/unordered_set_fwd.hpp 2011-07-04 17:52:17 EDT (Mon, 04 Jul 2011)
@@ -14,8 +14,34 @@
namespace boost
{
+ namespace unordered
+ {
+ template <class T, class H, class P, class A>
+ inline bool operator==(unordered_set<T, H, P, A> const&,
+ unordered_set<T, H, P, A> const&);
+ template <class T, class H, class P, class A>
+ inline bool operator!=(unordered_set<T, H, P, A> const&,
+ unordered_set<T, H, P, A> const&);
+ template <class T, class H, class P, class A>
+ inline void swap(unordered_set<T, H, P, A> &m1,
+ unordered_set<T, H, P, A> &m2);
+
+ template <class T, class H, class P, class A>
+ inline bool operator==(unordered_multiset<T, H, P, A> const&,
+ unordered_multiset<T, H, P, A> const&);
+ template <class T, class H, class P, class A>
+ inline bool operator!=(unordered_multiset<T, H, P, A> const&,
+ unordered_multiset<T, H, P, A> const&);
+ template <class T, class H, class P, class A>
+ inline void swap(unordered_multiset<T, H, P, A> &m1,
+ unordered_multiset<T, H, P, A> &m2);
+ }
+
using ::boost::unordered::unordered_set;
using ::boost::unordered::unordered_multiset;
+ using ::boost::unordered::swap;
+ using ::boost::unordered::operator==;
+ using ::boost::unordered::operator!=;
}
#endif
Modified: trunk/libs/unordered/test/unordered/compile_tests.hpp
==============================================================================
--- trunk/libs/unordered/test/unordered/compile_tests.hpp (original)
+++ trunk/libs/unordered/test/unordered/compile_tests.hpp 2011-07-04 17:52:17 EDT (Mon, 04 Jul 2011)
@@ -129,6 +129,7 @@
test::check_return_type<const_iterator>::equals(a_const.cend());
a.swap(b);
+ boost::swap(a, b);
test::check_return_type<X>::equals_ref(r = a);
test::check_return_type<size_type>::equals(a.size());
test::check_return_type<size_type>::equals(a.max_size());
@@ -180,6 +181,8 @@
test::check_return_type<bool>::equals(a == b);
test::check_return_type<bool>::equals(a != b);
+ test::check_return_type<bool>::equals(boost::operator==(a, b));
+ test::check_return_type<bool>::equals(boost::operator!=(a, b));
}
template <class X, class T>
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