Created on 2011-08-16.00:00:00 last changed 131 months ago
[Moved to DR at the October, 2012 meeting.]
Proposed resolution (February, 2012):
Change 11.5 [class.union] paragraph 7:
A union for which objects,
orpointers, or references are declared is not an anonymous union. [Example:void f() { union { int aa; char* p; } obj, *ptr = &obj; aa = 1; // error ptr->aa = 1; // OK }
According to 11.5 [class.union] paragraph 7,
A union for which objects or pointers are declared is not an anonymous union.
This should also apply to references, which are now possible because decltype allows writing an initializer for an unnamed union:
char buf[100]; union { int i; } &r = (decltype(r)) buf;
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-05-03 00:00:00 | admin | set | status: dr -> drwp |
2012-11-03 00:00:00 | admin | set | messages: + msg4152 |
2012-11-03 00:00:00 | admin | set | status: ready -> dr |
2012-02-27 00:00:00 | admin | set | messages: + msg3728 |
2012-02-27 00:00:00 | admin | set | status: open -> ready |
2011-08-16 00:00:00 | admin | create |