This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53446] New: Template function incorrectly rejected when convertible argument is provided for a parameter


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]