19#ifndef MTCORE_UNITS_LENGTH_HPP
20#define MTCORE_UNITS_LENGTH_HPP
82 static_assert(12 *
inch == 1 *
foot);
86 static_assert((1.44 *
twip).to(
thou).val >= 0.99999 && (1.44 *
twip).to(
thou).val <= 1.0001);
95 static_assert((1. *
fathom).to(
meter).val == 1.852);
104 static_assert(7.92 *
inch == 1. *
link);
105 static_assert(25 *
link == 1 *
rod);
113 static_assert(std::same_as<ConvertMorePrecise<std::remove_cv_t<
decltype(
length::meter)>,
117 static_assert(std::same_as<ConvertMorePrecise<std::remove_cv_t<
decltype(
length::decimeter)>,
153 static_assert(1. *
acre == 4. *
rood);
303 static_assert(1. *
us_gal == 4.40488377086 *
liter);
constexpr auto square_mile
constexpr auto centimetre
constexpr auto hectometre
constexpr auto millimeter
constexpr auto micrometre
constexpr auto centimeter
constexpr auto nautical_mile
constexpr auto micrometer
constexpr auto femtometre
constexpr auto femtometer
constexpr auto millimetre
constexpr auto hectometer
constexpr auto barleycorn
constexpr auto us_tablespoon
constexpr auto us_oil_barrel
constexpr auto us_teaspoon
constexpr auto us_fluid_ounce
constexpr auto us_hogshead
constexpr auto hectolitre
constexpr auto cubic_yard
constexpr auto milliliter
constexpr auto centiliter
constexpr auto microlitre
constexpr auto femtoliter
constexpr auto cubic_foot
constexpr auto millilitre
constexpr auto microliter
constexpr auto hectoliter
constexpr auto femtolitre
constexpr auto centilitre
constexpr auto cubic_inch
Base namespace for units.
MTCORE_DEF_UNIT_NAME_NO_ABBREV(length, twip)
MTCORE_DEF_UNIT_NAME_DIFF_US(length, attometre, attometer, am)
MTCORE_DEF_UNIT_NAME_SYM(length, inch, in, "″")
MTCORE_DEF_UNIT_NAME(length, thou, th)
Template for storing unit names.
Represents a single unit of measurement.
#define MTCORE_DEF_UNIT_NAME_NO_ABBREV(NS, UNIT)
#define MTCORE_DEF_UNIT_NAME_SI(NS, UNIT, US_NAME, ABBREV)
#define MTCORE_DEF_UNIT_NAME_STRS(NS, UNIT, NAME, US_NAME, ABBREV, ABBREV_ASCII, ABBREV_US, SYMBOL)
#define MTCORE_DEF_UNIT_NAME(NS, UNIT, ABBREV)