On 9/2/11, Jacob Carlborg <d...@me.com> wrote: > Note that to!string and/or write(f)(ln) could be implemented to inspect > the fields and just print them in some standard format. This would allow > you to skip implementing toString/writeTo in simple cases like the above.
http://codepad.org/1PZY7YTX But I'm pretty sure this suffers from template instantiation bloat. I had a similar template like this (a bit more complex though) and the compilation speed slowed down considerably on every instantiation.