Created on 2009-11-27.00:00:00 last changed 24 months ago
Additional note (April, 2022)
This is a request for an extension, which is pursued by paper P2152 (Querying the alignment of an object).
Additional note, April, 2020:
A survey of current implementations shows that most have already implemented the extension; the example there illustrates one motivation for its use. The principle of least astonishment would suggest that it is surprising for sizeof and alignof to behave differently in this regard.
The current specification of the alignof operator (7.6.2.6 [expr.alignof]) allows it to be applied only to types, not to objects. Since the align attribute may be applied to objects, and since existing practice permits querying the alignment of objects, it should be considered whether to allow this in Standard C++ as well.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-23 23:04:06 | admin | set | status: extension -> nad |
2022-05-03 07:29:04 | admin | set | messages: + msg6824 |
2020-12-15 00:00:00 | admin | set | messages: + msg6317 |
2010-11-29 00:00:00 | admin | set | status: open -> extension |
2009-11-27 00:00:00 | admin | create |