Title
Should there be a feature-test macro update for constexpr `std::to_(w)string`?
Status
new
Section
[version.syn]
Submitter
Jiang An

Created on 2026-02-25.00:00:00 last changed 7 days ago

Messages

Date: 2026-02-28.15:08:40

Proposed resolution:

This wording is relative to N5032.

[Drafting Note: Two mutually exclusive options are prepared, depicted below by Option A and Option B, respectively.]

Option A:

  1. Modify [version.syn] as indicated:

    […]
    #define __cpp_lib_to_string                         202306L202511L // also in <string>
    […]
    

Option B:

  1. Modify [version.syn] as indicated:

    […]
    #define __cpp_lib_constexpr_string                  201907L202511L // also in <string>
    […]
    
Date: 2026-02-25.00:00:00

P3391R2 added `constexpr` to integral overloads of `std::to_string` and `std::to_wstring`. However, the paper only added one feature-test macro `__cpp_lib_constexpr_format`, which doesn't seem clearly related to `std::to_(w)string`.

Given that P3391R2 contained the constexpr additions in P3438R0 which proposed to bump `__cpp_lib_to_string`, perhaps we should bump that FTM. It might be also reasonable to bump `__cpp_lib_constexpr_string` for pure constexpr additions.

History
Date User Action Args
2026-02-28 15:08:40adminsetmessages: + msg15995
2026-02-25 00:00:00admincreate