Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
Conversion Factors

Defines conversion_factor and the strong-typed conversion factors that tag each unit. More...

Classes

struct  units::conversion_factor< Conversion, BaseUnit, PiExponent, Translation >
 Type representing an arbitrary conversion factor between units. More...

Typedefs

template<ConversionFactorType Cf, ConversionFactorType... Cfs>
using units::compound_conversion_factor = typename detail::compound_impl<Cf, Cfs...>::type
 Represents a conversion factor made up from other conversion factors.

Detailed Description

Defines conversion_factor and the strong-typed conversion factors that tag each unit.

Typedef Documentation

◆ compound_conversion_factor

template<ConversionFactorType Cf, ConversionFactorType... Cfs>
using units::compound_conversion_factor = typename detail::compound_impl<Cf, Cfs...>::type

Represents a conversion factor made up from other conversion factors.

Compound conversion factors are formed by multiplying all the conversion factor template arguments. Types provided must inherit from conversion_factor. A compound conversion factor can be formed from any number of other conversion factors, and unit manipulators like inverse and squared are supported. E.g. to specify acceleration, one could declare using acceleration = compound_conversion factor<length::meters, inverse<squared<seconds>>;

Template Parameters
Cfconversion factor which, when multiplied together, form the desired compound conversion factor.