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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
      Known to work|                            |10.0, 9.2.0
      Known to fail|                            |8.3.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
No ICE with gcc-9-branch or current trunk:

68628.cc:12:61: error: expected parameter pack before '...'
   12 |       is_convertible<Ret, decltype(impl(forward <
Args(args)...))>::value;
      |                                                             ^~~
68628.cc:12:41: error: invalid template-argument-list
   12 |       is_convertible<Ret, decltype(impl(forward <
Args(args)...))>::value;
      |                                         ^~~~~~~
68628.cc:12:41: note: function name as the left hand operand of '<' is
ill-formed in C++2a; wrap the function name in '()'
68628.cc:12:64: error: no matching function for call to
'internal::B<Ret>::impl(void (&)())'
   12 |       is_convertible<Ret, decltype(impl(forward <
Args(args)...))>::value;
      |                                                                ^
68628.cc:7:35: note: candidate: 'template<class> static auto
internal::A::impl()'
    7 |   template <typename> static auto impl();
      |                                   ^~~~
68628.cc:7:35: note:   template argument deduction/substitution failed:
68628.cc:12:64: note:   candidate expects 0 arguments, 1 provided
   12 |       is_convertible<Ret, decltype(impl(forward <
Args(args)...))>::value;
      |                                                                ^
68628.cc:12:64: error: no matching function for call to
'internal::B<Ret>::impl(void (&)())'
68628.cc:7:35: note: candidate: 'template<class> static auto
internal::A::impl()'
    7 |   template <typename> static auto impl();
      |                                   ^~~~
68628.cc:7:35: note:   template argument deduction/substitution failed:
68628.cc:12:64: note:   candidate expects 0 arguments, 1 provided
   12 |       is_convertible<Ret, decltype(impl(forward <
Args(args)...))>::value;
      |                                                                ^
68628.cc:12:66: error: template argument 2 is invalid
   12 |       is_convertible<Ret, decltype(impl(forward <
Args(args)...))>::value;
      |                                                                  ^
68628.cc: In instantiation of 'bool Invokable<<lambda()>, int>':
68628.cc:21:17:   required from here
68628.cc:20:64: error: no match for call to '(internal::B<<lambda()> >) (void
(&)())'
   20 | template <typename Ret, typename> bool
Invokable{invoke_as<Ret>(forward)};
      |                                                 
~~~~~~~~~~~~~~^~~~~~~~~
68628.cc:11:8: note: candidate: 'auto internal::B<Ret>::operator()(F, Args ...)
requires  <erroneous-expression> [with F = void (*)(); Args = {}; Ret =
<lambda()>]'
   11 |   auto operator()(F, Args... args) requires
      |        ^~~~~~~~
68628.cc:11:8: note: constraints not satisfied
68628.cc:21:56: error: expected ',' at end of input
   21 | static_assert ( Invokable < decltype ( functor ), int >
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      |                                                        ,
68628.cc:21:17: error: expected string-literal at end of input
   21 | static_assert ( Invokable < decltype ( functor ), int >
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68628.cc:21:56: error: expected ')' at end of input
   21 | static_assert ( Invokable < decltype ( functor ), int >
      |               ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      |                                                        )
68628.cc:21:56: error: expected ';' at end of input
   21 | static_assert ( Invokable < decltype ( functor ), int >
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      |                                                        ;

Reply via email to