Title
<version> should not be "all freestanding"
Status
c++23
Section
[version.syn]
Submitter
Jonathan Wakely

Created on 2022-12-14.00:00:00 last changed 4 months ago

Messages

Date: 2024-01-29.16:34:32

Proposed resolution:

This wording is relative to N4917.

  1. Modify [version.syn], header <version> synopsis, as indicated:

    -2- Each of the macros defined in <version> is also defined after inclusion of any member of the set of library headers indicated in the corresponding comment in this synopsis.

    [Note 1: Future revisions of C++ might replace the values of these macros with greater values. — end note]

    // all freestanding
    #define __cpp_lib_addressof_constexpr          201603L // also in <memory>
    […]
    
Date: 2023-02-13.00:00:00

[ 2023-02-13 Approved at February 2023 meeting in Issaquah. Status changed: Voting → WP. ]

Date: 2023-01-15.00:00:00

[ 2023-01-06; Reflector poll ]

Set status to Tentatively Ready after eight votes in favour during reflector poll.

Date: 2022-12-14.00:00:00

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.

P2198R7 will fix this situation for C++26, but we should also do something for C++23 before publishing it. It seems sensible not to require any of the macros to be present, and then allow implementations to define them for the features that they support.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2023-02-13 10:17:57adminsetmessages: + msg13366
2023-02-13 10:17:57adminsetstatus: voting -> wp
2023-02-06 15:33:48adminsetstatus: ready -> voting
2023-01-06 14:39:29adminsetmessages: + msg13168
2023-01-06 14:39:29adminsetstatus: new -> ready
2022-12-17 13:48:15adminsetmessages: + msg13157
2022-12-14 00:00:00admincreate