1- .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation
1+ .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
22..
33.. SPDX-License-Identifier: CC-BY-4.0
44
@@ -18,18 +18,44 @@ Inserting values
1818
1919 bool insert( accessor& result, const key_type& key );
2020
21- If the accessor ``result `` is not empty, releases the ``result `` and
21+ If the ``result `` accessor is not empty, releases the ``result `` and
2222 attempts to insert the value constructed from ``key, mapped_type() `` into the container.
2323
24- Sets the ``result `` to provide access to the inserted element or to the element with equal key
25- that was already presented in the container.
24+ Sets the ``result `` to provide access to the inserted element or to the element with equal key,
25+ which was already presented in the container.
2626
2727 **Requirements **:
2828
29- * the type ``value_type `` must meet the ``EmplaceConstructible `` requirements the from [container.requirements] ISO C++ Standard section .
30- * the type ``mapped_type `` must meet the ``DefaultConstructible `` requirements from the [defaultconstructible] ISO C++ Standard section .
29+ * the ``value_type `` type must meet the ``EmplaceConstructible `` requirements described in the [container.requirements] section of the ISO C++ Standard.
30+ * the ``mapped_type `` type must meet the ``DefaultConstructible `` requirements described in the [defaultconstructible] section of the ISO C++ Standard.
3131
32- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise.
32+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise.
33+
34+ --------------------------
35+
36+ .. code :: cpp
37+
38+ template <typename K>
39+ bool insert( const_accessor& result, const K& key );
40+
41+ template <typename K>
42+ bool insert( accessor& result, const K& key );
43+
44+ If the ``result `` accessor is not empty, releases the ``result `` and
45+ attempts to insert the value constructed from ``key, mapped_type() `` into the container.
46+
47+ Sets the ``result `` to provide access to the inserted element or to the element with the key,
48+ that compares equivalent to the value ``key ``, which was already presented in the container.
49+
50+ This overload only participates in the overload resolution if:
51+
52+ * qualified-id ``hash_compare_type::is_transparent `` is valid and denotes a type
53+ * ``std::is_constructible<key_type, const K&>::value `` is ``true ``
54+
55+ **Requirements **: the ``mapped_type `` type must meet the ``DefaultConstructible `` requirements
56+ described in the [defaultconstructible] section of the ISO C++ Standard.
57+
58+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise.
3359
3460--------------------------
3561
@@ -39,16 +65,16 @@ Inserting values
3965
4066 bool insert( accessor& result, const value_type& value );
4167
42- If the accessor ``result `` is not empty, releases the ``result `` and
68+ If the ``result `` accessor is not empty, releases the ``result `` and
4369 attempts to insert the value ``value `` into the container.
4470
45- Sets the ``result `` to provide access to the inserted element or to the element with equal key
46- that was already presented in the container.
71+ Sets the ``result `` to provide access to the inserted element or to the element with equal key,
72+ which was already presented in the container.
4773
48- **Requirements **: the type ``value_type `` must meet the ``CopyInsertable `` requirements from the
49- [container.requirements] ISO C++ Standard section .
74+ **Requirements **: the ``value_type `` type must meet the ``CopyInsertable `` requirements described in the
75+ [container.requirements] section of the ISO C++ Standard.
5076
51- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise.
77+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise.
5278
5379--------------------------
5480
@@ -58,10 +84,10 @@ Inserting values
5884
5985 Attempts to insert the value ``value `` into the container.
6086
61- **Requirements **: the type ``value_type `` must meet the ``CopyInsertable `` requirements from the
62- [container.requirements] ISO C++ Standard section .
87+ **Requirements **: the ``value_type `` type must meet the ``CopyInsertable `` requirements described in the
88+ [container.requirements] section of the ISO C++ Standard.
6389
64- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise.
90+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise.
6591
6692--------------------------
6793
@@ -71,18 +97,18 @@ Inserting values
7197
7298 bool insert( accessor& result, value_type&& value );
7399
74- If the accessor ``result `` is not empty, releases the ``result `` and
100+ If the ``result `` accessor is not empty, releases the ``result `` and
75101 attempts to insert the value ``value `` into the container using move semantics.
76102
77- Sets the ``result `` to provide access to the inserted element or to the element with equal key
78- that was already presented in the container.
103+ Sets the ``result `` to provide access to the inserted element or to the element with equal key,
104+ which was already presented in the container.
79105
80106 ``value `` is left in a valid, but unspecified state.
81107
82- **Requirements **: the type ``value_type `` must meet the ``MoveInsertable `` requirements from the
83- [container.requirements] ISO C++ Standard section .
108+ **Requirements **: the ``value_type `` type must meet the ``MoveInsertable `` requirements described in the
109+ [container.requirements] section of the ISO C++ Standard.
84110
85- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise.
111+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise.
86112
87113--------------------------
88114
@@ -92,10 +118,10 @@ Inserting values
92118
93119 Attempts to insert the value ``value `` into the container using move semantics.
94120
95- **Requirements **: the type ``value_type `` must meet the ``MoveInsertable `` requirements from the
96- [container.requirements] ISO C++ Standard section .
121+ **Requirements **: the ``value_type `` type must meet the ``MoveInsertable `` requirements described in the
122+ [container.requirements] section of the ISO C++ Standard.
97123
98- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise.
124+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise.
99125
100126Inserting sequences of elements
101127-------------------------------
@@ -111,8 +137,8 @@ Inserting sequences of elements
111137 If the interval ``[first, last) `` contains multiple elements with equal keys,
112138 it is unspecified which element should be inserted.
113139
114- **Requirements **: the type ``InputIterator `` must meet the requirements of `InputIterator `
115- from the ``[input.iterators] `` ISO C++ Standard section .
140+ **Requirements **: the ``InputIterator `` type must meet the requirements of `InputIterator `
141+ described in the ``[input.iterators] `` section of the ISO C++ Standard.
116142
117143--------------------------
118144
@@ -133,16 +159,16 @@ Emplacing elements
133159 template <typename... Args>
134160 bool emplace( accessor& result, Args&&... args );
135161
136- If the accessor ``result `` is not empty, releases the ``result `` and
162+ If the ``result `` accessor is not empty, releases the ``result `` and
137163 attempts to insert an element constructed in-place from ``args `` into the container.
138164
139- Sets the ``result `` to provide access to the inserted element or to the element with equal key
140- that was already presented in the container.
165+ Sets the ``result `` to provide access to the inserted element or to the element with equal key,
166+ which was already presented in the container.
141167
142- **Requirements **: the type ``value_type `` must meet the ``EmplaceConstructible `` requirements from the
143- [container.requirements] ISO C++ Standard section .
168+ **Requirements **: the type ``value_type `` must meet the ``EmplaceConstructible `` requirements described in the
169+ [container.requirements] section of the ISO C++ Standard.
144170
145- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise
171+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise
146172
147173--------------------------
148174
@@ -153,10 +179,10 @@ Emplacing elements
153179
154180 Attempts to insert an element constructed in-place from ``args `` into the container.
155181
156- **Requirements **: the type ``value_type `` must meet the ``EmplaceConstructible `` requirements from the
157- [container.requirements] ISO C++ Standard section .
182+ **Requirements **: the type ``value_type `` must meet the ``EmplaceConstructible `` requirements described in the
183+ [container.requirements] section of the ISO C++ Standard.
158184
159- **Returns **: ``true `` if an element was inserted; ``false ``, otherwise
185+ **Returns **: ``true `` if an element is inserted; ``false `` otherwise
160186
161187Erasing elements
162188----------------
@@ -167,7 +193,21 @@ Erasing elements
167193
168194 If an element with the key equivalent to ``key `` exists, removes it from the container.
169195
170- **Returns **: ``true `` if an element was removed; ``false ``, otherwise.
196+ **Returns **: ``true `` if an element is removed; ``false `` otherwise.
197+
198+ --------------------------
199+
200+ .. code :: cpp
201+
202+ template <typename K>
203+ bool erase( const K& key );
204+
205+ If an element with the key that compares equivalent to the value ``key `` exists, removes it from the container.
206+
207+ This overload only participates in the overload resolution if qualified-id
208+ ``hash_compare_type::is_transparent `` is valid and denotes a type.
209+
210+ **Returns **: ``true `` if an element is removed; ``false `` otherwise.
171211
172212--------------------------
173213
@@ -180,5 +220,5 @@ Erasing elements
180220
181221 **Requirements **: ``item_accessor `` should not be empty.
182222
183- **Returns **: ``true `` if an element was removed by the current thread; ``false ``
184- if it was removed by another thread.
223+ **Returns **: ``true `` if an element is removed by the current thread; ``false ``
224+ if it is removed by another thread.
0 commit comments