Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmh0511 opened this issue Dec 31, 2021 · 0 comments
Open

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

xmh0511 opened this issue Dec 31, 2021 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Dec 31, 2021

[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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant