BTW you can do: class myclass_custom(T = int) {} alias myclass_custom!int myclass; Then use myclass.whatever and you get int. If you want a custom type then, you'd use the other name (myclass_custom!ubyte for instance)