mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
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:
parent
ec947ebc0f
commit
c7e1a1ed92
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue