-
Notifications
You must be signed in to change notification settings - Fork 8
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
Reorder requirements in concept Iterator #331
Labels
Comments
ericniebler
added a commit
to CaseyCarter/cmcstl2
that referenced
this issue
Feb 17, 2017
…icniebler/stl2#155); remove argument deduction constraint work-arounds; fix up deduction constraints (refs ericniebler/stl2#331)
ericniebler
added a commit
to CaseyCarter/cmcstl2
that referenced
this issue
Feb 17, 2017
…icniebler/stl2#155); remove argument deduction constraint work-arounds; fix up deduction constraints (refs ericniebler/stl2#331)
ericniebler
added a commit
to CaseyCarter/cmcstl2
that referenced
this issue
Feb 17, 2017
…icniebler/stl2#155); remove argument deduction constraint work-arounds; fix up deduction constraints (refs ericniebler/stl2#331)
ericniebler
added a commit
to CaseyCarter/cmcstl2
that referenced
this issue
Feb 17, 2017
…icniebler/stl2#155); remove argument deduction constraint work-arounds; fix up deduction constraints (refs ericniebler/stl2#331)
CaseyCarter
pushed a commit
to CaseyCarter/cmcstl2
that referenced
this issue
Feb 18, 2017
…ance (#76) * Fix up Boolean, EqualityComparable, and StrictTotallyOrdered (refs ericniebler/stl2#155); remove argument deduction constraint work-arounds; fix up deduction constraints (refs ericniebler/stl2#331) * fix Assignable per discussion with @CaseyCarter
CaseyCarter
added a commit
that referenced
this issue
Jul 20, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When passing a
std::vector<MoveOnly>
tosort
, overload resolution causes the evaluation ofIterator<std::vector<MoveOnly>>
, which tests the vector type for assignability. Vectors of move-only types are not assignable, but their assignment operators are not properly constrained. That leads to a hard error rather than a concept check failure.The problem can be mostly avoided by testing for dereferencability first in concept
Iterator
, as shows in the Proposed Resolution below.Proposed Resolution
Change concept
Iterator
([iterators.iterator]) as follows:The text was updated successfully, but these errors were encountered: