<algorithm>
, <xutility>
: Usage of _Prefer_iterator_copies
should inspect unwrapped iterators
#4663
Labels
<algorithm>
, <xutility>
: Usage of _Prefer_iterator_copies
should inspect unwrapped iterators
#4663
Noticed while looking at #4660 but this is a distinct issue.
All of our uses of
_Prefer_iterator_copies
are inspectingiterator_t<_Rng>
, which is the range's original iterator, but we're actually working with the unwrapped iterator type:STL/stl/inc/algorithm
Lines 10417 to 10419 in 8dc4faa
STL/stl/inc/xutility
Lines 7018 to 7020 in 8dc4faa
STL/stl/inc/xutility
Lines 7236 to 7238 in 8dc4faa
_Prefer_iterator_copies
cares about both size and trivially-copyable, so wrapped vs. unwrapped is a significant difference:STL/stl/inc/xutility
Lines 6962 to 6966 in 8dc4faa
The text was updated successfully, but these errors were encountered: