cereal
A C++11 library for serialization
|
A class that allows cereal to load smart pointers to types that have no default constructor. More...
#include </build/libcereal-B5G4p0/libcereal-1.1.2/include/cereal/access.hpp>
Static Public Member Functions | |
static std::false_type | load_and_construct (...) |
Called by cereal if no default constructor exists to load and construct data simultaneously. More... | |
A class that allows cereal to load smart pointers to types that have no default constructor.
If your class does not have a default constructor, cereal will not be able to load any smart pointers to it unless you overload LoadAndConstruct for your class, and provide an appropriate load_and_construct method. You can also choose to define a member static function instead of specializing this class.
The specialization of LoadAndConstruct must be placed within the cereal namespace:
Please note that just as in using external serialization functions, you cannot get access to non-public members of your class by befriending cereal::access. If you have the ability to modify the class you wish to serialize, it is recommended that you use member serialize functions and a static member load_and_construct function.
T | The type to specialize for |
|
inlinestatic |
Called by cereal if no default constructor exists to load and construct data simultaneously.
Overloads of this should return a pointer to T and expect an archive as a parameter