This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: template syntax
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Marco Correia <mvc at netcabo dot pt>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 22 Jul 2004 19:10:14 +0200 (CEST)
- Subject: Re: template syntax
- References: <200407221800.30672.mvc@netcabo.pt>
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.
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).
> 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.
Gerald
--
Gerald Pfeifer (Jerry) gerald@pfeifer.com http://www.pfeifer.com/gerald/