https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95968

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> The following is the reduced testcase:
> struct test_class
> {
>     consteval test_class( double pack_) { }
> };
> 
> void test_func() 
> {
>     auto t = [](const auto... args) {return test_class(args...);};
>     t(1.0);
> }
> 
> are lambdas consteval by default? I know they are implicit constexpr but I
> don't think they are consteval though.

They are not until C++23 (See PR 107687 for the status on that).

This is just a diagnostic issue. add constevalue like this to the reduced
testcase allows the testcase to work:
    auto t = [](const auto... args) consteval {return test_class(args...);};

Note the original testcase still has issues even if you add consteval to the
lambda and I suspect because std::apply still has issues ...

Reply via email to