Template Function fmt::v6::safe_duration_cast::lossless_integral_conversion

Function Documentation

template<typename To, typename From, enable_if_t<(!std::is_same<From, To>::value && std::numeric_limits<From>::is_signed == std::numeric_limits<To>::is_signed), int> = 0>
To safe_duration_cast::v6::fmt::lossless_integral_conversion(const From from, int &ec)

converts From to To, without loss. If the dynamic value of from can’t be converted to To without loss, ec is set.