On Wednesday, 20 July 2016 at 16:03:27 UTC, pineapple wrote:
On Wednesday, 20 July 2016 at 13:33:34 UTC, Mike Parker wrote:
There is no auto-decoding going on here, as char[] and wchar[]
are rejected outright since they are not considered random
access ranges.
They are considered random access ranges by my ranges library,
because they are treated as arrays of characters and not as
unicode strings.
I think you mean that your range library treats them as arrays of
code units, meaning your library will break (some) unicode
strings.
Note that auto decoding and random access range are different.
The isRandomAccess check must make a special condition that the
string is not "narrow" else they would be considered random
access even though front automatically decodes.
922: static assert(!isNarrowString!R);