zpp_bits
zpp_bits copied to clipboard
std::valarray is not serializable
Hi, https://godbolt.org/z/xrbv7x415
There are at least two issues, valarrays use std::begin instead of .begin and they don't have std::iterator.
std::begin return T* as far as I understand.
What would be the right place to add support for valarrays?
Interesting case, since std::valarray is not directly part of the containers library in the standard the concepts don't apply to it. I will take a look, but this should be a temporary workaround, to wrap it with a span, although when loading a valarray you need to know the size and do the resize yourself: https://godbolt.org/z/hjKKnocE9
If you want a complete solution, for the time being use an external serialize function until I add support for this similar to issue https://github.com/eyalz800/zpp_bits/issues/160
thanks!