Conversation
|
Do you mind adding a test case to |
OK, I've added the test cases. |
|
I would expect that the same kind of error occurs for valarray of size 0, vector of size 0, etc. Shouldn't you fix this in the handling of binary_data created of nullptr and size 0 by the archive class, rather than the specific type(s)? That way we have a generic solution for the situation. |
I've checked that vector and valarray will not occur error. But, perhaps we can change |
|
Great suggestion, or use array.size() |
updated |
For
std::array<T,0>, thesizeof(array)!=0.Then bugs appear at
https://github.com/USCiLab/cereal/blob/master/include/cereal/types/array.hpp#L45
and
https://github.com/USCiLab/cereal/blob/master/include/cereal/types/array.hpp#L55 ,
since
array.data()isnullptrforstd::array<T,0>.