[libcxx-commits] [libcxx] Move nondiscard tests of ranges::contains() to the right place. (PR #76887)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 3 19:08:00 PST 2024


================
@@ -28,6 +28,8 @@ void test() {
   std::ranges::binary_search(range, 1);
   std::ranges::binary_search(iter, iter, 1);
   std::ranges::clamp(1, 2, 3);
+  std::ranges::contains(range, 1);
+  std::ranges::contains(iter, iter, 1);
----------------
philnik777 wrote:

```suggestion
#if TEST_STD_VER >= 23
  std::ranges::contains(range, 1);
  std::ranges::contains(iter, iter, 1);
#endif
```

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


More information about the libcxx-commits mailing list