
"Robert Ramey" <ramey@rrsd.com> writes:
All combinations of A and T actually used - and only those combinations - are used to instantiate code.
I don't think that can be true for any reasonable definition of "used." Code in one TU can't tell what other TUs are doing, so the code is instantiated for all archives whose headers have been included. IIRC it gets around the ordering problems you were having before by doing the instantiation as the result of overload resolution on an unqualified call, which happens in phase 2 and thus doesn't depend on having seen the overload for a particular archive type before the serializable type is EXPORTed. It doesn't do any other deep magic, IIRC. -- Dave Abrahams Boost Consulting www.boost-consulting.com