41#if !defined(DISABLE_PREDEFINED_UNITS) || \
42 defined(ENABLE_PREDEFINED_VOLUME_UNITS)
43UNIT_ADD(volume, cubic_meter, cubic_meters, cu_m,
46 cubed<length::millimeter>)
47UNIT_ADD(volume, cubic_kilometer, cubic_kilometers, cu_km,
48 cubed<length::kilometer>)
51UNIT_ADD(volume, cubic_inch, cubic_inches, cu_in,
cubed<length::inches>)
52UNIT_ADD(volume, cubic_foot, cubic_feet, cu_ft,
cubed<length::feet>)
53UNIT_ADD(volume, cubic_yard, cubic_yards, cu_yd,
cubed<length::yards>)
54UNIT_ADD(volume, cubic_mile, cubic_miles, cu_mi,
cubed<length::miles>)
55UNIT_ADD(volume, gallon, gallons, gal,
unit<
std::ratio<231>, cubic_inches>)
59UNIT_ADD(volume, fluid_ounce, fluid_ounces, fl_oz,
unit<
std::ratio<1, 8>, cups>)
62 unit<
std::ratio<215042, 100>, cubic_inches>)
64UNIT_ADD(volume, cubic_fathom, cubic_fathoms, cu_fm,
cubed<length::fathom>)
66 unit<
std::ratio<1, 2>, fluid_ounces>)
67UNIT_ADD(volume, teaspoon, teaspoons, tsp,
unit<
std::ratio<1, 6>, fluid_ounces>)
68UNIT_ADD(volume, pinch, pinches, pinch,
unit<
std::ratio<1, 8>, teaspoons>)
70UNIT_ADD(volume, drop, drops, drop,
unit<
std::ratio<1, 360>, fluid_ounces>)
76UNIT_ADD(volume, shot, shots, shots,
unit<
std::ratio<3, 2>, fluid_ounces>)
82using namespace volume;
typename units::detail::cubed_impl< U >::type cubed
represents the type of class U cubed.
Definition base.h:1199
typename units::detail::prefix< std::deci, U >::type deci
Represents the type of class U with the metric 'deci' prefix appended.
Definition base.h:1488
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280
Unit Conversion Library namespace.
Definition acceleration.h:33
cubed< length::millimeter > L
Definition volume.h:49
cu_mm
Definition volume.h:45
cubed< length::millimeter > cubed< deci< length::meter > > tbsp
Definition volume.h:65
cubic_millimeters
Definition volume.h:45
cubed< length::millimeter > liter
Definition volume.h:49
cubic_millimeter
Definition volume.h:45
cubed< length::millimeter > liters
Definition volume.h:49
cubed< length::millimeter > cubed< deci< length::meter > > tablespoon
Definition volume.h:65
cubed< length::millimeter > cubed< deci< length::meter > > tablespoons
Definition volume.h:65
Class representing SI base unit types.
Definition base.h:761
Type representing an arbitrary unit.
Definition base.h:888
#define UNIT_ADD(namespaceName, nameSingular, namePlural, abbreviation,...)
Macro for generating the boiler-plate code needed for a new unit.
Definition base.h:290
#define UNIT_ADD_CATEGORY_TRAIT(unitCategory)
Macro to create the is_category_unit type trait.
Definition base.h:373
#define UNIT_ADD_WITH_METRIC_PREFIXES(namespaceName, nameSingular, namePlural, abbreviation,...)
Macro for generating the boiler-plate code needed for a new unit, including its metric prefixes from ...
Definition base.h:399