[Bug c++/97663] [c++17] Function with return type 'unsigned' in nested namespace misinterpreted as deduction guide
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 3 20:43:21 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97663
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:875225301e356759982573d5578ed7ca54f81f86
commit r11-4695-g875225301e356759982573d5578ed7ca54f81f86
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 3 21:42:51 2020 +0100
c++: Don't try to parse a function declaration as deduction guide [PR97663]
While these function declarations have NULL decl_specifiers->type,
they have still type specifiers specified from which the default int
in the return type is added, so we shouldn't try to parse those as
deduction guides.
2020-11-03 Jakub Jelinek <jakub@redhat.com>
PR c++/97663
* parser.c (cp_parser_init_declarator): Don't try to parse
C++17 deduction guides if there are any type specifiers even when
type is NULL.
* g++.dg/cpp1z/class-deduction75.C: New test.
More information about the Gcc-bugs
mailing list