Update isSlicing docs to match code

Use lvalueOf instead of `(R r)` parameter as lvalueOf!R is already
needed for the other tests.
This commit is contained in:
Nick Treleaven 2023-02-18 15:28:16 +00:00
parent ec947ebc0f
commit c7e1a1ed92

View file

@ -1674,8 +1674,8 @@ The following expression must be true for `hasSlicing` to be `true`:
----
isForwardRange!R
&& !isNarrowString!R
&& is(ReturnType!((R r) => r[1 .. 1].length) == size_t)
&& !(isAutodecodableString!R && !isAggregateType!R)
&& is(typeof(() { return lvalueOf!R[1 .. 1].length; } ()) == size_t)
&& (is(typeof(lvalueOf!R[1 .. 1]) == R) || isInfinite!R)
&& (!is(typeof(lvalueOf!R[0 .. $])) || is(typeof(lvalueOf!R[0 .. $]) == R))
&& (!is(typeof(lvalueOf!R[0 .. $])) || isInfinite!R
@ -1688,7 +1688,7 @@ The following expression must be true for `hasSlicing` to be `true`:
*/
enum bool hasSlicing(R) = isForwardRange!R
&& !(isAutodecodableString!R && !isAggregateType!R)
&& is(typeof((R r) { return r[1 .. 1].length; } (R.init)) == size_t)
&& is(typeof(() { return lvalueOf!R[1 .. 1].length; } ()) == size_t)
&& (is(typeof(lvalueOf!R[1 .. 1]) == R) || isInfinite!R)
&& (!is(typeof(lvalueOf!R[0 .. $])) || is(typeof(lvalueOf!R[0 .. $]) == R))
&& (!is(typeof(lvalueOf!R[0 .. $])) || isInfinite!R