[libcxx-commits] [libcxx] [libc++] P1789R3: Library Support for Expansion Statements (PR #167184)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Nov 8 20:48:09 PST 2025
================
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++26
+// <utility>
+
+// structured binding support for integer_sequence
+
+#include <tuple>
+#include <utility>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**) {
+ using empty = std::integer_sequence<int>;
+ using size4 = std::integer_sequence<int, 9, 8, 7, 2>;
+
+ static_assert(std::tuple_size_v<empty> == 0, "empty size wrong");
----------------
Zingam wrote:
```suggestion
static_assert(std::tuple_size_v<empty> == 0);
```
The comments are unnecessry. You don't use empty elsewhere you can move the checks up after the declaration.
https://github.com/llvm/llvm-project/pull/167184
More information about the libcxx-commits
mailing list