------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-10-12 06:46 
-------
The bug here is that we are checking complain at all.

SFINAE does not say that when given a set of overload candidates you perform
type deduction and then discard any candiates for which an any error occurs. 
Instead, you perform type deduction and discard any candidates for which type
deduction fails, which is a defined term in [temp.deduct].  Type deduction fails
only under precise circumstances; using a local class as a template argument is
not a case in which type deduction fails.

It looks like people have been throwing around "complain & tf_error" checks too
freely in pt.c.

The question is then what happens after type deduction succeeds.  Should we emit
an error before doing overload resolution, or only if the invalid function is
selected from the overload set?  DR 415 is a related issue and the proposed
resolution suggests that errors about invalid substitutions may be issued before
overload resolution.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17413

Reply via email to