18 template <
char _symbol,
typename _exponent,
typename _type,
typename _ratio>
25 template <
template <
typename...>
typename _resulting_unit,
typename _unit_lhs,
30 static_assert(!std::is_same<_unit_lhs, _unit_rhs>::value);
31 static_assert(is_unit_t_v<_unit_lhs>,
"lhs parameter is a unit_t");
32 static_assert(is_unit_t_v<_unit_rhs>,
"rhs parameter is a unit_t");
34 using resulting_ratio =
typename std::ratio_divide<
typename _unit_lhs::ratio,
35 typename _unit_rhs::ratio>;
36 return _resulting_unit<typename _unit_lhs::internal_type, resulting_ratio>(
37 lhs.value() / rhs.value());
45 template <
template <
typename...>
typename _resulting_unit,
typename _unit_lhs,
50 static_assert(!std::is_same<_unit_lhs, _unit_rhs>::value);
51 static_assert(is_unit_t_v<_unit_lhs>,
"lhs parameter is a unit_t");
52 static_assert(is_unit_t_v<_unit_rhs>,
"rhs parameter is a unit_t");
53 using resulting_ratio =
54 typename std::ratio_multiply<
typename _unit_lhs::ratio,
55 typename _unit_rhs::ratio>;
56 return _resulting_unit<typename _unit_lhs::internal_type, resulting_ratio>(
57 lhs.value() * rhs.value());
Namespace containing implementation details for SI.
Definition: acceleration.h:34
constexpr auto cross_unit_divide(const _unit_lhs &lhs, const _unit_rhs &rhs)
Definition: cross_unit_operations.h:27
constexpr auto cross_unit_multiply(const _unit_lhs &lhs, const _unit_rhs &rhs)
Definition: cross_unit_operations.h:47