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

[class.base.init] p9 is not suitable for implicitly defined copy/move constructor #4916

Closed
xmh0511 opened this issue Sep 18, 2021 · 0 comments · Fixed by #4918
Closed

[class.base.init] p9 is not suitable for implicitly defined copy/move constructor #4916

xmh0511 opened this issue Sep 18, 2021 · 0 comments · Fixed by #4918
Assignees

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Sep 18, 2021

[class.base.init] p9

In a non-delegating constructor, if a given potentially constructed subobject is not designated by a mem-initializer-id (including the case where there is no mem-initializer-list because the constructor has no ctor-initializer), then

The rules that are defined by [class.base.init] p9 intend to cover all cases about initialization associated with a non-delegating constructor.

[class.copy.ctor#note-7]

[Note 7: Default member initializers of non-static data members are ignored. See also the example in [class.base.init]. — end note]

The above note wants to expound implicitly defined copy/move constructor suppresses the application of [class.base.init] p9, however, it is just a note instead of a normative rule. Furthermore, I cannot find the example in [class.base.init]. Should we give a normative rule for [class.base.init] p9, which will exclude applying to the implicitly defined copy/move constructor?

In a non-delegating constructor that is not an implicitly defined copy/move constructor, if a given potentially constructed subobject is not designated by a mem-initializer-id (including the case where there is no mem-initializer-list because the constructor has no ctor-initializer), then

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

Successfully merging a pull request may close this issue.

2 participants