From 6157e1f25e9f45d6788beb9fa1f2c0f000d497a6 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sat, 9 Mar 2024 13:20:18 +0800 Subject: [PATCH] Always enable compile time format string checking for `wchar_t` --- stl/inc/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/format b/stl/inc/format index 4f7a3ffa3a4..bc1dcbdeb78 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -3682,7 +3682,7 @@ public: template requires convertible_to> consteval basic_format_string(const _Ty& _Str_val) : _Str(_Str_val) { - if (_Is_execution_charset_self_synchronizing()) { + if constexpr (!is_same_v<_CharT, char> || _Is_execution_charset_self_synchronizing()) { using _Context = basic_format_context>, _CharT>; constexpr size_t _Num_args = sizeof...(_Args); constexpr _Basic_format_arg_type _Arg_types[_Num_args > 0 ? _Num_args : 1] = {