From: Pascal Francq <pfrancq@ulb.ac.be>
To: help-gcc@gnu.org
Subject: Problems with pointer and templates
Date: Tue, 21 Dec 1999 17:20:00 -0000 [thread overview]
Message-ID: <385F9DF7.32D7F2A4@ulb.ac.be> (raw)
I have a template class with a template function declare like:
template<class C> class Cont
{
public:
   Cont(void) {}
   template<class G> DoSomething(const G ¶m)
{}
};
I declare a pointer to Cont:
Cont *ptr=new Cont();
When i try the following instruction, gcc gives me an error ("parse
error before '>')
ptr->DoSomething<int>(3);
Note: When I compile this code with a compiler like the one of borland,
there are no problems.
--Â
Ir. Pascal Francq
Researcher
Université Libre de Bruxelles
Faculty of Applied Mechanics
Avenue F.D. Roosevelt, 50
CP 165/41
B-1050 Brussels
BELGIUM
Tel. +32-2-650 47 65
Fax +32-2-650 27 10
Â
WARNING: multiple messages have this Message-ID
From: Pascal Francq <pfrancq@ulb.ac.be>
To: help-gcc@gnu.org
Subject: Problems with pointer and templates
Date: Fri, 31 Dec 1999 22:24:00 -0000 [thread overview]
Message-ID: <385F9DF7.32D7F2A4@ulb.ac.be> (raw)
Message-ID: <19991231222400.eiHLb8HbAbfLzqZlH_WuWUlz3xjtJyo2DaWuIA_QDcw@z> (raw)
I have a template class with a template function declare like:
template<class C> class Cont
{
public:
   Cont(void) {}
   template<class G> DoSomething(const G ¶m)
{}
};
I declare a pointer to Cont:
Cont *ptr=new Cont();
When i try the following instruction, gcc gives me an error ("parse
error before '>')
ptr->DoSomething<int>(3);
Note: When I compile this code with a compiler like the one of borland,
there are no problems.
--Â
Ir. Pascal Francq
Researcher
Université Libre de Bruxelles
Faculty of Applied Mechanics
Avenue F.D. Roosevelt, 50
CP 165/41
B-1050 Brussels
BELGIUM
Tel. +32-2-650 47 65
Fax +32-2-650 27 10
Â
next reply other threads:[~1999-12-21 17:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-21 17:20 Pascal Francq [this message]
1999-12-31 22:24 ` Pascal Francq
1999-12-22 1:46 kd
1999-12-31 22:24 ` kd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=385F9DF7.32D7F2A4@ulb.ac.be \
--to=pfrancq@ulb.ac.be \
--cc=help-gcc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).