cereal icon indicating copy to clipboard operation
cereal copied to clipboard

CEREAL_SPECIALIZE_FOR_ALL_ARCHIVES for templated classes

Open andrewkcorcoran opened this issue 3 years ago • 0 comments

What's the procedure for specialising access for template classes/structs? CEREAL_SPECIALIZE_FOR_ALL_ARCHIVES and the cereal::specialize struct don't seem to support template types at first glance.

template<typename T>
struct Test { T t; };

CEREAL_SPECIALIZE_FOR_ALL_ARCHIVES (Test) // compile error
CEREAL_SPECIALIZE_FOR_ALL_ARCHIVES (Test<int>) // works but I won't know all possible templated types

andrewkcorcoran avatar Jun 17 '21 11:06 andrewkcorcoran