When cctz::parse() produces seconds+femtoseconds values that cannot
be represented in the output time_point<D> it should return false.
Here we add overloads of join_seconds() that break the overflow issue
down into four cases, three of which are implemented and have test cases.
The fourth overload (for 1/N duration ratios) is yet to be implemented,
so its test cases are currently commented out, but they provide a guide
to what remains to be done. See #199.
Also, clarify that the ToUnixSeconds() implementation requires that
the std::chrono::system_clock uses the Unix epoch in order to avoid
arithmetic overflow.
When
cctz::parse()
produces seconds+femtoseconds values that cannot be represented in the outputtime_point<D>
it should returnfalse
. Here we add overloads ofjoin_seconds()
that break the overflow issue down into four cases, three of which are implemented and have test cases.The fourth overload (for 1/N duration ratios) is yet to be implemented, so its test cases are currently commented out, but they provide a guide to what remains to be done. See #199.
Also, clarify that the
ToUnixSeconds()
implementation requires that thestd::chrono::system_clock
uses the Unix epoch in order to avoid arithmetic overflow.This change is