[libcxx-commits] [libcxx] [libc++] Replace hardcoded table_size with CHAR_BIT calculation (PR #160008)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sun Sep 21 22:37:22 PDT 2025


================
@@ -578,7 +578,7 @@ public:
 #ifdef _CACHED_RUNES
   static const size_t table_size = _CACHED_RUNES;
 #else
-  static const size_t table_size = 256; // FIXME: Don't hardcode this.
+  static const size_t table_size = 1 << CHAR_BIT;
----------------
frederick-vs-ja wrote:

Why wasn't `‎libcxx/include/__locale` changed together? I think we should change non-frozen headers first.

https://github.com/llvm/llvm-project/pull/160008


More information about the libcxx-commits mailing list