Commit 417e896e by Paolo Carlini Committed by Paolo Carlini

hashtable.h (_Hashtable<>::operator=(const _Hashtable&)): Move inline.

2010-08-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::operator=(const
	_Hashtable&)): Move inline.
	(operator=(_Hashtable&&)): Define.
	* include/bits/unordered_map.h (unordered_map(unordered_map&&),
	unordered_map(const unordered_map&), unordered_multimap
	(unordered_multimap&&), unordered_multimap(const unordered_multimap&),
	__unordered_map(__unordered_map&&), __unordered_map(const
	__unordered_map&), __unordered_multimap(__unordered_multimap&&),
	__unordered_multimap(const __unordered_multimap&)): Do not define,
	leave implicit.
	* include/bits/unordered_set.h (unordered_set(unordered_set&&),
	unordered_set(const unordered_set&), unordered_multiset
	(unordered_multiset&&), unordered_multiset(const unordered_multiset&),
	__unordered_set(__unordered_set&&), __unordered_set(const
	__unordered_set&), __unordered_multiset(__unordered_multiset&&),
	__unordered_multiset(const __unordered_multiset&)): Likewise.

	* include/bits/unordered_map.h (__unordered_map(initializer_list<>),
	__unordered_map<>::operator=(initializer_list<>),
	__unordered_multimap(initializer_list<>), __unordered_multimap<>::
	operator=(initializer_list<>)): Add.
	* include/bits/unordered_set.h (__unordered_set(initializer_list<>),
	__unordered_set<>::operator=(initializer_list<>),
	__unordered_multiset(initializer_list<>), __unordered_multiset<>::
	operator=(initializer_list<>)): Likewise.

	* include/bits/unordered_map.h (__unordered_map(_InputIterator,
	_InputIterator, size_type __n), unordered_map(_InputIterator,
	_InputIterator, size_type __n), unordered_map(initializer_list<>,
	size_type __n), unordered_multimap(initializer_list<>, size_type __n)):
	Fix __n default to 0.
	* include/bits/unordered_set.h (__unordered_set(_InputIterator,
	_InputIterator, size_type __n), unordered_set(_InputIterator,
	_InputIterator, size_type __n), unordered_set(initializer_list<>,
	size_type __n), unordered_multiset(initializer_list<>, size_type __n)):
	Likewise.
	* include/debug/unordered_map (unordered_map(_InputIterator,
	_InputIterator, size_type __n), unordered_map(initializer_list<>,
	size_type __n), unordered_map(_InputIterator, _InputIterator,
	size_type __n), unordered_multimap(initializer_list<>, size_type __n)):
	Likewise.
	* include/debug/unordered_set (unordered_set(_InputIterator,
	_InputIterator, size_type __n), unordered_set(initializer_list<>,
	size_type __n), unordered_set(_InputIterator, _InputIterator,
	size_type __n), unordered_multiset(initializer_list<>, size_type __n)):
	Likewise.
	* include/profile/unordered_map (unordered_map(_InputIterator,
	_InputIterator, size_type __n), unordered_map(initializer_list<>,
	size_type __n), unordered_map(_InputIterator, _InputIterator,
	size_type __n), unordered_multimap(initializer_list<>, size_type __n)):
	Likewise.
	* include/profile/unordered_set (unordered_set(_InputIterator,
	_InputIterator, size_type __n), unordered_set(initializer_list<>,
	size_type __n), unordered_set(_InputIterator, _InputIterator,
	size_type __n), unordered_multiset(initializer_list<>, size_type __n)):
	Likewise.

From-SVN: r163236
parent e3f5a69d
2010-08-13 Paolo Carlini <paolo.carlini@oracle.com> 2010-08-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/hashtable.h (_Hashtable<>::operator=(const
_Hashtable&)): Move inline.
(operator=(_Hashtable&&)): Define.
* include/bits/unordered_map.h (unordered_map(unordered_map&&),
unordered_map(const unordered_map&), unordered_multimap
(unordered_multimap&&), unordered_multimap(const unordered_multimap&),
__unordered_map(__unordered_map&&), __unordered_map(const
__unordered_map&), __unordered_multimap(__unordered_multimap&&),
__unordered_multimap(const __unordered_multimap&)): Do not define,
leave implicit.
* include/bits/unordered_set.h (unordered_set(unordered_set&&),
unordered_set(const unordered_set&), unordered_multiset
(unordered_multiset&&), unordered_multiset(const unordered_multiset&),
__unordered_set(__unordered_set&&), __unordered_set(const
__unordered_set&), __unordered_multiset(__unordered_multiset&&),
__unordered_multiset(const __unordered_multiset&)): Likewise.
* include/bits/unordered_map.h (__unordered_map(initializer_list<>),
__unordered_map<>::operator=(initializer_list<>),
__unordered_multimap(initializer_list<>), __unordered_multimap<>::
operator=(initializer_list<>)): Add.
* include/bits/unordered_set.h (__unordered_set(initializer_list<>),
__unordered_set<>::operator=(initializer_list<>),
__unordered_multiset(initializer_list<>), __unordered_multiset<>::
operator=(initializer_list<>)): Likewise.
* include/bits/unordered_map.h (__unordered_map(_InputIterator,
_InputIterator, size_type __n), unordered_map(_InputIterator,
_InputIterator, size_type __n), unordered_map(initializer_list<>,
size_type __n), unordered_multimap(initializer_list<>, size_type __n)):
Fix __n default to 0.
* include/bits/unordered_set.h (__unordered_set(_InputIterator,
_InputIterator, size_type __n), unordered_set(_InputIterator,
_InputIterator, size_type __n), unordered_set(initializer_list<>,
size_type __n), unordered_multiset(initializer_list<>, size_type __n)):
Likewise.
* include/debug/unordered_map (unordered_map(_InputIterator,
_InputIterator, size_type __n), unordered_map(initializer_list<>,
size_type __n), unordered_map(_InputIterator, _InputIterator,
size_type __n), unordered_multimap(initializer_list<>, size_type __n)):
Likewise.
* include/debug/unordered_set (unordered_set(_InputIterator,
_InputIterator, size_type __n), unordered_set(initializer_list<>,
size_type __n), unordered_set(_InputIterator, _InputIterator,
size_type __n), unordered_multiset(initializer_list<>, size_type __n)):
Likewise.
* include/profile/unordered_map (unordered_map(_InputIterator,
_InputIterator, size_type __n), unordered_map(initializer_list<>,
size_type __n), unordered_map(_InputIterator, _InputIterator,
size_type __n), unordered_multimap(initializer_list<>, size_type __n)):
Likewise.
* include/profile/unordered_set (unordered_set(_InputIterator,
_InputIterator, size_type __n), unordered_set(initializer_list<>,
size_type __n), unordered_set(_InputIterator, _InputIterator,
size_type __n), unordered_multiset(initializer_list<>, size_type __n)):
Likewise.
2010-08-13 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/45281 PR libstdc++/45281
* include/bits/stl_queue.h (queue(queue&&), operator=(queue&&), * include/bits/stl_queue.h (queue(queue&&), operator=(queue&&),
priority_queue(priority_queue&&), operator=(priority_queue&&)): priority_queue(priority_queue&&), operator=(priority_queue&&)):
......
...@@ -212,7 +212,22 @@ namespace std ...@@ -212,7 +212,22 @@ namespace std
_Hashtable(_Hashtable&&); _Hashtable(_Hashtable&&);
_Hashtable& _Hashtable&
operator=(const _Hashtable&); operator=(const _Hashtable& __ht)
{
_Hashtable __tmp(__ht);
this->swap(__tmp);
return *this;
}
_Hashtable&
operator=(_Hashtable&& __ht)
{
// NB: DR 1204.
// NB: DR 675.
this->clear();
this->swap(__ht);
return *this;
}
~_Hashtable(); ~_Hashtable();
...@@ -668,21 +683,6 @@ namespace std ...@@ -668,21 +683,6 @@ namespace std
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
bool __chc, bool __cit, bool __uk> bool __chc, bool __cit, bool __uk>
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>&
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
operator=(const _Hashtable& __ht)
{
_Hashtable __tmp(__ht);
this->swap(__tmp);
return *this;
}
template<typename _Key, typename _Value,
typename _Allocator, typename _ExtractKey, typename _Equal,
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
bool __chc, bool __cit, bool __uk>
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
~_Hashtable() ~_Hashtable()
{ {
......
...@@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
_Base; _Base;
public: public:
typedef typename _Base::value_type value_type;
typedef typename _Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
...@@ -73,7 +74,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -73,7 +74,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _InputIterator> template<typename _InputIterator>
__unordered_map(_InputIterator __f, _InputIterator __l, __unordered_map(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -82,10 +83,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -82,10 +83,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
__unordered_map(const __unordered_map& __x) = default; __unordered_map(initializer_list<value_type> __l,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf,
__detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
__unordered_map(__unordered_map&& __x) __unordered_map&
: _Base(std::move(__x)) { } operator=(initializer_list<value_type> __l)
{
this->clear();
this->insert(__l.begin(), __l.end());
return *this;
}
}; };
template<class _Key, class _Tp, template<class _Key, class _Tp,
...@@ -112,6 +127,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -112,6 +127,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
_Base; _Base;
public: public:
typedef typename _Base::value_type value_type;
typedef typename _Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
...@@ -130,7 +146,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -130,7 +146,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _InputIterator> template<typename _InputIterator>
__unordered_multimap(_InputIterator __f, _InputIterator __l, __unordered_multimap(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -139,10 +155,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -139,10 +155,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a) __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ } { }
__unordered_multimap(const __unordered_multimap& __x) = default; __unordered_multimap(initializer_list<value_type> __l,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf,
__detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(),
__eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
{ }
__unordered_multimap(__unordered_multimap&& __x) __unordered_multimap&
: _Base(std::move(__x)) { } operator=(initializer_list<value_type> __l)
{
this->clear();
this->insert(__l.begin(), __l.end());
return *this;
}
}; };
template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc, template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
...@@ -243,40 +273,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -243,40 +273,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _InputIterator> template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l, unordered_map(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ } { }
unordered_map(const unordered_map& __x) = default;
unordered_map(unordered_map&& __x)
: _Base(std::move(__x)) { }
unordered_map(initializer_list<value_type> __l, unordered_map(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a) : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
{ } { }
unordered_map& unordered_map&
operator=(const unordered_map& __x) = default;
unordered_map&
operator=(unordered_map&& __x)
{
// NB: DR 1204.
// NB: DR 675.
this->clear();
this->swap(__x);
return *this;
}
unordered_map&
operator=(initializer_list<value_type> __l) operator=(initializer_list<value_type> __l)
{ {
this->clear(); this->clear();
...@@ -327,43 +339,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -327,43 +339,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
: _Base(__n, __hf, __eql, __a) : _Base(__n, __hf, __eql, __a)
{ } { }
template<typename _InputIterator> template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l, unordered_multimap(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ } { }
unordered_multimap(const unordered_multimap& __x) = default;
unordered_multimap(unordered_multimap&& __x)
: _Base(std::move(__x)) { }
unordered_multimap(initializer_list<value_type> __l, unordered_multimap(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a) : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
{ } { }
unordered_multimap& unordered_multimap&
operator=(const unordered_multimap& __x) = default;
unordered_multimap&
operator=(unordered_multimap&& __x)
{
// NB: DR 1204.
// NB: DR 675.
this->clear();
this->swap(__x);
return *this;
}
unordered_multimap&
operator=(initializer_list<value_type> __l) operator=(initializer_list<value_type> __l)
{ {
this->clear(); this->clear();
......
...@@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
_Base; _Base;
public: public:
typedef typename _Base::value_type value_type;
typedef typename _Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
...@@ -68,24 +69,38 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -68,24 +69,38 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __detail::_Mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<value_type>(), __a)
{ } { }
template<typename _InputIterator> template<typename _InputIterator>
__unordered_set(_InputIterator __f, _InputIterator __l, __unordered_set(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<value_type>(), __a)
{ } { }
__unordered_set(const __unordered_set& __x) = default; __unordered_set(initializer_list<value_type> __l,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf,
__detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql,
std::_Identity<value_type>(), __a)
{ }
__unordered_set(__unordered_set&& __x) __unordered_set&
: _Base(std::move(__x)) { } operator=(initializer_list<value_type> __l)
{
this->clear();
this->insert(__l.begin(), __l.end());
return *this;
}
}; };
template<class _Value, template<class _Value,
...@@ -110,6 +125,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -110,6 +125,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
_Base; _Base;
public: public:
typedef typename _Base::value_type value_type;
typedef typename _Base::size_type size_type; typedef typename _Base::size_type size_type;
typedef typename _Base::hasher hasher; typedef typename _Base::hasher hasher;
typedef typename _Base::key_equal key_equal; typedef typename _Base::key_equal key_equal;
...@@ -122,25 +138,39 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -122,25 +138,39 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __detail::_Mod_range_hashing(), : _Base(__n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<value_type>(), __a)
{ } { }
template<typename _InputIterator> template<typename _InputIterator>
__unordered_multiset(_InputIterator __f, _InputIterator __l, __unordered_multiset(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(), : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql, __detail::_Default_ranged_hash(), __eql,
std::_Identity<_Value>(), __a) std::_Identity<value_type>(), __a)
{ } { }
__unordered_multiset(const __unordered_multiset& __x) = default; __unordered_multiset(initializer_list<value_type> __l,
size_type __n = 0,
const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf,
__detail::_Mod_range_hashing(),
__detail::_Default_ranged_hash(), __eql,
std::_Identity<value_type>(), __a)
{ }
__unordered_multiset(__unordered_multiset&& __x) __unordered_multiset&
: _Base(std::move(__x)) { } operator=(initializer_list<value_type> __l)
{
this->clear();
this->insert(__l.begin(), __l.end());
return *this;
}
}; };
template<class _Value, class _Hash, class _Pred, class _Alloc, template<class _Value, class _Hash, class _Pred, class _Alloc,
...@@ -236,40 +266,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -236,40 +266,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _InputIterator> template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l, unordered_set(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ } { }
unordered_set(const unordered_set& __x) = default;
unordered_set(unordered_set&& __x)
: _Base(std::move(__x)) { }
unordered_set(initializer_list<value_type> __l, unordered_set(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a) : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
{ } { }
unordered_set& unordered_set&
operator=(const unordered_set& __x) = default;
unordered_set&
operator=(unordered_set&& __x)
{
// NB: DR 1204.
// NB: DR 675.
this->clear();
this->swap(__x);
return *this;
}
unordered_set&
operator=(initializer_list<value_type> __l) operator=(initializer_list<value_type> __l)
{ {
this->clear(); this->clear();
...@@ -320,40 +332,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) ...@@ -320,40 +332,22 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
template<typename _InputIterator> template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l, unordered_multiset(_InputIterator __f, _InputIterator __l,
typename _Base::size_type __n = 0, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ } { }
unordered_multiset(const unordered_multiset& __x) = default;
unordered_multiset(unordered_multiset&& __x)
: _Base(std::move(__x)) { }
unordered_multiset(initializer_list<value_type> __l, unordered_multiset(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a) : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
{ } { }
unordered_multiset& unordered_multiset&
operator=(const unordered_multiset& __x) = default;
unordered_multiset&
operator=(unordered_multiset&& __x)
{
// NB: DR 1204.
// NB: DR 675.
this->clear();
this->swap(__x);
return *this;
}
unordered_multiset&
operator=(initializer_list<value_type> __l) operator=(initializer_list<value_type> __l)
{ {
this->clear(); this->clear();
......
...@@ -79,7 +79,7 @@ namespace __debug ...@@ -79,7 +79,7 @@ namespace __debug
template<typename _InputIterator> template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l, unordered_map(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -96,7 +96,7 @@ namespace __debug ...@@ -96,7 +96,7 @@ namespace __debug
: _Base(std::move(__x)), _Safe_base() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_map(initializer_list<value_type> __l, unordered_map(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -338,7 +338,7 @@ namespace __debug ...@@ -338,7 +338,7 @@ namespace __debug
template<typename _InputIterator> template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l, unordered_multimap(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -355,7 +355,7 @@ namespace __debug ...@@ -355,7 +355,7 @@ namespace __debug
: _Base(std::move(__x)), _Safe_base() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_multimap(initializer_list<value_type> __l, unordered_multimap(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
......
...@@ -79,7 +79,7 @@ namespace __debug ...@@ -79,7 +79,7 @@ namespace __debug
template<typename _InputIterator> template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l, unordered_set(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -96,7 +96,7 @@ namespace __debug ...@@ -96,7 +96,7 @@ namespace __debug
: _Base(std::move(__x)), _Safe_base() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_set(initializer_list<value_type> __l, unordered_set(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -334,7 +334,7 @@ namespace __debug ...@@ -334,7 +334,7 @@ namespace __debug
template<typename _InputIterator> template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l, unordered_multiset(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -351,7 +351,7 @@ namespace __debug ...@@ -351,7 +351,7 @@ namespace __debug
: _Base(std::move(__x)), _Safe_base() { } : _Base(std::move(__x)), _Safe_base() { }
unordered_multiset(initializer_list<value_type> __l, unordered_multiset(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
......
...@@ -86,10 +86,10 @@ namespace __profile ...@@ -86,10 +86,10 @@ namespace __profile
template<typename _InputIterator> template<typename _InputIterator>
unordered_map(_InputIterator __f, _InputIterator __l, unordered_map(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
...@@ -111,7 +111,7 @@ namespace __profile ...@@ -111,7 +111,7 @@ namespace __profile
} }
unordered_map(initializer_list<value_type> __l, unordered_map(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -314,19 +314,19 @@ namespace __profile ...@@ -314,19 +314,19 @@ namespace __profile
explicit explicit
unordered_multimap(size_type __n = 10, unordered_multimap(size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __eql, __a) : _Base(__n, __hf, __eql, __a)
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
} }
template<typename _InputIterator> template<typename _InputIterator>
unordered_multimap(_InputIterator __f, _InputIterator __l, unordered_multimap(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
...@@ -345,7 +345,7 @@ namespace __profile ...@@ -345,7 +345,7 @@ namespace __profile
} }
unordered_multimap(initializer_list<value_type> __l, unordered_multimap(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
......
...@@ -85,10 +85,10 @@ namespace __profile ...@@ -85,10 +85,10 @@ namespace __profile
template<typename _InputIterator> template<typename _InputIterator>
unordered_set(_InputIterator __f, _InputIterator __l, unordered_set(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
...@@ -110,7 +110,7 @@ namespace __profile ...@@ -110,7 +110,7 @@ namespace __profile
} }
unordered_set(initializer_list<value_type> __l, unordered_set(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
...@@ -302,9 +302,9 @@ namespace __profile ...@@ -302,9 +302,9 @@ namespace __profile
explicit explicit
unordered_multiset(size_type __n = 10, unordered_multiset(size_type __n = 10,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__n, __hf, __eql, __a) : _Base(__n, __hf, __eql, __a)
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
...@@ -312,10 +312,10 @@ namespace __profile ...@@ -312,10 +312,10 @@ namespace __profile
template<typename _InputIterator> template<typename _InputIterator>
unordered_multiset(_InputIterator __f, _InputIterator __l, unordered_multiset(_InputIterator __f, _InputIterator __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
: _Base(__f, __l, __n, __hf, __eql, __a) : _Base(__f, __l, __n, __hf, __eql, __a)
{ {
__profcxx_hashtable_construct(this, _Base::bucket_count()); __profcxx_hashtable_construct(this, _Base::bucket_count());
...@@ -334,7 +334,7 @@ namespace __profile ...@@ -334,7 +334,7 @@ namespace __profile
} }
unordered_multiset(initializer_list<value_type> __l, unordered_multiset(initializer_list<value_type> __l,
size_type __n = 10, size_type __n = 0,
const hasher& __hf = hasher(), const hasher& __hf = hasher(),
const key_equal& __eql = key_equal(), const key_equal& __eql = key_equal(),
const allocator_type& __a = allocator_type()) const allocator_type& __a = allocator_type())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment