PR c++/87748 - substitution failure error with decltype.
authorJason Merrill <jason@redhat.com>
Mon, 25 Mar 2019 18:27:08 +0000 (14:27 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 25 Mar 2019 18:27:08 +0000 (14:27 -0400)
commitb25e675d7de70c530a1ac50f726179c9fd54f161
tree433526769555de82ecf3ec0284998f10622da6ac
parent51e471ae61b6a9fe672fe92e00edacabf69f55a4
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.

From-SVN: r269921
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/sfinae64.C [new file with mode: 0644]