Quantity Factory Functions

Convenience functions for creating quantities with compile-time units

Context

_images/ditaa-8403fa66acef33ca91cef45ab20b9810035d93a5.png

Introduction

#include <xo/unit/quantity.hpp>

Mass

template<typename Repr>
inline constexpr auto xo::qty::qty::picograms(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::nanograms(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::micrograms(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::milligrams(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::grams(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::kilograms(Repr x)

create a quantity representing x kilograms of mass, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::tonnes(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::kilotonnes(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::megatonnes(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::gigatonnes(Repr x)

Distance

template<typename Repr>
inline constexpr auto xo::qty::qty::picometers(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::nanometers(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::micrometers(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::millimeters(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::meters(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::kilometers(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::megameters(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::gigameters(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::lightseconds(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::astronomicalunits(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::inches(Repr x)

create quantity representing x inches of distance, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::feet(Repr x)

create quantity representing x feet of distance, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::yards(Repr x)

create quantity representing x yards of distance, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::miles(Repr x)

create quantity representing x statute miles of distance, with compile-time unit representation

Time

template<typename Repr>
inline constexpr auto xo::qty::qty::picoseconds(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::nanoseconds(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::microseconds(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::milliseconds(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::seconds(Repr x)

create quantity representing x seconds of time, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::minutes(Repr x)

create quantity representing x minutes of time, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::hours(Repr x)

create quantity representing x hours of time, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::days(Repr x)

create quantity representing x days of time, with compile-time unit representation

template<typename Repr>
inline constexpr auto xo::qty::qty::weeks(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::months(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::years(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::year250s(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::year360s(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::year365s(Repr x)

Volatility

template<typename Repr>
inline constexpr auto xo::qty::qty::volatility_30d(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::volatility_250d(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::volatility_360d(Repr x)
template<typename Repr>
inline constexpr auto xo::qty::qty::volatility_365d(Repr x)