diff --git a/test/more/tests/libs/array.gold2 b/test/more/tests/libs/array.gold2
index 404f73b..0d0fb5e 100644
--- a/test/more/tests/libs/array.gold2
+++ b/test/more/tests/libs/array.gold2
@@ -65,15 +65,15 @@
No constructors are provided.Elements may have an undetermined initial value (see ).swap() has no constant complexity.
- size() is always constant, based on the second template argument of the type.
+ size() is always constant, based on the second template argument of the type.The container provides no allocator support.It doesn't fulfill the requirements of a "sequence" (see Section 23.1.1, [lib.sequence.reqmts] of the C++ Standard), except that:
- front() and back() are provided.
- operator[] and at() are provided.
+ front() and back() are provided.
+ operator[] and at() are provided.
@@ -87,13 +87,13 @@
template<typename T,std::size_t N>booloperator!=(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator<(const array<T,N>&,const array<T,N>&);
+ booloperator<(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator>(const array<T,N>&,const array<T,N>&);
+ booloperator>(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator<=(const array<T,N>&,const array<T,N>&);
+ booloperator<=(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator>=(const array<T,N>&,const array<T,N>&);
+ booloperator>=(const array<T,N>&,const array<T,N>&);}Class template array3boost::arraySTL compliant container wrapper for arrays of constant size// In header: <boost/array.hpp>
@@ -115,121 +115,121 @@
staticconstsize_typestatic_size = N;// construct/copy/destruct
- template<typename U> array& operator=(const array<U,N>&);
+ template<typename U> array& operator=(const array<U,N>&);
- // iterator support
- iteratorbegin();
- const_iteratorbegin()const;
- iteratorend();
- const_iteratorend()const;
+ // iterator support
+ iteratorbegin();
+ const_iteratorbegin()const;
+ iteratorend();
+ const_iteratorend()const;
- // reverse iterator support
- reverse_iteratorrbegin();
- const_reverse_iteratorrbegin()const;
- reverse_iteratorrend();
- const_reverse_iteratorrend()const;
+ // reverse iterator support
+ reverse_iteratorrbegin();
+ const_reverse_iteratorrbegin()const;
+ reverse_iteratorrend();
+ const_reverse_iteratorrend()const;
- // capacity
- size_typesize();
- boolempty();
- size_typemax_size();
+ // capacity
+ size_typesize();
+ boolempty();
+ size_typemax_size();
- // element access
- referenceoperator[](size_type);
- const_referenceoperator[](size_type)const;
- referenceat(size_type);
- const_referenceat(size_type)const;
- referencefront();
- const_referencefront()const;
- referenceback();
- const_referenceback()const;
- constT*data()const;
- T*c_array();
+ // element access
+ referenceoperator[](size_type);
+ const_referenceoperator[](size_type)const;
+ referenceat(size_type);
+ const_referenceat(size_type)const;
+ referencefront();
+ const_referencefront()const;
+ referenceback();
+ const_referenceback()const;
+ constT*data()const;
+ T*c_array();
- // modifiers
- voidswap(array<T,N>&);
- voidassign(constT&);
+ // modifiers
+ voidswap(array<T,N>&);
+ voidassign(constT&);// public data membersTelems[N];};
-// specialized algorithms
+// specialized algorithmstemplate<typename T,std::size_t N>voidswap(array<T,N>&, array<T,N>&);
-// comparisons
+// comparisonstemplate<typename T,std::size_t N>booloperator==(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>booloperator!=(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator<(const array<T,N>&,const array<T,N>&);
+ booloperator<(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator>(const array<T,N>&,const array<T,N>&);
+ booloperator>(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator<=(const array<T,N>&,const array<T,N>&);
+ booloperator<=(const array<T,N>&,const array<T,N>&);template<typename T,std::size_t N>
- booloperator>=(const array<T,N>&,const array<T,N>&);Descriptionarray
+ booloperator>=(const array<T,N>&,const array<T,N>&);Descriptionarray
public
- construct/copy/destructtemplate<typename U> array& operator=(const array<U,N>& other);template<typename U> array& operator=(const array<U,N>& other);Effects:std::copy(rhs.begin(),rhs.end(), begin())array iterator supportiteratorbegin();
-const_iteratorbegin()const;Effects:std::copy(rhs.begin(),rhs.end(), begin())array iterator supportiteratorbegin();
+const_iteratorbegin()const;Returns:iterator for the first elementThrows:will not throwiteratorend();
-const_iteratorend()const;Returns:iterator for the first elementThrows:will not throwiteratorend();
+const_iteratorend()const;Returns:iterator for position after the last elementThrows:will not throwarray reverse iterator supportreverse_iteratorrbegin();
-const_reverse_iteratorrbegin()const;Returns:iterator for position after the last elementThrows:will not throwarray reverse iterator supportreverse_iteratorrbegin();
+const_reverse_iteratorrbegin()const;Returns:reverse iterator for the first element of reverse iterationreverse_iteratorrend();
-const_reverse_iteratorrend()const;Returns:reverse iterator for the first element of reverse iterationreverse_iteratorrend();
+const_reverse_iteratorrend()const;Returns:reverse iterator for position after the last element in reverse iterationarray capacitysize_typesize();Returns:reverse iterator for position after the last element in reverse iterationarray capacitysize_typesize();Returns:Nboolempty();Returns:Nboolempty();Returns:N==0Throws:will not throwsize_typemax_size();Returns:N==0Throws:will not throwsize_typemax_size();Returns:NThrows:will not throwarray element accessreferenceoperator[](size_type i);
-const_referenceoperator[](size_type i)const;Returns:NThrows:will not throwarray element accessreferenceoperator[](size_type i);
+const_referenceoperator[](size_type i)const;Requires:i < NReturns:element with index iThrows:will not throw.referenceat(size_type i);
-const_referenceat(size_type i)const;Requires:i < NReturns:element with index iThrows:will not throw.referenceat(size_type i);
+const_referenceat(size_type i)const;Returns:element with index iThrows:std::range_error if i >= Nreferencefront();
-const_referencefront()const;Returns:element with index iThrows:std::range_error if i >= Nreferencefront();
+const_referencefront()const;Requires:N > 0Returns:the first elementThrows:will not throwreferenceback();
-const_referenceback()const;Requires:N > 0Returns:the first elementThrows:will not throwreferenceback();
+const_referenceback()const;Requires:N > 0Returns:the last elementThrows:will not throwconstT*data()const;Requires:N > 0Returns:the last elementThrows:will not throwconstT*data()const;Returns:elemsThrows:will not throwT*c_array();Returns:elemsThrows:will not throwT*c_array();Returns:elemsThrows:will not throwarray modifiersvoidswap(array<T,N>& other);Returns:elemsThrows:will not throwarray modifiersvoidswap(array<T,N>& other);Effects:std::swap_ranges(begin(), end(), other.begin())Complexity:linear in Nvoidassign(constT& value);Effects:std::swap_ranges(begin(), end(), other.begin())Complexity:linear in Nvoidassign(constT& value);Effects:std::fill_n(begin(), N, value)array specialized algorithmstemplate<typename T,std::size_t N>voidswap(array<T,N>& x, array<T,N>& y);Effects:std::fill_n(begin(), N, value)array specialized algorithmstemplate<typename T,std::size_t N>voidswap(array<T,N>& x, array<T,N>& y);Effects:x.swap(y)Throws:will not throw.array comparisonstemplate<typename T,std::size_t N>
+ ?>Effects:x.swap(y)Throws:will not throw.array comparisonstemplate<typename T,std::size_t N>booloperator==(const array<T,N>& x,const array<T,N>& y);Returns:std::equal(x.begin(), x.end(), y.begin())template<typename T,std::size_t N>
+ ?>Returns:std::equal(x.begin(), x.end(), y.begin())template<typename T,std::size_t N>booloperator!=(const array<T,N>& x,const array<T,N>& y);Returns:!(x == y)template<typename T,std::size_t N>
- booloperator<(const array<T,N>& x,const array<T,N>& y);bool operator<(const array<T,N>& x,const array<T,N>& y);Returns:std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end())template<typename T,std::size_t N>
- booloperator>(const array<T,N>& x,const array<T,N>& y);Returns:std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end())template<typename T,std::size_t N>
+ booloperator>(const array<T,N>& x,const array<T,N>& y);Returns:y < xtemplate<typename T,std::size_t N>
- booloperator<=(const array<T,N>& x,const array<T,N>& y);bool operator<=(const array<T,N>& x,const array<T,N>& y);Returns:!(y < x)template<typename T,std::size_t N>
- booloperator>=(const array<T,N>& x,const array<T,N>& y);bool operator>=(const array<T,N>& x,const array<T,N>& y);Returns:!(x < y)
diff --git a/test/more/tests/libs/hash-ref.gold2 b/test/more/tests/libs/hash-ref.gold2
index e3a08b4..cbd8e8f 100644
--- a/test/more/tests/libs/hash-ref.gold2
+++ b/test/more/tests/libs/hash-ref.gold2
@@ -13,74 +13,74 @@
namespaceboost{template<typename T>struct hash;
- template<>struct hash<bool>;
- template<>struct hash<char>;
- template<>struct hash<signedchar>;
- template<>struct hash<unsignedchar>;
- template<>struct hash<wchar_t>;
- template<>struct hash<short>;
- template<>struct hash<unsignedshort>;
- template<>struct hash<int>;
- template<>struct hash<unsignedint>;
- template<>struct hash<long>;
- template<>struct hash<unsignedlong>;
- template<>struct hash<longlong>;
- template<>struct hash<unsignedlonglong>;
- template<>struct hash<float>;
- template<>struct hash<double>;
- template<>struct hash<longdouble>;
- template<>struct hash<std::string>;
- template<>struct hash<std::wstring>;
- template<typename T>struct hash<T*>;
+ template<>struct hash<bool>;
+ template<>struct hash<char>;
+ template<>struct hash<signedchar>;
+ template<>struct hash<unsignedchar>;
+ template<>struct hash<wchar_t>;
+ template<>struct hash<short>;
+ template<>struct hash<unsignedshort>;
+ template<>struct hash<int>;
+ template<>struct hash<unsignedint>;
+ template<>struct hash<long>;
+ template<>struct hash<unsignedlong>;
+ template<>struct hash<longlong>;
+ template<>struct hash<unsignedlonglong>;
+ template<>struct hash<float>;
+ template<>struct hash<double>;
+ template<>struct hash<longdouble>;
+ template<>struct hash<std::string>;
+ template<>struct hash<std::wstring>;
+ template<typename T>struct hash<T*>;
- // Support functions (Boost extension).
+ // Support functions (Boost extension).template<typename T>voidhash_combine(size_t&,Tconst&);
- template<typename It>std::size_thash_range(It,It);
- template<typename It>voidhash_range(std::size_t&,It,It);
+ template<typename It>std::size_thash_range(It,It);
+ template<typename It>voidhash_range(std::size_t&,It,It);
- // Overloadable hash implementation (Boost extension).
- std::size_thash_value(bool);
- std::size_thash_value(char);
- std::size_thash_value(signedchar);
- std::size_thash_value(unsignedchar);
- std::size_thash_value(wchar_t);
- std::size_thash_value(short);
- std::size_thash_value(unsignedshort);
- std::size_thash_value(int);
- std::size_thash_value(unsignedint);
- std::size_thash_value(long);
- std::size_thash_value(unsignedlong);
- std::size_thash_value(longlong);
- std::size_thash_value(unsignedlonglong);
- std::size_thash_value(float);
- std::size_thash_value(double);
- std::size_thash_value(longdouble);
- template<typename T>std::size_thash_value(T*const&);
- template<typename T,unsigned N>std::size_thash_value(T(&val)[N]);
- template<typename T,unsigned N>std::size_thash_value(constT(&val)[N]);
+ // Overloadable hash implementation (Boost extension).
+ std::size_thash_value(bool);
+ std::size_thash_value(char);
+ std::size_thash_value(signedchar);
+ std::size_thash_value(unsignedchar);
+ std::size_thash_value(wchar_t);
+ std::size_thash_value(short);
+ std::size_thash_value(unsignedshort);
+ std::size_thash_value(int);
+ std::size_thash_value(unsignedint);
+ std::size_thash_value(long);
+ std::size_thash_value(unsignedlong);
+ std::size_thash_value(longlong);
+ std::size_thash_value(unsignedlonglong);
+ std::size_thash_value(float);
+ std::size_thash_value(double);
+ std::size_thash_value(longdouble);
+ template<typename T>std::size_thash_value(T*const&);
+ template<typename T,unsigned N>std::size_thash_value(T(&val)[N]);
+ template<typename T,unsigned N>std::size_thash_value(constT(&val)[N]);template<typename Ch,typename A>
- std::size_thash_value(std::basic_string<Ch,std::char_traits<Ch>,A>const&);
+ std::size_thash_value(std::basic_string<Ch,std::char_traits<Ch>,A>const&);template<typename A,typename B>
- std::size_thash_value(std::pair<A,B>const&);
+ std::size_thash_value(std::pair<A,B>const&);template<typename T,typename A>
- std::size_thash_value(std::vector<T,A>const&);
+ std::size_thash_value(std::vector<T,A>const&);template<typename T,typename A>
- std::size_thash_value(std::list<T,A>const&);
+ std::size_thash_value(std::list<T,A>const&);template<typename T,typename A>
- std::size_thash_value(std::deque<T,A>const&);
+ std::size_thash_value(std::deque<T,A>const&);template<typename K,typename C,typename A>
- std::size_thash_value(std::set<K,C,A>const&);
+ std::size_thash_value(std::set<K,C,A>const&);template<typename K,typename C,typename A>
- std::size_thash_value(std::multiset<K,C,A>const&);
+ std::size_thash_value(std::multiset<K,C,A>const&);template<typename K,typename T,typename C,typename A>
- std::size_thash_value(std::map<K,T,C,A>const&);
+ std::size_thash_value(std::map<K,T,C,A>const&);template<typename K,typename T,typename C,typename A>
- std::size_thash_value(std::multimap<K,T,C,A>const&);
- template<typename T>std::size_thash_value(std::complex<T>const&);
+ std::size_thash_value(std::multimap<K,T,C,A>const&);
+ template<typename T>std::size_thash_value(std::complex<T>const&);}
- Support functions (Boost extension).template<typename T>voidhash_combine(size_t& seed,Tconst& v);
+ Support functions (Boost extension).template<typename T>voidhash_combine(size_t& seed,Tconst& v);
Called repeatedly to incrementally create a hash value from
several variables.
hash_value(T) throws.
Strong exception safety, as long as hash_value(T)
also has strong exception safety.
- template<typename It>std::size_thash_range(It first,It last);
-template<typename It>voidhash_range(std::size_t& seed,It first,It last);
+ template<typename It>std::size_thash_range(It first,It last);
+template<typename It>voidhash_range(std::size_t& seed,It first,It last);
Calculate the combined hash value of the elements of an iterator
range.
hash_range(std::size_t&, It, It) has basic exception safety as long as
hash_value(std::iterator_traits<It>::value_type)
has basic exception safety.
- Overloadable hash implementation (Boost extension).std::size_thash_value(bool val);
-std::size_thash_value(char val);
-std::size_thash_value(signedchar val);
-std::size_thash_value(unsignedchar val);
-std::size_thash_value(wchar_t val);
-std::size_thash_value(short val);
-std::size_thash_value(unsignedshort val);
-std::size_thash_value(int val);
-std::size_thash_value(unsignedint val);
-std::size_thash_value(long val);
-std::size_thash_value(unsignedlong val);
-std::size_thash_value(longlong val);
-std::size_thash_value(unsignedlonglong val);
-std::size_thash_value(float val);
-std::size_thash_value(double val);
-std::size_thash_value(longdouble val);
-template<typename T>std::size_thash_value(T*const& val);
-template<typename T,unsigned N>std::size_thash_value(T(&val)[N]);
-template<typename T,unsigned N>std::size_thash_value(constT(&val)[N]);
+ Overloadable hash implementation (Boost extension).std::size_thash_value(bool val);
+std::size_thash_value(char val);
+std::size_thash_value(signedchar val);
+std::size_thash_value(unsignedchar val);
+std::size_thash_value(wchar_t val);
+std::size_thash_value(short val);
+std::size_thash_value(unsignedshort val);
+std::size_thash_value(int val);
+std::size_thash_value(unsignedint val);
+std::size_thash_value(long val);
+std::size_thash_value(unsignedlong val);
+std::size_thash_value(longlong val);
+std::size_thash_value(unsignedlonglong val);
+std::size_thash_value(float val);
+std::size_thash_value(double val);
+std::size_thash_value(longdouble val);
+template<typename T>std::size_thash_value(T*const& val);
+template<typename T,unsigned N>std::size_thash_value(T(&val)[N]);
+template<typename T,unsigned N>std::size_thash_value(constT(&val)[N]);template<typename Ch,typename A>
- std::size_thash_value(std::basic_string<Ch,std::char_traits<Ch>,A>const& val);
+ std::size_thash_value(std::basic_string<Ch,std::char_traits<Ch>,A>const& val);template<typename A,typename B>
- std::size_thash_value(std::pair<A,B>const& val);
+ std::size_thash_value(std::pair<A,B>const& val);template<typename T,typename A>
- std::size_thash_value(std::vector<T,A>const& val);
+ std::size_thash_value(std::vector<T,A>const& val);template<typename T,typename A>
- std::size_thash_value(std::list<T,A>const& val);
+ std::size_thash_value(std::list<T,A>const& val);template<typename T,typename A>
- std::size_thash_value(std::deque<T,A>const& val);
+ std::size_thash_value(std::deque<T,A>const& val);template<typename K,typename C,typename A>
- std::size_thash_value(std::set<K,C,A>const& val);
+ std::size_thash_value(std::set<K,C,A>const& val);template<typename K,typename C,typename A>
- std::size_thash_value(std::multiset<K,C,A>const& val);
+ std::size_thash_value(std::multiset<K,C,A>const& val);template<typename K,typename T,typename C,typename A>
- std::size_thash_value(std::map<K,T,C,A>const& val);
+ std::size_thash_value(std::map<K,T,C,A>const& val);template<typename K,typename T,typename C,typename A>
- std::size_thash_value(std::multimap<K,T,C,A>const& val);
-template<typename T>std::size_thash_value(std::complex<T>const& val);
+ std::size_thash_value(std::multimap<K,T,C,A>const& val);
+template<typename T>std::size_thash_value(std::complex<T>const& val);
Implementation of the hash function.
Generally shouldn't be called directly by users, instead they should use
@@ -243,8 +243,8 @@
template<typename T>struct hash :public std::unary_function<T, std::size_t> {
- std::size_toperator()(Tconst&)const;
-};Descriptionstd::size_toperator()(Tconst& val)const;std::size_toperator()(Tconst&)const;
+};Descriptionstd::size_toperator()(Tconst& val)const;Returns:hash_value(val)
@@ -259,138 +259,138 @@
Throws:
Only throws if
hash_value(T) throws.
- Struct hash<bool>3boost::hash<bool>// In header: <boost/functional/hash.hpp>
+ Struct hash<bool>3boost::hash<bool>// In header: <boost/functional/hash.hpp>
-struct hash<bool>{
- std::size_toperator()(bool)const;
-};Descriptionstd::size_toperator()(bool val)const;struct hash<bool>{
+ std::size_toperator()(bool)const;
+};Descriptionstd::size_toperator()(bool val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<char>3boost::hash<char>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<char>3boost::hash<char>// In header: <boost/functional/hash.hpp>
-struct hash<char>{
- std::size_toperator()(char)const;
-};Descriptionstd::size_toperator()(char val)const;struct hash<char>{
+ std::size_toperator()(char)const;
+};Descriptionstd::size_toperator()(char val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<signed char>3boost::hash<signed char>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<signed char>3boost::hash<signed char>// In header: <boost/functional/hash.hpp>
-struct hash<signedchar>{
- std::size_toperator()(signedchar)const;
-};Descriptionstd::size_toperator()(signedchar val)const;struct hash<signedchar>{
+ std::size_toperator()(signedchar)const;
+};Descriptionstd::size_toperator()(signedchar val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned char>3boost::hash<unsigned char>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned char>3boost::hash<unsigned char>// In header: <boost/functional/hash.hpp>
-struct hash<unsignedchar>{
- std::size_toperator()(unsignedchar)const;
-};Descriptionstd::size_toperator()(unsignedchar val)const;struct hash<unsignedchar>{
+ std::size_toperator()(unsignedchar)const;
+};Descriptionstd::size_toperator()(unsignedchar val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<wchar_t>3boost::hash<wchar_t>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<wchar_t>3boost::hash<wchar_t>// In header: <boost/functional/hash.hpp>
-struct hash<wchar_t>{
- std::size_toperator()(wchar_t)const;
-};Descriptionstd::size_toperator()(wchar_t val)const;struct hash<wchar_t>{
+ std::size_toperator()(wchar_t)const;
+};Descriptionstd::size_toperator()(wchar_t val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<short>3boost::hash<short>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<short>3boost::hash<short>// In header: <boost/functional/hash.hpp>
-struct hash<short>{
- std::size_toperator()(short)const;
-};Descriptionstd::size_toperator()(short val)const;struct hash<short>{
+ std::size_toperator()(short)const;
+};Descriptionstd::size_toperator()(short val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned short>3boost::hash<unsigned short>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned short>3boost::hash<unsigned short>// In header: <boost/functional/hash.hpp>
-struct hash<unsignedshort>{
- std::size_toperator()(unsignedshort)const;
-};Descriptionstd::size_toperator()(unsignedshort val)const;struct hash<unsignedshort>{
+ std::size_toperator()(unsignedshort)const;
+};Descriptionstd::size_toperator()(unsignedshort val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<int>3boost::hash<int>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<int>3boost::hash<int>// In header: <boost/functional/hash.hpp>
-struct hash<int>{
- std::size_toperator()(int)const;
-};Descriptionstd::size_toperator()(int val)const;struct hash<int>{
+ std::size_toperator()(int)const;
+};Descriptionstd::size_toperator()(int val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned int>3boost::hash<unsigned int>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned int>3boost::hash<unsigned int>// In header: <boost/functional/hash.hpp>
-struct hash<unsignedint>{
- std::size_toperator()(unsignedint)const;
-};Descriptionstd::size_toperator()(unsignedint val)const;struct hash<unsignedint>{
+ std::size_toperator()(unsignedint)const;
+};Descriptionstd::size_toperator()(unsignedint val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<long>3boost::hash<long>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<long>3boost::hash<long>// In header: <boost/functional/hash.hpp>
-struct hash<long>{
- std::size_toperator()(long)const;
-};Descriptionstd::size_toperator()(long val)const;struct hash<long>{
+ std::size_toperator()(long)const;
+};Descriptionstd::size_toperator()(long val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned long>3boost::hash<unsigned long>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned long>3boost::hash<unsigned long>// In header: <boost/functional/hash.hpp>
-struct hash<unsignedlong>{
- std::size_toperator()(unsignedlong)const;
-};Descriptionstd::size_toperator()(unsignedlong val)const;struct hash<unsignedlong>{
+ std::size_toperator()(unsignedlong)const;
+};Descriptionstd::size_toperator()(unsignedlong val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<long long>3boost::hash<long long>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<long long>3boost::hash<long long>// In header: <boost/functional/hash.hpp>
-struct hash<longlong>{
- std::size_toperator()(longlong)const;
-};Descriptionstd::size_toperator()(longlong val)const;struct hash<longlong>{
+ std::size_toperator()(longlong)const;
+};Descriptionstd::size_toperator()(longlong val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned long long>3boost::hash<unsigned long long>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<unsigned long long>3boost::hash<unsigned long long>// In header: <boost/functional/hash.hpp>
-struct hash<unsignedlonglong>{
- std::size_toperator()(unsignedlonglong)const;
-};Descriptionstd::size_toperator()(unsignedlonglong val)const;struct hash<unsignedlonglong>{
+ std::size_toperator()(unsignedlonglong)const;
+};Descriptionstd::size_toperator()(unsignedlonglong val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<float>3boost::hash<float>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<float>3boost::hash<float>// In header: <boost/functional/hash.hpp>
-struct hash<float>{
- std::size_toperator()(float)const;
-};Descriptionstd::size_toperator()(float val)const;struct hash<float>{
+ std::size_toperator()(float)const;
+};Descriptionstd::size_toperator()(float val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<double>3boost::hash<double>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<double>3boost::hash<double>// In header: <boost/functional/hash.hpp>
-struct hash<double>{
- std::size_toperator()(double)const;
-};Descriptionstd::size_toperator()(double val)const;struct hash<double>{
+ std::size_toperator()(double)const;
+};Descriptionstd::size_toperator()(double val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<long double>3boost::hash<long double>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<long double>3boost::hash<long double>// In header: <boost/functional/hash.hpp>
-struct hash<longdouble>{
- std::size_toperator()(longdouble)const;
-};Descriptionstd::size_toperator()(longdouble val)const;struct hash<longdouble>{
+ std::size_toperator()(longdouble)const;
+};Descriptionstd::size_toperator()(longdouble val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<std::string>3boost::hash<std::string>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<std::string>3boost::hash<std::string>// In header: <boost/functional/hash.hpp>
-struct hash<std::string>{
- std::size_toperator()(std::stringconst&)const;
-};Descriptionstd::size_toperator()(std::stringconst& val)const;struct hash<std::string>{
+ std::size_toperator()(std::stringconst&)const;
+};Descriptionstd::size_toperator()(std::stringconst& val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<std::wstring>3boost::hash<std::wstring>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct hash<std::wstring>3boost::hash<std::wstring>// In header: <boost/functional/hash.hpp>
-struct hash<std::wstring>{
- std::size_toperator()(std::wstringconst&)const;
-};Descriptionstd::size_toperator()(std::wstringconst& val)const;struct hash<std::wstring>{
+ std::size_toperator()(std::wstringconst&)const;
+};Descriptionstd::size_toperator()(std::wstringconst& val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct template hash<T*>3boost::hash<T*>// In header: <boost/functional/hash.hpp>
+ ?>Returns:Unspecified in TR1, except that equal arguments yield the same result.hash_value(val) in Boost.Throws:Doesn't throwStruct template hash<T*>3boost::hash<T*>// In header: <boost/functional/hash.hpp>
template<typename T>
-struct hash<T*>{
- std::size_toperator()(T*)const;
-};Descriptionstd::size_toperator()(T* val)const;struct hash<T*>{
+ std::size_toperator()(T*)const;
+};Descriptionstd::size_toperator()(T* val)const;Returns:Unspecified in TR1, except that equal arguments yield the same result.Throws:Doesn't throw
diff --git a/test/more/tests/libs/unordered-ref.gold2 b/test/more/tests/libs/unordered-ref.gold2
index 0a501a2..72967eb 100644
--- a/test/more/tests/libs/unordered-ref.gold2
+++ b/test/more/tests/libs/unordered-ref.gold2
@@ -55,91 +55,91 @@
typedefimplementation-definedconst_local_iterator;// construct/copy/destruct
- explicitunordered_set(size_type=implementation-defined,
+ explicitunordered_set(size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());template<typename InputIterator>
- unordered_set(InputIterator,InputIterator,
+ unordered_set(InputIterator,InputIterator,size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());
- unordered_set(unordered_setconst&);
- unordered_set(unordered_set&&);
- explicitunordered_set(Allocatorconst&);
- unordered_set(unordered_setconst&,Allocatorconst&);
- ~unordered_set();
- unordered_set&operator=(unordered_setconst&);
- unordered_set&operator=(unordered_set&&);
- allocator_typeget_allocator()const;
+ unordered_set(unordered_setconst&);
+ unordered_set(unordered_set&&);
+ explicitunordered_set(Allocatorconst&);
+ unordered_set(unordered_setconst&,Allocatorconst&);
+ ~unordered_set();
+ unordered_set&operator=(unordered_setconst&);
+ unordered_set&operator=(unordered_set&&);
+ allocator_typeget_allocator()const;
- // size and capacity
- boolempty()const;
- size_typesize()const;
- size_typemax_size()const;
+ // size and capacity
+ boolempty()const;
+ size_typesize()const;
+ size_typemax_size()const;
- // iterators
- iteratorbegin();
- const_iteratorbegin()const;
- iteratorend();
- const_iteratorend()const;
- const_iteratorcbegin()const;
- const_iteratorcend()const;
+ // iterators
+ iteratorbegin();
+ const_iteratorbegin()const;
+ iteratorend();
+ const_iteratorend()const;
+ const_iteratorcbegin()const;
+ const_iteratorcend()const;
- // modifiers
- template<typename... Args>std::pair<iterator,bool>emplace(Args&&...);
- template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
- std::pair<iterator,bool>insert(value_typeconst&);
- iteratorinsert(const_iterator,value_typeconst&);
- template<typename InputIterator>voidinsert(InputIterator,InputIterator);
- iteratorerase(const_iterator);
- size_typeerase(key_typeconst&);
- iteratorerase(const_iterator,const_iterator);
- voidquick_erase(const_iterator);
- voiderase_return_void(const_iterator);
- voidclear();
- voidswap(unordered_set&);
+ // modifiers
+ template<typename... Args>std::pair<iterator,bool>emplace(Args&&...);
+ template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
+ std::pair<iterator,bool>insert(value_typeconst&);
+ iteratorinsert(const_iterator,value_typeconst&);
+ template<typename InputIterator>voidinsert(InputIterator,InputIterator);
+ iteratorerase(const_iterator);
+ size_typeerase(key_typeconst&);
+ iteratorerase(const_iterator,const_iterator);
+ voidquick_erase(const_iterator);
+ voiderase_return_void(const_iterator);
+ voidclear();
+ voidswap(unordered_set&);
- // observers
- hasherhash_function()const;
- key_equalkey_eq()const;
+ // observers
+ hasherhash_function()const;
+ key_equalkey_eq()const;
- // lookup
- iteratorfind(key_typeconst&);
- const_iteratorfind(key_typeconst&)const;
+ // lookup
+ iteratorfind(key_typeconst&);
+ const_iteratorfind(key_typeconst&)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,
+ iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst&,CompatibleHashconst&,
+ find(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&)const;
- size_typecount(key_typeconst&)const;
- std::pair<iterator,iterator>equal_range(key_typeconst&);
- std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
+ size_typecount(key_typeconst&)const;
+ std::pair<iterator,iterator>equal_range(key_typeconst&);
+ std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
- // bucket interface
- size_typebucket_count()const;
- size_typemax_bucket_count()const;
- size_typebucket_size(size_type)const;
- size_typebucket(key_typeconst&)const;
- local_iteratorbegin(size_type);
- const_local_iteratorbegin(size_type)const;
- local_iteratorend(size_type);
- const_local_iteratorend(size_type)const;
- const_local_iteratorcbegin(size_type)const;
- const_local_iteratorcend(size_type);
+ // bucket interface
+ size_typebucket_count()const;
+ size_typemax_bucket_count()const;
+ size_typebucket_size(size_type)const;
+ size_typebucket(key_typeconst&)const;
+ local_iteratorbegin(size_type);
+ const_local_iteratorbegin(size_type)const;
+ local_iteratorend(size_type);
+ const_local_iteratorend(size_type)const;
+ const_local_iteratorcbegin(size_type)const;
+ const_local_iteratorcend(size_type);
- // hash policy
- floatload_factor()const;
- floatmax_load_factor()const;
- voidmax_load_factor(float);
- voidrehash(size_type);
+ // hash policy
+ floatload_factor()const;
+ floatmax_load_factor()const;
+ voidmax_load_factor(float);
+ voidrehash(size_type);};
-// Equality Comparisons
+// Equality Comparisonstemplate<typename Value,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_set<Value,Hash,Pred,Alloc>const&,unordered_set<Value,Hash,Pred,Alloc>const&);
@@ -147,7 +147,7 @@
booloperator!=(unordered_set<Value,Hash,Pred,Alloc>const&,unordered_set<Value,Hash,Pred,Alloc>const&);
-// swap
+// swaptemplate<typename Value,typename Hash,typename Pred,typename Alloc>voidswap(unordered_set<Value,Hash,Pred,Alloc>&,unordered_set<Value,Hash,Pred,Alloc>&);Description
@@ -204,32 +204,32 @@
A const_local_iterator object can be used to iterate through a single bucket.unordered_set
public
- construct/copy/destructexplicitunordered_set(size_type n =implementation-defined,
+ construct/copy/destructexplicitunordered_set(size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.Postconditions:size() == 0template<typename InputIterator>
- unordered_set(InputIterator f,InputIterator l,
+ ?>Postconditions:size() == 0template<typename InputIterator>
+ unordered_set(InputIterator f,InputIterator l,size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),
- allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_set(unordered_setconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.allocator_type const& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_set(unordered_setconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.Requires:value_type is copy constructibleunordered_set(unordered_set&&);The move constructor.Requires:value_type is copy constructibleunordered_set(unordered_set&&);The move constructor.Notes:This is emulated on compilers without rvalue references.Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- explicitunordered_set(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_set(unordered_setconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_set();explicitunordered_set(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_set(unordered_setconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_set();Notes:The destructor is applied to every element, and all memory is deallocatedunordered_set&operator=(unordered_setconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:The destructor is applied to every element, and all memory is deallocatedunordered_set&operator=(unordered_setconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:
On compilers without rvalue references, there is a single assignment
operator with the signature operator=(unordered_set)
in order to emulate move semantics.
- Requires:value_type is copy constructibleunordered_set&operator=(unordered_set&&);The move assignment operator.Requires:value_type is copy constructibleunordered_set&operator=(unordered_set&&);The move assignment operator.Notes:
On compilers without rvalue references, there is a single assignment
@@ -238,92 +238,92 @@
Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- allocator_typeget_allocator()const;unordered_set size and capacityboolempty()const;allocator_typeget_allocator()const;unordered_set size and capacityboolempty()const;Returns:size() == 0size_typesize()const;Returns:size() == 0size_typesize()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:size() of the largest possible container.
- unordered_set iteratorsiteratorbegin();
-const_iteratorbegin()const;Returns:size() of the largest possible container.
+ unordered_set iteratorsiteratorbegin();
+const_iteratorbegin()const;Returns:An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- iteratorend();
-const_iteratorend()const;iteratorend();
+const_iteratorend()const;Returns:An iterator which refers to the past-the-end value for the container.
- const_iteratorcbegin()const;const_iteratorcbegin()const;Returns:A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- const_iteratorcend()const;const_iteratorcend()const;Returns:A constant iterator which refers to the past-the-end value for the container.
- unordered_set modifierstemplate<typename... Args>std::pair<iterator,bool>emplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent value.unordered_set modifierstemplate<typename... Args>std::pair<iterator,bool>emplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent value.Returns:The bool component of the return type is true if an insert took place.If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
for rvalue references or move semantics.template<typename... Args>
- iteratoremplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent value.hint is a suggestion to where the element should be inserted.iterator emplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent value.hint is a suggestion to where the element should be inserted.Returns:If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
- for rvalue references or move semantics.std::pair<iterator,bool>insert(value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent value.std::pair<iterator,bool>insert(value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent value.Returns:The bool component of the return type is true if an insert took place.If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent value.hint is a suggestion to where the element should be inserted.Returns:The bool component of the return type is true if an insert took place.If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent value.hint is a suggestion to where the element should be inserted.Returns:If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent value.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.template<typename InputIterator>
- voidinsert(InputIterator first,InputIterator last);Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.void insert(InputIterator first,InputIterator last);Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent value.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following position before the erasure.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
When the number of elements is a lot smaller than the number of buckets
this function can be very inefficient as it has to search through empty
buckets for the next element, in order to return the iterator.
- The method quick_erase is faster, but has yet
+ The method quick_erase is faster, but has yet
to be standardized.
- size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
- This method is faster than erase as
+ This method is faster than erase as
it doesn't have to find the next element in the container -
a potentially costly operation.
As it hasn't been standardized, it's likely that this may
change in the future.
- voiderase_return_void(const_iterator position);Erase the element pointed to by position.voiderase_return_void(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
This method is now deprecated, use
quick_return instead. Although be
warned that as that isn't standardized yet, it could also
change.
- voidclear();Erases all elements in the container.voidclear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_set&);Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_set&);Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.Notes:For a discussion of the behavior when allocators aren't equal see
- the implementation details.unordered_set observershasherhash_function()const;the implementation details.unordered_set observershasherhash_function()const;Returns:The container's hash function.
- key_equalkey_eq()const;key_equalkey_eq()const;Returns:The container's key equality predicate.
- unordered_set lookupiteratorfind(key_typeconst& k);
-const_iteratorfind(key_typeconst& k)const;
+ unordered_set lookupiteratorfind(key_typeconst& k);
+const_iteratorfind(key_typeconst& k)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ find(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq)const;Returns:An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.Notes:
@@ -331,41 +331,41 @@
allows you to use a compatible hash function and equality
predicate for a key of a different type in order to avoid
an expensive type cast. In general, its use is not encouraged.
- size_typecount(key_typeconst& k)const;size_typecount(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
-std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
+std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:A range containing all elements with key equivalent to k.
If the container doesn't container any such elements, returns
std::make_pair(b.end(),b.end()).
- unordered_set bucket interfacesize_typebucket_count()const;unordered_set bucket interfacesize_typebucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
-const_local_iteratorbegin(size_type n)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
+const_local_iteratorbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
-const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
+const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_set hash policyfloatload_factor()const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_set hash policyfloatload_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_set Equality Comparisonstemplate<typename Value,typename Hash,typename Pred,typename Alloc>
+ ?>Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_set Equality Comparisonstemplate<typename Value,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_set<Value,Hash,Pred,Alloc>const& x,unordered_set<Value,Hash,Pred,Alloc>const& y);unordered_set<Value,Hash,Pred,Alloc>const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have
- equivalent equality predicates.unordered_set swaptemplate<typename Value,typename Hash,typename Pred,typename Alloc>
+ equivalent equality predicates.unordered_set swaptemplate<typename Value,typename Hash,typename Pred,typename Alloc>voidswap(unordered_set<Value,Hash,Pred,Alloc>& x,unordered_set<Value,Hash,Pred,Alloc>& y);typedef implementation-definedconst_local_iterator;// construct/copy/destruct
- explicitunordered_multiset(size_type=implementation-defined,
+ explicitunordered_multiset(size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());template<typename InputIterator>
- unordered_multiset(InputIterator,InputIterator,
+ unordered_multiset(InputIterator,InputIterator,size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());
- unordered_multiset(unordered_multisetconst&);
- unordered_multiset(unordered_multiset&&);
- explicitunordered_multiset(Allocatorconst&);
- unordered_multiset(unordered_multisetconst&,Allocatorconst&);
- ~unordered_multiset();
- unordered_multiset&operator=(unordered_multisetconst&);
- unordered_multiset&operator=(unordered_multiset&&);
- allocator_typeget_allocator()const;
+ unordered_multiset(unordered_multisetconst&);
+ unordered_multiset(unordered_multiset&&);
+ explicitunordered_multiset(Allocatorconst&);
+ unordered_multiset(unordered_multisetconst&,Allocatorconst&);
+ ~unordered_multiset();
+ unordered_multiset&operator=(unordered_multisetconst&);
+ unordered_multiset&operator=(unordered_multiset&&);
+ allocator_typeget_allocator()const;
- // size and capacity
- boolempty()const;
- size_typesize()const;
- size_typemax_size()const;
+ // size and capacity
+ boolempty()const;
+ size_typesize()const;
+ size_typemax_size()const;
- // iterators
- iteratorbegin();
- const_iteratorbegin()const;
- iteratorend();
- const_iteratorend()const;
- const_iteratorcbegin()const;
- const_iteratorcend()const;
+ // iterators
+ iteratorbegin();
+ const_iteratorbegin()const;
+ iteratorend();
+ const_iteratorend()const;
+ const_iteratorcbegin()const;
+ const_iteratorcend()const;
- // modifiers
- template<typename... Args>iteratoremplace(Args&&...);
- template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
- iteratorinsert(value_typeconst&);
- iteratorinsert(const_iterator,value_typeconst&);
- template<typename InputIterator>voidinsert(InputIterator,InputIterator);
- iteratorerase(const_iterator);
- size_typeerase(key_typeconst&);
- iteratorerase(const_iterator,const_iterator);
- voidquick_erase(const_iterator);
- voiderase_return_void(const_iterator);
- voidclear();
- voidswap(unordered_multiset&);
+ // modifiers
+ template<typename... Args>iteratoremplace(Args&&...);
+ template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
+ iteratorinsert(value_typeconst&);
+ iteratorinsert(const_iterator,value_typeconst&);
+ template<typename InputIterator>voidinsert(InputIterator,InputIterator);
+ iteratorerase(const_iterator);
+ size_typeerase(key_typeconst&);
+ iteratorerase(const_iterator,const_iterator);
+ voidquick_erase(const_iterator);
+ voiderase_return_void(const_iterator);
+ voidclear();
+ voidswap(unordered_multiset&);
- // observers
- hasherhash_function()const;
- key_equalkey_eq()const;
+ // observers
+ hasherhash_function()const;
+ key_equalkey_eq()const;
- // lookup
- iteratorfind(key_typeconst&);
- const_iteratorfind(key_typeconst&)const;
+ // lookup
+ iteratorfind(key_typeconst&);
+ const_iteratorfind(key_typeconst&)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,
+ iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst&,CompatibleHashconst&,
+ find(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&)const;
- size_typecount(key_typeconst&)const;
- std::pair<iterator,iterator>equal_range(key_typeconst&);
- std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
+ size_typecount(key_typeconst&)const;
+ std::pair<iterator,iterator>equal_range(key_typeconst&);
+ std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
- // bucket interface
- size_typebucket_count()const;
- size_typemax_bucket_count()const;
- size_typebucket_size(size_type)const;
- size_typebucket(key_typeconst&)const;
- local_iteratorbegin(size_type);
- const_local_iteratorbegin(size_type)const;
- local_iteratorend(size_type);
- const_local_iteratorend(size_type)const;
- const_local_iteratorcbegin(size_type)const;
- const_local_iteratorcend(size_type);
+ // bucket interface
+ size_typebucket_count()const;
+ size_typemax_bucket_count()const;
+ size_typebucket_size(size_type)const;
+ size_typebucket(key_typeconst&)const;
+ local_iteratorbegin(size_type);
+ const_local_iteratorbegin(size_type)const;
+ local_iteratorend(size_type);
+ const_local_iteratorend(size_type)const;
+ const_local_iteratorcbegin(size_type)const;
+ const_local_iteratorcend(size_type);
- // hash policy
- floatload_factor()const;
- floatmax_load_factor()const;
- voidmax_load_factor(float);
- voidrehash(size_type);
+ // hash policy
+ floatload_factor()const;
+ floatmax_load_factor()const;
+ voidmax_load_factor(float);
+ voidrehash(size_type);};
-// Equality Comparisons
+// Equality Comparisonstemplate<typename Value,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_multiset<Value,Hash,Pred,Alloc>const&,unordered_multiset<Value,Hash,Pred,Alloc>const&);
@@ -500,7 +500,7 @@
booloperator!=(unordered_multiset<Value,Hash,Pred,Alloc>const&,unordered_multiset<Value,Hash,Pred,Alloc>const&);
-// swap
+// swaptemplate<typename Value,typename Hash,typename Pred,typename Alloc>voidswap(unordered_multiset<Value,Hash,Pred,Alloc>&,unordered_multiset<Value,Hash,Pred,Alloc>&);Description
@@ -557,32 +557,32 @@
A const_local_iterator object can be used to iterate through a single bucket.unordered_multiset
public
- construct/copy/destructexplicitunordered_multiset(size_type n =implementation-defined,
+ construct/copy/destructexplicitunordered_multiset(size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.Postconditions:size() == 0template<typename InputIterator>
- unordered_multiset(InputIterator f,InputIterator l,
+ ?>Postconditions:size() == 0template<typename InputIterator>
+ unordered_multiset(InputIterator f,InputIterator l,size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),
- allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_multiset(unordered_multisetconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.allocator_type const& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_multiset(unordered_multisetconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.Requires:value_type is copy constructibleunordered_multiset(unordered_multiset&&);The move constructor.Requires:value_type is copy constructibleunordered_multiset(unordered_multiset&&);The move constructor.Notes:This is emulated on compilers without rvalue references.Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- explicitunordered_multiset(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_multiset(unordered_multisetconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_multiset();explicitunordered_multiset(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_multiset(unordered_multisetconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_multiset();Notes:The destructor is applied to every element, and all memory is deallocatedunordered_multiset&operator=(unordered_multisetconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:The destructor is applied to every element, and all memory is deallocatedunordered_multiset&operator=(unordered_multisetconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:
On compilers without rvalue references, there is a single assignment
operator with the signature operator=(unordered_multiset)
in order to emulate move semantics.
- Requires:value_type is copy constructibleunordered_multiset&operator=(unordered_multiset&&);The move assignment operator.Requires:value_type is copy constructibleunordered_multiset&operator=(unordered_multiset&&);The move assignment operator.Notes:
On compilers without rvalue references, there is a single assignment
@@ -591,92 +591,92 @@
Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- allocator_typeget_allocator()const;unordered_multiset size and capacityboolempty()const;allocator_typeget_allocator()const;unordered_multiset size and capacityboolempty()const;Returns:size() == 0size_typesize()const;Returns:size() == 0size_typesize()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:size() of the largest possible container.
- unordered_multiset iteratorsiteratorbegin();
-const_iteratorbegin()const;Returns:size() of the largest possible container.
+ unordered_multiset iteratorsiteratorbegin();
+const_iteratorbegin()const;Returns:An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- iteratorend();
-const_iteratorend()const;iteratorend();
+const_iteratorend()const;Returns:An iterator which refers to the past-the-end value for the container.
- const_iteratorcbegin()const;const_iteratorcbegin()const;Returns:A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- const_iteratorcend()const;const_iteratorcend()const;Returns:A constant iterator which refers to the past-the-end value for the container.
- unordered_multiset modifierstemplate<typename... Args>iteratoremplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container.unordered_multiset modifierstemplate<typename... Args>iteratoremplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
for rvalue references or move semantics.template<typename... Args>
- iteratoremplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container.hint is a suggestion to where the element should be inserted.iterator emplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container.hint is a suggestion to where the element should be inserted.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
- for rvalue references or move semantics.iteratorinsert(value_typeconst& obj);Inserts obj in the container.iteratorinsert(value_typeconst& obj);Inserts obj in the container.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container.hint is a suggestion to where the element should be inserted.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container.hint is a suggestion to where the element should be inserted.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.template<typename InputIterator>
- voidinsert(InputIterator first,InputIterator last);Inserts a range of elements into the container.void insert(InputIterator first,InputIterator last);Inserts a range of elements into the container.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following position before the erasure.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
When the number of elements is a lot smaller than the number of buckets
this function can be very inefficient as it has to search through empty
buckets for the next element, in order to return the iterator.
- The method quick_erase is faster, but has yet
+ The method quick_erase is faster, but has yet
to be standardized.
- size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
- This method is faster than erase as
+ This method is faster than erase as
it doesn't have to find the next element in the container -
a potentially costly operation.
As it hasn't been standardized, it's likely that this may
change in the future.
- voiderase_return_void(const_iterator position);Erase the element pointed to by position.voiderase_return_void(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
This method is now deprecated, use
quick_return instead. Although be
warned that as that isn't standardized yet, it could also
change.
- voidclear();Erases all elements in the container.voidclear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_multiset&);Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_multiset&);Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.Notes:For a discussion of the behavior when allocators aren't equal see
- the implementation details.unordered_multiset observershasherhash_function()const;the implementation details.unordered_multiset observershasherhash_function()const;Returns:The container's hash function.
- key_equalkey_eq()const;key_equalkey_eq()const;Returns:The container's key equality predicate.
- unordered_multiset lookupiteratorfind(key_typeconst& k);
-const_iteratorfind(key_typeconst& k)const;
+ unordered_multiset lookupiteratorfind(key_typeconst& k);
+const_iteratorfind(key_typeconst& k)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ find(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq)const;Returns:An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.Notes:
@@ -684,41 +684,41 @@
allows you to use a compatible hash function and equality
predicate for a key of a different type in order to avoid
an expensive type cast. In general, its use is not encouraged.
- size_typecount(key_typeconst& k)const;size_typecount(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
-std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
+std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:A range containing all elements with key equivalent to k.
If the container doesn't container any such elements, returns
std::make_pair(b.end(),b.end()).
- unordered_multiset bucket interfacesize_typebucket_count()const;unordered_multiset bucket interfacesize_typebucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
-const_local_iteratorbegin(size_type n)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
+const_local_iteratorbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
-const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
+const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_multiset hash policyfloatload_factor()const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_multiset hash policyfloatload_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_multiset Equality Comparisonstemplate<typename Value,typename Hash,typename Pred,typename Alloc>
+ ?>Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_multiset Equality Comparisonstemplate<typename Value,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_multiset<Value,Hash,Pred,Alloc>const& x,unordered_multiset<Value,Hash,Pred,Alloc>const& y);unordered_multiset<Value,Hash,Pred,Alloc>const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have
- equivalent equality predicates.unordered_multiset swaptemplate<typename Value,typename Hash,typename Pred,typename Alloc>
+ equivalent equality predicates.unordered_multiset swaptemplate<typename Value,typename Hash,typename Pred,typename Alloc>voidswap(unordered_multiset<Value,Hash,Pred,Alloc>& x,unordered_multiset<Value,Hash,Pred,Alloc>& y);typedef implementation-definedconst_local_iterator;// construct/copy/destruct
- explicitunordered_map(size_type=implementation-defined,
+ explicitunordered_map(size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());template<typename InputIterator>
- unordered_map(InputIterator,InputIterator,
+ unordered_map(InputIterator,InputIterator,size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());
- unordered_map(unordered_mapconst&);
- unordered_map(unordered_map&&);
- explicitunordered_map(Allocatorconst&);
- unordered_map(unordered_mapconst&,Allocatorconst&);
- ~unordered_map();
- unordered_map&operator=(unordered_mapconst&);
- unordered_map&operator=(unordered_map&&);
- allocator_typeget_allocator()const;
+ unordered_map(unordered_mapconst&);
+ unordered_map(unordered_map&&);
+ explicitunordered_map(Allocatorconst&);
+ unordered_map(unordered_mapconst&,Allocatorconst&);
+ ~unordered_map();
+ unordered_map&operator=(unordered_mapconst&);
+ unordered_map&operator=(unordered_map&&);
+ allocator_typeget_allocator()const;
- // size and capacity
- boolempty()const;
- size_typesize()const;
- size_typemax_size()const;
+ // size and capacity
+ boolempty()const;
+ size_typesize()const;
+ size_typemax_size()const;
- // iterators
- iteratorbegin();
- const_iteratorbegin()const;
- iteratorend();
- const_iteratorend()const;
- const_iteratorcbegin()const;
- const_iteratorcend()const;
+ // iterators
+ iteratorbegin();
+ const_iteratorbegin()const;
+ iteratorend();
+ const_iteratorend()const;
+ const_iteratorcbegin()const;
+ const_iteratorcend()const;
- // modifiers
- template<typename... Args>std::pair<iterator,bool>emplace(Args&&...);
- template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
- std::pair<iterator,bool>insert(value_typeconst&);
- iteratorinsert(const_iterator,value_typeconst&);
- template<typename InputIterator>voidinsert(InputIterator,InputIterator);
- iteratorerase(const_iterator);
- size_typeerase(key_typeconst&);
- iteratorerase(const_iterator,const_iterator);
- voidquick_erase(const_iterator);
- voiderase_return_void(const_iterator);
- voidclear();
- voidswap(unordered_map&);
+ // modifiers
+ template<typename... Args>std::pair<iterator,bool>emplace(Args&&...);
+ template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
+ std::pair<iterator,bool>insert(value_typeconst&);
+ iteratorinsert(const_iterator,value_typeconst&);
+ template<typename InputIterator>voidinsert(InputIterator,InputIterator);
+ iteratorerase(const_iterator);
+ size_typeerase(key_typeconst&);
+ iteratorerase(const_iterator,const_iterator);
+ voidquick_erase(const_iterator);
+ voiderase_return_void(const_iterator);
+ voidclear();
+ voidswap(unordered_map&);
- // observers
- hasherhash_function()const;
- key_equalkey_eq()const;
+ // observers
+ hasherhash_function()const;
+ key_equalkey_eq()const;
- // lookup
- iteratorfind(key_typeconst&);
- const_iteratorfind(key_typeconst&)const;
+ // lookup
+ iteratorfind(key_typeconst&);
+ const_iteratorfind(key_typeconst&)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,
+ iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst&,CompatibleHashconst&,
+ find(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&)const;
- size_typecount(key_typeconst&)const;
- std::pair<iterator,iterator>equal_range(key_typeconst&);
- std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
- mapped_type&operator[](key_typeconst&);
- Mapped&at(key_typeconst&);
- Mappedconst&at(key_typeconst&)const;
+ size_typecount(key_typeconst&)const;
+ std::pair<iterator,iterator>equal_range(key_typeconst&);
+ std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
+ mapped_type&operator[](key_typeconst&);
+ Mapped&at(key_typeconst&);
+ Mappedconst&at(key_typeconst&)const;
- // bucket interface
- size_typebucket_count()const;
- size_typemax_bucket_count()const;
- size_typebucket_size(size_type)const;
- size_typebucket(key_typeconst&)const;
- local_iteratorbegin(size_type);
- const_local_iteratorbegin(size_type)const;
- local_iteratorend(size_type);
- const_local_iteratorend(size_type)const;
- const_local_iteratorcbegin(size_type)const;
- const_local_iteratorcend(size_type);
+ // bucket interface
+ size_typebucket_count()const;
+ size_typemax_bucket_count()const;
+ size_typebucket_size(size_type)const;
+ size_typebucket(key_typeconst&)const;
+ local_iteratorbegin(size_type);
+ const_local_iteratorbegin(size_type)const;
+ local_iteratorend(size_type);
+ const_local_iteratorend(size_type)const;
+ const_local_iteratorcbegin(size_type)const;
+ const_local_iteratorcend(size_type);
- // hash policy
- floatload_factor()const;
- floatmax_load_factor()const;
- voidmax_load_factor(float);
- voidrehash(size_type);
+ // hash policy
+ floatload_factor()const;
+ floatmax_load_factor()const;
+ voidmax_load_factor(float);
+ voidrehash(size_type);};
-// Equality Comparisons
+// Equality Comparisonstemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_map<Key,Mapped,Hash,Pred,Alloc>const&,
@@ -894,7 +894,7 @@
booloperator!=(unordered_map<Key,Mapped,Hash,Pred,Alloc>const&,unordered_map<Key,Mapped,Hash,Pred,Alloc>const&);
-// swap
+// swaptemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>voidswap(unordered_map<Key,Mapped,Hash,Pred,Alloc>&,
@@ -955,32 +955,32 @@
A const_local_iterator object can be used to iterate through a single bucket.unordered_map
public
- construct/copy/destructexplicitunordered_map(size_type n =implementation-defined,
+ construct/copy/destructexplicitunordered_map(size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.Postconditions:size() == 0template<typename InputIterator>
- unordered_map(InputIterator f,InputIterator l,
+ ?>Postconditions:size() == 0template<typename InputIterator>
+ unordered_map(InputIterator f,InputIterator l,size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),
- allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_map(unordered_mapconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.allocator_type const& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_map(unordered_mapconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.Requires:value_type is copy constructibleunordered_map(unordered_map&&);The move constructor.Requires:value_type is copy constructibleunordered_map(unordered_map&&);The move constructor.Notes:This is emulated on compilers without rvalue references.Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- explicitunordered_map(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_map(unordered_mapconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_map();explicitunordered_map(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_map(unordered_mapconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_map();Notes:The destructor is applied to every element, and all memory is deallocatedunordered_map&operator=(unordered_mapconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:The destructor is applied to every element, and all memory is deallocatedunordered_map&operator=(unordered_mapconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:
On compilers without rvalue references, there is a single assignment
operator with the signature operator=(unordered_map)
in order to emulate move semantics.
- Requires:value_type is copy constructibleunordered_map&operator=(unordered_map&&);The move assignment operator.Requires:value_type is copy constructibleunordered_map&operator=(unordered_map&&);The move assignment operator.Notes:
On compilers without rvalue references, there is a single assignment
@@ -989,92 +989,92 @@
Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- allocator_typeget_allocator()const;unordered_map size and capacityboolempty()const;allocator_typeget_allocator()const;unordered_map size and capacityboolempty()const;Returns:size() == 0size_typesize()const;Returns:size() == 0size_typesize()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:size() of the largest possible container.
- unordered_map iteratorsiteratorbegin();
-const_iteratorbegin()const;Returns:size() of the largest possible container.
+ unordered_map iteratorsiteratorbegin();
+const_iteratorbegin()const;Returns:An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- iteratorend();
-const_iteratorend()const;iteratorend();
+const_iteratorend()const;Returns:An iterator which refers to the past-the-end value for the container.
- const_iteratorcbegin()const;const_iteratorcbegin()const;Returns:A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- const_iteratorcend()const;const_iteratorcend()const;Returns:A constant iterator which refers to the past-the-end value for the container.
- unordered_map modifierstemplate<typename... Args>std::pair<iterator,bool>emplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent key.unordered_map modifierstemplate<typename... Args>std::pair<iterator,bool>emplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent key.Returns:The bool component of the return type is true if an insert took place.If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
for rvalue references or move semantics.template<typename... Args>
- iteratoremplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent key.hint is a suggestion to where the element should be inserted.iterator emplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container if and only if there is no element in the container with an equivalent key.hint is a suggestion to where the element should be inserted.Returns:If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
- for rvalue references or move semantics.std::pair<iterator,bool>insert(value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent key.std::pair<iterator,bool>insert(value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent key.Returns:The bool component of the return type is true if an insert took place.If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent key.hint is a suggestion to where the element should be inserted.Returns:The bool component of the return type is true if an insert took place.If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container if and only if there is no element in the container with an equivalent key.hint is a suggestion to where the element should be inserted.Returns:If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.template<typename InputIterator>
- voidinsert(InputIterator first,InputIterator last);Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent key.void insert(InputIterator first,InputIterator last);Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent key.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following position before the erasure.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
When the number of elements is a lot smaller than the number of buckets
this function can be very inefficient as it has to search through empty
buckets for the next element, in order to return the iterator.
- The method quick_erase is faster, but has yet
+ The method quick_erase is faster, but has yet
to be standardized.
- size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
- This method is faster than erase as
+ This method is faster than erase as
it doesn't have to find the next element in the container -
a potentially costly operation.
As it hasn't been standardized, it's likely that this may
change in the future.
- voiderase_return_void(const_iterator position);Erase the element pointed to by position.voiderase_return_void(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
This method is now deprecated, use
quick_return instead. Although be
warned that as that isn't standardized yet, it could also
change.
- voidclear();Erases all elements in the container.voidclear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_map&);Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_map&);Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.Notes:For a discussion of the behavior when allocators aren't equal see
- the implementation details.unordered_map observershasherhash_function()const;the implementation details.unordered_map observershasherhash_function()const;Returns:The container's hash function.
- key_equalkey_eq()const;key_equalkey_eq()const;Returns:The container's key equality predicate.
- unordered_map lookupiteratorfind(key_typeconst& k);
-const_iteratorfind(key_typeconst& k)const;
+ unordered_map lookupiteratorfind(key_typeconst& k);
+const_iteratorfind(key_typeconst& k)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ find(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq)const;Returns:An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.Notes:
@@ -1082,47 +1082,47 @@
allows you to use a compatible hash function and equality
predicate for a key of a different type in order to avoid
an expensive type cast. In general, its use is not encouraged.
- size_typecount(key_typeconst& k)const;size_typecount(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
-std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
+std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:A range containing all elements with key equivalent to k.
If the container doesn't container any such elements, returns
std::make_pair(b.end(),b.end()).
- mapped_type&operator[](key_typeconst& k);mapped_type&operator[](key_typeconst& k);Effects:If the container does not already contain an elements with a key equivalent to k, inserts the value std::pair<key_type const, mapped_type>(k, mapped_type())Returns:A reference to x.second where x is the element already in the container, or the newly inserted element with a key equivalent to kThrows:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.Mapped&at(key_typeconst& k);
-Mappedconst&at(key_typeconst& k)const;Effects:If the container does not already contain an elements with a key equivalent to k, inserts the value std::pair<key_type const, mapped_type>(k, mapped_type())Returns:A reference to x.second where x is the element already in the container, or the newly inserted element with a key equivalent to kThrows:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.Mapped&at(key_typeconst& k);
+Mappedconst&at(key_typeconst& k)const;Returns:A reference to x.second where x is the (unique) element whose key is equivalent to k.Throws:An exception object of type std::out_of_range if no such element is present.Notes:This is not specified in the draft standard, but that is probably an oversight. The issue has been raised in
- comp.std.c++.unordered_map bucket interfacesize_typebucket_count()const;comp.std.c++.unordered_map bucket interfacesize_typebucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
-const_local_iteratorbegin(size_type n)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
+const_local_iteratorbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
-const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
+const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_map hash policyfloatload_factor()const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_map hash policyfloatload_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_map Equality Comparisonstemplate<typename Key,typename Mapped,typename Hash,typename Pred,
+ ?>Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_map Equality Comparisonstemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_map<Key,Mapped,Hash,Pred,Alloc>const& x,unordered_map<Key,Mapped,Hash,Pred,Alloc>const& y);unordered_map<Key,Mapped,Hash,Pred,Alloc>const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have
- equivalent equality predicates.unordered_map swaptemplate<typename Key,typename Mapped,typename Hash,typename Pred,
+ equivalent equality predicates.unordered_map swaptemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>voidswap(unordered_map<Key,Mapped,Hash,Pred,Alloc>& x,unordered_map<Key,Mapped,Hash,Pred,Alloc>& y);typedef implementation-definedconst_local_iterator;// construct/copy/destruct
- explicitunordered_multimap(size_type=implementation-defined,
+ explicitunordered_multimap(size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());template<typename InputIterator>
- unordered_multimap(InputIterator,InputIterator,
+ unordered_multimap(InputIterator,InputIterator,size_type=implementation-defined,hasherconst&=hasher(),key_equalconst&=key_equal(),allocator_typeconst&=allocator_type());
- unordered_multimap(unordered_multimapconst&);
- unordered_multimap(unordered_multimap&&);
- explicitunordered_multimap(Allocatorconst&);
- unordered_multimap(unordered_multimapconst&,Allocatorconst&);
- ~unordered_multimap();
- unordered_multimap&operator=(unordered_multimapconst&);
- unordered_multimap&operator=(unordered_multimap&&);
- allocator_typeget_allocator()const;
+ unordered_multimap(unordered_multimapconst&);
+ unordered_multimap(unordered_multimap&&);
+ explicitunordered_multimap(Allocatorconst&);
+ unordered_multimap(unordered_multimapconst&,Allocatorconst&);
+ ~unordered_multimap();
+ unordered_multimap&operator=(unordered_multimapconst&);
+ unordered_multimap&operator=(unordered_multimap&&);
+ allocator_typeget_allocator()const;
- // size and capacity
- boolempty()const;
- size_typesize()const;
- size_typemax_size()const;
+ // size and capacity
+ boolempty()const;
+ size_typesize()const;
+ size_typemax_size()const;
- // iterators
- iteratorbegin();
- const_iteratorbegin()const;
- iteratorend();
- const_iteratorend()const;
- const_iteratorcbegin()const;
- const_iteratorcend()const;
+ // iterators
+ iteratorbegin();
+ const_iteratorbegin()const;
+ iteratorend();
+ const_iteratorend()const;
+ const_iteratorcbegin()const;
+ const_iteratorcend()const;
- // modifiers
- template<typename... Args>iteratoremplace(Args&&...);
- template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
- iteratorinsert(value_typeconst&);
- iteratorinsert(const_iterator,value_typeconst&);
- template<typename InputIterator>voidinsert(InputIterator,InputIterator);
- iteratorerase(const_iterator);
- size_typeerase(key_typeconst&);
- iteratorerase(const_iterator,const_iterator);
- voidquick_erase(const_iterator);
- voiderase_return_void(const_iterator);
- voidclear();
- voidswap(unordered_multimap&);
+ // modifiers
+ template<typename... Args>iteratoremplace(Args&&...);
+ template<typename... Args>iteratoremplace_hint(const_iterator,Args&&...);
+ iteratorinsert(value_typeconst&);
+ iteratorinsert(const_iterator,value_typeconst&);
+ template<typename InputIterator>voidinsert(InputIterator,InputIterator);
+ iteratorerase(const_iterator);
+ size_typeerase(key_typeconst&);
+ iteratorerase(const_iterator,const_iterator);
+ voidquick_erase(const_iterator);
+ voiderase_return_void(const_iterator);
+ voidclear();
+ voidswap(unordered_multimap&);
- // observers
- hasherhash_function()const;
- key_equalkey_eq()const;
+ // observers
+ hasherhash_function()const;
+ key_equalkey_eq()const;
- // lookup
- iteratorfind(key_typeconst&);
- const_iteratorfind(key_typeconst&)const;
+ // lookup
+ iteratorfind(key_typeconst&);
+ const_iteratorfind(key_typeconst&)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,
+ iteratorfind(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst&,CompatibleHashconst&,
+ find(CompatibleKeyconst&,CompatibleHashconst&,CompatiblePredicateconst&)const;
- size_typecount(key_typeconst&)const;
- std::pair<iterator,iterator>equal_range(key_typeconst&);
- std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
+ size_typecount(key_typeconst&)const;
+ std::pair<iterator,iterator>equal_range(key_typeconst&);
+ std::pair<const_iterator,const_iterator>equal_range(key_typeconst&)const;
- // bucket interface
- size_typebucket_count()const;
- size_typemax_bucket_count()const;
- size_typebucket_size(size_type)const;
- size_typebucket(key_typeconst&)const;
- local_iteratorbegin(size_type);
- const_local_iteratorbegin(size_type)const;
- local_iteratorend(size_type);
- const_local_iteratorend(size_type)const;
- const_local_iteratorcbegin(size_type)const;
- const_local_iteratorcend(size_type);
+ // bucket interface
+ size_typebucket_count()const;
+ size_typemax_bucket_count()const;
+ size_typebucket_size(size_type)const;
+ size_typebucket(key_typeconst&)const;
+ local_iteratorbegin(size_type);
+ const_local_iteratorbegin(size_type)const;
+ local_iteratorend(size_type);
+ const_local_iteratorend(size_type)const;
+ const_local_iteratorcbegin(size_type)const;
+ const_local_iteratorcend(size_type);
- // hash policy
- floatload_factor()const;
- floatmax_load_factor()const;
- voidmax_load_factor(float);
- voidrehash(size_type);
+ // hash policy
+ floatload_factor()const;
+ floatmax_load_factor()const;
+ voidmax_load_factor(float);
+ voidrehash(size_type);};
-// Equality Comparisons
+// Equality Comparisonstemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_multimap<Key,Mapped,Hash,Pred,Alloc>const&,
@@ -1263,7 +1263,7 @@
booloperator!=(unordered_multimap<Key,Mapped,Hash,Pred,Alloc>const&,unordered_multimap<Key,Mapped,Hash,Pred,Alloc>const&);
-// swap
+// swaptemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>voidswap(unordered_multimap<Key,Mapped,Hash,Pred,Alloc>&,
@@ -1324,32 +1324,32 @@
A const_local_iterator object can be used to iterate through a single bucket.unordered_multimap
public
- construct/copy/destructexplicitunordered_multimap(size_type n =implementation-defined,
+ construct/copy/destructexplicitunordered_multimap(size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.Postconditions:size() == 0template<typename InputIterator>
- unordered_multimap(InputIterator f,InputIterator l,
+ ?>Postconditions:size() == 0template<typename InputIterator>
+ unordered_multimap(InputIterator f,InputIterator l,size_type n =implementation-defined,hasherconst& hf =hasher(),key_equalconst& eq =key_equal(),
- allocator_typeconst& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_multimap(unordered_multimapconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.allocator_type const& a =allocator_type());Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.unordered_multimap(unordered_multimapconst&);The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.Requires:value_type is copy constructibleunordered_multimap(unordered_multimap&&);The move constructor.Requires:value_type is copy constructibleunordered_multimap(unordered_multimap&&);The move constructor.Notes:This is emulated on compilers without rvalue references.Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- explicitunordered_multimap(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_multimap(unordered_multimapconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_multimap();explicitunordered_multimap(Allocatorconst& a);Constructs an empty container, using allocator a.unordered_multimap(unordered_multimapconst& x,Allocatorconst& a);Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a.~unordered_multimap();Notes:The destructor is applied to every element, and all memory is deallocatedunordered_multimap&operator=(unordered_multimapconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:The destructor is applied to every element, and all memory is deallocatedunordered_multimap&operator=(unordered_multimapconst&);The assignment operator. Copies the contained elements, hash function, predicate and maximum load factor but not the allocator.Notes:
On compilers without rvalue references, there is a single assignment
operator with the signature operator=(unordered_multimap)
in order to emulate move semantics.
- Requires:value_type is copy constructibleunordered_multimap&operator=(unordered_multimap&&);The move assignment operator.Requires:value_type is copy constructibleunordered_multimap&operator=(unordered_multimap&&);The move assignment operator.Notes:
On compilers without rvalue references, there is a single assignment
@@ -1358,92 +1358,92 @@
Requires:value_type is move constructible.
(TODO: This is not actually required in this implementation).
- allocator_typeget_allocator()const;unordered_multimap size and capacityboolempty()const;allocator_typeget_allocator()const;unordered_multimap size and capacityboolempty()const;Returns:size() == 0size_typesize()const;Returns:size() == 0size_typesize()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:std::distance(begin(), end())size_typemax_size()const;Returns:size() of the largest possible container.
- unordered_multimap iteratorsiteratorbegin();
-const_iteratorbegin()const;Returns:size() of the largest possible container.
+ unordered_multimap iteratorsiteratorbegin();
+const_iteratorbegin()const;Returns:An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- iteratorend();
-const_iteratorend()const;iteratorend();
+const_iteratorend()const;Returns:An iterator which refers to the past-the-end value for the container.
- const_iteratorcbegin()const;const_iteratorcbegin()const;Returns:A constant iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
- const_iteratorcend()const;const_iteratorcend()const;Returns:A constant iterator which refers to the past-the-end value for the container.
- unordered_multimap modifierstemplate<typename... Args>iteratoremplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container.unordered_multimap modifierstemplate<typename... Args>iteratoremplace(Args&&... args);Inserts an object, constructed with the arguments args, in the container.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
for rvalue references or move semantics.template<typename... Args>
- iteratoremplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container.hint is a suggestion to where the element should be inserted.iterator emplace_hint(const_iterator hint,Args&&... args);Inserts an object, constructed with the arguments args, in the container.hint is a suggestion to where the element should be inserted.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.If the compiler doesn't support variadic template arguments or rvalue
references, this is emulated for up to 10 arguments, with no support
- for rvalue references or move semantics.iteratorinsert(value_typeconst& obj);Inserts obj in the container.iteratorinsert(value_typeconst& obj);Inserts obj in the container.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container.hint is a suggestion to where the element should be inserted.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorinsert(const_iterator hint,value_typeconst& obj);Inserts obj in the container.hint is a suggestion to where the element should be inserted.Returns:An iterator pointing to the inserted element.Throws:If an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same key. Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.template<typename InputIterator>
- voidinsert(InputIterator first,InputIterator last);Inserts a range of elements into the container.void insert(InputIterator first,InputIterator last);Inserts a range of elements into the container.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Throws:When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.Notes:Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.Pointers and references to elements are never invalidated.iteratorerase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following position before the erasure.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
When the number of elements is a lot smaller than the number of buckets
this function can be very inefficient as it has to search through empty
buckets for the next element, in order to return the iterator.
- The method quick_erase is faster, but has yet
+ The method quick_erase is faster, but has yet
to be standardized.
- size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.size_typeerase(key_typeconst& k);Erase all elements with key equivalent to k.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The number of elements erased.Throws:Only throws an exception if it is thrown by hasher or key_equal.iteratorerase(const_iterator first,const_iterator last);Erases the elements in the range from first to last.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Returns:The iterator following the erased elements - i.e. last.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.voidquick_erase(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
- This method is faster than erase as
+ This method is faster than erase as
it doesn't have to find the next element in the container -
a potentially costly operation.
As it hasn't been standardized, it's likely that this may
change in the future.
- voiderase_return_void(const_iterator position);Erase the element pointed to by position.voiderase_return_void(const_iterator position);Erase the element pointed to by position.Throws:Only throws an exception if it is thrown by hasher or key_equal.In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.Notes:
This method is now deprecated, use
quick_return instead. Although be
warned that as that isn't standardized yet, it could also
change.
- voidclear();Erases all elements in the container.voidclear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_multimap&);Postconditions:size() == 0Throws:Never throws an exception.voidswap(unordered_multimap&);Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of key_equal or hasher.Notes:For a discussion of the behavior when allocators aren't equal see
- the implementation details.unordered_multimap observershasherhash_function()const;the implementation details.unordered_multimap observershasherhash_function()const;Returns:The container's hash function.
- key_equalkey_eq()const;key_equalkey_eq()const;Returns:The container's key equality predicate.
- unordered_multimap lookupiteratorfind(key_typeconst& k);
-const_iteratorfind(key_typeconst& k)const;
+ unordered_multimap lookupiteratorfind(key_typeconst& k);
+const_iteratorfind(key_typeconst& k)const;template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>
- iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ iteratorfind(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq);template<typename CompatibleKey,typename CompatibleHash,typename CompatiblePredicate>const_iterator
- find(CompatibleKeyconst& k,CompatibleHashconst& hash,
+ find(CompatibleKeyconst& k,CompatibleHashconst& hash,CompatiblePredicateconst& eq)const;Returns:An iterator pointing to an element with key equivalent to k, or b.end() if no such element exists.Notes:
@@ -1451,41 +1451,41 @@
allows you to use a compatible hash function and equality
predicate for a key of a different type in order to avoid
an expensive type cast. In general, its use is not encouraged.
- size_typecount(key_typeconst& k)const;size_typecount(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
-std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:The number of elements with key equivalent to k.std::pair<iterator,iterator>equal_range(key_typeconst& k);
+std::pair<const_iterator,const_iterator>equal_range(key_typeconst& k)const;Returns:A range containing all elements with key equivalent to k.
If the container doesn't container any such elements, returns
std::make_pair(b.end(),b.end()).
- unordered_multimap bucket interfacesize_typebucket_count()const;unordered_multimap bucket interfacesize_typebucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:The number of buckets.size_typemax_bucket_count()const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Returns:An upper bound on the number of buckets.size_typebucket_size(size_type n)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Requires:n < bucket_count()Returns:The number of elements in bucket n.size_typebucket(key_typeconst& k)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
-const_local_iteratorbegin(size_type n)const;Returns:The index of the bucket which would contain an element with key k.Postconditions:The return value is less than bucket_count()local_iteratorbegin(size_type n);
+const_local_iteratorbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
-const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the first element in the bucket with index n.local_iteratorend(size_type n);
+const_local_iteratorend(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A local iterator pointing the 'one past the end' element in the bucket with index n.const_local_iteratorcbegin(size_type n)const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the first element in the bucket with index n.const_local_iteratorcend(size_type n);Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_multimap hash policyfloatload_factor()const;Requires:n shall be in the range [0, bucket_count()).Returns:A constant local iterator pointing the 'one past the end' element in the bucket with index n.unordered_multimap hash policyfloatload_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:The average number of elements per bucket.floatmax_load_factor()const;Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Returns:Returns the current maximum load factor.voidmax_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Effects:Changes the container's maximum load factor, using z as a hint.voidrehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_multimap Equality Comparisonstemplate<typename Key,typename Mapped,typename Hash,typename Pred,
+ ?>Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.unordered_multimap Equality Comparisonstemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>booloperator==(unordered_multimap<Key,Mapped,Hash,Pred,Alloc>const& x,unordered_multimap<Key,Mapped,Hash,Pred,Alloc>const& y);unordered_multimap<Key,Mapped,Hash,Pred,Alloc>const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have
- equivalent equality predicates.unordered_multimap swaptemplate<typename Key,typename Mapped,typename Hash,typename Pred,
+ equivalent equality predicates.unordered_multimap swaptemplate<typename Key,typename Mapped,typename Hash,typename Pred,typename Alloc>voidswap(unordered_multimap<Key,Mapped,Hash,Pred,Alloc>& x,unordered_multimap<Key,Mapped,Hash,Pred,Alloc>& y);Methodname Test
- thing::foo::bar,
- thing::foo::bar(int x),
- thing::foo::operator(),
- thing::foo::operator()(int x).
+ thing::foo::bar,
+ thing::foo::bar(int x),
+ thing::foo::operator(),
+ thing::foo::operator()(int x).
Reference
@@ -18,9 +18,9 @@
class foo {public:
- voidbar(int);
- voidoperator()(int);
-};Descriptionvoidbar(int);voidoperator()(int);
+ voidbar(int);
+ voidoperator()(int);
+};Descriptionvoidbar(int);voidoperator()(int);
\ No newline at end of file
diff --git a/xsl/lookup.xsl b/xsl/lookup.xsl
index ad8b5e3..91b4a59 100644
--- a/xsl/lookup.xsl
+++ b/xsl/lookup.xsl
@@ -22,10 +22,23 @@
-
+
+ -bb
+
+
+
+
+
+
+
+
+
+
+
+
@@ -234,7 +247,7 @@
translate($part, '.<>;\:*?"| ', '') != $part
)">
-
+