Skip to content
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

[flat.set.modifiers] Drop return statement from code block in *Effects* element #5728

Closed
JohelEGP opened this issue Aug 14, 2022 · 0 comments · Fixed by #5803
Closed

[flat.set.modifiers] Drop return statement from code block in *Effects* element #5728

JohelEGP opened this issue Aug 14, 2022 · 0 comments · Fixed by #5803
Assignees

Comments

@JohelEGP
Copy link
Contributor

template<class K> pair<iterator, bool> insert(K&& x);
template<class K> iterator insert(const_iterator hint, K&& x);

Part of the effects of these overloads specify:

inserts a new element as if by: return emplace(std::forward<K>(x));.

These are the problems with it, first described at #5696 (comment):

  1. The Returns element fully describes the result.
  2. The use of return has nothing to do with how the new element is inserted.
  3. And also, this return can't work with the first overload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants