问问题
1560 次
1 回答
1
As far as I understand the way this library works, there is no way to deserialize something that doesn't have a default constructor at least for dynamically allocated objects.
The logic under this is the following:
- You need to deserialize
vector<Node>
- In order to do that you need to allocate an appropriate amount of memory
- cereal doesn't know about the constructor and can't properly allocate object memory by itself
- In order to provide a proper object building it requires the default constructor
于 2017-05-07T17:26:43.963 回答