[libcxx-commits] [libcxx] [libcxx] adds a size-based representation for `vector`'s unstable ABI (PR #155330)

Christopher Di Bella via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 11 15:55:36 PST 2025


================
@@ -183,15 +167,34 @@ constexpr bool test() {
     });
   });
 
-  { // Test vector<bool>::iterator optimization
-    test_vector_bool<8>();
-    test_vector_bool<19>();
-    test_vector_bool<32>();
-    test_vector_bool<49>();
-    test_vector_bool<64>();
-    test_vector_bool<199>();
-    test_vector_bool<256>();
+  return true;
----------------
cjdb wrote:

There were compile-time failures due to compiler limits on constexpr stack depths. We have two alternatives here:

1. Increase the limit Clang supports, which is a single-line change at the top of the file. Pro: single-line diff. Con: might need to increase the limit every so often.
2. Refactor the code so that it doesn't require that limit in the first place. Pro: won't run into this problem ever again. Con: this diff.

I could always split the refactoring into another PR, if it's too noisy for this one. That would also add documentation on why the change was necessary, which is probably a good enough reason for me to do it anyway.

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


More information about the libcxx-commits mailing list