@@ -146,17 +146,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__n, __hf, __eql, __a)
{ }
- unordered_map(size_type __n, const allocator_type& __a)
- : _M_h(__n, hasher(), key_equal(), __a)
- { }
-
- explicit
- unordered_map(size_type __n,
- const hasher& __hf,
- const allocator_type& __a)
- : _M_h(__n, __hf, key_equal(), __a)
- { }
-
/**
* @brief Builds an %unordered_map from a range.
* @param __first An input iterator.
@@ -233,6 +222,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__l, __n, __hf, __eql, __a)
{ }
+ unordered_map(size_type __n, const allocator_type& __a)
+ : unordered_map(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_map(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_map(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__l, __n, __hf, key_equal(), __a)
+ { }
+
/// Copy assignment operator.
unordered_map&
operator=(const unordered_map&) = default;
@@ -872,16 +896,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__n, __hf, __eql, __a)
{ }
- unordered_multimap(size_type __n, const allocator_type& __a)
- : _M_h(__n, hasher(), key_equal(), __a)
- { }
-
- unordered_multimap(size_type __n,
- const hasher& __hf,
- const allocator_type& __a)
- : _M_h(__n, __hf, key_equal(), __a)
- { }
-
/**
* @brief Builds an %unordered_multimap from a range.
* @param __first An input iterator.
@@ -958,6 +972,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__l, __n, __hf, __eql, __a)
{ }
+ unordered_multimap(size_type __n, const allocator_type& __a)
+ : unordered_multimap(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multimap(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__l, __n, __hf, key_equal(), __a)
+ { }
+
/// Copy assignment operator.
unordered_multimap&
operator=(const unordered_multimap&) = default;
@@ -140,16 +140,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__n, __hf, __eql, __a)
{ }
- unordered_set(size_type __n, const allocator_type& __a)
- : _M_h(__n, hasher(), key_equal(), __a)
- { }
-
- unordered_set(size_type __n,
- const hasher& __hf,
- const allocator_type& __a)
- : unordered_set(__n, __hf, key_equal(), __a)
- { }
-
/**
* @brief Builds an %unordered_set from a range.
* @param __first An input iterator.
@@ -226,6 +216,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__l, __n, __hf, __eql, __a)
{ }
+ unordered_set(size_type __n, const allocator_type& __a)
+ : unordered_set(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_set(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__l, __n, __hf, key_equal(), __a)
+ { }
+
/// Copy assignment operator.
unordered_set&
operator=(const unordered_set&) = default;
@@ -789,16 +814,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(__n, __hf, __eql, __a)
{ }
- unordered_multiset(size_type __n, const allocator_type& __a)
- : _M_h(__n, hasher(), key_equal(), __a)
- { }
-
- unordered_multiset(size_type __n,
- const hasher& __hf,
- const allocator_type& __a)
- : _M_h(__n, __hf, key_equal(), __a)
- { }
-
/**
* @brief Builds an %unordered_multiset from a range.
* @param __first An input iterator.
@@ -883,6 +898,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
: _M_h(std::move(__umset._M_h), __a)
{ }
+ unordered_multiset(size_type __n, const allocator_type& __a)
+ : unordered_multiset(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multiset(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multiset(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__l, __n, __hf, key_equal(), __a)
+ { }
+
/**
* @brief %Unordered_multiset list assignment operator.
* @param __l An initializer_list.
@@ -891,7 +941,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
* in the initializer list @a __l.
*
* Note that the assignment completely changes the %unordered_multiset
- * and that the resulting %unordered_set's size is the same as the number
+ * and that the resulting %unordered_multiset's size is the same as the number
* of elements assigned. Old data may be lost.
*/
unordered_multiset&
@@ -129,6 +129,44 @@ namespace __debug
const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a) { }
+ unordered_map(size_type __n, const allocator_type& __a)
+ : unordered_map(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_map(size_type __n,
+ const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_map(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n,
+ const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__l, __n, __hf, key_equal(), __a)
+ { }
+
~unordered_map() = default;
unordered_map&
@@ -550,6 +588,41 @@ namespace __debug
const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a) { }
+ unordered_multimap(size_type __n, const allocator_type& __a)
+ : unordered_multimap(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multimap(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__l, __n, __hf, key_equal(), __a)
+ { }
+
~unordered_multimap() = default;
unordered_multimap&
@@ -129,6 +129,41 @@ namespace __debug
const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a) { }
+ unordered_set(size_type __n, const allocator_type& __a)
+ : unordered_set(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_set(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__l, __n, __hf, key_equal(), __a)
+ { }
+
~unordered_set() = default;
unordered_set&
@@ -546,6 +581,41 @@ namespace __debug
const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a) { }
+ unordered_multiset(size_type __n, const allocator_type& __a)
+ : unordered_multiset(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multiset(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multiset(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__l, __n, __hf, key_equal(), __a)
+ { }
+
~unordered_multiset() = default;
unordered_multiset&
@@ -119,6 +119,41 @@ namespace __profile
const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a) { }
+ unordered_map(size_type __n, const allocator_type& __a)
+ : unordered_map(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_map(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_map(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_map(__l, __n, __hf, key_equal(), __a)
+ { }
+
unordered_map&
operator=(const unordered_map&) = default;
@@ -361,6 +396,41 @@ namespace __profile
const allocator_type& __a = allocator_type())
: _Base(__l, __n, __hf, __eql, __a) { }
+ unordered_multimap(size_type __n, const allocator_type& __a)
+ : unordered_multimap(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multimap(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multimap(__l, __n, __hf, key_equal(), __a)
+ { }
+
unordered_multimap&
operator=(const unordered_multimap&) = default;
@@ -125,6 +125,41 @@ namespace __profile
: _Base(__l, __n, __hf, __eql, __a)
{ }
+ unordered_set(size_type __n, const allocator_type& __a)
+ : unordered_set(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_set(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_set(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_set(__l, __n, __hf, key_equal(), __a)
+ { }
+
unordered_set&
operator=(const unordered_set&) = default;
@@ -346,6 +381,41 @@ namespace __profile
: _Base(__l, __n, __hf, __eql, __a)
{ }
+ unordered_multiset(size_type __n, const allocator_type& __a)
+ : unordered_multiset(__n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multiset(size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__n, __hf, key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __first, _InputIterator __last,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
+ { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n,
+ const allocator_type& __a)
+ : unordered_multiset(__l, __n, hasher(), key_equal(), __a)
+ { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n, const hasher& __hf,
+ const allocator_type& __a)
+ : unordered_multiset(__l, __n, __hf, key_equal(), __a)
+ { }
+
unordered_multiset&
operator=(const unordered_multiset&) = default;
@@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type;
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());
@@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type;
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());
@@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type;
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());
@@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type;
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());