diff --git a/iterators.tex b/iterators.tex index 401231d6..90c00629 100644 --- a/iterators.tex +++ b/iterators.tex @@ -1034,7 +1034,7 @@ requires(I i) { typename difference_type_t; requires SignedIntegral>; - { ++i } -> Same; // not required to be equality preserving + { ++i } -> Same&; // not required to be equality preserving i++; // not required to be equality preserving }; \end{codeblock} @@ -1075,7 +1075,7 @@ Regular && WeaklyIncrementable && requires(I i) { - { i++ } -> Same; + { i++ } -> Same&&; }; \end{codeblock} @@ -1172,8 +1172,8 @@ Sentinel && !disable_sized_sentinel, remove_cv_t> && requires(const I& i, const S& s) { - { s - i } -> Same>; - { i - s } -> Same>; + { s - i } -> Same>&&; + { i - s } -> Same>&&; }; \end{itemdecl} @@ -1331,8 +1331,8 @@ ForwardIterator && DerivedFrom, bidirectional_iterator_tag> && requires(I i) { - { @\dcr@i } -> Same; - { i@\dcr@ } -> Same; + { --i } -> Same&; + { i-- } -> Same&&; }; \end{codeblock} @@ -1372,12 +1372,13 @@ StrictTotallyOrdered && SizedSentinel && requires(I i, const I j, const difference_type_t n) { - { i += n } -> Same; - { j + n } -> Same; - { n + j } -> Same; - { i -= n } -> Same; - { j - n } -> Same; - { j[n] } -> Same>; + { i += n } -> Same&; + { j + n } -> Same&&; + { n + j } -> Same&&; + { i -= n } -> Same&; + { j - n } -> Same&&; + j[n]; + requires Same>; }; \end{codeblock} diff --git a/numerics.tex b/numerics.tex index b5e33169..e828359f 100644 --- a/numerics.tex +++ b/numerics.tex @@ -22,10 +22,11 @@ namespace std { namespace experimental { namespace ranges { inline namespace v1 { template concept bool UniformRandomNumberGenerator = - requires(G g) { - { g() } -> UnsignedIntegral; // not required to be equality preserving - { G::min() } -> Same>; - { G::max() } -> Same>; + Invocable && + UnsignedIntegral> && + requires { + { G::min() } -> Same>&&; + { G::max() } -> Same>&&; }; }}}} \end{codeblock}