A while ago I developed an optimized class factory for an application, however I now need to serialize template classes, necessarily forcing me to register each specialization separately thereby creating a separate entry in the hash table thus wasting resources. Therefor I wonder: how do one correctly serialize template classes?