aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-02-05 20:07:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-05-14 11:44:47 +0000
commit1fd87a682ad7442327078e1eeb63edc4258f9815 (patch)
tree83b42223e987ef7df2e1036937bc1bb627fa2779 /contrib/llvm-project/libcxx/include/__algorithm
parent04eeddc0aa8e0a417a16eaf9d7d095207f4a8623 (diff)
parentecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/in_in_out_result.h48
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/in_in_result.h4
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/in_out_result.h4
3 files changed, 52 insertions, 4 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/in_in_out_result.h b/contrib/llvm-project/libcxx/include/__algorithm/in_in_out_result.h
new file mode 100644
index 000000000000..e365eb58eb62
--- /dev/null
+++ b/contrib/llvm-project/libcxx/include/__algorithm/in_in_out_result.h
@@ -0,0 +1,48 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
+#define _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#ifndef _LIBCPP_HAS_NO_CONCEPTS
+
+namespace ranges {
+template <class _I1, class _I2, class _O1>
+struct in_in_out_result {
+ [[no_unique_address]] _I1 in1;
+ [[no_unique_address]] _I2 in2;
+ [[no_unique_address]] _O1 out;
+
+ template <class _II1, class _II2, class _OO1>
+ requires convertible_to<const _I1&, _II1> && convertible_to<const _I2&, _II2> && convertible_to<const _O1&, _OO1>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ operator in_in_out_result<_II1, _II2, _OO1>() const& {
+ return {in1, in2, out};
+ }
+
+ template <class _II1, class _II2, class _OO1>
+ requires convertible_to<_I1, _II1> && convertible_to<_I2, _II2> && convertible_to<_O1, _OO1>
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ operator in_in_out_result<_II1, _II2, _OO1>() && {
+ return {_VSTD::move(in1), _VSTD::move(in2), _VSTD::move(out)};
+ }
+};
+} // namespace ranges
+
+#endif // _LIBCPP_HAS_NO_CONCEPTS
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/in_in_result.h b/contrib/llvm-project/libcxx/include/__algorithm/in_in_result.h
index fbe53ae4f57e..ed14ecedbbdf 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/in_in_result.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/in_in_result.h
@@ -16,7 +16,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#ifndef _LIBCPP_HAS_NO_RANGES
+#ifndef _LIBCPP_HAS_NO_CONCEPTS
namespace ranges {
template <class _I1, class _I2>
@@ -38,7 +38,7 @@ struct in_in_result {
};
} // namespace ranges
-#endif // _LIBCPP_HAS_NO_RANGES
+#endif // _LIBCPP_HAS_NO_CONCEPTS
_LIBCPP_END_NAMESPACE_STD
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/in_out_result.h b/contrib/llvm-project/libcxx/include/__algorithm/in_out_result.h
index 9d971157200f..8a58d6ada10c 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/in_out_result.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/in_out_result.h
@@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if !defined(_LIBCPP_HAS_NO_RANGES)
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
namespace ranges {
template<class _InputIterator, class _OutputIterator>
@@ -45,7 +45,7 @@ struct in_out_result {
};
} // namespace ranges
-#endif // !defined(_LIBCPP_HAS_NO_RANGES)
+#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
_LIBCPP_END_NAMESPACE_STD