@@ -47,35 +47,30 @@ of parallel range algorithms.
47
47
.. code :: cpp
48
48
49
49
// C++20 analogue of std::projected_value_t; exposition only
50
- template<typename I, typename Proj>
50
+ template <typename I, typename Proj>
51
51
using /*projected-value-type*/ = std::remove_cvref_t<std::invoke_result_t<Proj&, std::iter_value_t<I>&>>;
52
52
53
- // Extension of C++20 exposition-only special memory concepts as defined in [special.mem.concepts]
54
- template<typename S, typename I>
55
- concept no-throw-sized-sentinel-for = // exposition only
56
- no-throw-sentinel-for<S, I> &&
57
- std::sized_sentinel_for<S, I>;
58
-
59
- template<typename I>
60
- concept no-throw-bidirectional-iterator = // exposition only
61
- no-throw-forward-iterator<I> &&
62
- std::bidirectional_iterator<I>;
63
-
64
- template<typename I>
65
- concept no-throw-random-access-iterator = // exposition only
66
- no-throw-bidirectional-iterator<I> &&
67
- std::random_access_iterator<I> &&
68
- no-throw-sized-sentinel-for<I, I>;
69
-
70
- template<typename R>
71
- concept no-throw-bidirectional-range = // exposition only
72
- no-throw-forward-range<R> &&
73
- no-throw-bidirectional-iterator<std::ranges::iterator_t<R>>;
74
-
75
- template<typename R>
76
- concept no-throw-random-access-range = // exposition only
77
- no-throw-bidirectional-range<R> &&
78
- no-throw-random-access-iterator<std::ranges::iterator_t<R>>;
53
+ // C++20 analogue of nothrow-random-access-range proposed for C++26 in P3179R9; exposition only
54
+ template <typename R>
55
+ concept nothrow-random-access-range =
56
+ std::ranges::random_access_range<R> &&
57
+ std::is_lvalue_reference_v<std::iter_reference_t<I>> &&
58
+ std::same_as<std::remove_cvref_t<std::iter_reference_t<I>>, std::iter_value_t<I>> &&
59
+ std::sized_sentinel_for<std::ranges::sentinel_t<R>, std::ranges::iterator_t<R>>;
60
+
61
+ Semantic Requirements
62
+ ~~~~~~~~~~~~~~~~~~~~
63
+
64
+ A type ``R `` models ``nothrow-random-access-range `` if no exceptions are thrown from:
65
+
66
+ - increment, decrement, copy construction, move construction, copy assignment, move assignment,
67
+ comparisons or indirection through valid iterators of type ``std::ranges::iterator_t<R> ``;
68
+ - ``- `` operator, copy construction, move construction, copy assignment, move assignment,
69
+ or comparisons between valid values of type ``std::ranges::iterator_t<R> `` and ``std::ranges::sentinel_t<R> ``;
70
+ - ``- ``, ``+ ``, ``-= ``, ``+= ``, ``[] `` operators on valid values of type
71
+ ``std::ranges::iterator_t<R> `` and ``std::iter_difference_t<std::ranges::iterator_t<R>> ``;
72
+ - calls to ``std::ranges::begin() ``, ``std::ranges::end() `` and ``std::ranges::size() ``
73
+ on an object of type ``R ``.
79
74
80
75
Whole Sequence Operations
81
76
+++++++++++++++++++++++++
@@ -564,23 +559,23 @@ Uninitialized Memory Algorithms
564
559
namespace oneapi::dpl::ranges {
565
560
566
561
// uninitialized_default_construct
567
- template <typename ExecutionPolicy, /*no-throw -random-access-range*/ R>
562
+ template <typename ExecutionPolicy, /*nothrow -random-access-range*/ R>
568
563
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
569
564
std::ranges::sized_range<R> &&
570
565
std::default_initializable<std::ranges::range_value_t<R>>
571
566
std::ranges::borrowed_iterator_t<R>
572
567
uninitialized_default_construct (ExecutionPolicy&& pol, R&& r);
573
568
574
569
// uninitialized_value_construct
575
- template <typename ExecutionPolicy, /*no-throw -random-access-range*/ R>
570
+ template <typename ExecutionPolicy, /*nothrow -random-access-range*/ R>
576
571
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
577
572
std::ranges::sized_range<R> &&
578
573
std::default_initializable<std::ranges::range_value_t<R>>
579
574
std::ranges::borrowed_iterator_t<R>
580
575
uninitialized_value_construct (ExecutionPolicy&& pol, R&& r, const std::ranges::range_value_t<R>& value);
581
576
582
577
// uninitialized_copy
583
- template <typename ExecutionPolicy, std::random_access_range IR, /*no-throw -random-access-range*/ OR>
578
+ template <typename ExecutionPolicy, std::random_access_range IR, /*nothrow -random-access-range*/ OR>
584
579
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
585
580
std::ranges::sized_range<IR> && std::ranges::sized_range<OR> &&
586
581
std::constructible_from<std::ranges::range_value_t<OR>, std::ranges::range_reference_t<IR>>
@@ -590,7 +585,7 @@ Uninitialized Memory Algorithms
590
585
591
586
// uninitialized_move
592
587
template <typename ExecutionPolicy, std::ranges::random_access_range IR,
593
- /*no-throw -random-access-range*/ OR>
588
+ /*nothrow -random-access-range*/ OR>
594
589
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
595
590
std::ranges::sized_range<IR> && std::ranges::sized_range<OR> &&
596
591
std::constructible_from<std::ranges::range_value_t<OR>, std::ranges::range_reference_t<IR>>
@@ -599,7 +594,7 @@ Uninitialized Memory Algorithms
599
594
uninitialized_move (ExecutionPolicy&& pol, IR&& in_range, OR&& out_range);
600
595
601
596
// uninitialized_fill
602
- template <typename ExecutionPolicy, /*no-throw -random-access-range*/ R,
597
+ template <typename ExecutionPolicy, /*nothrow -random-access-range*/ R,
603
598
typename T>
604
599
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
605
600
std::ranges::sized_range<R> &&
@@ -608,7 +603,7 @@ Uninitialized Memory Algorithms
608
603
uninitialized_fill (ExecutionPolicy&& pol, R&& r, const T& value);
609
604
610
605
// destroy
611
- template <typename ExecutionPolicy, /*no-throw -random-access-range*/ R>
606
+ template <typename ExecutionPolicy, /*nothrow -random-access-range*/ R>
612
607
requires oneapi::dpl::is_execution_policy_v<std::remove_cvref_t<ExecutionPolicy>> &&
613
608
std::ranges::sized_range<R> &&
614
609
std::destructible<std::ranges::range_value_t<R>>
0 commit comments