[libcxx-commits] [libcxx] [libc++] Re-implement LWG2770 again * 2 (PR #132598)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 24 18:02:01 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
----------------
frederick-vs-ja wrote:
GCC hasn't implemented this feature yet, while I think it's worth testing empty structured bindings.
https://github.com/llvm/llvm-project/pull/132598
More information about the libcxx-commits
mailing list