On Monday, 25 March 2013 at 08:53:32 UTC, Jacob Carlborg wrote:
With templates:class Serializer (T) class XmlArchive auto archive = new XmlArchive; auto serializer = new Serializer!(XmlArchive)(archive); struct Foo {void toData (Serializer!(XmlArchive) serializer, Serializer.Data key);} Foo is now locked to the XmlArchive. Or: class Bar {void toData (T) (Serializer!(T) serializer, Serializer.Data key);} toData cannot be virtual.
http://dpaste.dzfl.pl/0f7d8219