Closed wg21bot closed 1 year ago
A comment from the UK NB suggests deprecating these as they're obsolescent in C2x.
Paper P2654 doesn't exist at the moment.
GB issues:
They're assigned to LEWG, so I'll move this comment to LEWG as well. Please re-assign to EWG if the macro aren't deprecated.
The proposed resolution is a paper that does not exist right now.
A comment from the UK NB suggests deprecating these as they're obsolescent in C2x.
Minor correction: __bool_true_false_are_defined
is obsolescent, the other two were outright removed in C2x (no idea if someone will file an NB comment asking for them to come back; if I see one, I'll report back).
The paper does exist, I just failed to check for a D paper. https://wg21.link/D2654R0
US-30-072: Predefined macros from the C library
2022-11-07 13:00 to 15:00 UTC-10 Kona Library Evolution Minutes
Champion: Alisdair Meredith (in-person)
Chair: Fabio Fracassi & Billy Baker
Minute Taker: Steve Downey
POLL: Adopt the proposed resolution from the NB comment US 30–72: adding C Macros as “feature test” macros for C++23
SF | F | N | A | SA |
---|---|---|---|---|
2 | 2 | 7 | 8 | 1 |
Attendance: 18 (in-person) + 8 (remote)
# of Authors: 1
Author’s position: SF
Outcome: No consensus in favor
The problem solution has some merit, but the problem seems to be rare enough, and has a readily available workaround.
Take a Library Evolution electronic poll to reject C++23 NB comment US-30-72 (Predefined macros from the C Library).
Poll 1.15: Reject C++23 National Body comment US-30-072 Predefined Macros From The C Library and any duplicate comments.
Strongly Favor | Weakly Favor | Neutral | Weakly Against | Strongly Against |
---|---|---|---|---|
12 | 4 | 1 | 2 | 1 |
Outcome: Consensus in favor.
There was no consensus for a change.
When importing the standard library using import std; or import std.all;, none of the macros from the C standard library are imported. A better integration is desired, see (pending) paper P2654 for more details of the whole problem space and proposals for C++26, but make the minimal changes appropriate for C++23.
Proposed change:
Add the following macros to the list of compiler predefined macros, and remove them from the corresponding C headers (in the C++ standard):
define __bool_true_false_are_defined 1
define __alignas_is_defined 1
define __alignof_is_defined 1