toChars Bug?
Bottled Gin
gin at bottle.com
Tue Dec 12 12:34:16 UTC 2017
Greetings
This small code snippet works:
//
import std.conv;
import std.stdio;
void main() {
writeln(toChars!10(45));
}
But if I change toChars!10 with toChars!2, I get:
/tmp/test.d(6): Error: template std.conv.toChars cannot deduce
function from argument types !(2)(int), candidates are:
[snip]std/conv.d(6020): std.conv.toChars(ubyte radix = 10,
Char = char, LetterCase letterCase = LetterCase.lower, T)(T
value) if ((radix == 2 || radix == 8 || radix == 10 || radix ==
16) && (is(Unqual!T == uint) || is(Unqual!T == ulong) || radix ==
10 && (is(Unqual!T == int) || is(Unqual!T == long))))
toChars!8 and toChars!16 do not work either.
More information about the Digitalmars-d
mailing list