Title
Library needs to ban macros named expects or ensures
Status
c++20
Section
[macro.names]
Submitter
Tim Song

Created on 2018-06-30.00:00:00 last changed 45 months ago

Messages

Date: 2018-11-12.04:39:29

Proposed resolution:

This wording is relative to N4762.

  1. Change [macro.names] p2 as indicated:

    -2- A translation unit shall not #define or #undef names lexically identical to keywords, to the identifiers listed in Table 4, or to the attribute-tokens described in [dcl.attr], or to the identifiers expects or ensures.

Date: 2018-11-12.04:39:29

[ 2018-11, Adopted in San Diego ]

Date: 2018-07-20.00:00:00

[ 2018-07-20 Status to Tentatively Ready after five positive votes on the reflector. ]

Date: 2018-06-30.00:00:00

expects and ensures are not technically described as attribute-tokens when used in a contract-attribute-specifier, so the existing prohibition in [macro.names] doesn't apply to them.

The remaining special identifiers used by the contract attributes are all already covered by existing wording: assert is also a library name so falls under p1, default is a keyword, and both axiom and audit were added to Table 4.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2018-11-12 04:39:29adminsetmessages: + msg10201
2018-11-12 04:39:29adminsetstatus: voting -> wp
2018-10-08 05:13:59adminsetstatus: ready -> voting
2018-07-20 21:06:57adminsetmessages: + msg10039
2018-07-20 21:06:57adminsetstatus: new -> ready
2018-06-30 09:57:38adminsetmessages: + msg10008
2018-06-30 00:00:00admincreate