Skip to content

Commit 4f3aad1

Browse files
authored
[oneDPL] Fix the function signatures to not require std::projected_value_t (#619)
1 parent b64ea1c commit 4f3aad1

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

source/elements/oneDPL/source/parallel_api/parallel_range_api.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ The following differences to the standard C++ range algorithms apply:
3737
Except for these differences, the signatures of parallel range algorithms correspond to the working draft
3838
of the next edition of the C++ standard (C++26).
3939

40+
Auxiliary Definitions
41+
+++++++++++++++++++++
42+
43+
The following auxiliary entities are only defined for the purpose of exposition, to aid the specification
44+
of parallel range algorithms.
45+
46+
.. code:: cpp
47+
48+
// C++20 analogue of std::projected_value_t; exposition only
49+
template<typename I, typename Proj>
50+
using /*projected-value-type*/ = std::remove_cvref_t<std::invoke_result_t<Proj&, std::iter_value_t<I>&>>;
51+
4052
Whole Sequence Operations
4153
+++++++++++++++++++++++++
4254

@@ -82,7 +94,7 @@ Whole Sequence Operations
8294
// count
8395
template <typename ExecutionPolicy, std::ranges::random_access_range R,
8496
typename Proj = std::identity,
85-
typename T = std::projected_value_t<std::ranges::iterator_t<R>, Proj>>
97+
typename T = /*projected-value-type*/<std::ranges::iterator_t<R>, Proj>>
8698
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
8799
std::ranges::sized_range<R> &&
88100
std::indirect_binary_predicate< std::ranges::equal_to,
@@ -114,7 +126,7 @@ Element Search Operations
114126
// find
115127
template <typename ExecutionPolicy, std::ranges::random_access_range R,
116128
typename Proj = std::identity,
117-
typename T = std::projected_value_t<std::ranges::iterator_t<R>, Proj>>
129+
typename T = /*projected-value-type*/<std::ranges::iterator_t<R>, Proj>>
118130
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
119131
std::ranges::sized_range<R> &&
120132
std::indirect_binary_predicate< std::ranges::equal_to,
@@ -209,7 +221,7 @@ Sequence Search and Comparison
209221
// search_n
210222
template<typename ExecutionPolicy, std::ranges::random_access_range R,
211223
typename Pred = std::ranges::equal_to, typename Proj = std::identity,
212-
typename T = std::projected_value_t<std::ranges::iterator_t<R>, Proj>>
224+
typename T = /*projected-value-type*/<std::ranges::iterator_t<R>, Proj>>
213225
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
214226
std::ranges::sized_range<R> &&
215227
std::indirectly_comparable< std::ranges::iterator_t<R>, const T*, Pred, Proj >

0 commit comments

Comments
 (0)