[libcxx-commits] [libcxx] aed0e8b - [libc++] Rename the template arguments of the algorithm result types
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 10 05:22:31 PDT 2022
Author: Nikolas Klauser
Date: 2022-04-10T14:22:13+02:00
New Revision: aed0e8b8056a51714f982d9a7873439bc506b540
URL: https://github.com/llvm/llvm-project/commit/aed0e8b8056a51714f982d9a7873439bc506b540
DIFF: https://github.com/llvm/llvm-project/commit/aed0e8b8056a51714f982d9a7873439bc506b540.diff
LOG: [libc++] Rename the template arguments of the algorithm result types
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D123463
Added:
Modified:
libcxx/include/__algorithm/in_found_result.h
libcxx/include/__algorithm/in_fun_result.h
libcxx/include/__algorithm/in_in_out_result.h
libcxx/include/__algorithm/in_in_result.h
libcxx/include/__algorithm/in_out_out_result.h
libcxx/include/__algorithm/in_out_result.h
Removed:
################################################################################
diff --git a/libcxx/include/__algorithm/in_found_result.h b/libcxx/include/__algorithm/in_found_result.h
index 0864d7c62c7fe..d43f45cd80ef2 100644
--- a/libcxx/include/__algorithm/in_found_result.h
+++ b/libcxx/include/__algorithm/in_found_result.h
@@ -23,20 +23,20 @@
_LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges {
-template <class _I1>
+template <class _InIter1>
struct in_found_result {
- _LIBCPP_NO_UNIQUE_ADDRESS _I1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
bool found;
- template <class _I2>
- requires convertible_to<const _I1&, _I2>
- _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_I2>() const & {
+ template <class _InIter2>
+ requires convertible_to<const _InIter1&, _InIter2>
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() const & {
return {in, found};
}
- template <class _I2>
- requires convertible_to<_I1, _I2>
- _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_I2>() && {
+ template <class _InIter2>
+ requires convertible_to<_InIter1, _InIter2>
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() && {
return {std::move(in), found};
}
};
diff --git a/libcxx/include/__algorithm/in_fun_result.h b/libcxx/include/__algorithm/in_fun_result.h
index 51b5f23460dc9..21efa655063d9 100644
--- a/libcxx/include/__algorithm/in_fun_result.h
+++ b/libcxx/include/__algorithm/in_fun_result.h
@@ -23,20 +23,20 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
-template <class _Ip, class _Fp>
+template <class _InIter1, class _Func1>
struct in_fun_result {
- _LIBCPP_NO_UNIQUE_ADDRESS _Ip in;
- _LIBCPP_NO_UNIQUE_ADDRESS _Fp fun;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _Func1 fun;
- template <class _I2, class _F2>
- requires convertible_to<const _Ip&, _I2> && convertible_to<const _Fp&, _F2>
- _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_I2, _F2>() const & {
+ template <class _InIter2, class _Func2>
+ requires convertible_to<const _InIter1&, _InIter2> && convertible_to<const _Func1&, _Func2>
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() const & {
return {in, fun};
}
- template <class _I2, class _F2>
- requires convertible_to<_Ip, _I2> && convertible_to<_Fp, _F2>
- _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_I2, _F2>() && {
+ template <class _InIter2, class _Func2>
+ requires convertible_to<_InIter1, _InIter2> && convertible_to<_Func1, _Func2>
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() && {
return {std::move(in), std::move(fun)};
}
};
diff --git a/libcxx/include/__algorithm/in_in_out_result.h b/libcxx/include/__algorithm/in_in_out_result.h
index 192c9f516c32e..e45fef187e0d4 100644
--- a/libcxx/include/__algorithm/in_in_out_result.h
+++ b/libcxx/include/__algorithm/in_in_out_result.h
@@ -24,23 +24,25 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges {
-template <class _I1, class _I2, class _O1>
+template <class _InIter1, class _InIter2, class _OutIter1>
struct in_in_out_result {
- _LIBCPP_NO_UNIQUE_ADDRESS _I1 in1;
- _LIBCPP_NO_UNIQUE_ADDRESS _I2 in2;
- _LIBCPP_NO_UNIQUE_ADDRESS _O1 out;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
- template <class _II1, class _II2, class _OO1>
- requires convertible_to<const _I1&, _II1> && convertible_to<const _I2&, _II2> && convertible_to<const _O1&, _OO1>
+ template <class _InIter3, class _InIter4, class _OutIter2>
+ requires convertible_to<const _InIter1&, _InIter3>
+ && convertible_to<const _InIter2&, _InIter4> && convertible_to<const _OutIter1&, _OutIter2>
_LIBCPP_HIDE_FROM_ABI constexpr
- operator in_in_out_result<_II1, _II2, _OO1>() const& {
+ operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() 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>
+ template <class _InIter3, class _InIter4, class _OutIter2>
+ requires convertible_to<_InIter1, _InIter3>
+ && convertible_to<_InIter2, _InIter4> && convertible_to<_OutIter1, _OutIter2>
_LIBCPP_HIDE_FROM_ABI constexpr
- operator in_in_out_result<_II1, _II2, _OO1>() && {
+ operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() && {
return {std::move(in1), std::move(in2), std::move(out)};
}
};
diff --git a/libcxx/include/__algorithm/in_in_result.h b/libcxx/include/__algorithm/in_in_result.h
index ec36955588b5d..39e64ced33b28 100644
--- a/libcxx/include/__algorithm/in_in_result.h
+++ b/libcxx/include/__algorithm/in_in_result.h
@@ -24,22 +24,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges {
-template <class _I1, class _I2>
+template <class _InIter1, class _InIter2>
struct in_in_result {
- _LIBCPP_NO_UNIQUE_ADDRESS _I1 in1;
- _LIBCPP_NO_UNIQUE_ADDRESS _I2 in2;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
- template <class _II1, class _II2>
- requires convertible_to<const _I1&, _II1> && convertible_to<const _I2&, _II2>
+ template <class _InIter3, class _InIter4>
+ requires convertible_to<const _InIter1&, _InIter3> && convertible_to<const _InIter2&, _InIter4>
_LIBCPP_HIDE_FROM_ABI constexpr
- operator in_in_result<_II1, _II2>() const & {
+ operator in_in_result<_InIter3, _InIter4>() const & {
return {in1, in2};
}
- template <class _II1, class _II2>
- requires convertible_to<_I1, _II1> && convertible_to<_I2, _II2>
+ template <class _InIter3, class _InIter4>
+ requires convertible_to<_InIter1, _InIter3> && convertible_to<_InIter2, _InIter4>
_LIBCPP_HIDE_FROM_ABI constexpr
- operator in_in_result<_II1, _II2>() && {
+ operator in_in_result<_InIter3, _InIter4>() && {
return {std::move(in1), std::move(in2)};
}
};
diff --git a/libcxx/include/__algorithm/in_out_out_result.h b/libcxx/include/__algorithm/in_out_out_result.h
index b68b4d1d726eb..52a883b17627e 100644
--- a/libcxx/include/__algorithm/in_out_out_result.h
+++ b/libcxx/include/__algorithm/in_out_out_result.h
@@ -23,23 +23,25 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
namespace ranges {
-template <class _I1, class _O1, class _O2>
+template <class _InIter1, class _OutIter1, class _OutIter2>
struct in_out_out_result {
- _LIBCPP_NO_UNIQUE_ADDRESS _I1 in;
- _LIBCPP_NO_UNIQUE_ADDRESS _O1 out1;
- _LIBCPP_NO_UNIQUE_ADDRESS _O2 out2;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out1;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter2 out2;
- template <class _II1, class _OO1, class _OO2>
- requires convertible_to<const _I1&, _II1> && convertible_to<const _O1&, _OO1> && convertible_to<const _O2&, _OO2>
+ template <class _InIter2, class _OutIter3, class _OutIter4>
+ requires convertible_to<const _InIter1&, _InIter2>
+ && convertible_to<const _OutIter1&, _OutIter3> && convertible_to<const _OutIter2&, _OutIter4>
_LIBCPP_HIDE_FROM_ABI constexpr
- operator in_out_out_result<_II1, _OO1, _OO2>() const& {
+ operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() const& {
return {in, out1, out2};
}
- template <class _II1, class _OO1, class _OO2>
- requires convertible_to<_I1, _II1> && convertible_to<_O1, _OO1> && convertible_to<_O2, _OO2>
+ template <class _InIter2, class _OutIter3, class _OutIter4>
+ requires convertible_to<_InIter1, _InIter2>
+ && convertible_to<_OutIter1, _OutIter3> && convertible_to<_OutIter2, _OutIter4>
_LIBCPP_HIDE_FROM_ABI constexpr
- operator in_out_out_result<_II1, _OO1, _OO2>() && {
+ operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() && {
return {std::move(in), std::move(out1), std::move(out2)};
}
};
diff --git a/libcxx/include/__algorithm/in_out_result.h b/libcxx/include/__algorithm/in_out_result.h
index 8dd8037946de8..47e6f39079431 100644
--- a/libcxx/include/__algorithm/in_out_result.h
+++ b/libcxx/include/__algorithm/in_out_result.h
@@ -24,22 +24,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace ranges {
-template<class _I1, class _O1>
+template<class _InIter1, class _OutIter1>
struct in_out_result {
- _LIBCPP_NO_UNIQUE_ADDRESS _I1 in;
- _LIBCPP_NO_UNIQUE_ADDRESS _O1 out;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
- template <class _I2, class _O2>
- requires convertible_to<const _I1&, _I2> && convertible_to<const _O1&, _O2>
+ template <class _InIter2, class _OutIter2>
+ requires convertible_to<const _InIter1&, _InIter2> && convertible_to<const _OutIter1&, _OutIter2>
_LIBCPP_HIDE_FROM_ABI
- constexpr operator in_out_result<_I2, _O2>() const & {
+ constexpr operator in_out_result<_InIter2, _OutIter2>() const & {
return {in, out};
}
- template <class _I2, class _O2>
- requires convertible_to<_I1, _I2> && convertible_to<_O1, _O2>
+ template <class _InIter2, class _OutIter2>
+ requires convertible_to<_InIter1, _InIter2> && convertible_to<_OutIter1, _OutIter2>
_LIBCPP_HIDE_FROM_ABI
- constexpr operator in_out_result<_I2, _O2>() && {
+ constexpr operator in_out_result<_InIter2, _OutIter2>() && {
return {std::move(in), std::move(out)};
}
};
More information about the libcxx-commits
mailing list