Skip to content

Commit 4c7ff44

Browse files
committed
[associative.reqmts.general], [unord.req.general] Simplify specifications for try_emplace
1 parent 1abf091 commit 4c7ff44

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

source/containers.tex

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3233,15 +3233,10 @@
32333233

32343234
\pnum
32353235
\effects
3236-
Equivalent to \tcode{a.emplace(std::forward<Args>(args)...)},
3236+
Equivalent to: \tcode{return a.emplace(std::forward<Args>(args)...).first},
32373237
except that the element is inserted as close as possible to
32383238
the position just prior to \tcode{p}.
32393239

3240-
\pnum
3241-
\returns
3242-
An iterator pointing to the element
3243-
with the key equivalent to the newly inserted element.
3244-
32453240
\pnum
32463241
\complexity
32473242
Logarithmic in general, but
@@ -4941,26 +4936,12 @@
49414936
\result
49424937
\tcode{iterator}
49434938

4944-
\pnum
4945-
\expects
4946-
\tcode{value_type} is
4947-
\oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{args}.
4948-
49494939
\pnum
49504940
\effects
4951-
Equivalent to \tcode{a.emplace(std::forward<Args>(args)...)}.
4952-
4953-
\pnum
4954-
\returns
4955-
An iterator pointing to the element
4956-
with the key equivalent to the newly inserted element.
4957-
The \tcode{const_iterator} \tcode{p} is a hint
4941+
Equivalent to: \tcode{return a.emplace(std::forward<Args>(args)...).first},
4942+
expect that the \tcode{const_iterator} \tcode{p} is a hint
49584943
pointing to where the search should start.
49594944
Implementations are permitted to ignore the hint.
4960-
4961-
\pnum
4962-
\complexity
4963-
Average case \bigoh{1}, worst case \bigoh{\tcode{a.size()}}.
49644945
\end{itemdescr}
49654946

49664947
\indexunordmem{insert}%

0 commit comments

Comments
 (0)