This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3462: base class ctor in initializer list problem
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/3462: base class ctor in initializer list problem
- From: "Artem Khodush" <artem at duma dot gov dot ru>
- Date: 28 Jun 2001 17:36:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: "Artem Khodush" <artem at duma dot gov dot ru>
The following reply was made to PR c++/3462; it has been noted by GNATS.
From: "Artem Khodush" <artem@duma.gov.ru>
To: <David.Partridge@primeur.com>
Cc: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>
Subject: Re: c++/3462: base class ctor in initializer list problem
Date: Thu, 28 Jun 2001 21:19:42 +0400
> 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.