This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53446] New: Template function incorrectly rejected when convertible argument is provided for a parameter
- From: "blelbach at cct dot lsu.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2012 05:13:39 +0000
- Subject: [Bug c++/53446] New: Template function incorrectly rejected when convertible argument is provided for a parameter
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53446
Bug #: 53446
Summary: Template function incorrectly rejected when
convertible argument is provided for a parameter
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: blelbach@cct.lsu.edu
Created attachment 27471
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27471
Failing test case
(Thanks to rjmccall on #llvm for explaining the details of why this is a bug)
In the attached code snippet, the second parameter of f<>(), B<>, is a
non-deduced context, but the first argument D<> permits the deduction of T=int.
That substitution should succeed, and then the second argument is convertible.
The candidate can't be rejected just because B<something> can't be matched with
A.