You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The by far most often used "swappable" requirement used in the current normative wording has the style
lvalues of type T are swappable
defined in [swappable.requirements]. This is rather lengthy wording for a simple thing, and has caused editorial hiccups such as the one mentioned in #5627. I suggest introducing a new editorial vocabulary, Cpp17Swappable to be introduced in subclause [swappable.requirements], for example as follows:
A type X meets the Cpp17Swappable requirements if lvalues of type X are swappable.
just before line 5 defining the Cpp17ValueSwappable requirements and to replace using existing wording of the above mentioned form "lvalues of type T are swappable" by "T meets the Cpp17Swappable requirements".
This approach would be similar to the style used for other Cpp17 requirements and can be easily migrated into a collection of such requirements. For example, both bullets (5.1) and (5.2) of [unord.hash] could easily be merged into a single bullet of the form:
meet the Cpp17Hash requirements (Table 36), with Key as the function call argument type, the
Cpp17DefaultConstructible requirements (Table 29), the Cpp17CopyAssignable requirements (Table 33), the Cpp17Swappable requirements ([swappable.requirements]),
A similar and by far not last example is the potential merge of formatter.requirements] bullet (1.2) into the (1.1.x) sub-bullets, etc.
This particular wording form also matches quite well with syntactic requirements such as is_swappable_v versus the most general form is_swappable_with_v.
If this suggestion goes beyond an editorial action, please let me know, whether instead an official paper proposal would be preferred to realize these effects.
The text was updated successfully, but these errors were encountered:
I have decided to provide an official proposal to realize these effects. I would appreciate if we could keep the issue open until I have added a reference to the provided proposal (assuming this happens within an acceptable time frame).
The by far most often used "swappable" requirement used in the current normative wording has the style
defined in [swappable.requirements]. This is rather lengthy wording for a simple thing, and has caused editorial hiccups such as the one mentioned in #5627. I suggest introducing a new editorial vocabulary, Cpp17Swappable to be introduced in subclause [swappable.requirements], for example as follows:
just before line 5 defining the Cpp17ValueSwappable requirements and to replace using existing wording of the above mentioned form "lvalues of type T are swappable" by "T meets the Cpp17Swappable requirements".
This approach would be similar to the style used for other Cpp17 requirements and can be easily migrated into a collection of such requirements. For example, both bullets (5.1) and (5.2) of [unord.hash] could easily be merged into a single bullet of the form:
A similar and by far not last example is the potential merge of formatter.requirements] bullet (1.2) into the (1.1.x) sub-bullets, etc.
This particular wording form also matches quite well with syntactic requirements such as
is_swappable_v
versus the most general formis_swappable_with_v
.If this suggestion goes beyond an editorial action, please let me know, whether instead an official paper proposal would be preferred to realize these effects.
The text was updated successfully, but these errors were encountered: