https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105297
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |redi at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If we want a quick work-around, I think: --- libstdc++-v3/include/std/charconv.jj 2022-04-19 07:20:56.772166410 +0200 +++ libstdc++-v3/include/std/charconv 2022-04-20 16:27:47.971314921 +0200 @@ -407,6 +407,10 @@ namespace __detail return true; } + struct __from_chars_alnum_to_val_table_type { + unsigned char __data[1u << __CHAR_BIT__] = {}; + }; + // Construct and return a lookup table that maps 0-9, A-Z and a-z to their // corresponding base-36 value and maps all other characters to 127. constexpr auto @@ -420,7 +424,7 @@ namespace __detail = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; - struct { unsigned char __data[1u << __CHAR_BIT__] = {}; } __table; + struct __from_chars_alnum_to_val_table_type __table; for (auto& __entry : __table.__data) __entry = 127; for (int __i = 0; __i < 10; ++__i) or so would do it.