c++/3462: base class ctor in initializer list problem
Artem Khodush
artem@duma.gov.ru
Thu Jun 28 10:29:00 GMT 2001
> 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.
More information about the Gcc-bugs
mailing list