error4.C
411 Bytes
-
Avoid double substitution with complete explicit template arguments. · 7d119905
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. From-SVN: r266055
Jason Merrill committed