https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96113

gcc-bugs at marehr dot dialup.fu-berlin.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Ah, thank you, you are right! I always forget that they are cached in the view
when calling begin and not when constructing the view. This makes the view
strictly speaking still not amortized constant, but helps to reduce the runtime
on multiple invocations of `begin`. 

The question is if `std::views::reverse_view`, which basically makes it a
common range, can recover the const-iterability. Like it can do for
sized-ranges.

I have just seen that `std::views::reverse_view` requires a common_range for
const overloads of begin/end, this might be my original use case, because I
have a const-iterable, bi-directional view with a sentinel.

But since the standard explicitly drops the const-iterability when using
`drop_while` / non-common views for `reverse_view`, I think this issue can be
closed.

Thank you!

Reply via email to