This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++23 status.
<version>
should not be "all freestanding"Section: 17.3.2 [version.syn] Status: C++23 Submitter: Jonathan Wakely Opened: 2022-12-14 Last modified: 2024-01-29
Priority: Not Prioritized
View all other issues in [version.syn].
View all issues with C++23 status.
Discussion:
It's reasonable for the <version>
header to be required for freestanding,
so that users can include it and see the "implementation-dependent information …
(e.g. version number and release date)", and also to ask which features are present
(which is the real intended purpose of <version>
).
It seems less reasonable to require every macro to be present on freestanding implementations,
even the ones that correspond to non-freestanding features.
[2023-01-06; Reflector poll]
Set status to Tentatively Ready after eight votes in favour during reflector poll.
[2023-02-13 Approved at February 2023 meeting in Issaquah. Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N4917.
Modify 17.3.2 [version.syn], header <version>
synopsis, as indicated:
-2- Each of the macros defined in
[Note 1: Future revisions of C++ might replace the values of these macros with greater values. — end note]<version>
is also defined after inclusion of any member of the set of library headers indicated in the corresponding comment in this synopsis.// all freestanding#define __cpp_lib_addressof_constexpr 201603L // also in <memory> […]