forked from boostorg/unordered
Merge unordered and hash.
Improved Codegear support in unordered. Another warning suppression in hash. [SVN r58223]
This commit is contained in:
@@ -38,16 +38,16 @@
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template <class Value, class Hash, class Pred, class Alloc>
|
||||
template <class T, class H, class P, class A>
|
||||
class unordered_set
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Value key_type;
|
||||
typedef Value value_type;
|
||||
typedef Hash hasher;
|
||||
typedef Pred key_equal;
|
||||
typedef Alloc allocator_type;
|
||||
typedef T key_type;
|
||||
typedef T value_type;
|
||||
typedef H hasher;
|
||||
typedef P key_equal;
|
||||
typedef A allocator_type;
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
private:
|
||||
@@ -58,7 +58,7 @@ namespace boost
|
||||
allocator_type, value_type>::type
|
||||
value_allocator;
|
||||
|
||||
typedef boost::unordered_detail::set<Hash, Pred,
|
||||
typedef boost::unordered_detail::set<H, P,
|
||||
value_allocator> types;
|
||||
typedef BOOST_DEDUCED_TYPENAME types::impl table;
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace boost
|
||||
}
|
||||
#else
|
||||
unordered_set(boost::unordered_detail::move_from<
|
||||
unordered_set<Value, Hash, Pred, Alloc>
|
||||
unordered_set<T, H, P, A>
|
||||
> other)
|
||||
: table_(other.source.table_, boost::unordered_detail::move_tag())
|
||||
{
|
||||
@@ -478,9 +478,9 @@ namespace boost
|
||||
}
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
friend bool operator==<Value, Hash, Pred, Alloc>(
|
||||
friend bool operator==<T, H, P, A>(
|
||||
unordered_set const&, unordered_set const&);
|
||||
friend bool operator!=<Value, Hash, Pred, Alloc>(
|
||||
friend bool operator!=<T, H, P, A>(
|
||||
unordered_set const&, unordered_set const&);
|
||||
#endif
|
||||
}; // class template unordered_set
|
||||
@@ -489,6 +489,9 @@ namespace boost
|
||||
inline bool operator==(unordered_set<T, H, P, A> const& m1,
|
||||
unordered_set<T, H, P, A> const& m2)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
||||
struct dummy { unordered_set<T,H,P,A> x; };
|
||||
#endif
|
||||
return m1.table_.equals(m2.table_);
|
||||
}
|
||||
|
||||
@@ -496,6 +499,9 @@ namespace boost
|
||||
inline bool operator!=(unordered_set<T, H, P, A> const& m1,
|
||||
unordered_set<T, H, P, A> const& m2)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
||||
struct dummy { unordered_set<T,H,P,A> x; };
|
||||
#endif
|
||||
return !m1.table_.equals(m2.table_);
|
||||
}
|
||||
|
||||
@@ -503,19 +509,22 @@ namespace boost
|
||||
inline void swap(unordered_set<T, H, P, A> &m1,
|
||||
unordered_set<T, H, P, A> &m2)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
||||
struct dummy { unordered_set<T,H,P,A> x; };
|
||||
#endif
|
||||
m1.swap(m2);
|
||||
}
|
||||
|
||||
template <class Value, class Hash, class Pred, class Alloc>
|
||||
template <class T, class H, class P, class A>
|
||||
class unordered_multiset
|
||||
{
|
||||
public:
|
||||
|
||||
typedef Value key_type;
|
||||
typedef Value value_type;
|
||||
typedef Hash hasher;
|
||||
typedef Pred key_equal;
|
||||
typedef Alloc allocator_type;
|
||||
typedef T key_type;
|
||||
typedef T value_type;
|
||||
typedef H hasher;
|
||||
typedef P key_equal;
|
||||
typedef A allocator_type;
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
private:
|
||||
@@ -526,7 +535,7 @@ namespace boost
|
||||
allocator_type, value_type>::type
|
||||
value_allocator;
|
||||
|
||||
typedef boost::unordered_detail::multiset<Hash, Pred,
|
||||
typedef boost::unordered_detail::multiset<H, P,
|
||||
value_allocator> types;
|
||||
typedef BOOST_DEDUCED_TYPENAME types::impl table;
|
||||
|
||||
@@ -640,7 +649,7 @@ namespace boost
|
||||
}
|
||||
#else
|
||||
unordered_multiset(boost::unordered_detail::move_from<
|
||||
unordered_multiset<Value, Hash, Pred, Alloc>
|
||||
unordered_multiset<T, H, P, A>
|
||||
> other)
|
||||
: table_(other.source.table_, boost::unordered_detail::move_tag())
|
||||
{
|
||||
@@ -943,9 +952,9 @@ namespace boost
|
||||
}
|
||||
|
||||
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
||||
friend bool operator==<Value, Hash, Pred, Alloc>(
|
||||
friend bool operator==<T, H, P, A>(
|
||||
unordered_multiset const&, unordered_multiset const&);
|
||||
friend bool operator!=<Value, Hash, Pred, Alloc>(
|
||||
friend bool operator!=<T, H, P, A>(
|
||||
unordered_multiset const&, unordered_multiset const&);
|
||||
#endif
|
||||
}; // class template unordered_multiset
|
||||
@@ -954,6 +963,9 @@ namespace boost
|
||||
inline bool operator==(unordered_multiset<T, H, P, A> const& m1,
|
||||
unordered_multiset<T, H, P, A> const& m2)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
||||
struct dummy { unordered_multiset<T,H,P,A> x; };
|
||||
#endif
|
||||
return m1.table_.equals(m2.table_);
|
||||
}
|
||||
|
||||
@@ -961,6 +973,9 @@ namespace boost
|
||||
inline bool operator!=(unordered_multiset<T, H, P, A> const& m1,
|
||||
unordered_multiset<T, H, P, A> const& m2)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
||||
struct dummy { unordered_multiset<T,H,P,A> x; };
|
||||
#endif
|
||||
return !m1.table_.equals(m2.table_);
|
||||
}
|
||||
|
||||
@@ -968,6 +983,9 @@ namespace boost
|
||||
inline void swap(unordered_multiset<T, H, P, A> &m1,
|
||||
unordered_multiset<T, H, P, A> &m2)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
||||
struct dummy { unordered_multiset<T,H,P,A> x; };
|
||||
#endif
|
||||
m1.swap(m2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user