https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87748
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- Author: jason Date: Mon Mar 25 18:27:08 2019 New Revision: 269921 URL: https://gcc.gnu.org/viewcvs?rev=269921&root=gcc&view=rev Log: PR c++/87748 - substitution failure error with decltype. This issue is similar to PR 87480; in both cases we were doing non-dependent substitution with processing_template_decl set, leading to member access expressions seeming still instantiation-dependent, and therefore decltype not being simplified to its actual type. And as in that PR, the fix is to clear processing_template_decl while substituting a default template argument. * pt.c (most_specialized_partial_spec): Clear processing_template_decl. Added: trunk/gcc/testsuite/g++.dg/cpp0x/sfinae64.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c