I have found it useful to be able to serialize user-defined structs. I usually use something like
#include <msgpack.hpp>
struct MyStruct {
int val;
MSGPACK_DEFINE_MAP(val);
};
This will then get included anywhere that needs it. I later noticed long compile times. When I ran g++ with the -H flag, I found that around 1/3 of the included files are msgpack related.
Is there any way to easily use msgpack while avoiding the headers getting re-included everywhere and bloating compile times?