You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I change the tests to try to do implicit conversion to std::chrono::duration<double> instead of to std::chrono::nanoseconds, I get a compile error. This seems weird since seconds_t is duration in double seconds.:
/path/to/units/unitTests/main.cpp:2637:32: error: no viable conversion from 'units::time::second_t' (aka 'unit_t<unit<ratio<1>, base_unit<ratio<0L, 1L>, ratio<0>, ratio<1>>>>') to 'std::chrono::duration<double>'
std::chrono::duration<double> j = second_t(1);
^ ~~~~~~~~~~~
It looks like we could change the implicit-conversion operator to convert to any/some std::chrono::duration<T, Ratio> types. As far as I'm concerned, it'd be fine to just add implicit conversion from units' double seconds to std::chrono::duration<value_type>.
The text was updated successfully, but these errors were encountered:
Please include the following information in your issue:
If I change the tests to try to do implicit conversion to
std::chrono::duration<double>
instead of tostd::chrono::nanoseconds
, I get a compile error. This seems weird sinceseconds_t
is duration indouble
seconds.:It looks like we could change the implicit-conversion operator to convert to any/some
std::chrono::duration<T, Ratio>
types. As far as I'm concerned, it'd be fine to just add implicit conversion from units'double
seconds tostd::chrono::duration<value_type>
.The text was updated successfully, but these errors were encountered: