------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 20:45 ------- (In reply to comment #3) > Subject: Re: Compile error on template member function called > from template function >
> - Section 14.6.2 (last two sentences in paragraph 1) says: > "If an operand of an operator is a type-depedent expression, the operator > also denotes a dependent name. SUCH NAMES > ARE UNBOUND AND ARE LOOKED UP AT THE POINT OF THE TEMPLATE INSTANTIATION > (14.6.4.1) in both the context of the template > definition and the context of the point of instantiation." > > At the point of the template instantiation, the compiler does know that > val3.f is a template. The code is therefore > valid according to the C++ standard. No but this is about parse time and not instantiation time. Let me find the reference this is documented in the release notes for 3.4 also. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19552