diff --git a/test/more/tests/libs/hash-ref.gold b/test/more/tests/libs/hash-ref.gold index 406965f..6404700 100644 --- a/test/more/tests/libs/hash-ref.gold +++ b/test/more/tests/libs/hash-ref.gold @@ -164,8 +164,8 @@ Implementation of the hash function. Generally shouldn't be called directly by users, instead they should use - boost::hash, boost::hash_range - or boost::hash_combine which + boost::hash, boost::hash_range + or boost::hash_combine which call hash_value without namespace qualification so that overloads for custom types are found via ADL. explicit unordered_set(size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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. - 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.Postconditions:size() == 0template<typename InputIterator> unordered_set(InputIterator f, InputIterator l, size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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_set const&); - 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_set const&);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). - explicit unordered_set(Allocator const& a); - Constructs an empty container, using allocator a. - unordered_set(unordered_set const& x, Allocator const& a); - Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a. - ~unordered_set();explicit unordered_set(Allocator const& a);Constructs an empty container, using allocator a.unordered_set(unordered_set const& x, Allocator const& 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_set const&); - 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_set const&);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 @@ -275,37 +259,23 @@ const_iterator cend() const;Returns:A constant iterator which refers to the past-the-end value for the container. - <anchor id="id24-bb"/><computeroutput>unordered_set</computeroutput> 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. - <anchor id="id24-bb"/><computeroutput>unordered_set</computeroutput> 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> - 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. - 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_type const& 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_type const& 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.iterator insert(const_iterator hint, value_type const& 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.iterator insert(const_iterator hint, value_type const& 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> - 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. - 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.iterator erase(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.iterator erase(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 @@ -313,17 +283,11 @@ buckets for the next element, in order to return the iterator. The method quick_erase is faster, but has yet to be standardized. - size_type erase(key_type const& k); - Erase all elements with key equivalent to k. - size_type erase(key_type const& 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.iterator erase(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.iterator erase(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.void quick_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.void quick_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 @@ -332,18 +296,14 @@ As it hasn't been standardized, it's likely that this may change in the future. - void erase_return_void(const_iterator position); - Erase the element pointed to by position. - void erase_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. - void clear(); - Erases all elements in the container. - void clear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.void swap(unordered_set&);Returns:Returns the current maximum load factor.void max_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.void rehash(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.void rehash(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.<anchor id="id68-bb"/><computeroutput>unordered_set</computeroutput> Equality Comparisonstemplate<typename Value, typename Hash, typename Pred, typename Alloc> bool operator==(unordered_set<Value, Hash, Pred, Alloc> const& x, @@ -603,45 +560,29 @@ construct/copy/destructexplicit unordered_multiset(size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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. - 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.Postconditions:size() == 0template<typename InputIterator> unordered_multiset(InputIterator f, InputIterator l, size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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_multiset const&); - 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_multiset const&);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). - explicit unordered_multiset(Allocator const& a); - Constructs an empty container, using allocator a. - unordered_multiset(unordered_multiset const& x, Allocator const& a); - Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a. - ~unordered_multiset();explicit unordered_multiset(Allocator const& a);Constructs an empty container, using allocator a.unordered_multiset(unordered_multiset const& x, Allocator const& 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_multiset const&); - 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_multiset const&);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 @@ -671,37 +612,23 @@ const_iterator cend() const;Returns:A constant iterator which refers to the past-the-end value for the container. - <anchor id="id93-bb"/><computeroutput>unordered_multiset</computeroutput> modifierstemplate<typename... Args> iterator emplace(Args&&... args); - Inserts an object, constructed with the arguments args, in the container. - <anchor id="id93-bb"/><computeroutput>unordered_multiset</computeroutput> modifierstemplate<typename... Args> iterator emplace(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> - 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. - 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.iterator insert(value_type const& obj); - Inserts obj in the container. - iterator insert(value_type const& 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.iterator insert(const_iterator hint, value_type const& 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.iterator insert(const_iterator hint, value_type const& 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> - void insert(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.iterator erase(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.iterator erase(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 @@ -709,17 +636,11 @@ buckets for the next element, in order to return the iterator. The method quick_erase is faster, but has yet to be standardized. - size_type erase(key_type const& k); - Erase all elements with key equivalent to k. - size_type erase(key_type const& 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.iterator erase(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.iterator erase(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.void quick_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.void quick_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 @@ -728,18 +649,14 @@ As it hasn't been standardized, it's likely that this may change in the future. - void erase_return_void(const_iterator position); - Erase the element pointed to by position. - void erase_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. - void clear(); - Erases all elements in the container. - void clear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.void swap(unordered_multiset&);Returns:Returns the current maximum load factor.void max_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.void rehash(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.void rehash(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.<anchor id="id137-bb"/><computeroutput>unordered_multiset</computeroutput> Equality Comparisonstemplate<typename Value, typename Hash, typename Pred, typename Alloc> bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const& x, @@ -1044,45 +958,29 @@ construct/copy/destructexplicit unordered_map(size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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. - 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.Postconditions:size() == 0template<typename InputIterator> unordered_map(InputIterator f, InputIterator l, size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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_map const&); - 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_map const&);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). - explicit unordered_map(Allocator const& a); - Constructs an empty container, using allocator a. - unordered_map(unordered_map const& x, Allocator const& a); - Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a. - ~unordered_map();explicit unordered_map(Allocator const& a);Constructs an empty container, using allocator a.unordered_map(unordered_map const& x, Allocator const& 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_map const&); - 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_map const&);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 @@ -1112,37 +1010,23 @@ const_iterator cend() const;Returns:A constant iterator which refers to the past-the-end value for the container. - <anchor id="id162-bb"/><computeroutput>unordered_map</computeroutput> 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. - <anchor id="id162-bb"/><computeroutput>unordered_map</computeroutput> 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> - 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. - 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_type const& 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_type const& 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.iterator insert(const_iterator hint, value_type const& 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.iterator insert(const_iterator hint, value_type const& 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> - 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. - 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.iterator erase(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.iterator erase(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 @@ -1150,17 +1034,11 @@ buckets for the next element, in order to return the iterator. The method quick_erase is faster, but has yet to be standardized. - size_type erase(key_type const& k); - Erase all elements with key equivalent to k. - size_type erase(key_type const& 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.iterator erase(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.iterator erase(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.void quick_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.void quick_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 @@ -1169,18 +1047,14 @@ As it hasn't been standardized, it's likely that this may change in the future. - void erase_return_void(const_iterator position); - Erase the element pointed to by position. - void erase_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. - void clear(); - Erases all elements in the container. - void clear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.void swap(unordered_map&);Returns:Returns the current maximum load factor.void max_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.void rehash(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.void rehash(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.<anchor id="id210-bb"/><computeroutput>unordered_map</computeroutput> Equality Comparisonstemplate<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> @@ -1456,45 +1327,29 @@ construct/copy/destructexplicit unordered_multimap(size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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. - 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.Postconditions:size() == 0template<typename InputIterator> unordered_multimap(InputIterator f, InputIterator l, size_type n = implementation-defined, hasher const& hf = hasher(), key_equal const& eq = key_equal(), - 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_multimap const&); - 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_multimap const&);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). - explicit unordered_multimap(Allocator const& a); - Constructs an empty container, using allocator a. - unordered_multimap(unordered_multimap const& x, Allocator const& a); - Constructs an container, copying x's contained elements, hash function, predicate, maximum load factor, but using allocator a. - ~unordered_multimap();explicit unordered_multimap(Allocator const& a);Constructs an empty container, using allocator a.unordered_multimap(unordered_multimap const& x, Allocator const& 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_multimap const&); - 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_multimap const&);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 @@ -1524,37 +1379,23 @@ const_iterator cend() const;Returns:A constant iterator which refers to the past-the-end value for the container. - <anchor id="id235-bb"/><computeroutput>unordered_multimap</computeroutput> modifierstemplate<typename... Args> iterator emplace(Args&&... args); - Inserts an object, constructed with the arguments args, in the container. - <anchor id="id235-bb"/><computeroutput>unordered_multimap</computeroutput> modifierstemplate<typename... Args> iterator emplace(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> - 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. - 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.iterator insert(value_type const& obj); - Inserts obj in the container. - iterator insert(value_type const& 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.iterator insert(const_iterator hint, value_type const& 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.iterator insert(const_iterator hint, value_type const& 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> - void insert(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.iterator erase(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.iterator erase(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 @@ -1562,17 +1403,11 @@ buckets for the next element, in order to return the iterator. The method quick_erase is faster, but has yet to be standardized. - size_type erase(key_type const& k); - Erase all elements with key equivalent to k. - size_type erase(key_type const& 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.iterator erase(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.iterator erase(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.void quick_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.void quick_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 @@ -1581,18 +1416,14 @@ As it hasn't been standardized, it's likely that this may change in the future. - void erase_return_void(const_iterator position); - Erase the element pointed to by position. - void erase_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. - void clear(); - Erases all elements in the container. - void clear();Erases all elements in the container.Postconditions:size() == 0Throws:Never throws an exception.void swap(unordered_multimap&);Returns:Returns the current maximum load factor.void max_load_factor(float z);Effects:Changes the container's maximum load factor, using z as a hint.void rehash(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.void rehash(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.<anchor id="id279-bb"/><computeroutput>unordered_multimap</computeroutput> Equality Comparisonstemplate<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> diff --git a/xsl/function.xsl b/xsl/function.xsl index f86e9ce..edba8ed 100644 --- a/xsl/function.xsl +++ b/xsl/function.xsl @@ -800,7 +800,7 @@ - + +