You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) { returntrue; });
[...]/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> is an aggregate with a single member of type semiregular_t<Fun>. predicate_pred<Rng, Fun>{std::move(fun)}}; attempts to copy-initialize that member from an rvalue Fun, which fails since semiregular's corresponding converting constructor is explicit.
The equivalent std::optional converting constructor is explicit(!is_convertible_v</**/>), so this is a bug.
Branch: v1.0-beta
The following extract fails to compile because the storage for the lambda couldn't be constructed.
[...]/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)
) tosemiregular_t<(lambda at [...]/src/gfm.cpp:426:36)>
(akaranges::semiregular<(lambda at [...]/src/gfm.cpp:426:36)>
)The text was updated successfully, but these errors were encountered: