Walter Bright:
auto code() { return cast(ushort)42; }works fine. There isn't really a lack here, just some more typing. I just don't see the case coming up hardly at all.
I have just found an example (reduced code): import std.typecons; void main() { alias Tuple!(ubyte[]) Tu; auto x1 = Tu([cast(ubyte)0]); // OK auto x2 = Tu([0]); // Error } D tuples are very strict. Bye, bearophile