novice2 wrote: > [...] >> auto b = toByteArray!(Foo)(f); // Yay! > > why we need two parameters? > compiler don't know type of f? That's how templates work. Another option would be to alias for frequently used types. alias toByteArray!(Foo) FooToByteArray; // or similar