gcc/libstdc++-v3/testsuite/20_util/pair
Patrick Palka 864fed4a49 c++: Explain fn template argument type/value mismatches [PR66439]
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.
2020-05-18 23:50:14 -04:00
..
astuple c++: Explain fn template argument type/value mismatches [PR66439] 2020-05-18 23:50:14 -04:00
comparison_operators
cons
make_pair
requirements
1.cc
2.cc
3.cc
4.cc
40925.cc
44487.cc
70437.cc
79141.cc
86751.cc
87822.cc
constexpr_assign.cc
constexpr_get.cc
constexpr_swap.cc
moveable.cc
noexcept_move_assign.cc
noexcept_swap.cc
noncopyable.cc
piecewise.cc
piecewise2.cc
ref_assign.cc
swap.cc
swap_cxx17.cc
traits.cc