[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
Mon Jul 6 00:12:55 PDT 2026


================
@@ -0,0 +1,43 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <text_encoding>
+
+// REQUIRES: std-at-least-c++26
+// ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-steps): -fconstexpr-steps=40000000
+// ADDITIONAL_COMPILE_FLAGS(has-fconstexpr-ops-limit): -fconstexpr-ops-limit=1000000000
+
+// Our table has 882 aliases exactly, test to make sure that number matches with the total alias count
+// Internally, there are a total of 884 entries in our offset table, 882 for the actual aliases,
+// and +2 reserved as sentinels for id::unknown and id::other
----------------
philnik777 wrote:

Can we just add this as an explantation for the `- 2` in the assert?

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


More information about the libcxx-commits mailing list