Range functions expand char to dchar

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 8 11:30:56 PDT 2015


On 08-Sep-2015 20:57, Matt Kline wrote:
> On Tuesday, 8 September 2015 at 17:52:13 UTC, Matt Kline wrote:
>
>> Whether by design or by oversight, this is quite undesirable.
>
> My apologies for double-posting, but is this intended behavior, or an
> unfortunate consequence of the metaprogramming used to determine the
> resulting type of these range functions?
>
>

Historical consequence of enabling auto-decoding for arrays of char and 
wchar (and only those). Today it's recognized that one should either 
wrap an array of char  as code unit range or code point range explicitly 
using byUTF helper.

-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list