This is the mail archive of the 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 syntax

On Thursday 22 July 2004 17:10, you wrote:
> On Thu, 22 Jul 2004, Marco Correia wrote:
> > Could anyone please tell me why this code:
> First of all, this code does not even come close to compiling; in the
> version that you posted, there is also an #include missing and cout
> resides in namespace std.

Ok, but the #include is clearly not relevant.
> Second, please note that this list is *not* a support list for GCC,
> rather it is dedicated to the development of GCC (as opposed to the
> development with GCC).

I apologize, I thought this was the right list.

> > void bla()
> > {
> >     B<T1> v;
> >     v.method<int>(3);			// <-- HERE (line 20)
> >     v.B<T1>::method<int>(3);	// <-- Also doesn't work
> > }
> Intuitively, v already has been instantiated with T1; what is <int>
> supposed to do here?  method() is just a regular member function of
> B, there are no further templates involved here.

I think you missed something. The method method() is not a regular member, is 
a template member, and of course this example is just a simplification of my 

Marco Correia <>

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