Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::units_combination_traits< QuantityType1, QuantityType2 > Struct Template Reference

Traits class with information about if and how a physical unit of type QuantityType1 can be combined with a physical unit of type QuantityType2. More...

Detailed Description

template<typename QuantityType1, typename QuantityType2>
struct arene::base::units_combination_traits< QuantityType1, QuantityType2 >

Traits class with information about if and how a physical unit of type QuantityType1 can be combined with a physical unit of type QuantityType2.

The physical unit types themselves are just tags used for the quantity class template rather than holding any values directly.

By default only addition and subtraction of identical quantity types are permitted.

Specializations may provide a sum_type type alias, specifying the physical unit type for the result of adding a quantity with the a physical unit type of QuantityType1 to a quantity with a physical unit type of QuantityType2

Specializations may provide a difference_type type alias, specifying the physical unit type for the result of subtracting a quantity with the a physical unit type of QuantityType2 from a quantity with a physical unit type of QuantityType1

Specializations may provide a product_type type alias, specifying the physical unit type for the result of multiplying a quantity with the a physical unit type of QuantityType1 by a quantity with a physical unit type of QuantityType2

Specializations may provide a ratio_type type alias, specifying the physical unit type for the result of dividing a quantity with the a physical unit type of QuantityType1 by a quantity with a physical unit type of QuantityType2

Template Parameters
QuantityType1The quantity type for the left-hand operand of an operation
QuantityType2The quantity type for the righ-hand operand of an operation

The documentation for this struct was generated from the following file: