From f9dc185ede4a0a3c9bda1a4a77d034ceebda8d41 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 13 Oct 2024 17:02:51 +0200 Subject: [PATCH] [UCRT] Use a C cast instead of const_cast for GCC This is because GCC will generate errors for both const_cast and static_cast depending on the template parameter: - With const_cast: error: invalid 'const_cast' from type 'std::nullptr_t' to type 'const wchar_t**' - With static_cast: error: invalid 'static_cast' from type 'wchar_t** const' to type 'const wchar_t**' --- sdk/lib/ucrt/inc/corecrt_internal_strtox.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/ucrt/inc/corecrt_internal_strtox.h b/sdk/lib/ucrt/inc/corecrt_internal_strtox.h index 102724dda7d..d3c4a0c0fb7 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_strtox.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_strtox.h @@ -1870,7 +1870,7 @@ c_string_character_source __cdecl make_c_string_character_source( EndPointer const end ) throw() { - return c_string_character_source(string, const_cast(end)); + return c_string_character_source(string, (Character const**)(end)); } template