[libcxx-commits] [libcxx] [libc++] Re-implement LWG2770 again * 2 (PR #132598)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 24 10:19:18 PDT 2025
================
@@ -136,16 +166,49 @@ struct std::tuple_size<Test> {
void test_after_tuple_size_specialization() {
Test const t{99};
auto& [p] = t;
- assert(p == -1);
+ // https://cplusplus.github.io/LWG/issue4040
+ // It is controversial whether std::tuple_size<const Test> is instantiated here or before.
+ (void)p;
+ LIBCPP_ASSERT(p == -1);
+}
+
+#if TEST_STD_VER >= 26 && __cpp_structured_bindings >= 202411L
----------------
ldionne wrote:
```suggestion
#if TEST_STD_VER >= 26
```
We normally just assume that `TEST_STD_VER >= 26` implies that the language feature is available. Is there a reason to stray from that here?
https://github.com/llvm/llvm-project/pull/132598
More information about the libcxx-commits
mailing list