[libcxx-commits] [libcxx] [libc++] Implement P1789R3: Library Support for Expansion Statements (PR #167184)
Matthias Wippich via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 23 08:10:50 PST 2025
================
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+// template<size_t I, class T, T... Values>
+// [[nodiscard]] constexpr T get(integer_sequence<T, Values...>) noexcept;
+
+// check that get is marked [[nodiscard]]
+
+#include <utility>
+
+void test() {
+ std::index_sequence<1> seq;
+ get<0>(seq); // expected-warning {{ignoring return value of function}}
----------------
Tsche wrote:
I've re-requested review since this is still marked as "changes requested" :)
https://github.com/llvm/llvm-project/pull/167184
More information about the libcxx-commits
mailing list