Boost serialization of derived class with private members

前端 未结 2 1136
时光取名叫无心
时光取名叫无心 2021-01-24 07:10

I try to serialize a class, say B (in file b.h), which is derived from another one, say A (in file a.h). Both classes have private members and I want to serialize both with the

2条回答
  •  死守一世寂寞
    2021-01-24 07:12

    Now I got it: Non-intrusive serialization (text format) with a pimpl style struct as described paragraph 3 here let most members private and reduced the overhead of get/set methods. xml is still open - got compiler errors C2664 and C2789 on Visual Studio 2015. Also json could be interesting ...

提交回复
热议问题