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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And invalid modification of the above
#include <meta>

template <typename T>
using A = decltype (T.[:std::meta::nonstatic_data_members_of (^^T,
std::meta::access_context::unchecked ())[0]:]);

struct B
{
  long a;
  int b;
};

struct C
{
  int c;
  long d;
};

int
main ()
{
  [] <typename T = C> requires (requires { A<T> {}; }) {} ();
}
ICEs elsewhere:
pr123237-4.C:4:111: internal compiler error: in cp_parser_splice_expression, at
cp/parser.cc:6321
    4 | using A = decltype (T.[:std::meta::nonstatic_data_members_of (^^T,
std::meta::access_context::unchecked ())[0]:]);
      |                                                                        
                                      ^~
0x31b27da internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:787
0x31c10e7 fancy_abort(char const*, int, char const*)
        ../../gcc/diagnostics/context.cc:1813
0x707cb5 cp_parser_splice_expression
        ../../gcc/cp/parser.cc:6321
0x71162c cp_parser_postfix_dot_deref_expression
        ../../gcc/cp/parser.cc:9662
0x70fd12 cp_parser_postfix_expression
        ../../gcc/cp/parser.cc:9174
0x72a0ab cp_parser_decltype_expr
        ../../gcc/cp/parser.cc:19350
0x72a403 cp_parser_decltype
        ../../gcc/cp/parser.cc:19488
...

Reply via email to