zpp_bits icon indicating copy to clipboard operation
zpp_bits copied to clipboard

Help with std::vector of a big object.

Open stayprivate opened this issue 9 months ago • 1 comments

Hello,

Code at: https://godbolt.org/z/3WW4fbs18

Ignore the ugliness of the structures. Basically if serializing Board_t, it's all good, but if serializing std::vector<Board_t> it's as though zpp cannot find the custom serializer and thus default to internal automatic handling which fail because there are more than 50 variables, yet the custom serializer for Board_t only serialized one variable.

It will work if the custom serializer is put inside the Board_t struct https://godbolt.org/z/4q9anToYo but that's not a viable solution for us.

Regards,

Mario

stayprivate avatar May 08 '24 20:05 stayprivate

Try to put the serialize function in the same namespace as your type: https://godbolt.org/z/onqPYTTT6

eyalz800 avatar May 08 '24 21:05 eyalz800

That did it thanks

stayprivate avatar May 14 '24 15:05 stayprivate