This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

449. Library Issue 306 Goes Too Far

Section: 17.2 [support.types] Status: CD1 Submitter: Pete Becker Opened: 2004-01-15 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [support.types].

View all issues with CD1 status.

Discussion:

Original text:

The macro offsetof accepts a restricted set of type arguments in this International Standard. type shall be a POD structure or a POD union (clause 9). The result of applying the offsetof macro to a field that is a static data member or a function member is undefined."

Revised text:

"If type is not a POD structure or a POD union the results are undefined."

Looks to me like the revised text should have replaced only the second sentence. It doesn't make sense standing alone.

Proposed resolution:

Change 18.1, paragraph 5, to:

The macro offsetof accepts a restricted set of type arguments in this International Standard. If type is not a POD structure or a POD union the results are undefined. The result of applying the offsetof macro to a field that is a static data member or a function member is undefined."

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant