]> gcc.gnu.org Git - gcc.git/commit
c++: Fix CTAD with multiple-arg ctor template [93248].
authorJason Merrill <jason@redhat.com>
Sat, 14 Mar 2020 21:10:39 +0000 (17:10 -0400)
committerJason Merrill <jason@redhat.com>
Sun, 15 Mar 2020 09:47:28 +0000 (05:47 -0400)
commitcb05d702a17476fb658a59a6661d1f69394da786
treeb5524ad802d9f0c2a163a6f72820ae889580ac44
parent6c7e43f470285787cc9d0419976aab1e7b03415d
c++: Fix CTAD with multiple-arg ctor template [93248].

When cp_unevaluated_operand is set, tsubst_decl thinks that if it sees a
PARM_DECL that isn't already in local_specializations, we're in a decltype
in a trailing return type or some such, and so we only want a substitution
for a single PARM_DECL.  In this case, we want the whole chain, so make sure
cp_unevaluated_operand is cleared.

gcc/cp/ChangeLog
2020-03-14  Jason Merrill  <jason@redhat.com>

PR c++/93248
* pt.c (build_deduction_guide): Clear cp_unevaluated_operand for
substituting DECL_ARGUMENTS.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/class-deduction71.C [new file with mode: 0644]
This page took 0.068959 seconds and 6 git commands to generate.