@@ -541,24 +541,6 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
: is_copy_constructible<_Tp>
{ };
- // Used to allow copy construction of unordered containers
- template<bool> struct __allow_copy_cons { };
-
- // Used to delete copy constructor of unordered containers
- template<>
- struct __allow_copy_cons<false>
- {
- __allow_copy_cons() = default;
- __allow_copy_cons(const __allow_copy_cons&) = delete;
- __allow_copy_cons(__allow_copy_cons&&) = default;
- __allow_copy_cons& operator=(const __allow_copy_cons&) = default;
- __allow_copy_cons& operator=(__allow_copy_cons&&) = default;
- };
-
- template<typename _Alloc>
- using __check_copy_constructible
- = __allow_copy_cons<__is_copy_insertable<_Alloc>::value>;
-
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
@@ -95,7 +95,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Key>,
class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
- class unordered_map : __check_copy_constructible<_Alloc>
+ class unordered_map
{
typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
_Hashtable _M_h;
@@ -807,7 +807,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Key>,
class _Pred = std::equal_to<_Key>,
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
- class unordered_multimap : __check_copy_constructible<_Alloc>
+ class unordered_multimap
{
typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
_Hashtable _M_h;
@@ -90,7 +90,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
- class unordered_set : __check_copy_constructible<_Alloc>
+ class unordered_set
{
typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
_Hashtable _M_h;
@@ -725,7 +725,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
- class unordered_multiset : __check_copy_constructible<_Alloc>
+ class unordered_multiset
{
typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
_Hashtable _M_h;
@@ -42,28 +42,3 @@ void test01()
v.emplace_back(uim());
}
-// Unordered containers don't use allocator_traits yet so need full
-// Allocator interface, derive from std::allocator to get it.
-template<typename T, bool R>
-struct Alloc : std::allocator<T>
-{
- template<typename U>
- struct rebind { typedef Alloc<U, R> other; };
-
- Alloc() = default;
-
- template<typename U>
- Alloc(const Alloc<U, R>&) { }
-
- typedef typename std::conditional<R, T&&, const T&>::type arg_type;
-
- void construct(T* p, arg_type) const
- { new((void*)p) T(); }
-};
-
-// verify is_copy_constructible depends on allocator
-typedef test_type<Alloc<MoveOnly, true>> uim_rval;
-static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
-
-typedef test_type<Alloc<MoveOnly, false>> uim_lval;
-static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
@@ -41,29 +41,3 @@ void test01()
std::vector<uim> v;
v.emplace_back(uim());
}
-
-// Unordered containers don't use allocator_traits yet so need full
-// Allocator interface, derive from std::allocator to get it.
-template<typename T, bool R>
-struct Alloc : std::allocator<T>
-{
- template<typename U>
- struct rebind { typedef Alloc<U, R> other; };
-
- Alloc() = default;
-
- template<typename U>
- Alloc(const Alloc<U, R>&) { }
-
- typedef typename std::conditional<R, T&&, const T&>::type arg_type;
-
- void construct(T* p, arg_type) const
- { new((void*)p) T(); }
-};
-
-// verify is_copy_constructible depends on allocator
-typedef test_type<Alloc<MoveOnly, true>> uim_rval;
-static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
-
-typedef test_type<Alloc<MoveOnly, false>> uim_lval;
-static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
@@ -45,29 +45,3 @@ void test01()
std::vector<uim> v;
v.emplace_back(uim());
}
-
-// Unordered containers don't use allocator_traits yet so need full
-// Allocator interface, derive from std::allocator to get it.
-template<typename T, bool R>
-struct Alloc : std::allocator<T>
-{
- template<typename U>
- struct rebind { typedef Alloc<U, R> other; };
-
- Alloc() = default;
-
- template<typename U>
- Alloc(const Alloc<U, R>&) { }
-
- typedef typename std::conditional<R, T&&, const T&>::type arg_type;
-
- void construct(T* p, arg_type) const
- { new((void*)p) T(); }
-};
-
-// verify is_copy_constructible depends on allocator
-typedef test_type<Alloc<MoveOnly, true>> uim_rval;
-static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
-
-typedef test_type<Alloc<MoveOnly, false>> uim_lval;
-static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
@@ -45,29 +45,3 @@ void test01()
std::vector<uim> v;
v.emplace_back(uim());
}
-
-// Unordered containers don't use allocator_traits yet so need full
-// Allocator interface, derive from std::allocator to get it.
-template<typename T, bool R>
-struct Alloc : std::allocator<T>
-{
- template<typename U>
- struct rebind { typedef Alloc<U, R> other; };
-
- Alloc() = default;
-
- template<typename U>
- Alloc(const Alloc<U, R>&) { }
-
- typedef typename std::conditional<R, T&&, const T&>::type arg_type;
-
- void construct(T* p, arg_type) const
- { new((void*)p) T(); }
-};
-
-// verify is_copy_constructible depends on allocator
-typedef test_type<Alloc<MoveOnly, true>> uim_rval;
-static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
-
-typedef test_type<Alloc<MoveOnly, false>> uim_lval;
-static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");