The Case For Autodecode
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 3 12:24:45 PDT 2016
On 6/3/16 3:12 PM, Steven Schveighoffer wrote:
> On 6/3/16 3:09 PM, Steven Schveighoffer wrote:
>>
>> Hm... an interesting possiblity:
>>
>> dchar _dchar_convert(char c)
>> {
>> return cast(int)cast(byte)c; // get sign extension for non-ASCII
>> }
>
> Allows this too:
>
> dchar d = char.init; // calls conversion function
> assert(d == dchar.init);
Hm... actually doesn't work. dchar.init is 0x0000ffff
-Steve
More information about the Digitalmars-d
mailing list