-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
The operator*(), operator*=(), operator/(), and operator/=() currently only support int parameters [see boost::posix_time::duration].
I tried to use it as follows:
std::uint64_t const timedeltaInTensOfNanoseconds = 2793555578;
boost::posix_time::time_duration const duration = boost::posix_time::nanoseconds(10) * timestamp;
// duration.total_nanoseconds() = -15014117180
[I did define BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG.]
What did work as expected was:
std::uint64_t const timedeltaInTensOfNanoseconds = 2793555578;
boost::posix_time::time_duration const duration = boost::posix_time::nanoseconds(10 * timestamp);
// duration.total_nanoseconds() = 27935555780
Would it be possible to extend the parameter type for above functions to at least support unsigned as well? Or even extend it to 64-bit types? Or make them template-methods [with a concept limiting them to ints and floats]?
Metadata
Metadata
Assignees
Labels
No labels