------- Comment #16 from jwakely dot gcc at gmail dot com  2010-01-21 19:00 
-------
Shouldn't it get the same error as for this case?

template<class T>
T foo() { return T(); }

int main()
{
        &foo;
}

That example can be made valid like so:

        int (*pf)() = &foo;

Which demonstrates that the angle brackets are not necessary, *if* the compiler
can determine which specialisation is intended.  So the "cannot resolve address
of overloaded function" error is arguably correct.


-- 


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

Reply via email to