Skip to main content

Module traits

Module traits 

Source
Expand description

Traits for working generically with dimensioned

Unless specified otherwise, all of these traits are implemented for the unit systems that come with dimensioned and with any created by the make_units! macro.

Traits§

Abs
Abs is used for implementing an abs() member for types that can have their absolute value taken (which is most of them).
Cbrt
Cbrt provides a cbrt member function for types that are not necessarily preserved under cube root.
Dimensioned
Allows one to refer to quantities generically.
Dimensionless
This trait is implemented for all quantities with no units. The unit systems that come with dimensioned use Unitless<V> for that type.
Map
Perform an operation on the contained value.
MapUnsafe
Perform an operation on a quantity.
Recip
Recip is used for implementing a recip() member for types that are not preserved under reciprocal.
Root
Root is used for implementing general integer roots for types that aren’t necessarily preserved under root.
Sqrt
Sqrt provides a sqrt member function for types that are not necessarily preserved under square root.