Avoid double substitution with complete explicit template arguments.
commitd1b312482df7b860b593d9d16b0d648f52bea71e
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Nov 2018 04:47:20 +0000 (13 04:47 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Nov 2018 04:47:20 +0000 (13 04:47 +0000)
treeea8bf50fae9497d15cbee4407a37515b686e65af
parent1c432fa5115d04d82d2c788d11cc3a6aaca28920
Avoid double substitution with complete explicit template arguments.

Previously, when we got a function template with explicit arguments for all
of the template parameters, we still did "deduction", which of course
couldn't deduce anything, but did other deduction-time checking of
non-dependent conversions and such.  This broke down with the unevaluated
lambdas patch (to follow): substituting into the lambda multiple times, once
to get the function type for deduction and then again to generate the actual
decl, doesn't work, since different substitutions of a lambda produce
different types.  I believe that skipping the initial substitution when we
have all the arguments is still conformant, and produces better diagnostics
for some testcases.

* pt.c (fn_type_unification): If we have a full set of explicit
arguments, go straight to substitution.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266055 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/decltype48.C
gcc/testsuite/g++.dg/cpp0x/diag1.C
gcc/testsuite/g++.dg/cpp0x/error4.C
gcc/testsuite/g++.dg/cpp0x/pr77655.C
gcc/testsuite/g++.dg/diagnostic/param-type-mismatch-2.C
gcc/testsuite/g++.dg/diagnostic/param-type-mismatch.C