Quantity Factory Functions
Convenience functions for creating quantities with compile-time units
Context
Introduction
#include <xo/unit/quantity.hpp>
Mass
-
template<typename Repr>
inline auto xo::qty::qty::picograms(Repr x) create quantity representing
xpicograms of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::nanograms(Repr x) create quantity representing
xnanograms of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::micrograms(Repr x) create quantity representing
xmicrograms of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::milligrams(Repr x) create quantity representing
xmilligrams of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::grams(Repr x) create quantity representing
xgrams of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::kilograms(Repr x) create quantity representing
xkilograms of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::tonnes(Repr x) create quantity representing
xtonnes of mass, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::kilotonnes(Repr x) create quantity representing
xkilotonnes of mass, with compile-time unit representation
Distance
-
template<typename Repr>
inline auto xo::qty::qty::picometers(Repr x) create quantity representing
xpicometers of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::nanometers(Repr x) create quantity representing
xnanometers of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::micrometers(Repr x) create quantity representing
xmicrometers of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::millimeters(Repr x) create quantity representing
xmillimeters of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::meters(Repr x) create quantity representing
xmeters of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::kilometers(Repr x) create quantity representing
xkilometers of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::megameters(Repr x) create quantity representing
xmegameters of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::gigameters(Repr x) create quantity representing
xgigameters of distance, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::lightseconds(Repr x) create quantity representing
xlight-seconds of distance, with compile-time unit operations.
-
template<typename Repr>
inline auto xo::qty::qty::astronomicalunits(Repr x) create quantity representing
xastronomical units of distance, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::inches(Repr x) create quantity representing
xinches of distance, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::feet(Repr x) create quantity representing
xfeet of distance, with compile-time unit representation
Time
-
template<typename Repr>
inline auto xo::qty::qty::picoseconds(Repr x) create quantity representing
xpicoseconds of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::nanoseconds(Repr x) create quantity representing
xnanoseconds of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::microseconds(Repr x) create quantity representing
xmicroseconds of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::milliseconds(Repr x) create quantity representing
xmilliseconds of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::seconds(Repr x) create quantity representing
xseconds of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::minutes(Repr x) create quantity representing
xminutes of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::hours(Repr x) create quantity representing
xhours of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::days(Repr x) create quantity representing
xexactly-24-hour days of time, with compile-time unit operations
-
template<typename Repr>
inline auto xo::qty::qty::weeks(Repr x) creeate quantity representing
xweeks of time, with compile-time unit operations. Each week has exactly 7 24-hour days.
-
template<typename Repr>
inline auto xo::qty::qty::months(Repr x) create quantity representing
xmonths of time, with compile-time unit operations. Each month has exactly 30 24-hour days
-
template<typename Repr>
inline auto xo::qty::qty::years(Repr x) create quantity representing
xyears of time, with compile-time unit operations. Each year has exactly 365.25 24-hour days
-
template<typename Repr>
inline auto xo::qty::qty::year250s(Repr x) create quantity representing
x‘250-day years’ of time. 250 represents approximate number of business days in a calendar year.
Volatility
-
template<typename Repr>
inline auto xo::qty::qty::volatility_30d(Repr x) create quantity representing
xunits of 30-day volatility, with compile-time unit representation
-
template<typename Repr>
inline auto xo::qty::qty::volatility_250d(Repr x) create quantity representing
xunits of 250-day volatility, with compile-time unit representation