Skip to content

[inplace.vector.modifiers] Revert wording for the Returns of try_append_range? #7486

@hewillk

Description

@hewillk

The wording of Returns for try_append_range in the original paper is:

Returns: Iterator past last inserted element of rg.

It was changed after 37a6c0d to:

Returns: An iterator pointing to the first element of rg that was not inserted into *this, or ranges​::​end(rg) if no such element exists.

This doesn't seem right because ranges::end might be different than ranges::begin making it impossible to convert to borrowed_iterator_t<R>. Given that there is no description for such a situation in the [container] as described in [algorithm#requirements-13]:

In the description of algorithm return values, a sentinel value s denoting the end of a range [i, s) is sometimes returned where an iterator is expected. In these cases, the semantics are as if the sentinel is converted into an iterator using ranges​::​next(i, s).

Should we revert the current wording to make it consistent with the original wording?

@jwakely @tkoeppe

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