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

[swappable.requirements] Mark up the swappable requirement in code font #1549

Closed
wants to merge 1 commit into from

Conversation

AlisdairM
Copy link
Contributor

Requiements like CopyConstrible and MoveAssignable are usually marked
up in code font. This PR applies the same pattern to the swappable
requirement, but not 'swappable with'. The need for this change was
most obvious for types that combined the swappble requirement with
others, such as MoveConstructible.

Requiements like CopyConstrible and MoveAssignable are usually marked
up in code font.  This PR applies the same pattern to the swappable
requirement, but not 'swappable with'.  The need for this change was
most obvious for types that combined the swappble requirement with
others, such as MoveConstructible.
@timsong-cpp
Copy link
Contributor

CopyConstructible etc. are CamelCased and apply to types, while "swappable" applies to expressions (hence the "lvalues of type T shall be swappable" wording). Not sure these are exactly analogous.

@zygoloid
Copy link
Member

If this is a concept, we should change it to be an actual concept now they're part of the language. If not, code font is inappropriate. Either way, this is LWG territory.

@geoffromer
Copy link
Contributor

In addition to being camel-cased, IIUC pseudo-concepts like CopyConstructible aren't supposed to be used as adjectives; we're supposed to say things like "satisfies the CopyConstructible requirements" instead. I don't think that would be an improvement (and as Tim observes, applying that pattern to values rather than types would be an innovation).

I suggest instead just dropping the code-font from the [swappable.requirements] section heading.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jan 4, 2018

LWG reflector discussion seemed to agree that the comparison with CopyConstructible is a false analogy and that code font is inappropriate for "swappable". Instead, we're removing the undesired code font from the heading; fixed by e664eb2.

@tkoeppe tkoeppe closed this Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants