864fed4a49
In fn_type_unifcation, we are passing NULL_TREE as the 'in_decl' parameter to coerce_template_parms, and this is causing template type/value mismatch error messages to get suppressed regardless of the value of 'complain'. This means that when substitution into a function template fails due to a type/value mismatch between a template parameter and the provided template argument, we just say "template argument deduction/substitution failed:" without a followup explanation of the failure. Fix this by passing 'fn' instead of NULL_TREE to coerce_template_parms. gcc/cp/ChangeLog: PR c++/66439 * pt.c (fn_type_unification): Pass 'fn' instead of NULL_TREE as the 'in_decl' parameter to coerce_template_parms. gcc/testsuite/ChangeLog: PR c++/66439 * g++.dg/cpp2a/concepts-ts4.C: Expect a "type/value mismatch" diagnostic. * g++.dg/cpp2a/concepts-ts6.C: Likewise. * g++.dg/template/error56.C: Likewise. * g++.dg/template/error59.C: New test. libstdc++-v3/ChangeLog: PR c++/66439 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value mismatch" messages. * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise. |
||
---|---|---|
.. | ||
17_intro | ||
18_support | ||
19_diagnostics | ||
20_util | ||
21_strings | ||
22_locale | ||
23_containers | ||
24_iterators | ||
25_algorithms | ||
26_numerics | ||
27_io | ||
28_regex | ||
29_atomics | ||
30_threads | ||
abi | ||
backward | ||
config | ||
data | ||
decimal | ||
experimental | ||
ext | ||
lib | ||
libstdc++-abi | ||
libstdc++-dg | ||
libstdc++-prettyprinters | ||
libstdc++-xmethods | ||
performance | ||
special_functions | ||
std | ||
tr1 | ||
tr2 | ||
util | ||
Makefile.am | ||
Makefile.in |