30 #ifndef CEREAL_TYPES_CHRONO_HPP_
31 #define CEREAL_TYPES_CHRONO_HPP_
38 template <
class Archive,
class R,
class P>
inline
45 template <
class Archive,
class R,
class P>
inline
51 dur = std::chrono::duration<R, P>{count};
55 template <
class Archive,
class C,
class D>
inline
58 ar(
CEREAL_NVP_(
"time_since_epoch", dur.time_since_epoch()) );
62 template <
class Archive,
class C,
class D>
inline
68 dur = std::chrono::time_point<C, D>{elapsed};
#define CEREAL_NVP_(name, value)
Convenience for creating a templated NVP.
Definition: helpers.hpp:201
in certain simple scenarios. They should probably not be used if maximizing performance is the main o...
Definition: access.hpp:42
std::enable_if< std::is_arithmetic< T >::value, void >::type CEREAL_LOAD_FUNCTION_NAME(BinaryInputArchive &ar, T &t)
Loading for POD types from binary.
Definition: binary.hpp:126
std::enable_if< std::is_arithmetic< T >::value, void >::type CEREAL_SAVE_FUNCTION_NAME(BinaryOutputArchive &ar, T const &t)
Saving for POD types to binary.
Definition: binary.hpp:118