Odd to!string call

Andrej Mitrovic none at none.none
Tue Dec 21 10:38:06 PST 2010


I found this by accident:

import std.stdio;
import std.conv;

void main()
{
    writeln(to!string(2, 2));  // writes 10
    writeln(to!string(1, 0));  // std.conv.ConvException: Radix error
}

I'm not sure why "std.conv.to" would even take multiple arguments. Bugzilla?


More information about the Digitalmars-d-learn mailing list