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.union]/3 note contradicts normative wording #1073

Closed
zygoloid opened this issue Nov 19, 2016 · 2 comments
Closed

[class.union]/3 note contradicts normative wording #1073

zygoloid opened this issue Nov 19, 2016 · 2 comments
Assignees

Comments

@zygoloid
Copy link
Member

See https://groups.google.com/a/isocpp.org/d/msg/std-discussion/4BWeZosWYiY/5LKz98-dBQAJ

We should weaken the note, for instance by changing "must" to "should typically" and "will" to "will usually".

jensmaurer added a commit to jensmaurer/draft that referenced this issue Nov 23, 2016
initializer may prevent a defaulted special member function
from being implicitly deleted.

Fixes cplusplus#1073.
@jensmaurer jensmaurer self-assigned this Nov 23, 2016
@jabelloc
Copy link

@jensmaurer
In reference to your commit, I believe the added sentence "Absent default member initializers" is necessary only for the non-trivial default constructor. That is, the additional condition imposed by the alluded sentence should not affect the other two constructors, the assignment operators and the destructor, mentioned in [class.union]/3.

@jensmaurer
Copy link
Member

@jabelloc: Right. However, I think the note is now correct post-my patch, although it's not completely describing the situation. But then, it's a note, not a normative statement. I don't think I should repeat all the complexity of the real rule in this note, which is just trying to say "you can have non-trivial data members in a union, but if you do, you need to do the legwork yourself".

zygoloid pushed a commit that referenced this issue Nov 28, 2016
initializer may prevent a defaulted special member function
from being implicitly deleted.

Fixes #1073.
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

3 participants