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.anon] p1 All implicitly declared special member functions for anonymous union violate that rule #4938

Open
xmh0511 opened this issue Sep 26, 2021 · 1 comment

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Sep 26, 2021

[class.union.anon] p1 explicitly says

Each member-declaration in the member-specification of an anonymous union shall either define one or more public non-static data members or be a static_assert-declaration. Nested types, anonymous unions, and functions shall not be declared within an anonymous union.

Special member functions are also functions. However, the implicitly declared special members didn't explicitly reject the consideration for anonymous unions(as long as, there is no user-declared one or satisfy some conditions).

@xmh0511 xmh0511 changed the title [partial of CWG1621] All implicitly declared special members should be excluded from anonymous union [partial of CWG1621] All implicitly declared special member functions should be excluded from anonymous union Sep 26, 2021
@xmh0511 xmh0511 changed the title [partial of CWG1621] All implicitly declared special member functions should be excluded from anonymous union [partial of CWG1621] All implicitly declared special member functions should be excluded from anonymous unions Sep 26, 2021
@xmh0511 xmh0511 changed the title [partial of CWG1621] All implicitly declared special member functions should be excluded from anonymous unions [partial of CWG1621] All implicitly declared special member functions should be excluded from anonymous union members Sep 26, 2021
@xmh0511 xmh0511 changed the title [partial of CWG1621] All implicitly declared special member functions should be excluded from anonymous union members [class.union.anon] p1 All implicitly declared special member functions for anonymous union violates that rule Sep 26, 2021
@xmh0511 xmh0511 changed the title [class.union.anon] p1 All implicitly declared special member functions for anonymous union violates that rule [class.union.anon] p1 All implicitly declared special member functions for anonymous union violate that rule Sep 26, 2021
@xmh0511
Copy link
Contributor Author

xmh0511 commented Sep 26, 2021

@jensmaurer How do you think about this issue?

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