[libcxx-commits] [libcxx] [libc++][ranges] Applied [[nodiscard]] to `elements_view` (PR #206589)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 1 05:21:02 PDT 2026
================
@@ -0,0 +1,100 @@
+//===----------------------------------------------------------------------===//
+//
+// 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++20
+
+// Test the libc++ extension that std::ranges::transform_view and std::views::transform are marked as [[nodiscard]].
----------------
frederick-vs-ja wrote:
The current comment is wrong.
```suggestion
// Test the libc++ extension that std::ranges::elements_view and std::views::elements are marked as [[nodiscard]].
```
https://github.com/llvm/llvm-project/pull/206589
More information about the libcxx-commits
mailing list