This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
offsetof
should be marked noexcept
Section: 17.2 [support.types] Status: C++11 Submitter: BSI Opened: 2010-08-25 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [support.types].
View all issues with C++11 status.
Discussion:
Addresses GB-68
There is no reason for the offsetof macro to invoke potentially throwing operations, so the result of noexcept(offsetof(type,member-designator)) should be true.
[ Resolved in Rapperswil by a motion to directly apply the words from the ballot comment in N3102. ]
Proposed resolution:
Add to the end of 18.2p4:
No operation invoked by the offsetof macro shall throw an exception, and
noexcept(offsetof(type,member-designator))
shall be true.