Post #2037220
2026-05-05 17:15 UTC
Answer is A
Yes, this is valid, see [class.union.anon]p2: https://eel.is/c++draft/class.union.anon#2
"An anonymous union declared in the scope of a namespace with external linkage shall use the storage-class-specifier static"
Replies (1)
-
@alison@burningboard.net 2026-05-05 19:52
@shafik@hachyderm.io Presumably either the member or the union can be anonymous, but not both.