Skip to content

Can't move construct semiregular from non-capturing lambda #986

@JohelEGP

Description

@JohelEGP

Branch: v1.0-beta
The following extract fails to compile because the storage for the lambda couldn't be constructed.

std::string_view{} | ranges::view::split([](char c) { return true; });

[...]/build/clang/_deps/range-v3-src/include/range/v3/view/split.hpp:265: error: no viable conversion from typename std::remove_reference<(lambda at [...]/src/gfm.cpp:426:36) &>::type (aka (lambda at [...]/src/gfm.cpp:426:36)) to semiregular_t<(lambda at [...]/src/gfm.cpp:426:36)> (aka ranges::semiregular<(lambda at [...]/src/gfm.cpp:426:36)>)

                    predicate_pred<Rng, Fun>{std::move(fun)}};
                                             ^~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions