[Bug c++/31816] If a function foo is defined before declaring a template class A<T>, overloaded version of foo defined after the class declaration will not be available within class A<T>.
nicolas dot burrus at ensta dot fr
gcc-bugzilla@gcc.gnu.org
Sat May 5 15:53:00 GMT 2007
------- Comment #3 from nicolas dot burrus at ensta dot fr 2007-05-05 16:53 -------
Indeed, you're right, from the standard, section 14.6.3 (non dependent names)
in the template section : "Non-dependent names used in a template definition
are found using the usual name lookup and bound at the
point they are used".
However, in this case, shouldn't g++ be consistent and still fail for
QSet<int*> if void qHash(double) is not defined before the template definition
?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31816
More information about the Gcc-bugs
mailing list