diff --git a/doc/unordered/unordered_map.adoc b/doc/unordered/unordered_map.adoc index 9d018990..7c61cfae 100644 --- a/doc/unordered/unordered_map.adoc +++ b/doc/unordered/unordered_map.adoc @@ -131,7 +131,7 @@ public: iterator insert(const_iterator hint, node_type&& nh); template - std::pair + iterator insert(const_iterator hint, P&& value); template @@ -883,13 +883,13 @@ std::pair insert(const_iterator hint, P&& value); ``` -Inserts an element into the container by performing `emplace(std::forward

(value))`. +Inserts an element into the container by performing `emplace_hint(hint, std::forward

(value))`. Only participates in overload resolution if `std::is_constructible::value` is `true`. `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. +Returns:: If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key. 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. diff --git a/doc/unordered/unordered_multimap.adoc b/doc/unordered/unordered_multimap.adoc index 4abe6329..8952cb74 100644 --- a/doc/unordered/unordered_multimap.adoc +++ b/doc/unordered/unordered_multimap.adoc @@ -107,17 +107,17 @@ public: // modifiers template - std::pair + iterator emplace(Args&&... args); template iterator emplace_hint(const_iterator hint, Args&&... args); - std::pair + iterator insert(value_type const& obj); - std::pair + iterator insert(value_type&& obj); template @@ -715,7 +715,7 @@ Returns:: A `const_iterator` which refers to the past-the-end value for the cont ==== emplace ```c++ template -std::pair +iterator emplace(Args&&... args); ``` @@ -761,7 +761,7 @@ Since existing `std::pair` implementations don't support `std::piecewise_constru ==== Copy Insert ```c++ -std::pair +iterator insert(value_type const& obj); ``` @@ -779,7 +779,7 @@ Notes:: Can invalidate iterators, but only if the insert causes the load factor ==== Move Insert ```c++ -std::pair +iterator insert(value_type&& obj); ``` @@ -871,10 +871,10 @@ Notes:: The standard is fairly vague on the meaning of the hint. But the only pr ```c++ template iterator -insert(P&& value); +insert(const_iterator hint, P&& value); ``` -Inserts an element into the container by performing `emplace(std::forward

(value))`. +Inserts an element into the container by performing `emplace_hint(hint, std::forward

(value))`. Only participates in overload resolution if `std::is_constructible::value` is `true`. diff --git a/doc/unordered/unordered_multiset.adoc b/doc/unordered/unordered_multiset.adoc index 849f3fdd..eac97b2c 100644 --- a/doc/unordered/unordered_multiset.adoc +++ b/doc/unordered/unordered_multiset.adoc @@ -105,20 +105,20 @@ public: // modifiers template - std::pair + iterator emplace(Args&&... args); template iterator emplace_hint(const_iterator hint, Args&&... args); - std::pair + iterator insert(value_type const& obj); - std::pair + iterator insert(value_type&& obj); - insert_return_type insert(node_type&& nh); + iterator insert(node_type&& nh); iterator insert(const_iterator hint, value_type const& obj); iterator insert(const_iterator hint, value_type&& obj); @@ -703,7 +703,7 @@ Returns:: A `const_iterator` which refers to the past-the-end value for the cont ==== emplace ```c++ template -std::pair +iterator emplace(Args&&... args); ``` @@ -749,7 +749,7 @@ Since existing `std::pair` implementations don't support `std::piecewise_constru ==== Copy Insert ```c++ -std::pair +iterator insert(value_type const& obj); ``` @@ -767,7 +767,7 @@ Notes:: Can invalidate iterators, but only if the insert causes the load factor ==== Move Insert ```c++ -std::pair +iterator insert(value_type&& obj); ``` @@ -785,7 +785,7 @@ Notes:: Can invalidate iterators, but only if the insert causes the load factor ==== Insert with `node_handle` ```c++ -insert_return_type +iterator insert(node_type&& nh); ```