template<typename Units, std::uintmax_t Num, std::uintmax_t Denom = 1>
struct units::unit_value_t< Units, Num, Denom >
Stores a rational unit value as a compile-time constant.
unit_value_t is useful for performing compile-time arithmetic on known unit quantities.
- Template Parameters
-
Units | units represented by the unit_value_t |
Num | numerator of the represented value. |
Denom | denominator of the represented value. |
- See also
- unit_value_t_traits to access information about the properties of the class, such as it's unit type and rational value.
- Note
- This is intentionally identical in concept to a
std::ratio
.