It doesn't seem to work with any_view, even if sized and random_access categories are both specified. Note: any_view::back() does not work in this case either, which it probably should.
Using views::common on an any_view to circumvent the restriction that it must be a common range, my_sized_random_any_view | ranges::views::common | ranges::back does not compile. However, (my_sized_random_any_view | ranges::views::common).back() works.
Similarly, if I instead make my function a template instead of using any_view, calling it with a single ranges::sliding_view (so the type of my_range is sliding_view instead of any_view), then again my_range | ranges::back does not work but my_range.back() does.
ranges::back should probably work in the same conditions view_interface::back does. Additionally, it would be nice if any_view::back() worked for any_view with random_access | sized category.
It doesn't seem to work with
any_view
, even ifsized
andrandom_access
categories are both specified. Note:any_view::back()
does not work in this case either, which it probably should.Using
views::common
on anany_view
to circumvent the restriction that it must be a common range,my_sized_random_any_view | ranges::views::common | ranges::back
does not compile. However,(my_sized_random_any_view | ranges::views::common).back()
works.Similarly, if I instead make my function a template instead of using any_view, calling it with a single
ranges::sliding_view
(so the type of my_range issliding_view
instead ofany_view
), then againmy_range | ranges::back
does not work butmy_range.back()
does.ranges::back
should probably work in the same conditionsview_interface::back
does. Additionally, it would be nice ifany_view::back()
worked forany_view
withrandom_access | sized
category.