noexcept for <unordered_map>.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-06-04 18:54:24 +00:00
parent 8b53768dac
commit 5f2f14c5d2
12 changed files with 1015 additions and 153 deletions

View File

@@ -44,7 +44,12 @@ public:
typedef /unspecified/ local_iterator;
typedef /unspecified/ const_local_iterator;
explicit unordered_map(size_type n = 0, const hasher& hf = hasher(),
unordered_map()
noexcept(
is_nothrow_default_constructible<hasher>::value &&
is_nothrow_default_constructible<key_equal>::value &&
is_nothrow_default_constructible<allocator_type>::value);
explicit unordered_map(size_type n, const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template <class InputIterator>
@@ -55,28 +60,37 @@ public:
explicit unordered_map(const allocator_type&);
unordered_map(const unordered_map&);
unordered_map(const unordered_map&, const Allocator&);
unordered_map(unordered_map&&);
unordered_map(unordered_map&&)
noexcept(
is_nothrow_move_constructible<hasher>::value &&
is_nothrow_move_constructible<key_equal>::value &&
is_nothrow_move_constructible<allocator_type>::value);
unordered_map(unordered_map&&, const Allocator&);
unordered_map(initializer_list<value_type>, size_type n = 0,
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
~unordered_map();
unordered_map& operator=(const unordered_map&);
unordered_map& operator=(unordered_map&&);
unordered_map& operator=(unordered_map&&)
noexcept(
allocator_type::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value &&
is_nothrow_move_assignable<hasher>::value &&
is_nothrow_move_assignable<key_equal>::value);
unordered_map& operator=(initializer_list<value_type>);
allocator_type get_allocator() const;
allocator_type get_allocator() const noexcept;
bool empty() const;
size_type size() const;
size_type max_size() const;
bool empty() const noexcept;
size_type size() const noexcept;
size_type max_size() const noexcept;
iterator begin();
iterator end();
const_iterator begin() const;
const_iterator end() const;
const_iterator cbegin() const;
const_iterator cend() const;
iterator begin() noexcept;
iterator end() noexcept;
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
template <class... Args>
pair<iterator, bool> emplace(Args&&... args);
@@ -95,9 +109,14 @@ public:
iterator erase(const_iterator position);
size_type erase(const key_type& k);
iterator erase(const_iterator first, const_iterator last);
void clear();
void clear() noexcept;
void swap(unordered_map&);
void swap(unordered_map&)
noexcept(
(!allocator_type::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value) &&
__is_nothrow_swappable<hasher>::value &&
__is_nothrow_swappable<key_equal>::value);
hasher hash_function() const;
key_equal key_eq() const;
@@ -114,8 +133,8 @@ public:
mapped_type& at(const key_type& k);
const mapped_type& at(const key_type& k) const;
size_type bucket_count() const;
size_type max_bucket_count() const;
size_type bucket_count() const noexcept;
size_type max_bucket_count() const noexcept;
size_type bucket_size(size_type n) const;
size_type bucket(const key_type& k) const;
@@ -127,8 +146,8 @@ public:
const_local_iterator cbegin(size_type n) const;
const_local_iterator cend(size_type n) const;
float load_factor() const;
float max_load_factor() const;
float load_factor() const noexcept;
float max_load_factor() const noexcept;
void max_load_factor(float z);
void rehash(size_type n);
void reserve(size_type n);
@@ -136,7 +155,8 @@ public:
template <class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
unordered_map<Key, T, Hash, Pred, Alloc>& y);
unordered_map<Key, T, Hash, Pred, Alloc>& y)
noexcept(noexcept(x.swap(y)));
template <class Key, class T, class Hash, class Pred, class Alloc>
bool
@@ -172,7 +192,12 @@ public:
typedef /unspecified/ local_iterator;
typedef /unspecified/ const_local_iterator;
explicit unordered_multimap(size_type n = 0, const hasher& hf = hasher(),
unordered_multimap()
noexcept(
is_nothrow_default_constructible<hasher>::value &&
is_nothrow_default_constructible<key_equal>::value &&
is_nothrow_default_constructible<allocator_type>::value);
explicit unordered_multimap(size_type n, const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
template <class InputIterator>
@@ -183,28 +208,37 @@ public:
explicit unordered_multimap(const allocator_type&);
unordered_multimap(const unordered_multimap&);
unordered_multimap(const unordered_multimap&, const Allocator&);
unordered_multimap(unordered_multimap&&);
unordered_multimap(unordered_multimap&&)
noexcept(
is_nothrow_move_constructible<hasher>::value &&
is_nothrow_move_constructible<key_equal>::value &&
is_nothrow_move_constructible<allocator_type>::value);
unordered_multimap(unordered_multimap&&, const Allocator&);
unordered_multimap(initializer_list<value_type>, size_type n = 0,
const hasher& hf = hasher(), const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
~unordered_multimap();
unordered_multimap& operator=(const unordered_multimap&);
unordered_multimap& operator=(unordered_multimap&&);
unordered_multimap& operator=(unordered_multimap&&)
noexcept(
allocator_type::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value &&
is_nothrow_move_assignable<hasher>::value &&
is_nothrow_move_assignable<key_equal>::value);
unordered_multimap& operator=(initializer_list<value_type>);
allocator_type get_allocator() const;
allocator_type get_allocator() const noexcept;
bool empty() const;
size_type size() const;
size_type max_size() const;
bool empty() const noexcept;
size_type size() const noexcept;
size_type max_size() const noexcept;
iterator begin();
iterator end();
const_iterator begin() const;
const_iterator end() const;
const_iterator cbegin() const;
const_iterator cend() const;
iterator begin() noexcept;
iterator end() noexcept;
const_iterator begin() const noexcept;
const_iterator end() const noexcept;
const_iterator cbegin() const noexcept;
const_iterator cend() const noexcept;
template <class... Args>
iterator emplace(Args&&... args);
@@ -223,9 +257,14 @@ public:
iterator erase(const_iterator position);
size_type erase(const key_type& k);
iterator erase(const_iterator first, const_iterator last);
void clear();
void clear() noexcept;
void swap(unordered_multimap&);
void swap(unordered_multimap&)
noexcept(
(!allocator_type::propagate_on_container_swap::value ||
__is_nothrow_swappable<allocator_type>::value) &&
__is_nothrow_swappable<hasher>::value &&
__is_nothrow_swappable<key_equal>::value);
hasher hash_function() const;
key_equal key_eq() const;
@@ -236,8 +275,8 @@ public:
pair<iterator, iterator> equal_range(const key_type& k);
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
size_type bucket_count() const;
size_type max_bucket_count() const;
size_type bucket_count() const noexcept;
size_type max_bucket_count() const noexcept;
size_type bucket_size(size_type n) const;
size_type bucket(const key_type& k) const;
@@ -249,8 +288,8 @@ public:
const_local_iterator cbegin(size_type n) const;
const_local_iterator cend(size_type n) const;
float load_factor() const;
float max_load_factor() const;
float load_factor() const noexcept;
float max_load_factor() const noexcept;
void max_load_factor(float z);
void rehash(size_type n);
void reserve(size_type n);
@@ -258,7 +297,8 @@ public:
template <class Key, class T, class Hash, class Pred, class Alloc>
void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
noexcept(noexcept(x.swap(y)));
template <class Key, class T, class Hash, class Pred, class Alloc>
bool
@@ -289,11 +329,15 @@ class __unordered_map_hasher
{
public:
_LIBCPP_INLINE_VISIBILITY
__unordered_map_hasher() : _Hash() {}
__unordered_map_hasher()
_NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
: _Hash() {}
_LIBCPP_INLINE_VISIBILITY
__unordered_map_hasher(const _Hash& __h) : _Hash(__h) {}
__unordered_map_hasher(const _Hash& __h)
_NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
: _Hash(__h) {}
_LIBCPP_INLINE_VISIBILITY
const _Hash& hash_function() const {return *this;}
const _Hash& hash_function() const _NOEXCEPT {return *this;}
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const _Tp& __x) const
{return static_cast<const _Hash&>(*this)(__x.first);}
@@ -308,11 +352,15 @@ class __unordered_map_hasher<_Tp, _Hash, false>
_Hash __hash_;
public:
_LIBCPP_INLINE_VISIBILITY
__unordered_map_hasher() : __hash_() {}
__unordered_map_hasher()
_NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
: __hash_() {}
_LIBCPP_INLINE_VISIBILITY
__unordered_map_hasher(const _Hash& __h) : __hash_(__h) {}
__unordered_map_hasher(const _Hash& __h)
_NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
: __hash_(__h) {}
_LIBCPP_INLINE_VISIBILITY
const _Hash& hash_function() const {return __hash_;}
const _Hash& hash_function() const _NOEXCEPT {return __hash_;}
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const _Tp& __x) const
{return __hash_(__x.first);}
@@ -327,11 +375,15 @@ class __unordered_map_equal
{
public:
_LIBCPP_INLINE_VISIBILITY
__unordered_map_equal() : _Pred() {}
__unordered_map_equal()
_NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
: _Pred() {}
_LIBCPP_INLINE_VISIBILITY
__unordered_map_equal(const _Pred& __p) : _Pred(__p) {}
__unordered_map_equal(const _Pred& __p)
_NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
: _Pred(__p) {}
_LIBCPP_INLINE_VISIBILITY
const _Pred& key_eq() const {return *this;}
const _Pred& key_eq() const _NOEXCEPT {return *this;}
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return static_cast<const _Pred&>(*this)(__x.first, __y.first);}
@@ -353,11 +405,15 @@ class __unordered_map_equal<_Tp, _Pred, false>
_Pred __pred_;
public:
_LIBCPP_INLINE_VISIBILITY
__unordered_map_equal() : __pred_() {}
__unordered_map_equal()
_NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
: __pred_() {}
_LIBCPP_INLINE_VISIBILITY
__unordered_map_equal(const _Pred& __p) : __pred_(__p) {}
__unordered_map_equal(const _Pred& __p)
_NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
: __pred_(__p) {}
_LIBCPP_INLINE_VISIBILITY
const _Pred& key_eq() const {return __pred_;}
const _Pred& key_eq() const _NOEXCEPT {return __pred_;}
_LIBCPP_INLINE_VISIBILITY
bool operator()(const _Tp& __x, const _Tp& __y) const
{return __pred_(__x.first, __y.first);}
@@ -394,7 +450,7 @@ public:
bool __second_constructed;
_LIBCPP_INLINE_VISIBILITY
explicit __hash_map_node_destructor(allocator_type& __na)
explicit __hash_map_node_destructor(allocator_type& __na) _NOEXCEPT
: __na_(__na),
__first_constructed(false),
__second_constructed(false)
@@ -403,6 +459,7 @@ public:
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
_NOEXCEPT
: __na_(__x.__na_),
__first_constructed(__x.__value_constructed),
__second_constructed(__x.__value_constructed)
@@ -421,7 +478,7 @@ public:
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
void operator()(pointer __p)
void operator()(pointer __p) _NOEXCEPT
{
if (__second_constructed)
__alloc_traits::destroy(__na_, _STD::addressof(__p->__value_.second));
@@ -454,10 +511,10 @@ public:
pointer;
_LIBCPP_INLINE_VISIBILITY
__hash_map_iterator() {}
__hash_map_iterator() _NOEXCEPT {}
_LIBCPP_INLINE_VISIBILITY
__hash_map_iterator(_HashIterator __i) : __i_(__i) {}
__hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
_LIBCPP_INLINE_VISIBILITY
reference operator*() const {return *operator->();}
@@ -510,13 +567,14 @@ public:
pointer;
_LIBCPP_INLINE_VISIBILITY
__hash_map_const_iterator() {}
__hash_map_const_iterator() _NOEXCEPT {}
_LIBCPP_INLINE_VISIBILITY
__hash_map_const_iterator(_HashIterator __i) : __i_(__i) {}
__hash_map_const_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
_LIBCPP_INLINE_VISIBILITY
__hash_map_const_iterator(
__hash_map_iterator<typename _HashIterator::__non_const_iterator> __i)
_NOEXCEPT
: __i_(__i.__i_) {}
_LIBCPP_INLINE_VISIBILITY
@@ -599,7 +657,9 @@ public:
typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;
_LIBCPP_INLINE_VISIBILITY
unordered_map() {} // = default;
unordered_map()
_NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
{} // = default;
explicit unordered_map(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
unordered_map(size_type __n, const hasher& __hf,
@@ -620,7 +680,8 @@ public:
unordered_map(const unordered_map& __u);
unordered_map(const unordered_map& __u, const allocator_type& __a);
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_map(unordered_map&& __u);
unordered_map(unordered_map&& __u)
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
unordered_map(unordered_map&& __u, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_map(initializer_list<value_type> __il);
@@ -632,33 +693,34 @@ public:
// ~unordered_map() = default;
// unordered_map& operator=(const unordered_map& __u) = default;
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_map& operator=(unordered_map&& __u);
unordered_map& operator=(unordered_map&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
#endif
unordered_map& operator=(initializer_list<value_type> __il);
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const
allocator_type get_allocator() const _NOEXCEPT
{return allocator_type(__table_.__node_alloc());}
_LIBCPP_INLINE_VISIBILITY
bool empty() const {return __table_.size() == 0;}
bool empty() const _NOEXCEPT {return __table_.size() == 0;}
_LIBCPP_INLINE_VISIBILITY
size_type size() const {return __table_.size();}
size_type size() const _NOEXCEPT {return __table_.size();}
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const {return __table_.max_size();}
size_type max_size() const _NOEXCEPT {return __table_.max_size();}
_LIBCPP_INLINE_VISIBILITY
iterator begin() {return __table_.begin();}
iterator begin() _NOEXCEPT {return __table_.begin();}
_LIBCPP_INLINE_VISIBILITY
iterator end() {return __table_.end();}
iterator end() _NOEXCEPT {return __table_.end();}
_LIBCPP_INLINE_VISIBILITY
const_iterator begin() const {return __table_.begin();}
const_iterator begin() const _NOEXCEPT {return __table_.begin();}
_LIBCPP_INLINE_VISIBILITY
const_iterator end() const {return __table_.end();}
const_iterator end() const _NOEXCEPT {return __table_.end();}
_LIBCPP_INLINE_VISIBILITY
const_iterator cbegin() const {return __table_.begin();}
const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
_LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __table_.end();}
const_iterator cend() const _NOEXCEPT {return __table_.end();}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
@@ -733,10 +795,12 @@ public:
iterator erase(const_iterator __first, const_iterator __last)
{return __table_.erase(__first.__i_, __last.__i_);}
_LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
void clear() _NOEXCEPT {__table_.clear();}
_LIBCPP_INLINE_VISIBILITY
void swap(unordered_map& __u) {__table_.swap(__u.__table_);}
void swap(unordered_map& __u)
_NOEXCEPT_(__is_nothrow_swappable<__table>::value)
{__table_.swap(__u.__table_);}
_LIBCPP_INLINE_VISIBILITY
hasher hash_function() const
@@ -767,9 +831,9 @@ public:
const mapped_type& at(const key_type& __k) const;
_LIBCPP_INLINE_VISIBILITY
size_type bucket_count() const {return __table_.bucket_count();}
size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
_LIBCPP_INLINE_VISIBILITY
size_type max_bucket_count() const {return __table_.max_bucket_count();}
size_type max_bucket_count() const _NOEXCEPT {return __table_.max_bucket_count();}
_LIBCPP_INLINE_VISIBILITY
size_type bucket_size(size_type __n) const
@@ -791,9 +855,9 @@ public:
const_local_iterator cend(size_type __n) const {return __table_.cend(__n);}
_LIBCPP_INLINE_VISIBILITY
float load_factor() const {return __table_.load_factor();}
float load_factor() const _NOEXCEPT {return __table_.load_factor();}
_LIBCPP_INLINE_VISIBILITY
float max_load_factor() const {return __table_.max_load_factor();}
float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
_LIBCPP_INLINE_VISIBILITY
void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
_LIBCPP_INLINE_VISIBILITY
@@ -895,6 +959,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
unordered_map&& __u)
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
: __table_(_STD::move(__u.__table_))
{
}
@@ -949,6 +1014,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
{
__table_ = _STD::move(__u.__table_);
return *this;
@@ -1111,6 +1177,7 @@ inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
__x.swap(__y);
}
@@ -1193,7 +1260,9 @@ public:
typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;
_LIBCPP_INLINE_VISIBILITY
unordered_multimap() {} // = default
unordered_multimap()
_NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
{} // = default;
explicit unordered_multimap(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
unordered_multimap(size_type __n, const hasher& __hf,
@@ -1214,7 +1283,8 @@ public:
unordered_multimap(const unordered_multimap& __u);
unordered_multimap(const unordered_multimap& __u, const allocator_type& __a);
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_multimap(unordered_multimap&& __u);
unordered_multimap(unordered_multimap&& __u)
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
unordered_multimap(unordered_multimap&& __u, const allocator_type& __a);
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_multimap(initializer_list<value_type> __il);
@@ -1227,33 +1297,34 @@ public:
// ~unordered_multimap() = default;
// unordered_multimap& operator=(const unordered_multimap& __u) = default;
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
unordered_multimap& operator=(unordered_multimap&& __u);
unordered_multimap& operator=(unordered_multimap&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
#endif
unordered_multimap& operator=(initializer_list<value_type> __il);
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const
allocator_type get_allocator() const _NOEXCEPT
{return allocator_type(__table_.__node_alloc());}
_LIBCPP_INLINE_VISIBILITY
bool empty() const {return __table_.size() == 0;}
bool empty() const _NOEXCEPT {return __table_.size() == 0;}
_LIBCPP_INLINE_VISIBILITY
size_type size() const {return __table_.size();}
size_type size() const _NOEXCEPT {return __table_.size();}
_LIBCPP_INLINE_VISIBILITY
size_type max_size() const {return __table_.max_size();}
size_type max_size() const _NOEXCEPT {return __table_.max_size();}
_LIBCPP_INLINE_VISIBILITY
iterator begin() {return __table_.begin();}
iterator begin() _NOEXCEPT {return __table_.begin();}
_LIBCPP_INLINE_VISIBILITY
iterator end() {return __table_.end();}
iterator end() _NOEXCEPT {return __table_.end();}
_LIBCPP_INLINE_VISIBILITY
const_iterator begin() const {return __table_.begin();}
const_iterator begin() const _NOEXCEPT {return __table_.begin();}
_LIBCPP_INLINE_VISIBILITY
const_iterator end() const {return __table_.end();}
const_iterator end() const _NOEXCEPT {return __table_.end();}
_LIBCPP_INLINE_VISIBILITY
const_iterator cbegin() const {return __table_.begin();}
const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
_LIBCPP_INLINE_VISIBILITY
const_iterator cend() const {return __table_.end();}
const_iterator cend() const _NOEXCEPT {return __table_.end();}
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
@@ -1324,10 +1395,12 @@ public:
iterator erase(const_iterator __first, const_iterator __last)
{return __table_.erase(__first.__i_, __last.__i_);}
_LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
void clear() _NOEXCEPT {__table_.clear();}
_LIBCPP_INLINE_VISIBILITY
void swap(unordered_multimap& __u) {__table_.swap(__u.__table_);}
void swap(unordered_multimap& __u)
_NOEXCEPT_(__is_nothrow_swappable<__table>::value)
{__table_.swap(__u.__table_);}
_LIBCPP_INLINE_VISIBILITY
hasher hash_function() const
@@ -1350,9 +1423,10 @@ public:
{return __table_.__equal_range_multi(__k);}
_LIBCPP_INLINE_VISIBILITY
size_type bucket_count() const {return __table_.bucket_count();}
size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
_LIBCPP_INLINE_VISIBILITY
size_type max_bucket_count() const {return __table_.max_bucket_count();}
size_type max_bucket_count() const _NOEXCEPT
{return __table_.max_bucket_count();}
_LIBCPP_INLINE_VISIBILITY
size_type bucket_size(size_type __n) const
@@ -1374,9 +1448,9 @@ public:
const_local_iterator cend(size_type __n) const {return __table_.cend(__n);}
_LIBCPP_INLINE_VISIBILITY
float load_factor() const {return __table_.load_factor();}
float load_factor() const _NOEXCEPT {return __table_.load_factor();}
_LIBCPP_INLINE_VISIBILITY
float max_load_factor() const {return __table_.max_load_factor();}
float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
_LIBCPP_INLINE_VISIBILITY
void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
_LIBCPP_INLINE_VISIBILITY
@@ -1474,6 +1548,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
unordered_multimap&& __u)
_NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
: __table_(_STD::move(__u.__table_))
{
}
@@ -1530,6 +1605,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multimap&& __u)
_NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
{
__table_ = _STD::move(__u.__table_);
return *this;
@@ -1637,6 +1713,7 @@ inline _LIBCPP_INLINE_VISIBILITY
void
swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
{
__x.swap(__y);
}