[odb-users] Persisting class instantiated from a template

Balázs Bayer balazs.bayer at gmail.com
Thu Mar 16 13:17:27 EDT 2017


Hi Boris,

the thing is, that as Value is a std::array, and although in these code
snippets its size is only 7, I am expecting to have ~1000 long arrays. And
if I do this:

std::array<float, 1000> const &getValue() const { return Value; };
void setValue(const std::array<float, 1000> &NewValue) { Value =
std::move(NewValue); };

which is somehow analogue to

valuetype getValue() const;
void setValue(valuetype)

then I guess the problem is, that when I want to change only one specific
member of the Value array, I will have to construct another huge array, and
pass it to setValue, which does not seem to be efficient to me. Do you have
any suggestions, how to overcome this situation?

Many Thanks,
Balazs


More information about the odb-users mailing list