This isn't your code, but I think this cast is wrong, as it involves integral promotion. The correct code would be:

`toImpl!(T)(unsigned(value), radix);`

The difference is this:

```D
   byte b = -3;
   writeln(to!string(b, 16))
```

This prints `FFFFFFFFFFFFFFFD`, which is the *long* representation of my argument. It really should have only printed `FD`.