Modernize PackedData classes
- autogenerate the 'decomposition' of plain aggegrate using boost::pfr
- this reduces boiler plate code, and guarantees all fields are persisted
- use decomposition to trigger i/o of 'current' version of packed data
structs, and use in
load
andsave
- the above fixes the const-correctness of
load
which should pass non-const references to data, but as it was typically implemented by callingsave
which passes const references instead -- which was then 'fixed' by using a C-style cast in the downstream buffer code to (implicitly!) cast away the const again...- aside: implementing
load
by callingsave
was/is a bit confusing as it is not clear what decides on I vs. O -- the only difference is theBuffer
type, and hence that must determine which direction the data is moving... which is a bit obfuscated IMHO
- aside: implementing
- drop redundant
inline
qualifiers - do not 'hide' default constructors which would otherwise never be auto-generated by the compiler anyway
- prefer
std::array
overboost::array
sits on top of !3165 (merged)
Edited by Gerhard Raven