[libcxx-commits] [libcxx] [libc++][pstl] Implement pstl std::min_element (PR #173970)

Marcell Leleszi via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 31 06:30:21 PST 2025


================
@@ -0,0 +1,35 @@
+//===----------------------------------------------------------------------===//
+//
+// 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++17
+
+// UNSUPPORTED: libcpp-has-no-incomplete-pstl
+
+// <algorithm>
+
+// template<class ExecutionPolicy, class ForwardIterator>
+//   [[nodiscard]] ForwardIterator min_element(ExecutionPolicy&& exec,
+//                                             ForwardIterator first, ForwardIterator last);
+//
+// template<class ExecutionPolicy, class ForwardIterator, class Compare>
+//   [[nodiscard]] ForwardIterator min_element(ExecutionPolicy&& exec,
+//                                             ForwardIterator first, ForwardIterator last,
+//                                             Compare comp);
+
+#include <algorithm>
+#include <execution>
+#include <functional>
+
+int main(int, char**) {
----------------
mleleszi wrote:

Got it, moved them there

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


More information about the libcxx-commits mailing list