|
pstore2
|
The primary template for serialization of non standard layout types. More...
#include <types.hpp>
Static Public Member Functions | |
| template<typename Archive > | |
| static auto | write (Archive &&archive, Ty const &v) -> archive_result_type< Archive > |
| Writes an single value of type Ty to an archive. More... | |
| template<typename Archive > | |
| static void | read (Archive &&archive, Ty &v) |
| Reads a value of type Ty from an archive. More... | |
The primary template for serialization of non standard layout types.
Define read() and write() methods which understand how to transfer an instance of an object of type Ty to and from an archive.
The default implementations of these functions rely on the type implementing a de-archiving constructor and a write() method respectively; see read() and write() for details.
|
inlinestatic |
Reads a value of type Ty from an archive.
Requires that the type Ty provides a constructor with the following signature:
template <typename Archive> explicit Ty (Archive && archive);
(You are encouraged to make such a constructor explicit, although this is not required.) This method should build the value of the new object from the contents of the supplied archive.
| archive | The archive from which the value will be read. |
| v | The memory into which a newly constructed instance of Ty should be placed. This is uninitialized memory suitable for construction of an instance of type Ty. |
|
inlinestatic |
Writes an single value of type Ty to an archive.
Requires that the type Ty implements a method with the following signature:
template <typename Archive> void write (Archive && archive) const;
This function should write the contents of the object to the supplied archive instance.
| archive | The archive to which the value 'ty' should be written. |
| v | An object which is the source for the write operation. Its contents are written to the archive. |
1.8.13