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
This commit is contained in:
parent
9b940c6dd7
commit
b7202baf14
|
@ -1,3 +1,27 @@
|
||||||
|
2013-01-16 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2013-01-16 Jonathan Wakely <jwakely.gcc@gmail.com>
|
2013-01-16 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
PR libstdc++/55043
|
PR libstdc++/55043
|
||||||
|
|
|
@ -257,7 +257,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
|
||||||
|
|
||||||
template<typename _Tp, typename... _Args>
|
template<typename _Tp, typename... _Args>
|
||||||
static typename
|
static typename
|
||||||
enable_if<!__construct_helper<_Tp, _Args...>::value, void>::type
|
enable_if<__and_<__not_<__construct_helper<_Tp, _Args...>>,
|
||||||
|
is_constructible<_Tp, _Args...>>::value, void>::type
|
||||||
_S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
|
_S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
|
||||||
{ ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
|
{ ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
|
@ -389,7 +390,8 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
|
||||||
* arguments @a __args...
|
* arguments @a __args...
|
||||||
*/
|
*/
|
||||||
template<typename _Tp, typename... _Args>
|
template<typename _Tp, typename... _Args>
|
||||||
static void construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
|
static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
|
||||||
|
-> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
|
||||||
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
|
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -526,9 +528,10 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
|
||||||
_M_select(...);
|
_M_select(...);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
|
typedef decltype(_M_select<typename _Alloc::value_type>(0)) type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// true if _Alloc::value_type is CopyInsertable into containers using _Alloc
|
||||||
template<typename _Alloc>
|
template<typename _Alloc>
|
||||||
struct __is_copy_insertable
|
struct __is_copy_insertable
|
||||||
: __is_copy_insertable_impl<_Alloc>::type
|
: __is_copy_insertable_impl<_Alloc>::type
|
||||||
|
@ -540,9 +543,23 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap,
|
||||||
: is_copy_constructible<_Tp>
|
: is_copy_constructible<_Tp>
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
template<typename _Container>
|
// Used to allow copy construction of unordered containers
|
||||||
using __has_copy_insertable_val
|
template<bool> struct __allow_copy_cons { };
|
||||||
= __is_copy_insertable<typename _Container::allocator_type>;
|
|
||||||
|
// 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
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
|
@ -94,7 +94,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
class _Hash = hash<_Key>,
|
class _Hash = hash<_Key>,
|
||||||
class _Pred = std::equal_to<_Key>,
|
class _Pred = std::equal_to<_Key>,
|
||||||
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
|
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
|
||||||
class unordered_map
|
class unordered_map : __check_copy_constructible<_Alloc>
|
||||||
{
|
{
|
||||||
typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
|
typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
|
||||||
_Hashtable _M_h;
|
_Hashtable _M_h;
|
||||||
|
@ -775,7 +775,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
class _Hash = hash<_Key>,
|
class _Hash = hash<_Key>,
|
||||||
class _Pred = std::equal_to<_Key>,
|
class _Pred = std::equal_to<_Key>,
|
||||||
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
|
class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
|
||||||
class unordered_multimap
|
class unordered_multimap : __check_copy_constructible<_Alloc>
|
||||||
{
|
{
|
||||||
typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
|
typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable;
|
||||||
_Hashtable _M_h;
|
_Hashtable _M_h;
|
||||||
|
@ -1408,26 +1408,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_CONTAINER
|
_GLIBCXX_END_NAMESPACE_CONTAINER
|
||||||
|
|
||||||
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
|
|
||||||
typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<_GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash,
|
|
||||||
_Pred, _Alloc>>
|
|
||||||
: __has_copy_insertable_val<_GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash,
|
|
||||||
_Pred, _Alloc>>
|
|
||||||
{ };
|
|
||||||
|
|
||||||
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
|
|
||||||
typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<_GLIBCXX_STD_C::unordered_multimap<_Key, _Tp, _Hash,
|
|
||||||
_Pred, _Alloc>>
|
|
||||||
: __has_copy_insertable_val<_GLIBCXX_STD_C::unordered_multimap<_Key, _Tp,
|
|
||||||
_Hash, _Pred,
|
|
||||||
_Alloc>>
|
|
||||||
{ };
|
|
||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif /* _UNORDERED_MAP_H */
|
#endif /* _UNORDERED_MAP_H */
|
||||||
|
|
|
@ -90,7 +90,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
class _Hash = hash<_Value>,
|
class _Hash = hash<_Value>,
|
||||||
class _Pred = std::equal_to<_Value>,
|
class _Pred = std::equal_to<_Value>,
|
||||||
class _Alloc = std::allocator<_Value> >
|
class _Alloc = std::allocator<_Value> >
|
||||||
class unordered_set
|
class unordered_set : __check_copy_constructible<_Alloc>
|
||||||
{
|
{
|
||||||
typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
|
typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
|
||||||
_Hashtable _M_h;
|
_Hashtable _M_h;
|
||||||
|
@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
class _Hash = hash<_Value>,
|
class _Hash = hash<_Value>,
|
||||||
class _Pred = std::equal_to<_Value>,
|
class _Pred = std::equal_to<_Value>,
|
||||||
class _Alloc = std::allocator<_Value> >
|
class _Alloc = std::allocator<_Value> >
|
||||||
class unordered_multiset
|
class unordered_multiset : __check_copy_constructible<_Alloc>
|
||||||
{
|
{
|
||||||
typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
|
typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
|
||||||
_Hashtable _M_h;
|
_Hashtable _M_h;
|
||||||
|
@ -1291,23 +1291,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_CONTAINER
|
_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
|
} // namespace std
|
||||||
|
|
||||||
#endif /* _UNORDERED_SET_H */
|
#endif /* _UNORDERED_SET_H */
|
||||||
|
|
|
@ -96,14 +96,12 @@ namespace __debug
|
||||||
__gnu_debug::__base(__last), __n,
|
__gnu_debug::__base(__last), __n,
|
||||||
__hf, __eql, __a) { }
|
__hf, __eql, __a) { }
|
||||||
|
|
||||||
unordered_map(const unordered_map& __x)
|
unordered_map(const unordered_map& __x) = default;
|
||||||
: _Base(__x) { }
|
|
||||||
|
|
||||||
unordered_map(const _Base& __x)
|
unordered_map(const _Base& __x)
|
||||||
: _Base(__x) { }
|
: _Base(__x) { }
|
||||||
|
|
||||||
unordered_map(unordered_map&& __x)
|
unordered_map(unordered_map&& __x) = default;
|
||||||
: _Base(std::move(__x)) { }
|
|
||||||
|
|
||||||
unordered_map(initializer_list<value_type> __l,
|
unordered_map(initializer_list<value_type> __l,
|
||||||
size_type __n = 0,
|
size_type __n = 0,
|
||||||
|
@ -547,14 +545,12 @@ namespace __debug
|
||||||
__gnu_debug::__base(__last), __n,
|
__gnu_debug::__base(__last), __n,
|
||||||
__hf, __eql, __a) { }
|
__hf, __eql, __a) { }
|
||||||
|
|
||||||
unordered_multimap(const unordered_multimap& __x)
|
unordered_multimap(const unordered_multimap& __x) = default;
|
||||||
: _Base(__x) { }
|
|
||||||
|
|
||||||
unordered_multimap(const _Base& __x)
|
unordered_multimap(const _Base& __x)
|
||||||
: _Base(__x) { }
|
: _Base(__x) { }
|
||||||
|
|
||||||
unordered_multimap(unordered_multimap&& __x)
|
unordered_multimap(unordered_multimap&& __x) = default;
|
||||||
: _Base(std::move(__x)) { }
|
|
||||||
|
|
||||||
unordered_multimap(initializer_list<value_type> __l,
|
unordered_multimap(initializer_list<value_type> __l,
|
||||||
size_type __n = 0,
|
size_type __n = 0,
|
||||||
|
@ -938,30 +934,6 @@ namespace __debug
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
} // namespace __debug
|
} // namespace __debug
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
||||||
|
|
||||||
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
|
|
||||||
typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__debug::unordered_map<_Key, _Tp, _Hash, _Pred,
|
|
||||||
_Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_C::unordered_map<_Key, _Tp,
|
|
||||||
_Hash, _Pred,
|
|
||||||
_Alloc> >
|
|
||||||
{ };
|
|
||||||
|
|
||||||
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
|
|
||||||
typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__debug::unordered_multimap<_Key, _Tp, _Hash, _Pred,
|
|
||||||
_Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_C::unordered_multimap<_Key, _Tp,
|
|
||||||
_Hash, _Pred,
|
|
||||||
_Alloc> >
|
|
||||||
{ };
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif // C++11
|
#endif // C++11
|
||||||
|
|
|
@ -96,14 +96,12 @@ namespace __debug
|
||||||
__gnu_debug::__base(__last), __n,
|
__gnu_debug::__base(__last), __n,
|
||||||
__hf, __eql, __a) { }
|
__hf, __eql, __a) { }
|
||||||
|
|
||||||
unordered_set(const unordered_set& __x)
|
unordered_set(const unordered_set& __x) = default;
|
||||||
: _Base(__x) { }
|
|
||||||
|
|
||||||
unordered_set(const _Base& __x)
|
unordered_set(const _Base& __x)
|
||||||
: _Base(__x) { }
|
: _Base(__x) { }
|
||||||
|
|
||||||
unordered_set(unordered_set&& __x)
|
unordered_set(unordered_set&& __x) = default;
|
||||||
: _Base(std::move(__x)) { }
|
|
||||||
|
|
||||||
unordered_set(initializer_list<value_type> __l,
|
unordered_set(initializer_list<value_type> __l,
|
||||||
size_type __n = 0,
|
size_type __n = 0,
|
||||||
|
@ -542,14 +540,12 @@ namespace __debug
|
||||||
__gnu_debug::__base(__last), __n,
|
__gnu_debug::__base(__last), __n,
|
||||||
__hf, __eql, __a) { }
|
__hf, __eql, __a) { }
|
||||||
|
|
||||||
unordered_multiset(const unordered_multiset& __x)
|
unordered_multiset(const unordered_multiset& __x) = default;
|
||||||
: _Base(__x) { }
|
|
||||||
|
|
||||||
unordered_multiset(const _Base& __x)
|
unordered_multiset(const _Base& __x)
|
||||||
: _Base(__x) { }
|
: _Base(__x) { }
|
||||||
|
|
||||||
unordered_multiset(unordered_multiset&& __x)
|
unordered_multiset(unordered_multiset&& __x) = default;
|
||||||
: _Base(std::move(__x)) { }
|
|
||||||
|
|
||||||
unordered_multiset(initializer_list<value_type> __l,
|
unordered_multiset(initializer_list<value_type> __l,
|
||||||
size_type __n = 0,
|
size_type __n = 0,
|
||||||
|
@ -920,27 +916,6 @@ namespace __debug
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
} // namespace __debug
|
} // namespace __debug
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
||||||
|
|
||||||
template<typename _Key, typename _Hash, typename _Pred, typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__debug::unordered_set<_Key, _Hash, _Pred, _Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_C::unordered_set<_Key,
|
|
||||||
_Hash, _Pred,
|
|
||||||
_Alloc> >
|
|
||||||
{ };
|
|
||||||
|
|
||||||
template<typename _Key, typename _Hash, typename _Pred, typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__debug::unordered_multiset<_Key, _Hash, _Pred,
|
|
||||||
_Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_C::unordered_multiset<_Key,
|
|
||||||
_Hash, _Pred,
|
|
||||||
_Alloc> >
|
|
||||||
{ };
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#endif // C++11
|
#endif // C++11
|
||||||
|
|
|
@ -339,25 +339,11 @@ namespace __profile
|
||||||
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
|
const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
} // namespace __profile
|
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
||||||
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
|
|
||||||
typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__profile::unordered_map<_Key, _Tp, _Hash,
|
|
||||||
_Pred, _Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_BASE >
|
|
||||||
{ };
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
|
||||||
|
|
||||||
#undef _GLIBCXX_BASE
|
#undef _GLIBCXX_BASE
|
||||||
#undef _GLIBCXX_STD_BASE
|
#undef _GLIBCXX_STD_BASE
|
||||||
#define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
|
#define _GLIBCXX_BASE unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
|
||||||
#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE
|
#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE
|
||||||
|
|
||||||
namespace __profile
|
|
||||||
{
|
|
||||||
/// Class std::unordered_multimap wrapper with performance instrumentation.
|
/// Class std::unordered_multimap wrapper with performance instrumentation.
|
||||||
template<typename _Key, typename _Tp,
|
template<typename _Key, typename _Tp,
|
||||||
typename _Hash = std::hash<_Key>,
|
typename _Hash = std::hash<_Key>,
|
||||||
|
@ -623,18 +609,6 @@ namespace __profile
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
} // namespace __profile
|
} // namespace __profile
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
||||||
|
|
||||||
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
|
|
||||||
typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__profile::unordered_multimap<_Key, _Tp, _Hash,
|
|
||||||
_Pred, _Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_BASE >
|
|
||||||
{ };
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#undef _GLIBCXX_BASE
|
#undef _GLIBCXX_BASE
|
||||||
|
|
|
@ -305,23 +305,11 @@ namespace __profile
|
||||||
const unordered_set<_Key, _Hash, _Pred, _Alloc>& __y)
|
const unordered_set<_Key, _Hash, _Pred, _Alloc>& __y)
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
} // namespace __profile
|
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
||||||
template<typename _Key, typename _Hash, typename _Pred, typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__profile::unordered_set<_Key, _Hash, _Pred, _Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_BASE >
|
|
||||||
{ };
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
|
||||||
|
|
||||||
#undef _GLIBCXX_BASE
|
#undef _GLIBCXX_BASE
|
||||||
#undef _GLIBCXX_STD_BASE
|
#undef _GLIBCXX_STD_BASE
|
||||||
#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE
|
#define _GLIBCXX_STD_BASE _GLIBCXX_STD_C::_GLIBCXX_BASE
|
||||||
#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
|
#define _GLIBCXX_BASE unordered_multiset<_Value, _Hash, _Pred, _Alloc>
|
||||||
|
|
||||||
namespace __profile
|
|
||||||
{
|
|
||||||
/** @brief Unordered_multiset wrapper with performance instrumentation. */
|
/** @brief Unordered_multiset wrapper with performance instrumentation. */
|
||||||
template<typename _Value,
|
template<typename _Value,
|
||||||
typename _Hash = std::hash<_Value>,
|
typename _Hash = std::hash<_Value>,
|
||||||
|
@ -580,17 +568,6 @@ namespace __profile
|
||||||
{ return !(__x == __y); }
|
{ return !(__x == __y); }
|
||||||
|
|
||||||
} // namespace __profile
|
} // namespace __profile
|
||||||
|
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
||||||
|
|
||||||
template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
|
|
||||||
struct
|
|
||||||
is_copy_constructible<__profile::unordered_multiset<_Value, _Hash,
|
|
||||||
_Pred, _Alloc>>
|
|
||||||
: is_copy_constructible< _GLIBCXX_STD_BASE >
|
|
||||||
{ };
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#undef _GLIBCXX_BASE
|
#undef _GLIBCXX_BASE
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct Alloc : std::allocator<T>
|
||||||
|
|
||||||
// verify is_copy_constructible depends on allocator
|
// verify is_copy_constructible depends on allocator
|
||||||
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
||||||
static_assert(std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
||||||
|
|
||||||
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
||||||
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
// { dg-do compile }
|
// XFAIL because of PR libstdc++/55043 fix
|
||||||
|
// { dg-do compile { xfail *-*-* } }
|
||||||
|
// { dg-excess-errors "" }
|
||||||
// { dg-options "-std=gnu++11" }
|
// { dg-options "-std=gnu++11" }
|
||||||
|
|
||||||
// Copyright (C) 2012 Free Software Foundation, Inc.
|
// Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
// software; you can redistribute it and/or modify it under the
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct Alloc : std::allocator<T>
|
||||||
|
|
||||||
// verify is_copy_constructible depends on allocator
|
// verify is_copy_constructible depends on allocator
|
||||||
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
||||||
static_assert(std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
||||||
|
|
||||||
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
||||||
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
// { dg-do compile }
|
// XFAIL because of PR libstdc++/55043 fix
|
||||||
|
// { dg-do compile { xfail *-*-* } }
|
||||||
|
// { dg-excess-errors "" }
|
||||||
// { dg-options "-std=gnu++11" }
|
// { dg-options "-std=gnu++11" }
|
||||||
|
|
||||||
// Copyright (C) 2012 Free Software Foundation, Inc.
|
// Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// This file is part of the GNU ISO C++ Library. This library is free
|
||||||
// software; you can redistribute it and/or modify it under the
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct Alloc : std::allocator<T>
|
||||||
|
|
||||||
// verify is_copy_constructible depends on allocator
|
// verify is_copy_constructible depends on allocator
|
||||||
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
||||||
static_assert(std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
||||||
|
|
||||||
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
||||||
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct Alloc : std::allocator<T>
|
||||||
|
|
||||||
// verify is_copy_constructible depends on allocator
|
// verify is_copy_constructible depends on allocator
|
||||||
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
typedef test_type<Alloc<MoveOnly, true>> uim_rval;
|
||||||
static_assert(std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
static_assert(!std::is_copy_constructible<uim_rval>::value, "is not copyable");
|
||||||
|
|
||||||
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
typedef test_type<Alloc<MoveOnly, false>> uim_lval;
|
||||||
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
static_assert(std::is_copy_constructible<uim_lval>::value, "is copyable");
|
||||||
|
|
Loading…
Reference in New Issue