There is currently no compiler protection when someone tries to do (for example) BLOB_SERIALIZER(std::vector<int>). You just get runtime allocation errors. This has already eaten up dev time before, so this PR adds a static assertion that the type must be trivially copyable, as defined by the C++ standard. Types can override this if applicable if they use BLOB_SERIALIZER_FORCED.
There is currently no compiler protection when someone tries to do (for example)
BLOB_SERIALIZER(std::vector<int>)
. You just get runtime allocation errors. This has already eaten up dev time before, so this PR adds a static assertion that the type must be trivially copyable, as defined by the C++ standard. Types can override this if applicable if they useBLOB_SERIALIZER_FORCED
.