Skip to content

Direct non-static data member vs. non-static data member #5176

Description

@xmh0511

[class.derived.general] p2 says that

Members of a base class are also members of the derived class.

Analogously, we can say that

non-static data members of a base class are also non-static data members of the derived class.

This makes
[class.special] p7

For a class, its non-static data members, its non-virtual direct base classes, and, if the class is not abstract ([class.abstract]), its virtual base classes are called its potentially constructed subobjects.

and [class.base.init] p2

Unless the mem-initializer-id names the constructor's class, a non-static data member of the constructor's class, or a direct or virtual base of that class, the mem-initializer is ill-formed.

be non-reasonable(as far as I have found, maybe there are other paragraphs that have the same issue).

We should give a stricter extent as that

direct non-static data members...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions