: unordered_map(__n, __hf, key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered containers
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_map(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_map(__l, __n, hasher(), key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered containers
+ unordered_map(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_map(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_map(initializer_list<value_type> __l,
size_type __n, const hasher& __hf,
const allocator_type& __a)
: unordered_multimap(__n, __hf, key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered containers
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_multimap(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered containers
+ unordered_multimap(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_multimap(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_multimap(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
: unordered_set(__n, __hf, key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_set(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_set(__first, __last, __n, __hf, key_equal(), __a)
{ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ unordered_set(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_set(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_set(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
typename iterator_traits<_InputIterator>::value_type>,
_Allocator>;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ template<typename _InputIterator, typename _Allocator,
+ typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_set(_InputIterator, _InputIterator, _Allocator)
+ -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
+ hash<
+ typename iterator_traits<_InputIterator>::value_type>,
+ equal_to<
+ typename iterator_traits<_InputIterator>::value_type>,
+ _Allocator>;
+
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
unordered_set<int>::size_type, _Allocator)
-> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ template<typename _Tp, typename _Allocator,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_set(initializer_list<_Tp>, _Allocator)
+ -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+
template<typename _Tp, typename _Hash, typename _Allocator,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
: unordered_multiset(__n, __hf, key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_multiset(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
{ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ unordered_multiset(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_multiset(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_multiset(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
iterator_traits<_InputIterator>::value_type>,
_Allocator>;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ template<typename _InputIterator, typename _Allocator,
+ typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_multiset(_InputIterator, _InputIterator, _Allocator)
+ -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
+ hash<typename
+ iterator_traits<_InputIterator>::value_type>,
+ equal_to<typename
+ iterator_traits<_InputIterator>::value_type>,
+ _Allocator>;
+
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
unordered_multiset<int>::size_type, _Allocator)
-> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 2713. More missing allocator-extended constructors for unordered container
+ template<typename _Tp, typename _Allocator,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_multiset(initializer_list<_Tp>, _Allocator)
+ -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+
template<typename _Tp, typename _Hash, typename _Allocator,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
: unordered_map(__n, __hf, key_equal(), __a)
{ }
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_map(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_map(__first, __last, __n, __hf, key_equal(), __a)
{ }
+ unordered_map(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_map(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_map(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
: unordered_multimap(__n, __hf, key_equal(), __a)
{ }
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_multimap(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
{ }
+ unordered_multimap(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_multimap(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_multimap(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
: unordered_set(__n, __hf, key_equal(), __a)
{ }
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_set(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_set(__first, __last, __n, __hf, key_equal(), __a)
{ }
+ unordered_set(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_set(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_set(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
typename iterator_traits<_InputIterator>::value_type>,
_Allocator>;
+ template<typename _InputIterator, typename _Allocator,
+ typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_set(_InputIterator, _InputIterator, _Allocator)
+ -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
+ hash<
+ typename iterator_traits<_InputIterator>::value_type>,
+ equal_to<
+ typename iterator_traits<_InputIterator>::value_type>,
+ _Allocator>;
+
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
unordered_set<int>::size_type, _Allocator)
-> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+ template<typename _Tp, typename _Allocator,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_set(initializer_list<_Tp>, _Allocator)
+ -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+
template<typename _Tp, typename _Hash, typename _Allocator,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
: unordered_multiset(__n, __hf, key_equal(), __a)
{ }
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, 0, hasher(), key_equal(), __a)
+ { }
+
template<typename _InputIterator>
unordered_multiset(_InputIterator __first, _InputIterator __last,
size_type __n,
: unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
{ }
+ unordered_multiset(initializer_list<value_type> __l,
+ const allocator_type& __a)
+ : unordered_multiset(__l, 0, hasher(), key_equal(), __a)
+ { }
+
unordered_multiset(initializer_list<value_type> __l,
size_type __n,
const allocator_type& __a)
iterator_traits<_InputIterator>::value_type>,
_Allocator>;
+ template<typename _InputIterator, typename _Allocator,
+ typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_multiset(_InputIterator, _InputIterator, _Allocator)
+ -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
+ hash<typename
+ iterator_traits<_InputIterator>::value_type>,
+ equal_to<typename
+ iterator_traits<_InputIterator>::value_type>,
+ _Allocator>;
+
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
unordered_multiset<int>::size_type, _Allocator)
-> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+ template<typename _Tp, typename _Allocator,
+ typename = _RequireAllocator<_Allocator>>
+ unordered_multiset(initializer_list<_Tp>, _Allocator)
+ -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
+
template<typename _Tp, typename _Hash, typename _Allocator,
typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
test_type h1(10, alloc_type());
test_type h2(10, hasher_type(), alloc_type());
-test_type h3(h1.begin(), h1.end(), 10, alloc_type());
-test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
-test_type h5({ { 1, 1 } }, 10, alloc_type());
-test_type h6({ { 1, 1 } }, 10, hasher_type(), alloc_type());
+test_type h3(h1.begin(), h1.end(), alloc_type());
+test_type h4(h1.begin(), h1.end(), 10, alloc_type());
+test_type h5(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
+test_type h6({ { 1, 1 } }, alloc_type());
+test_type h7({ { 1, 1 } }, 10, alloc_type());
+test_type h8({ { 1, 1 } }, 10, hasher_type(), alloc_type());
+
{2, 3.0}, {3, 4.0}}}),
std::unordered_map<int, double>>);
+static_assert(std::is_same_v<
+ decltype(std::unordered_map{{std::pair{1, 2.0},
+ {2, 3.0}, {3, 4.0}},
+ SimpleAllocator<std::pair<const int, double>>{}}),
+ std::unordered_map<int, double, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<std::pair<const int, double>>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_map{
{std::pair{1, 2.0}, {2, 3.0}, {3, 4.0}},
1}),
std::unordered_map<int, double>>);
+static_assert(std::is_same_v<
+ decltype(std::unordered_map{
+ {std::pair{1, 2.0}, {2, 3.0}, {3, 4.0}},
+ 1, SimpleAllocator<std::pair<const int, double>>{}}),
+ std::unordered_map<int, double, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<std::pair<const int, double>>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_map{{std::pair{1, 2.0},
{2, 3.0}, {3, 4.0}},
std::equal_to<int>,
SimpleAllocator<std::pair<const int, double>>>>);
+ static_assert(std::is_same_v<
+ decltype(std::unordered_map{x.begin(), x.end(),
+ std::allocator<std::pair<const int, double>>{}}),
+ std::unordered_map<int, double>>);
+
+ static_assert(std::is_same_v<
+ decltype(std::unordered_map{x.begin(), x.end(),
+ SimpleAllocator<std::pair<const int, double>>{}}),
+ std::unordered_map<int, double, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<std::pair<const int, double>>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_map{x.begin(), x.end(),
1, std::hash<int>{},
test_type h1(10, alloc_type());
test_type h2(10, hasher_type(), alloc_type());
-test_type h3(h1.begin(), h1.end(), 10, alloc_type());
-test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
-test_type h5({ { 1, 1 } }, 10, alloc_type());
-test_type h6({ { 1, 1 } }, 10, hasher_type(), alloc_type());
+test_type h3(h1.begin(), h1.end(), alloc_type());
+test_type h4(h1.begin(), h1.end(), 10, alloc_type());
+test_type h5(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
+test_type h6({ { 1, 1 } }, alloc_type());
+test_type h7({ { 1, 1 } }, 10, alloc_type());
+test_type h8({ { 1, 1 } }, 10, hasher_type(), alloc_type());
{2, 3.0}, {3, 4.0}}}),
std::unordered_multimap<int, double>>);
+static_assert(std::is_same_v<
+ decltype(std::unordered_multimap{
+ {std::pair{1, 2.0}, {2, 3.0}, {3, 4.0}},
+ SimpleAllocator<std::pair<const int, double>>{}}),
+ std::unordered_multimap<int, double, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<std::pair<const int, double>>>>);
+
+static_assert(std::is_same_v<
+ decltype(std::unordered_multimap{
+ {std::pair{1, 2.0}, {2, 3.0}, {3, 4.0}},
+ 1}),
+ std::unordered_multimap<int, double>>);
+
+static_assert(std::is_same_v<
+ decltype(std::unordered_multimap{
+ {std::pair{1, 2.0}, {2, 3.0}, {3, 4.0}},
+ 1, SimpleAllocator<std::pair<const int, double>>{}}),
+ std::unordered_multimap<int, double, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<std::pair<const int, double>>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_multimap{{std::pair{1, 2.0},
{2, 3.0}, {3, 4.0}},
std::equal_to<int>,
SimpleAllocator<std::pair<const int, double>>>>);
+ static_assert(std::is_same_v<
+ decltype(std::unordered_multimap{x.begin(), x.end(),
+ std::allocator<std::pair<const int, double>>{}}),
+ std::unordered_multimap<int, double>>);
+
+ static_assert(std::is_same_v<
+ decltype(std::unordered_multimap{x.begin(), x.end(),
+ SimpleAllocator<std::pair<const int, double>>{}}),
+ std::unordered_multimap<int, double, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<std::pair<const int, double>>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_multimap{x.begin(), x.end(),
1, std::hash<int>{},
test_type h1(10, alloc_type());
test_type h2(10, hasher_type(), alloc_type());
-test_type h3(h1.begin(), h1.end(), 10, alloc_type());
-test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
-test_type h5({ 1, 1 }, 10, alloc_type());
-test_type h6({ 1, 1 }, 10, hasher_type(), alloc_type());
+test_type h3(h1.begin(), h1.end(), alloc_type());
+test_type h4(h1.begin(), h1.end(), 10, alloc_type());
+test_type h5(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
+test_type h6({ 1, 1 }, alloc_type());
+test_type h7({ 1, 1 }, 10, alloc_type());
+test_type h9({ 1, 1 }, 10, hasher_type(), alloc_type());
0, std::hash<int>{}, std::allocator<int>{}}),
std::unordered_multiset<int>>);
+static_assert(std::is_same_v<
+ decltype(std::unordered_multiset{{1, 2, 3}}),
+ std::unordered_multiset<int>>);
+
+static_assert(std::is_same_v<
+ decltype(std::unordered_multiset{{1, 2, 3},
+ std::allocator<int>{}}),
+ std::unordered_multiset<int>>);
+
+static_assert(std::is_same_v<
+ decltype(std::unordered_multiset{{1, 2, 3},
+ SimpleAllocator<int>{}}),
+ std::unordered_multiset<int, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<int>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_multiset{{1, 2, 3},
{}}),
{}, std::hash<int>{}, std::equal_to<int>{}}),
std::unordered_multiset<int>>);
+ static_assert(std::is_same_v<
+ decltype(std::unordered_multiset{x.begin(), x.end(),
+ std::allocator<int>{}}),
+ std::unordered_multiset<int>>);
+
+ static_assert(std::is_same_v<
+ decltype(std::unordered_multiset{x.begin(), x.end(),
+ SimpleAllocator<int>{}}),
+ std::unordered_multiset<int, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<int>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_multiset{x.begin(), x.end(),
{}, std::hash<int>{}, std::allocator<int>{}}),
test_type h1(10, alloc_type());
test_type h2(10, hasher_type(), alloc_type());
-test_type h3(h1.begin(), h1.end(), 10, alloc_type());
-test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
-test_type h5({ 1, 1 }, 10, alloc_type());
-test_type h6({ 1, 1 }, 10, hasher_type(), alloc_type());
+test_type h3(h1.begin(), h1.end(), alloc_type());
+test_type h4(h1.begin(), h1.end(), 10, alloc_type());
+test_type h5(h1.begin(), h1.end(), 10, hasher_type(), alloc_type());
+test_type h6({ 1, 1 }, alloc_type());
+test_type h7({ 1, 1 }, 10, alloc_type());
+test_type h9({ 1, 1 }, 10, hasher_type(), alloc_type());
0, std::hash<int>{}, std::allocator<int>{}}),
std::unordered_set<int>>);
+static_assert(std::is_same_v<
+ decltype(std::unordered_set{{1, 2, 3}}),
+ std::unordered_set<int>>);
+
+static_assert(std::is_same_v<
+ decltype(std::unordered_set{{1, 2, 3},
+ std::allocator<int>{}}),
+ std::unordered_set<int>>);
+
+static_assert(std::is_same_v<
+ decltype(std::unordered_set{{1, 2, 3},
+ SimpleAllocator<int>{}}),
+ std::unordered_set<int, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<int>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_set{{1, 2, 3},
{}}),
{})),
std::unordered_set<int>>);
+ static_assert(std::is_same_v<
+ decltype(std::unordered_set{x.begin(), x.end(),
+ std::allocator<int>{}}),
+ std::unordered_set<int>>);
+
+ static_assert(std::is_same_v<
+ decltype(std::unordered_set{x.begin(), x.end(),
+ SimpleAllocator<int>{}}),
+ std::unordered_set<int, std::hash<int>,
+ std::equal_to<int>,
+ SimpleAllocator<int>>>);
+
static_assert(std::is_same_v<
decltype(std::unordered_set{x.begin(), x.end(), 1}),
std::unordered_set<int>>);