Skip to content

[sequence.reqmts] uses atypical and unclear wording for Cpp17 requirements and swappable conditions #5627

@Dani-Hub

Description

@Dani-Hub

During the submission process of LWG 3742 I realized that the suggested wording violates our current wording style in the following aspects:

  • For the Cpp17MoveConstructible and Cpp17MoveAssignable we should better use the form "T meets the Cpp17XX requirements" instead of "T is Cpp17XX"
  • Instead of saying that "T is swappable" we should say that "lvalues of type T are swappable"

The plain reason why we didn't decide for the more appropriate wording forms as part of this LWG issue was caused by the observation that the current local wording style used in subclause [sequence.reqmts] follows the same unusual style with the agreement that I would open an editorial issue to take care of this problem.

To be more specific, for example for the specification of insert_range we currently say:

Preconditions: T is Cpp17EmplaceConstructible into X from *ranges::begin(rg). For vector and
deque, T is also Cpp17MoveInsertable into X, Cpp17MoveConstructible, Cpp17MoveAssignable, and
swappable (16.4.4.3).

According to the preferred wording forms this should better say something like this:

Preconditions: T is Cpp17EmplaceConstructible into X from *ranges::begin(rg). For vector and
deque, T is also Cpp17MoveInsertable into X, T meets the Cpp17MoveConstructible and
Cpp17MoveAssignable requirements, and lvalues of type T are swappable (16.4.4.3).

I would like to get feedback whether such a rephrasing is possible as part of editorial work and to which extend, otherwise I would open a separate LWG issue to realize such wording changes. Of-course I'm also willing to make a corresponding editorial PULL request once we have agreement that such a change is editorially appropriate.

Metadata

Metadata

Assignees

No one assigned

    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