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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std::vector |               |std::vector |
                   |std::views::drop_while |    |std::views::drop_while,
                   |std::views::reverse, cbegin |cbegin does not work
                   |does not work               |

--- Comment #1 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Sorry, we have a view which is similar to `std::views::drop_while` where I
could just replace the name and it gave me the same error, but using
`std::views::drop_while` gives me the error already without the reverse. So I
changed the ticket.

```c++
#include <ranges>
#include <vector>

int main()
{
    std::vector<int> text1{};
    auto drop_none = [](auto const &) constexpr { return false; };
    auto accept_any = [](auto const &) constexpr { return true; };
    auto && view1 = text1 | std::views::reverse;
    auto && view2 = text1 | std::views::drop_while(drop_none);
    auto && view3 = text1 | std::views::take_while(accept_any);
    auto && view4 = text1 | std::views::filter(accept_any);

    std::ranges::cbegin(view1);
    std::ranges::cbegin(view2); // does not work
    std::ranges::cbegin(view3);
    std::ranges::cbegin(view4); // does not work
}
```

(https://godbolt.org/z/E97_Tq)

Reply via email to