[libcxx-commits] [libcxx] [libc++][ranges] P2387R3: Pipe support for user-defined range adaptors (PR #89148)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 22 07:06:12 PDT 2024


================
@@ -0,0 +1,142 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+// std::ranges::range_adaptor_closure;
+
+#include <ranges>
+
+#include <algorithm>
+#include <vector>
+
+#include "test_range.h"
+
+template <class T>
+concept DeriveFromRangeAdaptorClosure = requires { typename std::ranges::range_adaptor_closure<T>; };
+static_assert(!DeriveFromRangeAdaptorClosure<int>);
+
+struct t {};
----------------
ldionne wrote:

```suggestion
struct Foo {};
```

`t` is very terse

https://github.com/llvm/llvm-project/pull/89148


More information about the libcxx-commits mailing list