[Bug c++/105964] [12 Regression] Return type deduction fails during NTTP use of function dependent on template parameter
cvs-commit at gcc dot gnu.org
Thu Jun 23 03:46:55 GMT 2022
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
Author: Jason Merrill <firstname.lastname@example.org>
Date: Wed Jun 22 18:19:11 2022 -0400
c++: dependence of baselink [PR105964]
helper<token>::c isn't dependent just because we haven't deduced its return
type yet. type_dependent_expression_p already knows how to deal with that
for bare FUNCTION_DECL, but needs to learn to look through a BASELINK.
* pt.cc (type_dependent_expression_p): Look through BASELINK.
* g++.dg/cpp1z/nontype-auto21.C: New test.
More information about the Gcc-bugs