https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87748
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:ac5e28911abdfb8d9bf6bea980223e199bbcf28d commit r8-10070-gac5e28911abdfb8d9bf6bea980223e199bbcf28d Author: Jason Merrill <ja...@redhat.com> Date: Tue Feb 25 21:29:03 2020 -0500 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. gcc/cp/ChangeLog 2020-02-25 Jason Merrill <ja...@redhat.com> PR c++/87748 - substitution failure error with decltype. * pt.c (most_specialized_partial_spec): Clear processing_template_decl.