MT Core (C++)
Core library for replacing C++ standard in project usage
|
Base namespace for units. More...
Namespaces | |
namespace | angle |
namespace | area |
namespace | current |
namespace | dimensions |
Represents prebuilt dimensions for units. | |
namespace | length |
namespace | luminosity |
namespace | mass |
namespace | storage |
namespace | substance |
namespace | temperature |
namespace | time |
namespace | volume |
Classes | |
struct | Unit |
Represents a single unit of measurement. More... | |
struct | UnitName |
Template for storing unit names. More... | |
struct | Units |
List of units. More... | |
struct | Units< Unit< Id, S, PiPow, Tr, Exp >, Mappings... > |
struct | Units<> |
struct | UnitValue |
Represents a value with associated units. More... | |
struct | UnitValue< Underlying, Units< U1, UnitsSub... > > |
Represents a unit value with a specific, non-empty unit list. More... | |
struct | UnitValue< Underlying, Units<> > |
Specialization where units list is empty (basically a "unitless" value) Can be directly cast to a numeric type. More... | |
Concepts | |
concept | IsUnit |
Concept to check that a type is a unit. | |
concept | IsUnitValue |
Concept to check something is a unit value. | |
Functions | |
template<std::floating_point Val, typename... Dims> | |
constexpr UnitValue< Val, Units< Dims... > > | operator* (Val lhs, const Units< Dims... > &) |
Multiply a number with units to get a unit value. | |
template<typename... Dims1, typename... Dims2> | |
constexpr auto | operator* (const Units< Dims1... > &, const Units< Dims2... > &) |
Multiply units to combine them. | |
template<typename... Dims1, typename... Dims2> | |
constexpr auto | operator/ (const Units< Dims1... > &, const Units< Dims2... > &) |
Divide units to combine them. | |
template<std::floating_point Val, typename... Dims> | |
constexpr auto | operator/ (Val lhs, const Units< Dims... > &) |
Divide units with a number to get a unit value. | |
template<typename U1, typename Us1, typename U2, typename Us2> | |
constexpr auto | operator* (const UnitValue< U1, Us1 > &lhs, const UnitValue< U2, Us2 > &rhs) |
Multiply unit values together. | |
template<typename U1, typename Us1, typename U2, typename Us2> | |
constexpr auto | operator/ (const UnitValue< U1, Us1 > &lhs, const UnitValue< U2, Us2 > &rhs) |
Divide unit values. | |
template<std::floating_point I, typename U, typename Us> | |
constexpr auto | operator/ (I value, UnitValue< U, Us > lhs) |
Divide a number with a unit value. | |
template<std::floating_point I, typename U, typename Us> | |
constexpr auto | operator/ (UnitValue< U, Us > lhs, I value) |
Divide a unit value with a number. | |
template<std::integral I, typename U, typename Us> | |
constexpr auto | operator/ (I value, const UnitValue< U, Us > &lhs) |
Divide a number with a unit value. | |
template<std::floating_point Val, typename U, typename Us> | |
constexpr UnitValue< U, Us > | operator* (const UnitValue< U, Us > &lhs, Val rhs) |
Multiply a unit value with a number. | |
template<std::floating_point Val, typename U, typename Us> | |
constexpr UnitValue< Val, Us > | operator* (Val lhs, const UnitValue< U, Us > &rhs) |
Multiply a unit value with a number. | |
template<typename U, typename Us, typename... Dims> | |
constexpr auto | operator* (UnitValue< U, Us > lhs, const Units< Dims... > &u) |
Multiply a unit value with units to combine them. | |
template<typename U, typename Us, typename... Dims> | |
constexpr auto | operator/ (UnitValue< U, Us > lhs, const Units< Dims... > &u) |
Divide a unit value with units to combine them. | |
MTCORE_DEF_UNIT_NAME_DIFF_US (length, attometre, attometer, am) | |
MTCORE_DEF_UNIT_NAME_DIFF_US (length, exametre, exameter, Em) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (length, twip) | |
MTCORE_DEF_UNIT_NAME (length, thou, th) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (length, barleycorn) | |
MTCORE_DEF_UNIT_NAME_SYM (length, inch, in, "″") | |
MTCORE_DEF_UNIT_NAME (length, hand, hh) | |
MTCORE_DEF_UNIT_NAME_SYM (length, foot, in, "′") | |
MTCORE_DEF_UNIT_NAME (length, yard, yd) | |
MTCORE_DEF_UNIT_NAME (length, chain, ch) | |
MTCORE_DEF_UNIT_NAME (length, furlong, fur) | |
MTCORE_DEF_UNIT_NAME (length, mile, mi) | |
MTCORE_DEF_UNIT_NAME (length, league, lea) | |
MTCORE_DEF_UNIT_NAME (length, fathom, ftm) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (length, cable) | |
MTCORE_DEF_UNIT_NAME (length, nautical_mile, "nmi") | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (length, link) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (length, rod) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (area, perch) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (area, rood) | |
MTCORE_DEF_UNIT_NAME_NO_ABBREV (area, acre) | |
MTCORE_DEF_UNIT_NAME (area, square_mile, sq mi) | |
MTCORE_DEF_UNIT_NAME_SI (volume, litre, liter, L) | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_gal, "US gallon", "gallon", "US gal", "US gal", "gal", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_pot, "US pot", "pot", "US pot", "US pot", "pot", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_quart, "US quart", "quart", "US qt", "US qt", "qt", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_pint, "US pint", "pint", "US pt", "US pt", "pt", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_cup, "US cup", "cup", "US c", "US c", "c", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_gill, "US gill", "gill", "US gi", "US gi", "gi", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_jig, "US jig", "jig", "US jig", "US jig", "jig", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_fluid_ounce, "US fluid ounce", "fluid ounce", "US fl oz", "US fl oz", "fl oz", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_tablespoon, "US tablespoon", "tablespoon", "US tbsp", "US tbsp", "tbsp", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_teaspoon, "US teaspoon", "teaspoon", "US tsp", "US tsp", "tsp", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_barrel, "US barrel (liquid)", "barrel (liquid)", "US bbl", "US bbl", "bbl", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_oil_barrel, "US oil barrel", "oil barrel", "US bbl", "US bbl", "bbl", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, fluid::us_hogshead, "US hogshead", "hogshead", "US hogshead", "US hogshead", "hogshead", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, cubic_inch, "cubic inch", "cubic inch", "cu in", "cu in", "cu in", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, cubic_foot, "cubic foot", "cubic foot", "cu ft", "cu ft", "cu ft", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, cubic_yard, "cubic yard", "cubic yard", "cu yd", "cu yd", "cu yd", "") | |
MTCORE_DEF_UNIT_NAME_STRS (volume, acre_foot, "acre-foot", "acre-foot", "acre-ft", "acre-ft", "acre-ft", "") | |
MTCORE_DEF_UNIT_NAME_STRS (mass, hundredweight, "US (short) hundredweight", "hundredweight", "US cwt", "US cwt", "cwt", "") MTCORE_DEF_UNIT_NAME_STRS(mass | |
MTCORE_DEF_UNIT_NAME_DIFF_US (time, attosecond, attosecond, as) | |
MTCORE_DEF_UNIT_NAME_DIFF_US (time, exasecond, exasecond, Es) | |
Variables | |
long_hundredweight | |
long | hundredweight |
long long long | cwt |
Base namespace for units.
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | area | , |
square_mile | , | ||
sq | mi ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
chain | , | ||
ch | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
fathom | , | ||
ftm | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
furlong | , | ||
fur | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
hand | , | ||
hh | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
league | , | ||
lea | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
mile | , | ||
mi | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
nautical_mile | , | ||
"nmi" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
thou | , | ||
th | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME | ( | length | , |
yard | , | ||
yd | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_DIFF_US | ( | length | , |
attometre | , | ||
attometer | , | ||
am | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_DIFF_US | ( | length | , |
exametre | , | ||
exameter | , | ||
Em | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_DIFF_US | ( | time | , |
attosecond | , | ||
attosecond | , | ||
as | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_DIFF_US | ( | time | , |
exasecond | , | ||
exasecond | , | ||
Es | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | area | , |
acre | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | area | , |
perch | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | area | , |
rood | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | length | , |
barleycorn | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | length | , |
cable | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | length | , |
link | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | length | , |
rod | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_NO_ABBREV | ( | length | , |
twip | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_SI | ( | volume | , |
litre | , | ||
liter | , | ||
L | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | mass | , |
hundredweight | , | ||
"US (short) hundredweight" | , | ||
"hundredweight" | , | ||
"US cwt" | , | ||
"US cwt" | , | ||
"cwt" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
acre_foot | , | ||
"acre-foot" | , | ||
"acre-foot" | , | ||
"acre-ft" | , | ||
"acre-ft" | , | ||
"acre-ft" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
cubic_foot | , | ||
"cubic foot" | , | ||
"cubic foot" | , | ||
"cu ft" | , | ||
"cu ft" | , | ||
"cu ft" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
cubic_inch | , | ||
"cubic inch" | , | ||
"cubic inch" | , | ||
"cu in" | , | ||
"cu in" | , | ||
"cu in" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
cubic_yard | , | ||
"cubic yard" | , | ||
"cubic yard" | , | ||
"cu yd" | , | ||
"cu yd" | , | ||
"cu yd" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_barrel | , | ||
"US barrel (liquid)" | , | ||
"barrel (liquid)" | , | ||
"US bbl" | , | ||
"US bbl" | , | ||
"bbl" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_cup | , | ||
"US cup" | , | ||
"cup" | , | ||
"US c" | , | ||
"US c" | , | ||
"c" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_fluid_ounce | , | ||
"US fluid ounce" | , | ||
"fluid ounce" | , | ||
"US fl oz" | , | ||
"US fl oz" | , | ||
"fl oz" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_gal | , | ||
"US gallon" | , | ||
"gallon" | , | ||
"US gal" | , | ||
"US gal" | , | ||
"gal" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_gill | , | ||
"US gill" | , | ||
"gill" | , | ||
"US gi" | , | ||
"US gi" | , | ||
"gi" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_hogshead | , | ||
"US hogshead" | , | ||
"hogshead" | , | ||
"US hogshead" | , | ||
"US hogshead" | , | ||
"hogshead" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_jig | , | ||
"US jig" | , | ||
"jig" | , | ||
"US jig" | , | ||
"US jig" | , | ||
"jig" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_oil_barrel | , | ||
"US oil barrel" | , | ||
"oil barrel" | , | ||
"US bbl" | , | ||
"US bbl" | , | ||
"bbl" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_pint | , | ||
"US pint" | , | ||
"pint" | , | ||
"US pt" | , | ||
"US pt" | , | ||
"pt" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_pot | , | ||
"US pot" | , | ||
"pot" | , | ||
"US pot" | , | ||
"US pot" | , | ||
"pot" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_quart | , | ||
"US quart" | , | ||
"quart" | , | ||
"US qt" | , | ||
"US qt" | , | ||
"qt" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_tablespoon | , | ||
"US tablespoon" | , | ||
"tablespoon" | , | ||
"US tbsp" | , | ||
"US tbsp" | , | ||
"tbsp" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_STRS | ( | volume | , |
fluid::us_teaspoon | , | ||
"US teaspoon" | , | ||
"teaspoon" | , | ||
"US tsp" | , | ||
"US tsp" | , | ||
"tsp" | , | ||
"" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_SYM | ( | length | , |
foot | , | ||
in | , | ||
"′" | ) |
mtcore::units::MTCORE_DEF_UNIT_NAME_SYM | ( | length | , |
inch | , | ||
in | , | ||
"″" | ) |