[libcxx-commits] [libcxx] [libc++] Make list constexpr as part of P3372R3 (PR #129799)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 10 08:23:15 PDT 2025


================
@@ -33,17 +34,31 @@ int main(int, char**) {
     assert(l.back() == 0);
   }
 #if TEST_STD_VER >= 11
-  {
-    std::list<DefaultOnly> l(10);
-    l.resize(5);
-    assert(l.size() == 5);
-    assert(std::distance(l.begin(), l.end()) == 5);
-  }
-  {
-    std::list<DefaultOnly> l(10);
-    l.resize(20);
-    assert(l.size() == 20);
-    assert(std::distance(l.begin(), l.end()) == 20);
+  if (!TEST_IS_CONSTANT_EVALUATED) {
----------------
ldionne wrote:

Why is this excluded from constexpr-testing?

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


More information about the libcxx-commits mailing list