[libcxx-commits] [libcxx] [libc++] Opt `std::*set` out of map key extraction optimization (PR #220452)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 2 19:19:59 PDT 2026


================
@@ -92,6 +93,16 @@ TEST_CONSTEXPR_CXX26 bool test() {
     assert(std::get<1>(res));
     assert(set.begin() == std::get<0>(res));
   }
+  if (!TEST_IS_CONSTANT_EVALUATED) {
----------------
frederick-vs-ja wrote:

This should be constant-evaluation-friendly. At least we shouldn't lose coverage for Clang.

```suggestion
#ifdef TEST_GCC_VER
  if (!TEST_IS_CONSTANT_EVALUATED)
#endif
  {
```

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


More information about the libcxx-commits mailing list