This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc and using declarations
- To: roman at nstl dot nnov dot ru
- Subject: Re: gcc and using declarations
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Tue, 11 Apr 2000 20:43:27 +0200
- CC: gcc at gcc dot gnu dot org
- References: <ubt3gnc19.fsf@nstl.nnov.ru> <u7le4nbpu.fsf@nstl.nnov.ru>
> Sorry, I misunderstood a piece of code I dealt with (I'm porting another's
> code initially written under Visual C++); using declaration was used
> to use class declared in another class, like
>
> class A
> {
> class B;
> }
>
> using A::B;
> B b;
It seems that you still misunderstand it. That is not legal C++.
> Does latest gcc support it ?
No, and it shouldn't. g++ also does not support
class A
{
public:
class B;
};
class C:A{
public;
using A::B;
};
but it should; that is a known bug.
Regards,
Martin