c++: simple-requirement starting with 'typename' [PR101733]
commit2b0ae7fb91f64fb005abf7d7903fd4c0764bb45c
authorJason Merrill <jason@redhat.com>
Sat, 26 Nov 2022 16:13:55 +0000 (26 11:13 -0500)
committerJason Merrill <jason@redhat.com>
Mon, 28 Nov 2022 20:51:53 +0000 (28 15:51 -0500)
tree6de19e3c1a6fc3c61e2069b3940d9c1c919319f2
parent297bbe2d0dea083344e66e3e72fa791b5855a3de
c++: simple-requirement starting with 'typename' [PR101733]

Usually a requirement starting with 'typename' is a type-requirement, but it
might be a simple-requirement such as a functional cast to a typename-type.

PR c++/101733

gcc/cp/ChangeLog:

* parser.cc (cp_parser_requirement): Parse tentatively for the
'typename' case.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-requires32.C: New test.
gcc/cp/parser.cc
gcc/testsuite/g++.dg/cpp2a/concepts-requires32.C [new file with mode: 0644]