Set tracking traits of template class in boost serialization to reduce memory consumption
问题 As this link stated for defining traits for a template class we should define it manually or we extract our class from the trait class. But I want to make this process automatically, for this reason inspired from BOOST_CLASS_TRACKING I wrote the blow code: #include<boost/preprocessor/tuple/enum.hpp> ... #define FOO_CLASS_TRACKING(E, PARAMETER_TUPLE, ...) \ namespace boost { \ namespace serialization { \ template<BOOST_PP_TUPLE_ENUM(PARAMETER_TUPLE)> \ struct tracking_level< __VA_ARGS__ > \ {