I can not understand, why this code works: char s[2] = ['0', 'A']; string ss = to!string(s); writeln(parse!uint(ss, 16)); but this can deduces template: char s[2] = ['0', 'A']; writeln(parse!uint(to!string(s), 16)); What's the reason? And what is the right way to parse char[2]->int with radix?