[Bug c++/87480] [8 Regression] SFINAE constructor not matched, only in templated function
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 26 04:23:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87480
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:2dcdcda91921b512b978f7223c530352fd61b91b
commit r8-10069-g2dcdcda91921b512b978f7223c530352fd61b91b
Author: Jason Merrill <jason@redhat.com>
Date: Tue Feb 25 21:29:03 2020 -0500
PR c++/87480 - decltype of member access in default template arg
The issue here is that declval<T>().d is considered instantiation-dependent
within a template, as the access to 'd' might depend on the particular
specialization. But when we're deducing template arguments for a call, we
know that the call and the arguments are non-dependent, so we can do the
substitution as though we aren't in a template. Which strictly speaking we
aren't, since the default argument is considered a separate definition.
gcc/cp/ChangeLog
2020-02-25 Jason Merrill <jason@redhat.com>
PR c++/87480 - decltype of member access in default template arg
* pt.c (type_unification_real): Accept a dependent result in
template context.
More information about the Gcc-bugs
mailing list