Skip to content

[libc++] views::split and views::lazy_split shouldn't be range adaptor closures #75002

@StephanTLavavej

Description

@StephanTLavavej

See my analysis in #74961 followed by @cpplearner's #74961 (comment).

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

namespace __split_view {
struct __fn : __range_adaptor_closure<__fn> {

namespace __lazy_split_view {
struct __fn : __range_adaptor_closure<__fn> {

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

namespace __take_while {
struct __fn {

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions