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