[libcxx-commits] [libcxx] [libc++] Inline `text_encoding` alias offset table std::count to 884 (PR #207471)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 4 00:53:28 PDT 2026


================
@@ -792,8 +792,8 @@ private:
       "11\0CP50220\0csCP50220\0";
 
   struct __offset_table {
-    constexpr static unsigned long long __num_aliases =
-        std::count(__aliases_string, __aliases_string + sizeof(__aliases_string), '\0') + 1;
+    constexpr static unsigned long long __num_aliases = 884;
+    // +2 for id::unknown, id::other sentinels
----------------
philnik777 wrote:

I feel like that comment would be better in the test. I don't expect anybody will count the stuff above manually and then wonder why they're off by two.

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


More information about the libcxx-commits mailing list