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

Calls to swap in the library don't properly describe context #3798

Open
brevzin opened this issue Feb 25, 2020 · 3 comments
Open

Calls to swap in the library don't properly describe context #3798

brevzin opened this issue Feb 25, 2020 · 3 comments

Comments

@brevzin
Copy link
Contributor

brevzin commented Feb 25, 2020

In the following sections:

  • iter_swap: [alg.swap]/7
  • pair::swap: [pairs.pair]/30
  • optional::swap: [optional.swap]/2
  • tuple::swap: [tuple.swap]/2
  • variant::swap: [variant.swap]/2
  • possibly others

We describe swapping as either doing swap(a, b) or otherwise calling swap - which in the library wording always means ::std::swap, since we don't otherwise describe what happens here. But in these contexts, what we mean is that we're calling swap in the context described in [swappable.requirements]/3 (i.e. using ::std::swap; swap(a, b)). This is done correctly in the description for is_­swappable_­with in [meta.unary.prop].

Is updating all these sections an editorial fix (this is the behavior we actually mean, just poorly specified) or does this require a library issue?

@jensmaurer
Copy link
Member

jensmaurer commented Mar 10, 2020

@jwakely , @zygoloid , is adding a glorified cross-reference to [swappable.requirements] editorial? Strictly speaking, it doesn't seem to be.

@jensmaurer
Copy link
Member

@jwakely , ping?

@jwakely
Copy link
Member

jwakely commented Oct 1, 2021

I think it counts as editorial, since it's clarifying the intent. There is no doubt about the intent, so if the change has normative impact, it's because the current wording does not describe the intended behaviour correctly.

From the wiki: "Unclear writing, when the intention of the text in question is well-known to the committee, but the presentation could be clearer."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants