Skip to content

[container.requirements] Simplify Returns specification for try_emplace #7892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3239,8 +3239,7 @@

\pnum
\returns
An iterator pointing to the element
with the key equivalent to the newly inserted element.
The iterator returned by \tcode{emplace}.

\pnum
\complexity
Expand Down Expand Up @@ -4941,26 +4940,16 @@
\result
\tcode{iterator}

\pnum
\expects
\tcode{value_type} is
\oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{args}.

\pnum
\effects
Equivalent to \tcode{a.emplace(std::forward<Args>(args)...)}.

\pnum
\returns
An iterator pointing to the element
with the key equivalent to the newly inserted element.
The \tcode{const_iterator} \tcode{p} is a hint
Equivalent to \tcode{a.emplace(std::forward<Args>(args)...)},
except that the \tcode{const_iterator} \tcode{p} is a hint
pointing to where the search should start.
Implementations are permitted to ignore the hint.

\pnum
\complexity
Average case \bigoh{1}, worst case \bigoh{\tcode{a.size()}}.
\returns
The iterator returned by \tcode{emplace}.
\end{itemdescr}

\indexunordmem{insert}%
Expand Down
Loading