Skip to content

Base members and shadowing #1025

@K-ballo

Description

@K-ballo

EDIT: using declarations are not necessary

Given

struct X {
void foo();
void bar();
};

struct Y : X {
    void foo();
protected:
    void bar();
};

The reference for Y includes X::bar as a (public) member function, despite it being hidden by Y::bar. It correctly hides X::foo.

The code that handles shadowing (name hiding) only considers derived members within one trenche.

// Check if derived class has a member that shadows the base member

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions