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

[container.requirements.general] should use dual-range equal() #240

Closed
StephanTLavavej opened this issue Dec 7, 2013 · 2 comments
Closed

Comments

@StephanTLavavej
Copy link
Contributor

Thanks to N3797 25.2.11 [alg.equal]/2 "If last1 - first1 != last2 - first2, return false.", we can simplify 23.2.1 [container.requirements.general] Table 96 "Container requirements"
from: "distance(a.begin(), a.end()) == distance(b.begin(), b.end()) && equal(a.begin(), a.end(), b.begin())"
to: "equal(a.begin(), a.end(), b.begin(), b.end())"
This will save 4 lines in an obnoxiously tall row. Related issue: #235

@cpplearner
Copy link
Contributor

This (as well as issue #235) was also reported as a library issue http://cplusplus.github.io/LWG/lwg-defects.html#2257

@AlisdairM
Copy link
Contributor

The LWG issue reference above was adopted for C++14, so this issue should be closed.

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