summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/unordered_set.h
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2013-01-16 23:56:00 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2013-01-16 23:56:00 +0000
commitb7202baf14d76d3647721cd3b42019dc0d9b3d26 (patch)
tree9dc2e2bab905cf6f9951684712378f6af4f9ff90 /libstdc++-v3/include/bits/unordered_set.h
parent9b940c6dd781581de1493d658182be58d2b4a93d (diff)
downloadgcc-b7202baf14d76d3647721cd3b42019dc0d9b3d26.tar.gz
PR libstdc++/55043 (again)
PR libstdc++/55043 (again) * include/bits/alloc_traits.h (allocator_traits::construct): Disable unless construction would be well-formed. (__allow_copy_cons, __check_copy_constructible): Define. * include/bits/unordered_map.h (__check_copy_constructible): Use as base class so copy constructor will be deleted if appropriate. (is_copy_constructible): Remove specialization. * include/bits/unordered_set.h: Likewise. * include/debug/unordered_map.h: Undo previous commit. Default copy and move constructors. * include/debug/unordered_set.h: Likewise. * include/profile/unordered_map.h: Undo previous commit. * include/profile/unordered_set.h: Likewise. * testsuite/23_containers/unordered_map/55043.cc: Fix test. * testsuite/23_containers/unordered_multimap/55043.cc: Likewise. * testsuite/23_containers/unordered_multiset/55043.cc: Likewise. * testsuite/23_containers/unordered_set/55043.cc: Likewise. * testsuite/23_containers/unordered_map/requirements/53339.cc: XFAIL, cannot support incomplete types. * testsuite/23_containers/unordered_multimap/requirements/53339.cc: Likewise. From-SVN: r195253
Diffstat (limited to 'libstdc++-v3/include/bits/unordered_set.h')
-rw-r--r--libstdc++-v3/include/bits/unordered_set.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h
index 2ada63dcde6..50c233d0595 100644
--- a/libstdc++-v3/include/bits/unordered_set.h
+++ b/libstdc++-v3/include/bits/unordered_set.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
+ class unordered_set : __check_copy_constructible<_Alloc>
{
typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
_Hashtable _M_h;
@@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
class _Hash = hash<_Value>,
class _Pred = std::equal_to<_Value>,
class _Alloc = std::allocator<_Value> >
- class unordered_multiset
+ class unordered_multiset : __check_copy_constructible<_Alloc>
{
typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
_Hashtable _M_h;
@@ -1291,23 +1291,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ return !(__x == __y); }
_GLIBCXX_END_NAMESPACE_CONTAINER
-
- template<typename _Key, typename _Hash, typename _Pred, typename _Alloc>
- struct is_copy_constructible<_GLIBCXX_STD_C::unordered_set<_Key, _Hash,
- _Pred, _Alloc>>
- : __has_copy_insertable_val<_GLIBCXX_STD_C::unordered_set<_Key, _Hash,
- _Pred, _Alloc>>
- { };
-
- template<typename _Key, typename _Hash, typename _Pred, typename _Alloc>
- struct
- is_copy_constructible<_GLIBCXX_STD_C::unordered_multiset<_Key, _Hash,
- _Pred, _Alloc>>
- : __has_copy_insertable_val<_GLIBCXX_STD_C::unordered_multiset<_Key, _Hash,
- _Pred,
- _Alloc>>
- { };
-
} // namespace std
#endif /* _UNORDERED_SET_H */