STL icon indicating copy to clipboard operation
STL copied to clipboard

P3391R2 `constexpr` `std::format`

Open StephanTLavavej opened this issue 1 month ago • 1 comments

WG21-P3391R2 constexpr std::format

Feature-test macro (expected):

#define __cpp_lib_constexpr_format 202511L

Note: We're focused on implementing the remaining library-only features in C++23. Until that's done, we will NOT be accepting PRs for C++26 features.

StephanTLavavej avatar Nov 10 '25 22:11 StephanTLavavej

It seems that our _Format_arg_store is too compressed (containing unaligned basic_string_view representations stored in a unsigned char array) to be constexpr-friendly. It's a bit unfortunate that make_format_args returns _Format_arg_store. As a result, if one permanently stores the results of make_format_args and we change the layout of the return types (even if change its name together), perhaps there will be ABI break.

frederick-vs-ja avatar Nov 11 '25 07:11 frederick-vs-ja