Commit e068ded8 authored by Dominik Charousset's avatar Dominik Charousset

Allow serialization of any std::chrono time point

parent c5999142
......@@ -442,8 +442,8 @@ public:
return convert_apply(dref(), x, tmp, assign);
}
template <class Duration>
error apply(std::chrono::time_point<std::chrono::system_clock, Duration>& t) {
template <class Clock, class Duration>
error apply(std::chrono::time_point<Clock, Duration>& t) {
if (Derived::reads_state) {
auto dur = t.time_since_epoch();
return apply(dur);
......@@ -451,7 +451,7 @@ public:
if (Derived::writes_state) {
Duration dur{};
auto e = apply(dur);
t = std::chrono::time_point<std::chrono::system_clock, Duration>{dur};
t = std::chrono::time_point<Clock, Duration>{dur};
return e;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment