ADL-proof implementation of numeric algorithms #4391
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Separated from #4004 (this is the last one). Towards #1596.
Some
begin()
calls are replaced withdata()
because the iterator operations are not ADL-proof.begin()
calls on_Parallel_vector
that are not dependent on user-defined types and thus are always safe. I'm not sure whether we should consistently usedata()
(which possibly improves debug performance).After merging this PR, there're still a small number of unqualified
_Adl_verify_range
calls that possibly do evil (inspan
anddistance
etc.).The remaining unqualified
_Adl_verify_range
calls looks "OK" to me as ADL-incompatible types don't seem required to be supported in those cases (where the acceptable value types are integer/character types).