I noticed this while tinkering with random Blink stuff.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
return std::make_move_iterator(std::ranges::rbegin(range_));nit: `std::move_iterator` should also work due to CTAD: https://stackoverflow.com/a/57762216
That said, I believe changing `RangeOfRvaluesAdapter` shouldn't be necessary if you used `std::ranges::rbegin` etc instead of `std::rbegin` in `ReversedAdapter`. `std::ranges::rbegin` will try to find a `rbegin` member function, but if it fails it'll construct a `std::reverse_iterator` from `begin()` which would be correct here.
return std::make_move_iterator(std::ranges::rbegin(range_));nit: `std::move_iterator` should also work due to CTAD: https://stackoverflow.com/a/57762216
That said, I believe changing `RangeOfRvaluesAdapter` shouldn't be necessary if you used `std::ranges::rbegin` etc instead of `std::rbegin` in `ReversedAdapter`. `std::ranges::rbegin` will try to find a `rbegin` member function, but if it fails it'll construct a `std::reverse_iterator` from `begin()` which would be correct here.
I'm going to land this as-is, but I will address your feedback in a followup; it'll just be rather intrusive since I need to go fix other things to satisfy ranges constraints.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
Allow `base::RangeAsRvalues()` to model a bidirectional range
This allows the `base::Reversed()` adapter to be used with
`base::RangeAsRvalues()`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |