gcc/libstdc++-v3
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
..
config Update the baseline symbols for SPARC64/Linux 2020-05-07 10:56:51 +02:00
doc libstdc++: Document library versioning for 9.[123] and 10.1 2020-05-06 10:30:15 +01:00
include x86-vxworks malloc aligns to 8 bytes like solaris 2020-05-13 04:49:00 -03:00
libsupc++ libstdc++: Fix the return type of __cxa_finalize 2020-05-04 23:07:19 +01:00
po Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
python libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc 2020-02-17 13:20:57 +00:00
scripts Update copyright years. 2020-01-01 12:51:42 +01:00
src Revert "libstdc++ Enhance thread safety of debug mode iterators" 2020-05-11 14:07:06 +02:00
testsuite c++: Explain fn template argument type/value mismatches [PR66439] 2020-05-18 23:50:14 -04:00
ChangeLog c++: Explain fn template argument type/value mismatches [PR66439] 2020-05-18 23:50:14 -04:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019 libstdc++: Fix whitespace in ChangeLog-2019 2020-01-09 21:31:35 +00:00
Makefile.am Update copyright years. 2020-01-01 12:51:42 +01:00
Makefile.in Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
README
acinclude.m4 libstdc++: Replace glibc-specific check for clock_gettime (PR 93325) 2020-01-28 13:24:09 +00:00
aclocal.m4 Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
config.h.in libstdc++: Add full steady_clock support to shared_timed_mutex 2019-12-02 16:23:10 +00:00
configure x86: Also check if -fcf-protection works 2020-05-15 09:07:17 -07:00
configure.ac libstdc++: Add full steady_clock support to shared_timed_mutex 2019-12-02 16:23:10 +00:00
configure.host
crossconfig.m4 reject macros in math decl check 2020-01-23 16:44:54 -03:00
fragment.am
linkage.m4

README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.