What    |Removed                     |Added
                 CC|                            |
         OS/Version|Linux                       |All

------- Comment #1 from  2009-04-05 19:00 -------
I'm not sure that this is supposed to work.  It would appear that the process
of binding template parameters to arguments happens strictly before that of
applying default arguments.  Moreover, even if U is given, if it's anything but
S then it triggers a type mismatch on the default argument.

It would appear that you need two templates

void fun(T)(T t)
    fun(t, getS());

void fun(T, U)(T t, U u)


Reply via email to