mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
Swap order of swap/clear to match standard
This commit is contained in:
@ -677,8 +677,8 @@ template <class K, class T, class H, class P, class A> class unordered_map
|
|||||||
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
||||||
void erase_return_void(const_iterator it) { erase(it); }
|
void erase_return_void(const_iterator it) { erase(it); }
|
||||||
|
|
||||||
void clear();
|
|
||||||
void swap(unordered_map&);
|
void swap(unordered_map&);
|
||||||
|
void clear();
|
||||||
|
|
||||||
template <typename H2, typename P2>
|
template <typename H2, typename P2>
|
||||||
void merge(boost::unordered_map<K, T, H2, P2, A>& source);
|
void merge(boost::unordered_map<K, T, H2, P2, A>& source);
|
||||||
@ -1179,8 +1179,8 @@ template <class K, class T, class H, class P, class A> class unordered_multimap
|
|||||||
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
||||||
void erase_return_void(const_iterator it) { erase(it); }
|
void erase_return_void(const_iterator it) { erase(it); }
|
||||||
|
|
||||||
void clear();
|
|
||||||
void swap(unordered_multimap&);
|
void swap(unordered_multimap&);
|
||||||
|
void clear();
|
||||||
|
|
||||||
template <typename H2, typename P2>
|
template <typename H2, typename P2>
|
||||||
void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
|
void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
|
||||||
@ -1485,18 +1485,18 @@ unordered_map<K, T, H, P, A>::erase(const_iterator first, const_iterator last)
|
|||||||
return table_.erase_range(first, last);
|
return table_.erase_range(first, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
|
||||||
void unordered_map<K, T, H, P, A>::clear()
|
|
||||||
{
|
|
||||||
table_.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
void unordered_map<K, T, H, P, A>::swap(unordered_map& other)
|
void unordered_map<K, T, H, P, A>::swap(unordered_map& other)
|
||||||
{
|
{
|
||||||
table_.swap(other.table_);
|
table_.swap(other.table_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class K, class T, class H, class P, class A>
|
||||||
|
void unordered_map<K, T, H, P, A>::clear()
|
||||||
|
{
|
||||||
|
table_.clear();
|
||||||
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
template <typename H2, typename P2>
|
template <typename H2, typename P2>
|
||||||
void unordered_map<K, T, H, P, A>::merge(
|
void unordered_map<K, T, H, P, A>::merge(
|
||||||
@ -1904,18 +1904,18 @@ unordered_multimap<K, T, H, P, A>::erase(
|
|||||||
return table_.erase_range(first, last);
|
return table_.erase_range(first, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
|
||||||
void unordered_multimap<K, T, H, P, A>::clear()
|
|
||||||
{
|
|
||||||
table_.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
void unordered_multimap<K, T, H, P, A>::swap(unordered_multimap& other)
|
void unordered_multimap<K, T, H, P, A>::swap(unordered_multimap& other)
|
||||||
{
|
{
|
||||||
table_.swap(other.table_);
|
table_.swap(other.table_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class K, class T, class H, class P, class A>
|
||||||
|
void unordered_multimap<K, T, H, P, A>::clear()
|
||||||
|
{
|
||||||
|
table_.clear();
|
||||||
|
}
|
||||||
|
|
||||||
// observers
|
// observers
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
|
@ -416,8 +416,8 @@ template <class T, class H, class P, class A> class unordered_set
|
|||||||
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
||||||
void erase_return_void(const_iterator it) { erase(it); }
|
void erase_return_void(const_iterator it) { erase(it); }
|
||||||
|
|
||||||
void clear();
|
|
||||||
void swap(unordered_set&);
|
void swap(unordered_set&);
|
||||||
|
void clear();
|
||||||
|
|
||||||
template <typename H2, typename P2>
|
template <typename H2, typename P2>
|
||||||
void merge(boost::unordered_set<T, H2, P2, A>& source);
|
void merge(boost::unordered_set<T, H2, P2, A>& source);
|
||||||
@ -887,8 +887,8 @@ template <class T, class H, class P, class A> class unordered_multiset
|
|||||||
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
BOOST_UNORDERED_DEPRECATED("Use erase instead")
|
||||||
void erase_return_void(const_iterator it) { erase(it); }
|
void erase_return_void(const_iterator it) { erase(it); }
|
||||||
|
|
||||||
void clear();
|
|
||||||
void swap(unordered_multiset&);
|
void swap(unordered_multiset&);
|
||||||
|
void clear();
|
||||||
|
|
||||||
template <typename H2, typename P2>
|
template <typename H2, typename P2>
|
||||||
void merge(boost::unordered_multiset<T, H2, P2, A>& source);
|
void merge(boost::unordered_multiset<T, H2, P2, A>& source);
|
||||||
@ -1174,6 +1174,12 @@ typename unordered_set<T, H, P, A>::iterator unordered_set<T, H, P, A>::erase(
|
|||||||
return table_.erase_range(first, last);
|
return table_.erase_range(first, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class T, class H, class P, class A>
|
||||||
|
void unordered_set<T, H, P, A>::swap(unordered_set& other)
|
||||||
|
{
|
||||||
|
table_.swap(other.table_);
|
||||||
|
}
|
||||||
|
|
||||||
template <class T, class H, class P, class A>
|
template <class T, class H, class P, class A>
|
||||||
void unordered_set<T, H, P, A>::clear()
|
void unordered_set<T, H, P, A>::clear()
|
||||||
{
|
{
|
||||||
@ -1181,9 +1187,9 @@ void unordered_set<T, H, P, A>::clear()
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class H, class P, class A>
|
template <class T, class H, class P, class A>
|
||||||
void unordered_set<T, H, P, A>::swap(unordered_set& other)
|
void unordered_multiset<T, H, P, A>::clear()
|
||||||
{
|
{
|
||||||
table_.swap(other.table_);
|
table_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// observers
|
// observers
|
||||||
@ -1539,12 +1545,6 @@ unordered_multiset<T, H, P, A>::erase(const_iterator first, const_iterator last)
|
|||||||
return table_.erase_range(first, last);
|
return table_.erase_range(first, last);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class H, class P, class A>
|
|
||||||
void unordered_multiset<T, H, P, A>::clear()
|
|
||||||
{
|
|
||||||
table_.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T, class H, class P, class A>
|
template <class T, class H, class P, class A>
|
||||||
void unordered_multiset<T, H, P, A>::swap(unordered_multiset& other)
|
void unordered_multiset<T, H, P, A>::swap(unordered_multiset& other)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user