Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-09-25 19:49:33


Why does the following compile? The parameter type of A's pure virtual
function is private. How come B can see it, allowing it to override the
pure virtual function?

class A
{
private:
    struct S { };
    virtual void bar ( S ) = 0;
};

class B : public A
{
public:
    virtual void bar ( A::S )
    {
    }
};

int main ( )
{
    B b;
    return 0;
}

-Jason


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk