c++: ->template and using-decl [PR104235]
authorJason Merrill <jason@redhat.com>
Wed, 26 Jan 2022 15:40:42 +0000 (10:40 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 26 Jan 2022 16:39:40 +0000 (11:39 -0500)
commit00d8321124123daf41f7c51526355a5a610cdeb8
tree9f0e89b6661f1a045f06227d17bbbde07a4939c0
parent1bc00a489086b0bdde89ccb11dfa4f50b6c4e8f0
c++: ->template and using-decl [PR104235]

cp_parser_template_id wasn't prepared to handle getting a USING_DECL back
from cp_parser_template_name.  Let's defer that case to instantiation time,
as well.

PR c++/104235

gcc/cp/ChangeLog:

* parser.cc (cp_parser_template_name): Repeat lookup of USING_DECL.

gcc/testsuite/ChangeLog:

* g++.dg/parse/template-keyword2.C: New test.
gcc/cp/parser.cc
gcc/testsuite/g++.dg/parse/template-keyword2.C [new file with mode: 0644]