This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3462: base class ctor in initializer list problem
- To: <David dot Partridge at primeur dot com>
- Subject: Re: c++/3462: base class ctor in initializer list problem
- From: "Artem Khodush" <artem at duma dot gov dot ru>
- Date: Thu, 28 Jun 2001 21:19:42 +0400
- >Received: from artem by mailsrv.duma.gov.ru (SMI-8.6/SMI-SVR4)id VAA14147; Thu, 28 Jun 2001 21:24:05 +0400
- Cc: <gcc-gnats at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>
- References: <20010628150303.22985.qmail@sourceware.cygnus.com>
> template<class o> class asn_occupiedsetof : public asn_setof<o> {
> public:
> asn_occupiedsetof(security_t s = ASN_PUBLIC) : asn_setof(s) {
> ASN_OBJTYPE("OSETOF");
> set_empty_permitted(false);
> };
> asn_occupiedsetof(unsigned children, security_t s = ASN_PUBLIC)
> : asn_setof(children, s) {
> ASN_OBJTYPE("OSETOF");
> set_empty_permitted(false);
> };
> };
>
...
> We're actualy trying to fire the base class ctor of course,
And the name for that class is asn_setof<o>, not just asn_setof.
> not to initialise a field, but it seems g++ has got a bit
> confused - I think - I'm not a language lawyer on templated
> classes with inheritance :-(
>
I'm not a language lawyer too, but I'm pretty sure that
in standard c++, only the name of template class itself
may appear in the class definition not followed by <>.
The names of any other classes, including bases, must
always be spelled in full.