This is the mail archive of the gcc-help@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]

Re: template mem fun problem gcc-3.0.2


>>>>> "Paolo" == Paolo Carlini <pcarlini@unitus.it> writes:

    >> This code gives a syntax error.  I think it should not.
    Paolo> ... and what should give instead, in your opinion??

I may be mistaken, but I thought that the for a template function

template<typename T, typename W>
T f (W);

You say:

X x = f<X> (w) in order to specify the particular template
instantiation.  So I thought for a member function it is the same.

class C {
  template<typename T, typename W>
  T f (W);
};

C c;

X x = c.f<X> (w)


Is this not correct?  If it is correct, isn't my code correct and
should not give any error?


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