From: LLeweLLyn Reese <llewelly@lifesupport.shutdown.com>
To: "erwan ancel" <erwan.ancel@free.fr>
Cc: <gcc-help@gcc.gnu.org>
Subject: Re: C++ templates: precisions
Date: Sun, 12 Jan 2003 13:27:00 -0000 [thread overview]
Message-ID: <x3smvymrgf.fsf@lifesupport.shutdown.com> (raw)
In-Reply-To: <000501c2ba24$e7170630$42bd0b50@brisedorient>
"erwan ancel" <erwan.ancel@free.fr> writes:
> well, this is my problem:
>
> I would like to make a template class that owns a set of elements that have
> the type of one of the class parameters. And it doesn't compile...
> example:
>
> #include <set>
> template <class T>
> class A
> {
> public:
> A();
> B();
set_t.cc:7: ISO C++ forbids declaration of `B' with no type
That's the only error I get for your code. Take a 'B()' and it disappears.
> std::set<T> _list;
> };
>
> the compiler's output tells that the type T is not defined... Well,
> of
I get no such error message. I tried with gcc 2.95.3, and gcc 3.2.1 .
> course, but it will be defined when the template will be instanciated. So it
> should be possible...
> Does anybody know a solution to my problem?
next prev parent reply other threads:[~2003-01-12 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-12 9:05 C++ templates erwan ancel
2003-01-12 10:25 ` C++ templates: precisions erwan ancel
2003-01-12 11:05 ` Sebastian Huber
2003-01-12 11:25 ` erwan ancel
2003-01-12 13:27 ` LLeweLLyn Reese [this message]
2003-01-13 9:10 ` C++ templates Fabio Mazzone
2003-01-13 13:22 ` Oliver Kullmann
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=x3smvymrgf.fsf@lifesupport.shutdown.com \
--to=llewelly@lifesupport.shutdown.com \
--cc=erwan.ancel@free.fr \
--cc=gcc-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).