This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/3462: base class ctor in initializer list problem


> 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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]