Skip to content

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

@JohelEGP

Description

@JohelEGP
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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions