Strange behaviour of to!string and JSON

Sönke Ludwig via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 7 02:38:08 PST 2015


Am 03.12.2015 um 12:18 schrieb Vladimir Panteleev:
> On Thursday, 3 December 2015 at 10:17:17 UTC, Sönke Ludwig wrote:
>> But isn't there a way to customize std.conv.to!T for T other than string?
>
> I believe you do that by implementing opCast?

Right, forgot about that. Unfortunately that would stretch the semantics 
of cast() a bit too much in this case, IMO. It would certainly be good 
to have an alternative hook for high-level conversions.


More information about the Digitalmars-d mailing list