https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85569
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |7.3.0
Version|8.0.1 |8.1.0
Keywords| |rejects-valid
Last reconfirmed| |2018-07-03
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
Summary|is_invocable(F, |[8/9 Regression]
|decltype(objs)...) fails |is_invocable(F,
|with "not supported by |decltype(objs)...) fails
|dump_expr#" unless via |with "not supported by
|indirection |dump_expr#" unless via
| |indirection
Known to fail| |8.1.0, 9.0
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Preprocessing it with GCC 7.3 and trying to compile it shows it started to be
rejected with r251433 ("Reimplement handling of lambdas in templates") with
this diagnostic:
85569-gcc7.cc: In instantiation of ‘compose(F&&, Fs&& ...) [with F = const
equal(T&&) [with T = int]::<lambda(const auto:1&)>&; Fs =
{std::plus<void>}]::<lambda(auto:2&& ...)> [with auto:2 = {int, int}; decltype
(detail::compose(typename std::is_invocable<std::plus<void>, decltype
(objs)...>::type{}, f, compose(forward<std::plus<void> >(fs#0)),
(forward<decltype(compose::__lambda1::operator()::objs)>)(compose::__lambda1::operator()::objs)...))
= bool; decltype (objs) = int&&]’:
85569-gcc7.cc:90:23: required from here
85569-gcc7.cc:79:20: error: use ‘...’ to expand argument pack
85569-gcc7.cc:89:1: error: non-constant condition for static assertion
85569-gcc7.cc:90:23: in constexpr expansion of ‘compose<const equal(T&&)
[with T = int]::<lambda(const auto:1&)>&, std::plus<void> >(eq<3>,
std::plus<void>{}).compose(F&&, Fs&& ...) [with F = const equal(T&&) [with T =
int]::<lambda(const auto:1&)>&; Fs = {std::plus<void>}]::<lambda(auto:2&&
...)>(1, 2)’
85569-gcc7.cc:89:1: error: constexpr call flows off the end of the function
Then the diagnostic regressed with r257018 ("PR c++/82249 - wrong mismatched
pack length error"):
85569-gcc7.cc: In instantiation of ‘constexpr auto compose(F&&, Fs&& ...) [with
F = const equal(T&&) [with T = int]::<lambda(const auto:1&)>&; Fs =
{std::plus<void>}]’:
85569-gcc7.cc:90:22: required from here
85569-gcc7.cc:79:20: error: expansion pattern ‘decltype
(#‘nontype_argument_pack’ not supported by dump_expr#<expression error>)’
contains no argument packs
85569-gcc7.cc:90:23: error: non-constant condition for static assertion
85569-gcc7.cc:90:23: error: call to non-‘constexpr’ function ‘compose(F&&, Fs&&
...) [with F = const equal(T&&) [with T = int]::<lambda(const auto:1&)>&; Fs =
{std::plus<void>}]::<lambda(auto:2&& ...)> [with auto:2 = {int, int}; decltype
(detail::compose(typename std::is_invocable<std::plus<void>, decltype
(objs)...>::type{}, f, compose(forward<std::plus<void> >(fs#0)),
(forward<decltype(compose::__lambda1::operator()::objs)>)(compose::__lambda1::operator()::objs)...))
= bool; decltype (objs) = int&&]’
85569-gcc7.cc:68:8: note: ‘compose(F&&, Fs&& ...) [with F = const equal(T&&)
[with T = int]::<lambda(const auto:1&)>&; Fs =
{std::plus<void>}]::<lambda(auto:2&& ...)> [with auto:2 = {int, int}; decltype
(detail::compose(typename std::is_invocable<std::plus<void>, decltype
(objs)...>::type{}, f, compose(forward<std::plus<void> >(fs#0)),
(forward<decltype(compose::__lambda1::operator()::objs)>)(compose::__lambda1::operator()::objs)...))
= bool; decltype (objs) = int&&]’ is not usable as a ‘constexpr’ function
because: