Re: valid code?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 10 September 2008, Mike Stump wrote:
> So, was wondering, what do people think of:
>
> class A {
>    virtual int B() { return 0; }
> };
>
> class B: A {
>    B() { }
> };

I'd reckon that 3.3.7 "Name Hiding" is applicable here. The declaration of B 
introduces a name that hides int A::B(), changing it into a class name. 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux