[Bug c++/53446] New: Template function incorrectly rejected when convertible argument is provided for a parameter
blelbach at cct dot lsu.edu
gcc-bugzilla@gcc.gnu.org
Tue May 22 05:14:00 GMT 2012
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.
More information about the Gcc-bugs
mailing list