Issue 75002
Summary [libc++] `views::split` and `views::lazy_split` shouldn't be range adaptor closures
Labels libc++
Assignees
Reporter StephanTLavavej
    See my analysis in #74961 followed by @cpplearner's https://github.com/llvm/llvm-project/pull/74961#issuecomment-1848847026.

The `views::split` and `views::lazy_split` machinery shouldn't derive from `__range_adaptor_closure`:

https://github.com/llvm/llvm-project/blob/fde04e61cb7393f0ca982d7fc905a17767d93e6e/libcxx/include/__ranges/split_view.h#L196-L197
https://github.com/llvm/llvm-project/blob/fde04e61cb7393f0ca982d7fc905a17767d93e6e/libcxx/include/__ranges/lazy_split_view.h#L439-L440

Instead they should inherit from nothing, like `views::take_while`:

https://github.com/llvm/llvm-project/blob/fde04e61cb7393f0ca982d7fc905a17767d93e6e/libcxx/include/__ranges/take_while_view.h#L135-L137

I'm unsure if other changes will be needed, beyond my test changes in #74961.



_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to