Re: G++ rejects legal code

2001-08-16 Thread Martin v. Loewis
> Why only one data member? Members sy and st are public in the base > class. Initialization in the constructor body works OK. Moreover, > (week argument, but) Visual C++ compiles this OK. This is explained in 12.6.2, [class.base.init]. Paragraph 1 explains the syntax for member initializers ct

Re: G++ rejects legal code

2001-08-16 Thread Alexei Khlebnikov
"Martin v. Loewis" wrote: > I think so. I fail to see the bug in your report, though. Your code is > illegal (or, rather, ill-formed - some GNU coding style advises us not > to claim that you are breaking the law by writing the code). > > > template > > struct SGBMb : public SGBb <_TW> > > { > >

Re: G++ rejects legal code

2001-08-15 Thread Martin v. Loewis
> Am doing right by posting this here? (A copy has gone to GNATS as well.) I think so. I fail to see the bug in your report, though. Your code is illegal (or, rather, ill-formed - some GNU coding style advises us not to claim that you are breaking the law by writing the code). > template > struc

G++ rejects legal code

2001-08-15 Thread Alexei Khlebnikov
Am doing right by posting this here? (A copy has gone to GNATS as well.) == begin error.cpp == template struct SGBb { typedef _TTW _TW; _TW sy; void* st; SGBb <_TW> (_TW _sy, void* _st) : sy (_sy), st (_st) {} }; template struct SGBMb : public SGBb <_TW> { typedef _TTWO _TWO;