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

reverse() should require ValueSwappable instead of swappable #210

Closed
StephanTLavavej opened this issue Oct 5, 2013 · 0 comments · Fixed by #993
Closed

reverse() should require ValueSwappable instead of swappable #210

StephanTLavavej opened this issue Oct 5, 2013 · 0 comments · Fixed by #993

Comments

@StephanTLavavej
Copy link
Contributor

N3690 25.3.10 [alg.reverse]/2 says: "Requires: *first shall be swappable (17.6.3.2)."

This is inconsistent with the other algorithms, which require ValueSwappable from iterators instead of swappable from elements (e.g. see 25.3.13 [alg.partitions]/6 and many other places). These requirements are synonymous, so this is an editorial issue. The only exceptions in Clause 25 are swap_ranges() and iter_swap() which must require "swappable with" which is special.

I recommend changing 25.3.10 [alg.reverse]/2 to say: "Requires: BidirectionalIterator shall satisfy the requirements of ValueSwappable (17.6.3.2)."

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

Successfully merging a pull request may close this issue.

1 participant