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++/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>.



------- 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


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