Home | Libraries | People | FAQ | More |
Absolute units (points rather than vectors).
Operations between absolute units, and relative units like temperature differences.
BOOST_UNITS_DEFINE_CONVERSION_OFFSET(From, To, type_, value_)
namespace boost { namespace units { template<typename Y> class absolute; // add a relative value to an absolute one template<typename Y> absolute< Y > operator+(const absolute< Y > & aval, const Y & rval); // add a relative value to an absolute one template<typename Y> absolute< Y > operator+(const Y & rval, const absolute< Y > & aval); // subtract a relative value from an absolute one template<typename Y> absolute< Y > operator-(const absolute< Y > & aval, const Y & rval); // subtracting two absolutes gives a difference template<typename Y> Y operator-(const absolute< Y > & aval1, const absolute< Y > & aval2); // creates a quantity from an absolute unit and a raw value template<typename D, typename S, typename T> quantity< absolute< unit< D, S > >, T > operator*(const T & t, const absolute< unit< D, S > > &); // creates a quantity from an absolute unit and a raw value template<typename D, typename S, typename T> quantity< absolute< unit< D, S > >, T > operator*(const absolute< unit< D, S > > &, const T & t); // Print an absolute unit. template<typename Char, typename Traits, typename Y> std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > & os, const absolute< Y > & aval); } }
base dimensions (mass, length, time...).
base dimension definition registration.
namespace boost { namespace units { template<typename Derived, long N> class base_dimension; } }
base unit (meter, kg, sec...).
base unit definition registration.
namespace boost { namespace units { template<typename Derived, typename Dim, long N> class base_unit; } }
Overloads of functions in <cmath> for quantities.
Only functions for which a dimensionally-correct result type can be determined are overloaded. All functions work with dimensionless quantities.
namespace boost { namespace units { template<typename Unit, typename Y> bool isfinite(const quantity< Unit, Y > & q); template<typename Unit, typename Y> bool isinf(const quantity< Unit, Y > & q); template<typename Unit, typename Y> bool isnan(const quantity< Unit, Y > & q); template<typename Unit, typename Y> bool isnormal(const quantity< Unit, Y > & q); template<typename Unit, typename Y> bool isgreater(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> bool isgreaterequal(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> bool isless(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> bool islessequal(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> bool islessgreater(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> bool isunordered(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > abs(const quantity< Unit, Y > & q); template<typename Unit, typename Y> quantity< Unit, Y > ceil(const quantity< Unit, Y > & q); template<typename Unit, typename Y> quantity< Unit, Y > copysign(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > fabs(const quantity< Unit, Y > & q); template<typename Unit, typename Y> quantity< Unit, Y > floor(const quantity< Unit, Y > & q); template<typename Unit, typename Y> quantity< Unit, Y > fdim(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > fmax(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > fmin(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> int fpclassify(const quantity< Unit, Y > & q); template<typename Unit, typename Y> root_typeof_helper< typename add_typeof_helper< typename power_typeof_helper< quantity< Unit, Y >, static_rational< 2 > >::type, typename power_typeof_helper< quantity< Unit, Y >, static_rational< 2 > >::type >::type, static_rational< 2 > >::type hypot(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > nextafter(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > nexttoward(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > round(const quantity< Unit, Y > & q); template<typename Unit, typename Y> int signbit(const quantity< Unit, Y > & q); template<typename Unit, typename Y> quantity< Unit, Y > trunc(const quantity< Unit, Y > & q); template<typename Unit, typename Y> quantity< Unit, Y > fmod(const quantity< Unit, Y > & q1, const quantity< Unit, Y > & q2); template<typename Unit, typename Y> quantity< Unit, Y > modf(const quantity< Unit, Y > & q1, quantity< Unit, Y > * q2); template<typename Unit, typename Y, typename Int> quantity< Unit, Y > frexp(const quantity< Unit, Y > & q, Int * ex); template<typename S, typename Y> quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > pow(const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > &, const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > &); template<typename S, typename Y> quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > exp(const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > & q); template<typename Unit, typename Y, typename Int> quantity< Unit, Y > ldexp(const quantity< Unit, Y > & q, const Int & ex); template<typename S, typename Y> quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > log(const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > & q); template<typename S, typename Y> quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > log10(const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y > & q); template<typename Unit, typename Y> root_typeof_helper< quantity< Unit, Y >, static_rational< 2 > >::type sqrt(const quantity< Unit, Y > & q); // cos of theta in radians template<typename Y> dimensionless_quantity< si::system, Y >::type cos(const quantity< si::plane_angle, Y > & theta); // sin of theta in radians template<typename Y> dimensionless_quantity< si::system, Y >::type sin(const quantity< si::plane_angle, Y > & theta); // tan of theta in radians template<typename Y> dimensionless_quantity< si::system, Y >::type tan(const quantity< si::plane_angle, Y > & theta); // cos of theta in other angular units template<typename System, typename Y> dimensionless_quantity< System, Y >::type cos(const quantity< unit< plane_angle_dimension, System >, Y > & theta); // sin of theta in other angular units template<typename System, typename Y> dimensionless_quantity< System, Y >::type sin(const quantity< unit< plane_angle_dimension, System >, Y > & theta); // tan of theta in other angular units template<typename System, typename Y> dimensionless_quantity< System, Y >::type tan(const quantity< unit< plane_angle_dimension, System >, Y > & theta); // acos of dimensionless quantity returning angle in same system template<typename Y, typename System> quantity< unit< plane_angle_dimension, homogeneous_system< System > >, Y > acos(const quantity< unit< dimensionless_type, homogeneous_system< System > >, Y > & val); // acos of dimensionless quantity returning angle in radians template<typename Y> quantity< angle::radian_base_unit::unit_type, Y > acos(const quantity< unit< dimensionless_type, heterogeneous_dimensionless_system >, Y > & val); // asin of dimensionless quantity returning angle in same system template<typename Y, typename System> quantity< unit< plane_angle_dimension, homogeneous_system< System > >, Y > asin(const quantity< unit< dimensionless_type, homogeneous_system< System > >, Y > & val); // asin of dimensionless quantity returning angle in radians template<typename Y> quantity< angle::radian_base_unit::unit_type, Y > asin(const quantity< unit< dimensionless_type, heterogeneous_dimensionless_system >, Y > & val); // atan of dimensionless quantity returning angle in same system template<typename Y, typename System> quantity< unit< plane_angle_dimension, homogeneous_system< System > >, Y > atan(const quantity< unit< dimensionless_type, homogeneous_system< System > >, Y > & val); // atan of dimensionless quantity returning angle in radians template<typename Y> quantity< angle::radian_base_unit::unit_type, Y > atan(const quantity< unit< dimensionless_type, heterogeneous_dimensionless_system >, Y > & val); // atan2 ofvalue_type
returning angle in radians template<typename Y, typename Dimension, typename System> quantity< unit< plane_angle_dimension, homogeneous_system< System > >, Y > atan2(const quantity< unit< Dimension, homogeneous_system< System > >, Y > & y, const quantity< unit< Dimension, homogeneous_system< System > >, Y > & x); // atan2 ofvalue_type
returning angle in radians template<typename Y, typename Dimension, typename System> quantity< angle::radian_base_unit::unit_type, Y > atan2(const quantity< unit< Dimension, heterogeneous_system< System > >, Y > & y, const quantity< unit< Dimension, heterogeneous_system< System > >, Y > & x); } }
BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY BOOST_UNITS_NO_COMPILER_CHECK BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
Template for defining conversions between quantities.
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(Source, Destination, type_, value_) BOOST_UNITS_DEFINE_CONVERSION_FACTOR_TEMPLATE(Params, Source, Destination, type_, value_) BOOST_UNITS_DEFAULT_CONVERSION(Source, Dest) BOOST_UNITS_DEFAULT_CONVERSION_TEMPLATE(Params, Source, Dest)
namespace boost { namespace units { template<typename From, typename To> struct conversion_helper; // Find the conversion factor between two units. template<typename FromUnit, typename ToUnit> unspecified conversion_factor(const FromUnit &, const ToUnit &); } }
namespace boost { namespace units { template<typename DT1 = dimensionless_type, long E1 = 0, typename DT2 = dimensionless_type, long E2 = 0, typename DT3 = dimensionless_type, long E3 = 0, typename DT4 = dimensionless_type, long E4 = 0, typename DT5 = dimensionless_type, long E5 = 0, typename DT6 = dimensionless_type, long E6 = 0, typename DT7 = dimensionless_type, long E7 = 0, typename DT8 = dimensionless_type, long E8 = 0> struct derived_dimension; } }
Handling of fundamental dimension/exponent pairs.
namespace boost { namespace units { template<typename T, typename V> struct dim; } }
Core metaprogramming utilities for compile-time dimensional analysis.
namespace boost { namespace units { template<typename Seq> struct make_dimension_list; template<typename DL, typename Ex> struct static_power; template<typename DL, typename Rt> struct static_root; } }
Utility class to simplify construction of dimensionless quantities.
namespace boost { namespace units { template<typename System, typename Y> struct dimensionless_quantity; } }
Dimension lists in which all exponents resolve to zero reduce to dimensionless_type
.
namespace boost { namespace units { struct dimensionless_type; } }
Utility class to simplify construction of dimensionless units in a system.
namespace boost { namespace units { template<typename System> struct dimensionless_unit; } }
Get the dimension of a unit, absolute unit and quantity.
namespace boost { namespace units { template<typename T> struct get_dimension; template<typename Dim, typename System> struct get_dimension<unit< Dim, System >>; template<typename Unit> struct get_dimension<absolute< Unit >>; template<typename Unit, typename Y> struct get_dimension<quantity< Unit, Y >>; } }
Get the system of a unit, absolute unit or quantity.
namespace boost { namespace units { template<typename T> struct get_system; template<typename Dim, typename System> struct get_system<unit< Dim, System >>; template<typename Unit> struct get_system<absolute< Unit >>; template<typename Unit, typename Y> struct get_system<quantity< Unit, Y >>; } }
A heterogeneous system is a sorted list of base unit/exponent pairs.
namespace boost { namespace mpl { } namespace units { template<typename T> struct heterogeneous_system; } }
namespace boost { namespace units { template<typename L> struct homogeneous_system; } }
Stream input and output for rationals, units and quantities.
Functions and manipulators for output and input of units and quantities. symbol and name format, and engineering and binary autoprefix. Serialization output is also supported.
namespace boost { namespace serialization { // Boost Serialization library support for units. template<typename Archive, typename System, typename Dim> void serialize(Archive & ar, boost::units::unit< Dim, System > &, const unsigned int); // Boost Serialization library support for quantities. template<typename Archive, typename Unit, typename Y> void serialize(Archive & ar, boost::units::quantity< Unit, Y > & q, const unsigned int); } namespace units { template<typename BaseUnit> struct base_unit_info; // format of output of units, for example "m" or "meter". enum format_mode { symbol_fmt = 0, name_fmt = 1, raw_fmt = 2, typename_fmt = 3, fmt_mask = 3 }; // automatic scaling and prefix (controlled by value of quantity) a, if any, enum autoprefix_mode { autoprefix_none = 0, autoprefix_engineering = 4, autoprefix_binary = 8, autoprefix_mask = 12 }; template<typename T> std::string to_string(const T & t); // get string representation of integral-valuedstatic_rational
. template<integer_type N> std::string to_string(const static_rational< N > &); // get string representation ofstatic_rational
. template<integer_type N, integer_type D> std::string to_string(const static_rational< N, D > &); // Writestatic_rational
tostd::basic_ostream
. template<typename Char, typename Traits, integer_type N, integer_type D> std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > & os, const static_rational< N, D > & r); // returns flags controlling output. long get_flags(std::ios_base & ios, long mask); // Set new flags controlling output format. void set_flags(std::ios_base & ios, long new_flags, long mask); // returns flags controlling output format. format_mode get_format(std::ios_base & ios); // Set new flags controlling output format. void set_format(std::ios_base & ios, format_mode new_mode); // Set new flags for type_name output format. std::ios_base & typename_format(std::ios_base & ios); // set new flag for raw format output, for example "m". std::ios_base & raw_format(std::ios_base & ios); // set new format flag for symbol output, for example "m". std::ios_base & symbol_format(std::ios_base & ios); // set new format for name output, for example "meter". std::ios_base & name_format(std::ios_base & ios); // get autoprefix flags for output. autoprefix_mode get_autoprefix(std::ios_base & ios); // Get format for output. void set_autoprefix(std::ios_base & ios, autoprefix_mode new_mode); // Clear autoprefix flags. std::ios_base & no_prefix(std::ios_base & ios); // Set flag for engineering prefix, so 1234.5 m displays as "1.2345 km". std::ios_base & engineering_prefix(std::ios_base & ios); // Set flag for binary prefix, so 1024 byte displays as "1 Kib". std::ios_base & binary_prefix(std::ios_base & ios); // ADL customization point for automatic prefixing. Returns a non-negative value. Implemented as std::abs for built-in types. template<typename T> double autoprefix_norm(const T & arg); template<typename Dimension, typename System> std::string typename_string(const unit< Dimension, System > &); template<typename Dimension, typename System> std::string symbol_string(const unit< Dimension, System > &); template<typename Dimension, typename System> std::string name_string(const unit< Dimension, System > &); template<typename Char, typename Traits, typename Dimension, typename System> std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &, const unit< Dimension, System > &); template<typename Char, typename Traits, typename Unit, typename T> std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &, const quantity< Unit, T > &); } }
Check that a type is a valid dim
.
namespace boost { namespace units { template<typename T> struct is_dim; template<typename T, typename V> struct is_dim<dim< T, V >>; } }
Check that a type is a valid dimension list.
namespace boost { namespace units { template<typename Seq> struct is_dimension_list; template<typename Item, typename Next> struct is_dimension_list<list< Item, Next >>; template<> struct is_dimension_list<dimensionless_type>; } }
Check if a unit or quantity is dimensionless.
namespace boost { namespace units { template<typename T> struct is_dimensionless; template<typename System> struct is_dimensionless<unit< dimensionless_type, System >>; template<typename Unit, typename Y> struct is_dimensionless<quantity< Unit, Y >>; } }
check that a type is a dimensionless quantity
namespace boost { namespace units { template<typename T> struct is_dimensionless_quantity; } }
Check that a type is a dimensionless unit.
namespace boost { namespace units { template<typename T> struct is_dimensionless_unit; } }
Check that a type is a quantity.
namespace boost { namespace units { template<typename T> struct is_quantity; template<typename Unit, typename Y> struct is_quantity<quantity< Unit, Y >>; } }
Check that a type is a quantity of the specified dimension.
namespace boost { namespace units { template<typename T, typename Dim> struct is_quantity_of_dimension; template<typename Unit, typename Y, typename Dim> struct is_quantity_of_dimension<quantity< Unit, Y >, Dim>; } }
Check that a type is a quantity in a specified system.
namespace boost { namespace units { template<typename T, typename System> struct is_quantity_of_system; template<typename Unit, typename Y, typename System> struct is_quantity_of_system<quantity< Unit, Y >, System>; } }
Check that a type is a unit.
namespace boost { namespace units { template<typename T> struct is_unit; template<typename Dim, typename System> struct is_unit<unit< Dim, System >>; } }
Check that a type is a unit of the specified dimension.
namespace boost { namespace units { template<typename T, typename Dim> struct is_unit_of_dimension; template<typename Dim, typename System> struct is_unit_of_dimension<unit< Dim, System >, Dim>; template<typename Dim, typename System> struct is_unit_of_dimension<absolute< unit< Dim, System > >, Dim>; } }
Check that a type is a unit in a specified system.
namespace boost { namespace units { template<typename T, typename System> struct is_unit_of_system; template<typename Dim, typename System> struct is_unit_of_system<unit< Dim, System >, System>; template<typename Dim, typename System> struct is_unit_of_system<absolute< unit< Dim, System > >, System>; } }
Definitions to ease the usage of Boost.Units' quantity, unit, and absolute types in functors created with the Boost.Lambda library.
Torsten Maehne
2008-06-16
Boost.Lambda's return type deduction system is extented to make use of Boost.Units' typeof_helper trait classes for Boost.Units' quantity, absolute, and unit template classes.
namespace boost { namespace lambda { template<typename System, typename Dim, typename Y> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::unit< Dim, System >, Y>; template<typename System, typename Dim, typename Y> struct plain_return_type_2<arithmetic_action< divide_action >, boost::units::unit< Dim, System >, Y>; template<typename System, typename Dim, typename Y> struct plain_return_type_2<arithmetic_action< multiply_action >, Y, boost::units::unit< Dim, System >>; template<typename System, typename Dim, typename Y> struct plain_return_type_2<arithmetic_action< divide_action >, Y, boost::units::unit< Dim, System >>; template<typename Unit, typename X> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::quantity< Unit, X >, X>; template<typename Unit, typename X> struct plain_return_type_2<arithmetic_action< multiply_action >, X, boost::units::quantity< Unit, X >>; template<typename Unit, typename X> struct plain_return_type_2<arithmetic_action< divide_action >, boost::units::quantity< Unit, X >, X>; template<typename Unit, typename X> struct plain_return_type_2<arithmetic_action< divide_action >, X, boost::units::quantity< Unit, X >>; template<typename System1, typename Dim1, typename Unit2, typename Y> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::unit< Dim1, System1 >, boost::units::quantity< Unit2, Y >>; template<typename System1, typename Dim1, typename Unit2, typename Y> struct plain_return_type_2<arithmetic_action< divide_action >, boost::units::unit< Dim1, System1 >, boost::units::quantity< Unit2, Y >>; template<typename Unit1, typename Y, typename System2, typename Dim2> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::quantity< Unit1, Y >, boost::units::unit< Dim2, System2 >>; template<typename Unit1, typename Y, typename System2, typename Dim2> struct plain_return_type_2<arithmetic_action< divide_action >, boost::units::quantity< Unit1, Y >, boost::units::unit< Dim2, System2 >>; template<typename Unit, typename Y> struct plain_return_type_1<unary_arithmetic_action< plus_action >, boost::units::quantity< Unit, Y >>; template<typename Unit, typename Y> struct plain_return_type_1<unary_arithmetic_action< minus_action >, boost::units::quantity< Unit, Y >>; template<typename Unit1, typename X, typename Unit2, typename Y> struct plain_return_type_2<arithmetic_action< plus_action >, boost::units::quantity< Unit1, X >, boost::units::quantity< Unit2, Y >>; template<typename System, typename X, typename Y> struct plain_return_type_2<arithmetic_action< plus_action >, boost::units::quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(System), X >, Y>; template<typename System, typename X, typename Y> struct plain_return_type_2<arithmetic_action< plus_action >, X, boost::units::quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y >>; template<typename Unit1, typename X, typename Unit2, typename Y> struct plain_return_type_2<arithmetic_action< minus_action >, boost::units::quantity< Unit1, X >, boost::units::quantity< Unit2, Y >>; template<typename System, typename X, typename Y> struct plain_return_type_2<arithmetic_action< minus_action >, boost::units::quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(System), X >, Y>; template<typename System, typename X, typename Y> struct plain_return_type_2<arithmetic_action< minus_action >, X, boost::units::quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y >>; template<typename Unit1, typename X, typename Unit2, typename Y> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::quantity< Unit1, X >, boost::units::quantity< Unit2, Y >>; template<typename Unit1, typename X, typename Unit2, typename Y> struct plain_return_type_2<arithmetic_action< divide_action >, boost::units::quantity< Unit1, X >, boost::units::quantity< Unit2, Y >>; template<typename Dim, typename System> struct plain_return_type_1<unary_arithmetic_action< plus_action >, boost::units::unit< Dim, System >>; template<typename Dim, typename System> struct plain_return_type_1<unary_arithmetic_action< minus_action >, boost::units::unit< Dim, System >>; template<typename Dim1, typename Dim2, typename System1, typename System2> struct plain_return_type_2<arithmetic_action< plus_action >, boost::units::unit< Dim1, System1 >, boost::units::unit< Dim2, System2 >>; template<typename Dim1, typename Dim2, typename System1, typename System2> struct plain_return_type_2<arithmetic_action< minus_action >, boost::units::unit< Dim1, System1 >, boost::units::unit< Dim2, System2 >>; template<typename Dim1, typename Dim2, typename System1, typename System2> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::unit< Dim1, System1 >, boost::units::unit< Dim2, System2 >>; template<typename Dim1, typename Dim2, typename System1, typename System2> struct plain_return_type_2<arithmetic_action< divide_action >, boost::units::unit< Dim1, System1 >, boost::units::unit< Dim2, System2 >>; template<typename Y> struct plain_return_type_2<arithmetic_action< plus_action >, boost::units::absolute< Y >, Y>; template<typename Y> struct plain_return_type_2<arithmetic_action< plus_action >, Y, boost::units::absolute< Y >>; template<typename Y> struct plain_return_type_2<arithmetic_action< minus_action >, boost::units::absolute< Y >, Y>; template<typename Y> struct plain_return_type_2<arithmetic_action< minus_action >, boost::units::absolute< Y >, boost::units::absolute< Y >>; template<typename D, typename S, typename T> struct plain_return_type_2<arithmetic_action< multiply_action >, T, boost::units::absolute< boost::units::unit< D, S > >>; template<typename D, typename S, typename T> struct plain_return_type_2<arithmetic_action< multiply_action >, boost::units::absolute< boost::units::unit< D, S > >, T>; } namespace units { template<typename System, typename Dim, typename Arg> struct multiply_typeof_helper<boost::units::unit< Dim, System >, boost::lambda::lambda_functor< Arg >>; template<typename System, typename Dim, typename Arg> struct divide_typeof_helper<boost::units::unit< Dim, System >, boost::lambda::lambda_functor< Arg >>; template<typename System, typename Dim, typename Arg> struct multiply_typeof_helper<boost::lambda::lambda_functor< Arg >, boost::units::unit< Dim, System >>; template<typename System, typename Dim, typename Arg> struct divide_typeof_helper<boost::lambda::lambda_functor< Arg >, boost::units::unit< Dim, System >>; template<typename System, typename Dim, typename Arg> struct multiply_typeof_helper<boost::lambda::lambda_functor< Arg >, boost::units::absolute< boost::units::unit< Dim, System > >>; template<typename System, typename Dim, typename Arg> struct multiply_typeof_helper<boost::units::absolute< boost::units::unit< Dim, System > >, boost::lambda::lambda_functor< Arg >>; template<typename System, typename Dim, typename Arg> const multiply_typeof_helper< boost::units::unit< Dim, System >, boost::lambda::lambda_functor< Arg > >::type operator*(const boost::units::unit< Dim, System > &, const boost::lambda::lambda_functor< Arg > &); template<typename System, typename Dim, typename Arg> const divide_typeof_helper< boost::units::unit< Dim, System >, boost::lambda::lambda_functor< Arg > >::type operator/(const boost::units::unit< Dim, System > &, const boost::lambda::lambda_functor< Arg > &); template<typename System, typename Dim, typename Arg> const multiply_typeof_helper< boost::lambda::lambda_functor< Arg >, boost::units::unit< Dim, System > >::type operator*(const boost::lambda::lambda_functor< Arg > &, const boost::units::unit< Dim, System > &); template<typename System, typename Dim, typename Arg> const divide_typeof_helper< boost::lambda::lambda_functor< Arg >, boost::units::unit< Dim, System > >::type operator/(const boost::lambda::lambda_functor< Arg > &, const boost::units::unit< Dim, System > &); template<typename System, typename Dim, typename Arg> const multiply_typeof_helper< boost::lambda::lambda_functor< Arg >, boost::units::absolute< boost::units::unit< Dim, System > > >::type operator*(const boost::lambda::lambda_functor< Arg > &, const boost::units::absolute< boost::units::unit< Dim, System > > &); template<typename System, typename Dim, typename Arg> const multiply_typeof_helper< boost::units::absolute< boost::units::unit< Dim, System > >, boost::lambda::lambda_functor< Arg > >::type operator*(const boost::units::absolute< boost::units::unit< Dim, System > > &, const boost::lambda::lambda_functor< Arg > &); } }
specialize std::numeric_limits for units.
namespace std { template<typename Unit, typename T> class numeric_limits<::boost::units::quantity< Unit, T >>; }
namespace boost { namespace units { template<typename Unit, typename Scale> struct make_scaled_unit; template<typename Dimension, typename UnitList, typename OldScale, typename Scale> struct make_scaled_unit<unit< Dimension, heterogeneous_system< heterogeneous_system_impl< UnitList, Dimension, OldScale > > >, Scale>; template<typename Dimension, typename UnitList, typename OldScale, long Base> struct make_scaled_unit<unit< Dimension, heterogeneous_system< heterogeneous_system_impl< UnitList, Dimension, OldScale > > >, scale< Base, static_rational< 0 > >>; } }
Metafunction returning a homogeneous system that can represent any combination of the base units.
Metafunction make_system returning a homogeneous system that can represent any combination of the base units. There must be no way to represent any of the base units in terms of the others. make_system<foot_base_unit, meter_base_unit>::type is not allowed, for example.
namespace boost { namespace units { template<typename BaseUnit0, typename BaseUnit1, typename BaseUnit2, ... , typename BaseUnitN> struct make_system; } }
Compile time operators and typeof helper classes.
These operators declare the compile-time operators needed to support dimensional analysis algebra. They require the use of Boost.Typeof, emulation or native. Typeof helper classes define result type for heterogeneous operators on value types. These must be defined through specialization for powers and roots.
namespace boost { namespace units { template<typename X> struct unary_plus_typeof_helper; template<typename X> struct unary_minus_typeof_helper; template<typename X, typename Y> struct add_typeof_helper; template<typename X, typename Y> struct subtract_typeof_helper; template<typename X, typename Y> struct multiply_typeof_helper; template<typename X, typename Y> struct divide_typeof_helper; template<typename BaseType, typename Exponent> struct power_typeof_helper; template<typename Radicand, typename Index> struct root_typeof_helper; } }
Raise values to exponents known at compile-time.
namespace boost { namespace units { template<typename Rat, typename Y> power_typeof_helper< Y, Rat >::type pow(const Y &); template<typename Rat, typename Y> root_typeof_helper< Y, Rat >::type root(const Y &); } }
namespace boost { namespace units { template<typename Unit, typename Y = double> class quantity; template<typename System, typename Y> class quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y>; template<typename Dim1, typename System1, typename Dim2, typename System2, typename X, typename Y> struct add_typeof_helper<quantity< unit< Dim1, System1 >, X >, quantity< unit< Dim2, System2 >, Y >>; template<typename Dim, typename System, typename X, typename Y> struct add_typeof_helper<quantity< unit< Dim, System >, X >, quantity< unit< Dim, System >, Y >>; template<typename Dim1, typename System1, typename Dim2, typename System2, typename X, typename Y> struct subtract_typeof_helper<quantity< unit< Dim1, System1 >, X >, quantity< unit< Dim2, System2 >, Y >>; template<typename Dim, typename System, typename X, typename Y> struct subtract_typeof_helper<quantity< unit< Dim, System >, X >, quantity< unit< Dim, System >, Y >>; // quantity_cast provides mutating access to underlying quantity value_type template<typename X, typename Y> X quantity_cast(Y & source); template<typename X, typename Y> X quantity_cast(const Y & source); // swap quantities template<typename Unit, typename Y> void swap(quantity< Unit, Y > & lhs, quantity< Unit, Y > & rhs); // runtime unit divided by scalar template<typename System, typename Dim, typename Y> divide_typeof_helper< unit< Dim, System >, Y >::type operator/(const unit< Dim, System > &, const Y & rhs); // runtime scalar times unit template<typename System, typename Dim, typename Y> multiply_typeof_helper< Y, unit< Dim, System > >::type operator*(const Y & lhs, const unit< Dim, System > &); // runtime scalar divided by unit template<typename System, typename Dim, typename Y> divide_typeof_helper< Y, unit< Dim, System > >::type operator/(const Y & lhs, const unit< Dim, System > &); // runtime quantity times scalar template<typename Unit, typename X> multiply_typeof_helper< quantity< Unit, X >, X >::type operator*(const quantity< Unit, X > & lhs, const X & rhs); // runtime scalar times quantity template<typename Unit, typename X> multiply_typeof_helper< X, quantity< Unit, X > >::type operator*(const X & lhs, const quantity< Unit, X > & rhs); // runtime quantity divided by scalar template<typename Unit, typename X> divide_typeof_helper< quantity< Unit, X >, X >::type operator/(const quantity< Unit, X > & lhs, const X & rhs); // runtime scalar divided by quantity template<typename Unit, typename X> divide_typeof_helper< X, quantity< Unit, X > >::type operator/(const X & lhs, const quantity< Unit, X > & rhs); // runtime unit times quantity template<typename System1, typename Dim1, typename Unit2, typename Y> multiply_typeof_helper< unit< Dim1, System1 >, quantity< Unit2, Y > >::type operator*(const unit< Dim1, System1 > &, const quantity< Unit2, Y > & rhs); // runtime unit divided by quantity template<typename System1, typename Dim1, typename Unit2, typename Y> divide_typeof_helper< unit< Dim1, System1 >, quantity< Unit2, Y > >::type operator/(const unit< Dim1, System1 > &, const quantity< Unit2, Y > & rhs); // runtime quantity times unit template<typename Unit1, typename System2, typename Dim2, typename Y> multiply_typeof_helper< quantity< Unit1, Y >, unit< Dim2, System2 > >::type operator*(const quantity< Unit1, Y > & lhs, const unit< Dim2, System2 > &); // runtime quantity divided by unit template<typename Unit1, typename System2, typename Dim2, typename Y> divide_typeof_helper< quantity< Unit1, Y >, unit< Dim2, System2 > >::type operator/(const quantity< Unit1, Y > & lhs, const unit< Dim2, System2 > &); // runtime unary plus quantity template<typename Unit, typename Y> unary_plus_typeof_helper< quantity< Unit, Y > >::type operator+(const quantity< Unit, Y > & val); // runtime unary minus quantity template<typename Unit, typename Y> unary_minus_typeof_helper< quantity< Unit, Y > >::type operator-(const quantity< Unit, Y > & val); // runtime quantity plus quantity template<typename Unit1, typename Unit2, typename X, typename Y> add_typeof_helper< quantity< Unit1, X >, quantity< Unit2, Y > >::type operator+(const quantity< Unit1, X > & lhs, const quantity< Unit2, Y > & rhs); // runtime quantity minus quantity template<typename Unit1, typename Unit2, typename X, typename Y> subtract_typeof_helper< quantity< Unit1, X >, quantity< Unit2, Y > >::type operator-(const quantity< Unit1, X > & lhs, const quantity< Unit2, Y > & rhs); // runtime quantity times quantity template<typename Unit1, typename Unit2, typename X, typename Y> multiply_typeof_helper< quantity< Unit1, X >, quantity< Unit2, Y > >::type operator*(const quantity< Unit1, X > & lhs, const quantity< Unit2, Y > & rhs); // runtime quantity divided by quantity template<typename Unit1, typename Unit2, typename X, typename Y> divide_typeof_helper< quantity< Unit1, X >, quantity< Unit2, Y > >::type operator/(const quantity< Unit1, X > & lhs, const quantity< Unit2, Y > & rhs); // runtime operator== template<typename Unit, typename X, typename Y> bool operator==(const quantity< Unit, X > & val1, const quantity< Unit, Y > & val2); // runtime operator!= template<typename Unit, typename X, typename Y> bool operator!=(const quantity< Unit, X > & val1, const quantity< Unit, Y > & val2); // runtime operator< template<typename Unit, typename X, typename Y> bool operator<(const quantity< Unit, X > & val1, const quantity< Unit, Y > & val2); // runtime operator<= template<typename Unit, typename X, typename Y> bool operator<=(const quantity< Unit, X > & val1, const quantity< Unit, Y > & val2); // runtime operator> template<typename Unit, typename X, typename Y> bool operator>(const quantity< Unit, X > & val1, const quantity< Unit, Y > & val2); // runtime operator>= template<typename Unit, typename X, typename Y> bool operator>=(const quantity< Unit, X > & val1, const quantity< Unit, Y > & val2); } }
Returns a unique type for every unit.
namespace boost { namespace units { template<typename Unit> struct reduce_unit; } }
10^3 Engineering & 2^10 binary scaling factors for autoprefixing.
namespace boost { namespace units { template<long Base, typename Exponent> struct scale; template<long Base, typename Exponent> std::string symbol_string(const scale< Base, Exponent > &); template<long Base, typename Exponent> std::string name_string(const scale< Base, Exponent > &); } }
namespace boost { namespace units { template<typename S, typename Scale> struct scaled_base_unit; } }
BOOST_UNITS_STATIC_CONSTANT(name, type)
Compile-time rational numbers and operators.
namespace boost {
namespace units {
template<integer_type Value> struct static_abs;
template<integer_type N, integer_type D = 1> class static_rational;
typedef long integer_type;
// get decimal value of static_rational
template<typename T, integer_type N, integer_type D>
divide_typeof_helper< T, T >::type
value(const static_rational< N, D > &);
}
}
namespace boost { namespace units { template<typename Dim, typename System, typename Enable> class unit; template<typename Dim, typename System> struct reduce_unit<unit< Dim, System >>; template<typename Dim, typename System, long N, long D> struct power_typeof_helper<unit< Dim, System >, static_rational< N, D >>; template<typename Dim, typename System, long N, long D> struct root_typeof_helper<unit< Dim, System >, static_rational< N, D >>; // unit runtime unary plus template<typename Dim, typename System> unary_plus_typeof_helper< unit< Dim, System > >::type operator+(const unit< Dim, System > &); // unit runtime unary minus template<typename Dim, typename System> unary_minus_typeof_helper< unit< Dim, System > >::type operator-(const unit< Dim, System > &); // runtime add two units template<typename Dim1, typename Dim2, typename System1, typename System2> add_typeof_helper< unit< Dim1, System1 >, unit< Dim2, System2 > >::type operator+(const unit< Dim1, System1 > &, const unit< Dim2, System2 > &); // runtime subtract two units template<typename Dim1, typename Dim2, typename System1, typename System2> subtract_typeof_helper< unit< Dim1, System1 >, unit< Dim2, System2 > >::type operator-(const unit< Dim1, System1 > &, const unit< Dim2, System2 > &); // runtime multiply two units template<typename Dim1, typename Dim2, typename System1, typename System2> multiply_typeof_helper< unit< Dim1, System1 >, unit< Dim2, System2 > >::type operator*(const unit< Dim1, System1 > &, const unit< Dim2, System2 > &); // runtime divide two units template<typename Dim1, typename Dim2, typename System1, typename System2> divide_typeof_helper< unit< Dim1, System1 >, unit< Dim2, System2 > >::type operator/(const unit< Dim1, System1 > &, const unit< Dim2, System2 > &); // unit runtimeoperator==
template<typename Dim1, typename Dim2, typename System1, typename System2> bool operator==(const unit< Dim1, System1 > &, const unit< Dim2, System2 > &); // unit runtimeoperator!=
template<typename Dim1, typename Dim2, typename System1, typename System2> bool operator!=(const unit< Dim1, System1 > &, const unit< Dim2, System2 > &); } }
Forward declarations of library components.
Forward declarations of units library - dimensions, systems, quantity and string components.
Physical dimensions according to the SI system.
This header includes all physical dimension headers for both base and derived dimensions.
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, time_base_dimension,-2 >::type absorbed_dose_dimension; // derived dimension for absorbed dose : L^2 T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 1, time_base_dimension,-2 >::type acceleration_dimension; // derived dimension for acceleration : L T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-1 >::type action_dimension; // derived dimension for action : L^2 M T^-1 } }
namespace boost { namespace units { typedef derived_dimension< time_base_dimension,-1 >::type activity_dimension; // derived dimension for activity : T^-1 } }
namespace boost { namespace units { struct amount_base_dimension; typedef amount_base_dimension::dimension_type amount_dimension; // dimension of amount of substance (N) } }
namespace boost { namespace units { typedef derived_dimension< time_base_dimension,-2, plane_angle_base_dimension, 1 >::type angular_acceleration_dimension; // derived dimension for angular acceleration : T^-2 QP } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-1, plane_angle_base_dimension,-1 >::type angular_momentum_dimension; // derived dimension for angular momentum : L^2 M T^-1 QP^-1 } }
namespace boost { namespace units { typedef derived_dimension< time_base_dimension,-1, plane_angle_base_dimension, 1 >::type angular_velocity_dimension; // derived dimension for angular velocity : T^-1 QP } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2 >::type area_dimension; // derived dimension for area : L^2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-2, mass_base_dimension,-1, time_base_dimension, 4, current_base_dimension, 2 >::type capacitance_dimension; // derived dimension for capacitance : L^-2 M^-1 T^4 I^2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-2, mass_base_dimension,-1, time_base_dimension, 3, current_base_dimension, 2 >::type conductance_dimension; // derived dimension for conductance : L^-2 M^-1 T^3 I^2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-3, mass_base_dimension,-1, time_base_dimension, 3, current_base_dimension, 2 >::type conductivity_dimension; // derived dimension for conductivity : L^-3 M^-1 T^3 I^2 } }
namespace boost { namespace units { struct current_base_dimension; typedef current_base_dimension::dimension_type current_dimension; // dimension of electric current (I) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, time_base_dimension,-2 >::type dose_equivalent_dimension; // derived dimension for dose equivalent : L^2 T^-2 } }
namespace boost { namespace units { typedef derived_dimension< mass_base_dimension, 1, length_base_dimension,-1, time_base_dimension,-1 >::type dynamic_viscosity_dimension; // derived dimension for dynamic viscosity : M L^-1 T^-1 } }
namespace boost { namespace units { typedef derived_dimension< time_base_dimension, 1, current_base_dimension, 1 >::type electric_charge_dimension; // derived dimension for electric charge : T^1 I^1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-3, current_base_dimension,-1 >::type electric_potential_dimension; // derived dimension for electric potential : L^2 M T^-3 I^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2 >::type energy_dimension; // derived dimension for energy : L^2 M T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-1, mass_base_dimension, 1, time_base_dimension,-2 >::type energy_density_dimension; // derived dimension for energy density : L^-1 M^1 T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 1, mass_base_dimension, 1, time_base_dimension,-2 >::type force_dimension; // derived dimension for force : L M T^-2 } }
namespace boost { namespace units { typedef derived_dimension< time_base_dimension,-1 >::type frequency_dimension; // derived dimension for frequency : T^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2, temperature_base_dimension,-1 >::type heat_capacity_dimension; // derived dimension for heat capacity : L^2 M T^-2 Theta^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-2, luminous_intensity_base_dimension, 1, solid_angle_base_dimension, 1 >::type illuminance_dimension; // derived dimension for illuminance : L^-2 I QS } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-3, current_base_dimension,-2 >::type impedance_dimension; // derived dimension for impedance : L^2 M T^-3 I^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2, current_base_dimension,-2 >::type inductance_dimension; // derived dimension for inductance : L^2 M T^-2 I^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, time_base_dimension,-1 >::type kinematic_viscosity_dimension; // derived dimension for kinematic viscosity : L^2 T^-1 } }
namespace boost { namespace units { struct length_base_dimension; typedef length_base_dimension::dimension_type length_dimension; // dimension of length (L) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-2, luminous_intensity_base_dimension, 1 >::type luminance_dimension; // derived dimension for luminance : L^-2 I } }
namespace boost { namespace units { typedef derived_dimension< luminous_intensity_base_dimension, 1, solid_angle_base_dimension, 1 >::type luminous_flux_dimension; // derived dimension for luminous flux : I QS } }
namespace boost { namespace units { struct luminous_intensity_base_dimension; typedef luminous_intensity_base_dimension::dimension_type luminous_intensity_dimension; // dimension of luminous intensity (J) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-1, current_base_dimension, 1 >::type magnetic_field_intensity_dimension; // derived dimension for magnetic field intensity : L^-1 I } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2, current_base_dimension,-1 >::type magnetic_flux_dimension; // derived dimension for magnetic flux : L^2 M T^-2 I^-1 } }
namespace boost { namespace units { typedef derived_dimension< mass_base_dimension, 1, time_base_dimension,-2, current_base_dimension,-1 >::type magnetic_flux_density_dimension; // derived dimension for magnetic flux density : M T^-2 I^-1 } }
namespace boost { namespace units { struct mass_base_dimension; typedef mass_base_dimension::dimension_type mass_dimension; // dimension of mass (M) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-3, mass_base_dimension, 1 >::type mass_density_dimension; // derived dimension for mass density : L^-3 M } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2, amount_base_dimension,-1 >::type molar_energy_dimension; // derived dimension for molar energy : L^2 M T^-2 N^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2, temperature_base_dimension,-1, amount_base_dimension,-1 >::type molar_heat_capacity_dimension; // derived dimension for molar heat capacity : L^2 M T^-2 Theta^-1 N^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, plane_angle_base_dimension,-2 >::type moment_of_inertia_dimension; // derived dimension for moment of inertia : L^2 M QP^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 1, mass_base_dimension, 1, time_base_dimension,-1 >::type momentum_dimension; // derived dimension for linear momentum : L M T^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 1, mass_base_dimension, 1, time_base_dimension,-2, current_base_dimension,-2 >::type permeability_dimension; // derived dimension for permeability : L M T^-2 I^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-3, mass_base_dimension,-1, time_base_dimension, 4, current_base_dimension, 2 >::type permittivity_dimension; // derived dimension for permittivity : L^-3 M^-1 T^4 I^2 } }
namespace boost { namespace units { struct plane_angle_base_dimension; typedef plane_angle_base_dimension::dimension_type plane_angle_dimension; // base dimension of plane angle (QP) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-3 >::type power_dimension; // derived dimension for power : L^2 M T^-3 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-1, mass_base_dimension, 1, time_base_dimension,-2 >::type pressure_dimension; // derived dimension for pressure : L^-1 M T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-2, mass_base_dimension,-1, time_base_dimension, 2, current_base_dimension, 2 >::type reluctance_dimension; // derived dimension for reluctance : L^-2 M^-1 T^2 I^2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-3, current_base_dimension,-2 >::type resistance_dimension; // derived dimension for resistance : L^2 M T^-3 I^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 3, mass_base_dimension, 1, time_base_dimension,-3, current_base_dimension,-2 >::type resistivity_dimension; // derived dimension for resistivity : L^3 M T^-3 I^-2 } }
namespace boost { namespace units { struct solid_angle_base_dimension; typedef solid_angle_base_dimension::dimension_type solid_angle_dimension; // base dimension of solid angle (QS) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, time_base_dimension,-2 >::type specific_energy_dimension; // derived dimension for specific energy : L^2 T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, time_base_dimension,-2, temperature_base_dimension,-1 >::type specific_heat_capacity_dimension; // derived dimension for specific heat capacity : L^2 T^-2 Theta^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 3, mass_base_dimension,-1 >::type specific_volume_dimension; // derived dimension for specific volume : L^3 M^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-1, mass_base_dimension, 1, time_base_dimension,-2 >::type stress_dimension; // derived dimension for stress : L^-1 M T^-2 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-2, mass_base_dimension, 1 >::type surface_density_dimension; // derived dimension for surface density : L^-2 M } }
namespace boost { namespace units { typedef derived_dimension< mass_base_dimension, 1, time_base_dimension,-2 >::type surface_tension_dimension; // derived dimension for surface tension : M T^-2 } }
namespace boost { namespace units { struct temperature_base_dimension; typedef temperature_base_dimension::dimension_type temperature_dimension; // dimension of temperature (Theta) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 1, mass_base_dimension, 1, time_base_dimension,-3, temperature_base_dimension,-1 >::type thermal_conductivity_dimension; // derived dimension for thermal_conductivity : L^1 M^1 T^-3 Theta^-1 } }
namespace boost { namespace units { struct time_base_dimension; typedef time_base_dimension::dimension_type time_dimension; // dimension of time (T) } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 2, mass_base_dimension, 1, time_base_dimension,-2, plane_angle_base_dimension,-1 >::type torque_dimension; // derived dimension for torque : L^2 M T^-2 QP^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 1, time_base_dimension,-1 >::type velocity_dimension; // derived dimension for velocity : L T^-1 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension, 3 >::type volume_dimension; // derived dimension for volume : l^3 } }
namespace boost { namespace units { typedef derived_dimension< length_base_dimension,-1 >::type wavenumber_dimension; // derived dimension for wavenumber : L^-1 } }
Includes all the si unit headers
namespace boost { namespace units { namespace si { typedef unit< absorbed_dose_dimension, si::system > absorbed_dose; static const absorbed_dose gray; static const absorbed_dose grays; } } }
namespace boost { namespace units { namespace si { typedef unit< acceleration_dimension, si::system > acceleration; static const acceleration meter_per_second_squared; static const acceleration meters_per_second_squared; static const acceleration metre_per_second_squared; static const acceleration metres_per_second_squared; } } }
namespace boost { namespace units { namespace si { typedef unit< action_dimension, si::system > action; } } }
namespace boost { namespace units { namespace si { typedef unit< activity_dimension, si::system > activity; static const activity becquerel; static const activity becquerels; } } }
namespace boost { namespace units { namespace si { typedef unit< amount_dimension, si::system > amount; static const amount mole; static const amount moles; } } }
namespace boost { namespace units { namespace si { typedef unit< angular_acceleration_dimension, si::system > angular_acceleration; } } }
namespace boost { namespace units { namespace si { typedef unit< angular_momentum_dimension, si::system > angular_momentum; } } }
namespace boost { namespace units { namespace si { typedef unit< angular_velocity_dimension, si::system > angular_velocity; static const angular_velocity radian_per_second; static const angular_velocity radians_per_second; } } }
namespace boost { namespace units { namespace si { typedef unit< area_dimension, si::system > area; static const area square_meter; static const area square_meters; static const area square_metre; static const area square_metres; } } }
namespace boost { namespace units { namespace si { typedef make_system< meter_base_unit, kilogram_base_unit, second_base_unit, ampere_base_unit, kelvin_base_unit, mole_base_unit, candela_base_unit, angle::radian_base_unit, angle::steradian_base_unit >::type system; // placeholder class defining si unit system typedef unit< dimensionless_type, system > dimensionless; // dimensionless si unit } } }
namespace boost { namespace units { namespace si { typedef unit< capacitance_dimension, si::system > capacitance; static const capacitance farad; static const capacitance farads; } } }
namespace boost { namespace units { namespace si { typedef derived_dimension< time_base_dimension,-1, amount_base_dimension, 1 >::type catalytic_activity_dim; // catalytic activity : T^-1 A^1 typedef unit< si::catalytic_activity_dim, si::system > catalytic_activity; static const catalytic_activity katal; static const catalytic_activity katals; } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha, quantity< mass >, 6.64465620e-27 *, 3.3e-34 *); // alpha-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_e, quantity< dimensionless >, 7294.2995365 * dimensionless, 3.1e-6 * dimensionless); // alpha-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_p, quantity< dimensionless >, 3.97259968951 * dimensionless, 4.1e-10 * dimensionless); // alpha molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_alpha, quantity< mass_over_amount >, 4.001506179127e-3 *kilograms/ mole, 6.2e-14 *kilograms/ mole); } } } } }
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(alpha, quantity< dimensionless >, 7.2973525376e-3 *, 5.0e-12 *); // Rydberg constant. BOOST_UNITS_PHYSICAL_CONSTANT(R_infinity, quantity< wavenumber >, 10973731.568527/ meter, 7.3e-5/ meter); // Bohr radius. BOOST_UNITS_PHYSICAL_CONSTANT(a_0, quantity< length >, 0.52917720859e-10 * meters, 3.6e-20 * meters); // Hartree energy. BOOST_UNITS_PHYSICAL_CONSTANT(E_h, quantity< energy >, 4.35974394e-18 * joules, 2.2e-25 * joules); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_d, quantity< mass >, 3.34358320e-27 *, 1.7e-34 *); // deuteron-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_e, quantity< dimensionless >, 3670.4829654 * dimensionless, 1.6e-6 * dimensionless); // deuteron-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_p, quantity< dimensionless >, 1.99900750108 * dimensionless, 2.2e-10 * dimensionless); // deuteron molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_d, quantity< mass_over_amount >, 2.013553212724e-3 *kilograms/ mole, 7.8e-14 *kilograms/ mole); // deuteron rms charge radius BOOST_UNITS_PHYSICAL_CONSTANT(R_d, quantity< length >, 2.1402e-15 * meters, 2.8e-18 * meters); // deuteron magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_d, quantity< energy_over_magnetic_flux_density >, 0.433073465e-26 *joules/ tesla, 1.1e-34 *joules/ tesla); // deuteron-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_B, quantity< dimensionless >, 0.4669754556e-3 * dimensionless, 3.9e-12 * dimensionless); // deuteron-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_N, quantity< dimensionless >, 0.8574382308 * dimensionless, 7.2e-9 * dimensionless); // deuteron g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_d, quantity< dimensionless >, 0.8574382308 * dimensionless, 7.2e-9 * dimensionless); // deuteron-electron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_e, quantity< dimensionless >, -4.664345537e-4 * dimensionless, 3.9e-12 * dimensionless); // deuteron-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_p, quantity< dimensionless >, 0.3070122070 * dimensionless, 2.4e-9 * dimensionless); // deuteron-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_n, quantity< dimensionless >, -0.44820652 * dimensionless, 1.1e-7 * dimensionless); } } } } }
CODATA recommended values of fundamental electromagnetic constants.
CODATA recommended values of the fundamental physical constants: NIST SP 961 CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { // elementary charge BOOST_UNITS_PHYSICAL_CONSTANT(e, quantity< electric_charge >, 1.602176487e-19 * coulombs, 4.0e-27 * coulombs); // elementary charge to Planck constant ratio BOOST_UNITS_PHYSICAL_CONSTANT(e_over_h, quantity< current_over_energy >, 2.417989454e14 *amperes/ joule, 6.0e6 *amperes/ joule); // magnetic flux quantum BOOST_UNITS_PHYSICAL_CONSTANT(Phi_0, quantity< magnetic_flux >, 2.067833667e-15 * webers, 5.2e-23 * webers); // conductance quantum BOOST_UNITS_PHYSICAL_CONSTANT(G_0, quantity< conductance >, 7.7480917004e-5 * siemens, 5.3e-14 * siemens); // Josephson constant. BOOST_UNITS_PHYSICAL_CONSTANT(K_J, quantity< frequency_over_electric_potential >, 483597.891e9 *hertz/ volt, 1.2e7 *hertz/ volt); // von Klitzing constant BOOST_UNITS_PHYSICAL_CONSTANT(R_K, quantity< resistance >, 25812.807557 * ohms, 1.77e-5 * ohms); // Bohr magneton. BOOST_UNITS_PHYSICAL_CONSTANT(mu_B, quantity< energy_over_magnetic_flux_density >, 927.400915e-26 *joules/ tesla, 2.3e-31 *joules/ tesla); // nuclear magneton BOOST_UNITS_PHYSICAL_CONSTANT(mu_N, quantity< energy_over_magnetic_flux_density >, 5.05078324e-27 *joules/ tesla, 1.3e-34 *joules/ tesla); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_e, quantity< mass >, 9.10938215e-31 *, 4.5e-38 *); // electron-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_mu, quantity< dimensionless >, 4.83633171e-3 * dimensionless, 1.2e-10 * dimensionless); // electron-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_tau, quantity< dimensionless >, 2.87564e-4 * dimensionless, 4.7e-8 * dimensionless); // electron-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_p, quantity< dimensionless >, 5.4461702177e-4 * dimensionless, 2.4e-13 * dimensionless); // electron-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_n, quantity< dimensionless >, 5.4386734459e-4 * dimensionless, 3.3e-13 * dimensionless); // electron-deuteron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_d, quantity< dimensionless >, 2.7244371093e-4 * dimensionless, 1.2e-13 * dimensionless); // electron-alpha particle mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_alpha, quantity< dimensionless >, 1.37093355570e-4 * dimensionless, 5.8e-14 * dimensionless); // electron charge to mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_e, quantity< electric_charge_over_mass >, 1.758820150e11 *coulombs/ kilogram, 4.4e3 *coulombs/ kilogram); // electron molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_e, quantity< mass_over_amount >, 5.4857990943e-7 *kilograms/ mole, 2.3e-16 *kilograms/ mole); // Compton wavelength. BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C, quantity< length >, 2.4263102175e-12 * meters, 3.3e-21 * meters); // classical electron radius BOOST_UNITS_PHYSICAL_CONSTANT(r_e, quantity< length >, 2.8179402894e-15 * meters, 5.8e-24 * meters); // Thompson cross section. BOOST_UNITS_PHYSICAL_CONSTANT(sigma_e, quantity< area >, 0.6652458558e-28 * square_meters, 2.7e-37 * square_meters); // electron magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_e, quantity< energy_over_magnetic_flux_density >, -928.476377e-26 *joules/ tesla, 2.3e-31 *joules/ tesla); // electron-Bohr magenton moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_B, quantity< dimensionless >, -1.00115965218111 * dimensionless, 7.4e-13 * dimensionless); // electron-nuclear magneton moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_N, quantity< dimensionless >, -183.28197092 * dimensionless, 8.0e-7 * dimensionless); // electron magnetic moment anomaly BOOST_UNITS_PHYSICAL_CONSTANT(a_e, quantity< dimensionless >, 1.15965218111e-3 * dimensionless, 7.4e-13 * dimensionless); // electron g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_e, quantity< dimensionless >, -2.0023193043622 * dimensionless, 1.5e-12 * dimensionless); // electron-muon magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_mu, quantity< dimensionless >, 206.7669877 * dimensionless, 5.2e-6 * dimensionless); // electron-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p, quantity< dimensionless >, -658.2106848 * dimensionless, 5.4e-6 * dimensionless); // electron-shielded proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p_prime, quantity< dimensionless >, -658.2275971 * dimensionless, 7.2e-6 * dimensionless); // electron-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_n, quantity< dimensionless >, 960.92050 * dimensionless, 2.3e-4 * dimensionless); // electron-deuteron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_d, quantity< dimensionless >, -2143.923498 * dimensionless, 1.8e-5 * dimensionless); // electron-shielded helion magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_h_prime, quantity< dimensionless >, 864.058257 * dimensionless, 1.0e-5 * dimensionless); // electron gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_e, quantity< frequency_over_magnetic_flux_density >, 1.760859770e11/second/ tesla, 4.4e3/second/ tesla); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_h, quantity< mass >, 5.00641192e-27 *, 2.5e-34 *); // helion-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_e, quantity< dimensionless >, 5495.8852765 * dimensionless, 5.2e-6 * dimensionless); // helion-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_p, quantity< dimensionless >, 2.9931526713 * dimensionless, 2.6e-9 * dimensionless); // helion molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_h, quantity< mass_over_amount >, 3.0149322473e-3 *kilograms/ mole, 2.6e-12 *kilograms/ mole); // helion shielded magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime, quantity< energy_over_magnetic_flux_density >, -1.074552982e-26 *joules/ tesla, 3.0e-34 *joules/ tesla); // shielded helion-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_B, quantity< dimensionless >, -1.158671471e-3 * dimensionless, 1.4e-11 * dimensionless); // shielded helion-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_N, quantity< dimensionless >, -2.127497718 * dimensionless, 2.5e-8 * dimensionless); // shielded helion-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p, quantity< dimensionless >, -0.761766558 * dimensionless, 1.1e-8 * dimensionless); // shielded helion-shielded proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p_prime, quantity< dimensionless >, -0.7617861313 * dimensionless, 3.3e-8 * dimensionless); // shielded helion gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_h_prime, quantity< frequency_over_magnetic_flux_density >, 2.037894730e8/second/ tesla, 5.6e-0/second/ tesla); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_mu, quantity< mass >, 1.88353130e-28 *, 1.1e-35 *); // muon-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_e, quantity< dimensionless >, 206.7682823 * dimensionless, 5.2e-6 * dimensionless); // muon-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_tau, quantity< dimensionless >, 5.94592e-2 * dimensionless, 9.7e-6 * dimensionless); // muon-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_p, quantity< dimensionless >, 0.1126095261 * dimensionless, 2.9e-9 * dimensionless); // muon-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_n, quantity< dimensionless >, 0.1124545167 * dimensionless, 2.9e-9 * dimensionless); // muon molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_mu, quantity< mass_over_amount >, 0.1134289256e-3 *kilograms/ mole, 2.9e-12 *kilograms/ mole); // muon Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_mu, quantity< length >, 11.73444104e-15 * meters, 3.0e-22 * meters); // muon magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu, quantity< energy_over_magnetic_flux_density >, -4.49044786e-26 *joules/ tesla, 1.6e-33 *joules/ tesla); // muon-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_B, quantity< dimensionless >, -4.84197049e-3 * dimensionless, 1.2e-10 * dimensionless); // muon-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_N, quantity< dimensionless >, -8.89059705 * dimensionless, 2.3e-7 * dimensionless); // muon magnetic moment anomaly BOOST_UNITS_PHYSICAL_CONSTANT(a_mu, quantity< dimensionless >, 1.16592069e-3 * dimensionless, 6.0e-10 * dimensionless); // muon g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_mu, quantity< dimensionless >, -2.0023318414 * dimensionless, 1.2e-9 * dimensionless); // muon-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_p, quantity< dimensionless >, -3.183345137 * dimensionless, 8.5e-8 * dimensionless); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_n, quantity< mass >, 1.674927211e-27 *, 8.4e-35 *); // neutron-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_e, quantity< dimensionless >, 1838.6836605 * dimensionless, 1.1e-6 * dimensionless); // neutron-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_mu, quantity< dimensionless >, 8.89248409 * dimensionless, 2.3e-7 * dimensionless); // neutron-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_tau, quantity< dimensionless >, 0.528740 * dimensionless, 8.6e-5 * dimensionless); // neutron-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_p, quantity< dimensionless >, 1.00137841918 * dimensionless, 4.6e-10 * dimensionless); // neutron molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_n, quantity< mass_over_amount >, 1.00866491597e-3 *kilograms/ mole, 4.3e-13 *kilograms/ mole); // neutron Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_n, quantity< length >, 1.3195908951e-15 * meters, 2.0e-24 * meters); // neutron magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_n, quantity< energy_over_magnetic_flux_density >, -0.96623641e-26 *joules/ tesla, 2.3e-33 *joules/ tesla); // neutron g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_n, quantity< dimensionless >, -3.82608545 * dimensionless, 9.0e-7 * dimensionless); // neutron-electron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_e, quantity< dimensionless >, 1.04066882e-3 * dimensionless, 2.5e-10 * dimensionless); // neutron-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p, quantity< dimensionless >, -0.68497934 * dimensionless, 1.6e-7 * dimensionless); // neutron-shielded proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p_prime, quantity< dimensionless >, -0.68499694 * dimensionless, 1.6e-7 * dimensionless); // neutron gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_n, quantity< frequency_over_magnetic_flux_density >, 1.83247185e8/second/ tesla, 4.3e1/second/ tesla); } } } } }
CODATA recommended values of fundamental physico-chemical constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { // Avogadro constant. BOOST_UNITS_PHYSICAL_CONSTANT(N_A, quantity< inverse_amount >, 6.02214179e23/ mole, 3.0e16/ mole); // atomic mass constant BOOST_UNITS_PHYSICAL_CONSTANT(m_u, quantity< mass >, 1.660538782e-27 * kilograms, 8.3e-35 * kilograms); // Faraday constant. BOOST_UNITS_PHYSICAL_CONSTANT(F, quantity< electric_charge_over_amount >, 96485.3399 *coulombs/ mole, 2.4e-3 *coulombs/ mole); // molar gas constant BOOST_UNITS_PHYSICAL_CONSTANT(R, quantity< energy_over_temperature_amount >, 8.314472 *joules/kelvin/ mole, 1.5e-5 *joules/kelvin/ mole); // Boltzmann constant. BOOST_UNITS_PHYSICAL_CONSTANT(k_B, quantity< energy_over_temperature >, 1.3806504e-23 *joules/ kelvin, 2.4e-29 *joules/ kelvin); // Stefan-Boltzmann constant. BOOST_UNITS_PHYSICAL_CONSTANT(sigma_SB, quantity< power_over_area_temperature_4 >, 5.670400e-8 *watts/square_meter/pow< 4 >, 4.0e-13 *watts/square_meter/pow< 4 >); // first radiation constant BOOST_UNITS_PHYSICAL_CONSTANT(c_1, quantity< power_area >, 3.74177118e-16 *watt * square_meters, 1.9e-23 *watt * square_meters); // first radiation constant for spectral radiance BOOST_UNITS_PHYSICAL_CONSTANT(c_1L, quantity< power_area_over_solid_angle >, 1.191042759e-16 *watt *square_meters/ steradian, 5.9e-24 *watt *square_meters/ steradian); // second radiation constant BOOST_UNITS_PHYSICAL_CONSTANT(c_2, quantity< length_temperature >, 1.4387752e-2 *meter * kelvin, 2.5e-8 *meter * kelvin); // Wien displacement law constant : lambda_max T. BOOST_UNITS_PHYSICAL_CONSTANT(b, quantity< length_temperature >, 2.8977685e-3 *meter * kelvin, 5.1e-9 *meter * kelvin); // Wien displacement law constant : nu_max/T. BOOST_UNITS_PHYSICAL_CONSTANT(b_prime, quantity< frequency_over_temperature >, 5.878933e10 *hertz/ kelvin, 1.0e15 *hertz/ kelvin); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_p, quantity< mass >, 1.672621637e-27 *, 8.3e-35 *); // proton-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_e, quantity< dimensionless >, 1836.15267247 * dimensionless, 8.0e-7 * dimensionless); // proton-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_mu, quantity< dimensionless >, 8.88024339 * dimensionless, 2.3e-7 * dimensionless); // proton-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_tau, quantity< dimensionless >, 0.528012 * dimensionless, 8.6e-5 * dimensionless); // proton-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_n, quantity< dimensionless >, 0.99862347824 * dimensionless, 4.6e-10 * dimensionless); // proton charge to mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_p, quantity< electric_charge_over_mass >, 9.57883392e7 *coulombs/ kilogram, 2.4e0 *coulombs/ kilogram); // proton molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_p, quantity< mass_over_amount >, 1.00727646677e-3 *kilograms/ mole, 1.0e-13 *kilograms/ mole); // proton Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_p, quantity< length >, 1.3214098446e-15 * meters, 1.9e-24 * meters); // proton rms charge radius BOOST_UNITS_PHYSICAL_CONSTANT(R_p, quantity< length >, 0.8768e-15 * meters, 6.9e-18 * meters); // proton magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_p, quantity< energy_over_magnetic_flux_density >, 1.410606662e-26 *joules/ tesla, 3.7e-34 *joules/ tesla); // proton-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_B, quantity< dimensionless >, 1.521032209e-3 * dimensionless, 1.2e-11 * dimensionless); // proton-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_N, quantity< dimensionless >, 2.792847356 * dimensionless, 2.3e-8 * dimensionless); // proton g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_p, quantity< dimensionless >, 5.585694713 * dimensionless, 4.6e-8 * dimensionless); // proton-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_n, quantity< dimensionless >, -1.45989806 * dimensionless, 3.4e-7 * dimensionless); // shielded proton magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime, quantity< energy_over_magnetic_flux_density >, 1.410570419e-26 *joules/ tesla, 3.8e-34 *joules/ tesla); // shielded proton-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_B, quantity< dimensionless >, 1.520993128e-3 * dimensionless, 1.7e-11 * dimensionless); // shielded proton-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_N, quantity< dimensionless >, 2.792775598 * dimensionless, 3.0e-8 * dimensionless); // proton magnetic shielding correction BOOST_UNITS_PHYSICAL_CONSTANT(sigma_p_prime, quantity< dimensionless >, 25.694e-6 * dimensionless, 1.4e-8 * dimensionless); // proton gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p, quantity< frequency_over_magnetic_flux_density >, 2.675222099e8/second/ tesla, 7.0e0/second/ tesla); // shielded proton gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p_prime, quantity< frequency_over_magnetic_flux_density >, 2.675153362e8/second/ tesla, 7.3e0/second/ tesla); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_tau, quantity< mass >, 3.16777e-27 *, 5.2e-31 *); // tau-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_e, quantity< dimensionless >, 3477.48 * dimensionless, 5.7e-1 * dimensionless); // tau-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_mu, quantity< dimensionless >, 16.8183 * dimensionless, 2.7e-3 * dimensionless); // tau-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_p, quantity< dimensionless >, 1.89390 * dimensionless, 3.1e-4 * dimensionless); // tau-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_n, quantity< dimensionless >, 1.89129 * dimensionless, 3.1e-4 * dimensionless); // tau molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_tau, quantity< mass_over_amount >, 1.90768e-3 *kilograms/ mole, 3.1e-7 *kilograms/ mole); // tau Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_tau, quantity< length >, 0.69772e-15 * meters, 1.1e-19 * meters); } } } } }
CODATA recommended values of fundamental atomic and nuclear constants CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(m_t, quantity< mass >, 5.00735588e-27 *, 2.5e-34 *); // triton-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_e, quantity< dimensionless >, 5496.9215269 * dimensionless, 5.1e-6 * dimensionless); // triton-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_p, quantity< dimensionless >, 2.9937170309 * dimensionless, 2.5e-9 * dimensionless); // triton molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_t, quantity< mass_over_amount >, 3.0155007134e-3 *kilograms/ mole, 2.5e-12 *kilograms/ mole); // triton magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_t, quantity< energy_over_magnetic_flux_density >, 1.504609361e-26 *joules/ tesla, 4.2e-34 *joules/ tesla); // triton-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_B, quantity< dimensionless >, 1.622393657e-3 * dimensionless, 2.1e-11 * dimensionless); // triton-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_N, quantity< dimensionless >, 2.978962448 * dimensionless, 3.8e-8 * dimensionless); // triton g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_t, quantity< dimensionless >, 5.957924896 * dimensionless, 7.6e-8 * dimensionless); // triton-electron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_e, quantity< dimensionless >, -1.620514423e-3 * dimensionless, 2.1e-11 * dimensionless); // triton-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_p, quantity< dimensionless >, 1.066639908 * dimensionless, 1.0e-8 * dimensionless); // triton-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_n, quantity< dimensionless >, -1.55718553 * dimensionless, 3.7e-7 * dimensionless); } } } } }
namespace boost { namespace units { namespace si { namespace constants { namespace codata { typedef divide_typeof_helper< frequency, electric_potential >::type frequency_over_electric_potential; typedef divide_typeof_helper< electric_charge, mass >::type electric_charge_over_mass; typedef divide_typeof_helper< mass, amount >::type mass_over_amount; typedef divide_typeof_helper< energy, magnetic_flux_density >::type energy_over_magnetic_flux_density; typedef divide_typeof_helper< frequency, magnetic_flux_density >::type frequency_over_magnetic_flux_density; typedef divide_typeof_helper< current, energy >::type current_over_energy; typedef divide_typeof_helper< dimensionless, amount >::type inverse_amount; typedef divide_typeof_helper< energy, temperature >::type energy_over_temperature; typedef divide_typeof_helper< energy_over_temperature, amount >::type energy_over_temperature_amount; typedef divide_typeof_helper< divide_typeof_helper< power, area >::type, power_typeof_helper< temperature, static_rational< 4 > >::type >::type power_over_area_temperature_4; typedef multiply_typeof_helper< power, area >::type power_area; typedef divide_typeof_helper< power_area, solid_angle >::type power_area_over_solid_angle; typedef multiply_typeof_helper< length, temperature >::type length_temperature; typedef divide_typeof_helper< frequency, temperature >::type frequency_over_temperature; typedef divide_typeof_helper< divide_typeof_helper< force, current >::type, current >::type force_over_current_squared; typedef divide_typeof_helper< capacitance, length >::type capacitance_over_length; typedef divide_typeof_helper< divide_typeof_helper< divide_typeof_helper< volume, mass >::type, time >::type, time >::type volume_over_mass_time_squared; typedef multiply_typeof_helper< energy, time >::type energy_time; typedef divide_typeof_helper< electric_charge, amount >::type electric_charge_over_amount; } } } } }
CODATA recommended values of fundamental universal constants using CODATA 2006 values as of 2007/03/30
namespace boost { namespace units { namespace si { namespace constants { namespace codata { BOOST_UNITS_PHYSICAL_CONSTANT(c, quantity< velocity >, 299792458.0 *meters/, 0.0 *meters/); // magnetic constant (exactly 4 pi x 10^(-7) - error is due to finite precision of pi) BOOST_UNITS_PHYSICAL_CONSTANT(mu_0, quantity< force_over_current_squared >, 12.56637061435917295385057353311801153679e-7 *newtons/ampere/ ampere, 0.0 *newtons/ampere/ ampere); // electric constant BOOST_UNITS_PHYSICAL_CONSTANT(epsilon_0, quantity< capacitance_over_length >, 8.854187817620389850536563031710750260608e-12 *farad/ meter, 0.0 *farad/ meter); // characteristic impedance of vacuum BOOST_UNITS_PHYSICAL_CONSTANT(Z_0, quantity< resistance >, 376.7303134617706554681984004203193082686 * ohm, 0.0 * ohm); // Newtonian constant of gravitation. BOOST_UNITS_PHYSICAL_CONSTANT(G, quantity< volume_over_mass_time_squared >, 6.67428e-11 *cubic_meters/kilogram/second/ second, 6.7e-15 *cubic_meters/kilogram/second/ second); // Planck constant. BOOST_UNITS_PHYSICAL_CONSTANT(h, quantity< energy_time >, 6.62606896e-34 *joule * seconds, 3.3e-41 *joule * seconds); // Dirac constant. BOOST_UNITS_PHYSICAL_CONSTANT(hbar, quantity< energy_time >, 1.054571628e-34 *joule * seconds, 5.3e-42 *joule * seconds); // Planck mass. BOOST_UNITS_PHYSICAL_CONSTANT(m_P, quantity< mass >, 2.17644e-8 * kilograms, 1.1e-12 * kilograms); // Planck temperature. BOOST_UNITS_PHYSICAL_CONSTANT(T_P, quantity< temperature >, 1.416785e32 * kelvin, 7.1e27 * kelvin); // Planck length. BOOST_UNITS_PHYSICAL_CONSTANT(l_P, quantity< length >, 1.616252e-35 * meters, 8.1e-40 * meters); // Planck time. BOOST_UNITS_PHYSICAL_CONSTANT(t_P, quantity< time >, 5.39124e-44 * seconds, 2.7e-48 * seconds); } } } } }
namespace boost { namespace units { namespace si { typedef unit< conductance_dimension, si::system > conductance; static const conductance siemen; static const conductance siemens; static const conductance mho; static const conductance mhos; } } }
namespace boost { namespace units { namespace si { typedef unit< conductivity_dimension, si::system > conductivity; } } }
namespace boost { namespace units { namespace si { typedef unit< current_dimension, si::system > current; static const current ampere; static const current amperes; } } }
namespace boost { namespace units { namespace si { typedef unit< dose_equivalent_dimension, si::system > dose_equivalent; static const dose_equivalent sievert; static const dose_equivalent sieverts; } } }
namespace boost { namespace units { namespace si { typedef unit< dynamic_viscosity_dimension, si::system > dynamic_viscosity; } } }
namespace boost { namespace units { namespace si { typedef unit< electric_charge_dimension, si::system > electric_charge; static const electric_charge coulomb; static const electric_charge coulombs; } } }
namespace boost { namespace units { namespace si { typedef unit< electric_potential_dimension, si::system > electric_potential; static const electric_potential volt; static const electric_potential volts; } } }
namespace boost { namespace units { namespace si { typedef unit< energy_dimension, si::system > energy; static const energy joule; static const energy joules; } } }
namespace boost { namespace units { namespace si { typedef unit< force_dimension, si::system > force; static const force newton; static const force newtons; } } }
namespace boost { namespace units { namespace si { typedef unit< frequency_dimension, si::system > frequency; static const frequency hertz; } } }
namespace boost { namespace units { namespace si { typedef unit< illuminance_dimension, si::system > illuminance; static const illuminance lux; } } }
namespace boost { namespace units { namespace si { typedef unit< impedance_dimension, si::system > impedance; } } }
namespace boost { namespace units { namespace si { typedef unit< inductance_dimension, si::system > inductance; static const inductance henry; static const inductance henrys; } } }
namespace boost { namespace units { std::string name_string(const reduce_unit< si::absorbed_dose >::type &); std::string symbol_string(const reduce_unit< si::absorbed_dose >::type &); std::string name_string(const reduce_unit< si::capacitance >::type &); std::string symbol_string(const reduce_unit< si::capacitance >::type &); std::string name_string(const reduce_unit< si::catalytic_activity >::type &); std::string symbol_string(const reduce_unit< si::catalytic_activity >::type &); std::string name_string(const reduce_unit< si::conductance >::type &); std::string symbol_string(const reduce_unit< si::conductance >::type &); std::string name_string(const reduce_unit< si::electric_charge >::type &); std::string symbol_string(const reduce_unit< si::electric_charge >::type &); std::string name_string(const reduce_unit< si::electric_potential >::type &); std::string symbol_string(const reduce_unit< si::electric_potential >::type &); std::string name_string(const reduce_unit< si::energy >::type &); std::string symbol_string(const reduce_unit< si::energy >::type &); std::string name_string(const reduce_unit< si::force >::type &); std::string symbol_string(const reduce_unit< si::force >::type &); std::string name_string(const reduce_unit< si::frequency >::type &); std::string symbol_string(const reduce_unit< si::frequency >::type &); std::string name_string(const reduce_unit< si::illuminance >::type &); std::string symbol_string(const reduce_unit< si::illuminance >::type &); std::string name_string(const reduce_unit< si::inductance >::type &); std::string symbol_string(const reduce_unit< si::inductance >::type &); std::string name_string(const reduce_unit< si::luminous_flux >::type &); std::string symbol_string(const reduce_unit< si::luminous_flux >::type &); std::string name_string(const reduce_unit< si::magnetic_flux >::type &); std::string symbol_string(const reduce_unit< si::magnetic_flux >::type &); std::string name_string(const reduce_unit< si::magnetic_flux_density >::type &); std::string symbol_string(const reduce_unit< si::magnetic_flux_density >::type &); std::string name_string(const reduce_unit< si::power >::type &); std::string symbol_string(const reduce_unit< si::power >::type &); std::string name_string(const reduce_unit< si::pressure >::type &); std::string symbol_string(const reduce_unit< si::pressure >::type &); std::string name_string(const reduce_unit< si::resistance >::type &); std::string symbol_string(const reduce_unit< si::resistance >::type &); } }
namespace boost { namespace units { namespace si { typedef unit< kinematic_viscosity_dimension, si::system > kinematic_viscosity; } } }
namespace boost { namespace units { namespace si { typedef unit< length_dimension, si::system > length; static const length meter; static const length meters; static const length metre; static const length metres; } } }
namespace boost { namespace units { namespace si { typedef unit< luminous_flux_dimension, si::system > luminous_flux; static const luminous_flux lumen; static const luminous_flux lumens; } } }
namespace boost { namespace units { namespace si { typedef unit< luminous_intensity_dimension, si::system > luminous_intensity; static const luminous_intensity candela; static const luminous_intensity candelas; } } }
namespace boost { namespace units { namespace si { typedef unit< magnetic_field_intensity_dimension, si::system > magnetic_field_intensity; } } }
namespace boost { namespace units { namespace si { typedef unit< magnetic_flux_dimension, si::system > magnetic_flux; static const magnetic_flux weber; static const magnetic_flux webers; } } }
namespace boost { namespace units { namespace si { typedef unit< magnetic_flux_density_dimension, si::system > magnetic_flux_density; static const magnetic_flux_density tesla; static const magnetic_flux_density teslas; } } }
namespace boost { namespace units { namespace si { typedef unit< mass_dimension, si::system > mass; static const mass kilogram; static const mass kilograms; static const mass kilogramme; static const mass kilogrammes; } } }
namespace boost { namespace units { namespace si { typedef unit< mass_density_dimension, si::system > mass_density; static const mass_density kilogram_per_cubic_meter; static const mass_density kilograms_per_cubic_meter; static const mass_density kilogramme_per_cubic_metre; static const mass_density kilogrammes_per_cubic_metre; } } }
namespace boost { namespace units { namespace si { typedef unit< moment_of_inertia_dimension, si::system > moment_of_inertia; } } }
namespace boost { namespace units { namespace si { typedef unit< momentum_dimension, si::system > momentum; } } }
namespace boost { namespace units { namespace si { typedef unit< permeability_dimension, si::system > permeability; } } }
namespace boost { namespace units { namespace si { typedef unit< permittivity_dimension, si::system > permittivity; } } }
namespace boost { namespace units { namespace si { typedef unit< plane_angle_dimension, si::system > plane_angle; static const plane_angle radian; static const plane_angle radians; } } }
namespace boost { namespace units { namespace si { typedef unit< power_dimension, si::system > power; static const power watt; static const power watts; } } }
BOOST_UNITS_METRIC_PREFIX(exponent, name)
namespace boost { namespace units { namespace si { BOOST_UNITS_METRIC_PREFIX(- 24, yocto); BOOST_UNITS_METRIC_PREFIX(- 21, zepto); BOOST_UNITS_METRIC_PREFIX(- 18, atto); BOOST_UNITS_METRIC_PREFIX(- 15, femto); BOOST_UNITS_METRIC_PREFIX(- 12, pico); BOOST_UNITS_METRIC_PREFIX(- 9, nano); BOOST_UNITS_METRIC_PREFIX(- 6, micro); BOOST_UNITS_METRIC_PREFIX(- 3, milli); BOOST_UNITS_METRIC_PREFIX(- 2, centi); BOOST_UNITS_METRIC_PREFIX(- 1, deci); BOOST_UNITS_METRIC_PREFIX(1, deka); BOOST_UNITS_METRIC_PREFIX(2, hecto); BOOST_UNITS_METRIC_PREFIX(3, kilo); BOOST_UNITS_METRIC_PREFIX(6, mega); BOOST_UNITS_METRIC_PREFIX(9, giga); BOOST_UNITS_METRIC_PREFIX(12, tera); BOOST_UNITS_METRIC_PREFIX(15, peta); BOOST_UNITS_METRIC_PREFIX(18, exa); BOOST_UNITS_METRIC_PREFIX(21, zetta); BOOST_UNITS_METRIC_PREFIX(24, yotta); } } }
namespace boost { namespace units { namespace si { typedef unit< pressure_dimension, si::system > pressure; static const pressure pascal; static const pressure pascals; } } }
namespace boost { namespace units { namespace si { typedef unit< reluctance_dimension, si::system > reluctance; } } }
namespace boost { namespace units { namespace si { typedef unit< resistance_dimension, si::system > resistance; static const resistance ohm; static const resistance ohms; } } }
namespace boost { namespace units { namespace si { typedef unit< resistivity_dimension, si::system > resistivity; } } }
namespace boost { namespace units { namespace si { typedef unit< solid_angle_dimension, si::system > solid_angle; static const solid_angle steradian; static const solid_angle steradians; } } }
namespace boost { namespace units { namespace si { typedef unit< surface_density_dimension, si::system > surface_density; static const surface_density kilogram_per_square_meter; static const surface_density kilograms_per_square_meter; static const surface_density kilogramme_per_square_metre; static const surface_density kilogrammes_per_square_metre; } } }
namespace boost { namespace units { namespace si { typedef unit< surface_tension_dimension, si::system > surface_tension; static const surface_tension newton_per_meter; static const surface_tension newtons_per_meter; } } }
namespace boost { namespace units { namespace si { typedef unit< temperature_dimension, si::system > temperature; static const temperature kelvin; static const temperature kelvins; } } }
namespace boost { namespace units { namespace si { typedef unit< time_dimension, si::system > time; static const time second; static const time seconds; } } }
namespace boost { namespace units { namespace si { typedef unit< torque_dimension, si::system > torque; static const torque newton_meter; static const torque newton_meters; } } }
namespace boost { namespace units { namespace si { typedef unit< velocity_dimension, si::system > velocity; static const velocity meter_per_second; static const velocity meters_per_second; static const velocity metre_per_second; static const velocity metres_per_second; } } }
namespace boost { namespace units { namespace si { typedef unit< volume_dimension, si::system > volume; static const volume cubic_meter; static const volume cubic_meters; static const volume cubic_metre; static const volume cubic_metres; } } }
namespace boost { namespace units { namespace si { typedef unit< wavenumber_dimension, si::system > wavenumber; static const wavenumber reciprocal_meter; static const wavenumber reciprocal_meters; static const wavenumber reciprocal_metre; static const wavenumber reciprocal_metres; } } }
Includes all the cgs unit headers
namespace boost { namespace units { namespace cgs { typedef unit< acceleration_dimension, cgs::system > acceleration; static const acceleration gal; static const acceleration gals; } } }
namespace boost { namespace units { namespace cgs { typedef unit< area_dimension, cgs::system > area; static const area square_centimeter; static const area square_centimeters; static const area square_centimetre; static const area square_centimetres; } } }
namespace boost { namespace units { namespace cgs { typedef make_system< centimeter_base_unit, gram_base_unit, boost::units::si::second_base_unit, biot_base_unit >::type system; // placeholder class defining cgs unit system typedef unit< dimensionless_type, system > dimensionless; // various unit typedefs for convenience } } }
namespace boost { namespace units { namespace cgs { typedef unit< current_dimension, cgs::system > current; static const current biot; static const current biots; } } }
namespace boost { namespace units { namespace cgs { typedef unit< dynamic_viscosity_dimension, cgs::system > dynamic_viscosity; static const dynamic_viscosity poise; } } }
namespace boost { namespace units { namespace cgs { typedef unit< energy_dimension, cgs::system > energy; static const energy erg; static const energy ergs; } } }
namespace boost { namespace units { namespace cgs { typedef unit< force_dimension, cgs::system > force; static const force dyne; static const force dynes; } } }
namespace boost { namespace units { namespace cgs { typedef unit< frequency_dimension, cgs::system > frequency; } } }
namespace boost { namespace units { std::string name_string(const reduce_unit< cgs::acceleration >::type &); std::string symbol_string(const reduce_unit< cgs::acceleration >::type &); std::string name_string(const reduce_unit< cgs::current >::type &); std::string symbol_string(const reduce_unit< cgs::current >::type &); std::string name_string(const reduce_unit< cgs::dynamic_viscosity >::type &); std::string symbol_string(const reduce_unit< cgs::dynamic_viscosity >::type &); std::string name_string(const reduce_unit< cgs::energy >::type &); std::string symbol_string(const reduce_unit< cgs::energy >::type &); std::string name_string(const reduce_unit< cgs::force >::type &); std::string symbol_string(const reduce_unit< cgs::force >::type &); std::string name_string(const reduce_unit< cgs::kinematic_viscosity >::type &); std::string symbol_string(const reduce_unit< cgs::kinematic_viscosity >::type &); std::string name_string(const reduce_unit< cgs::pressure >::type &); std::string symbol_string(const reduce_unit< cgs::pressure >::type &); std::string name_string(const reduce_unit< cgs::wavenumber >::type &); std::string symbol_string(const reduce_unit< cgs::wavenumber >::type &); } }
namespace boost { namespace units { namespace cgs { typedef unit< kinematic_viscosity_dimension, cgs::system > kinematic_viscosity; static const kinematic_viscosity stoke; static const kinematic_viscosity stokes; } } }
namespace boost { namespace units { namespace cgs { typedef unit< length_dimension, cgs::system > length; static const length centimeter; static const length centimeters; static const length centimetre; static const length centimetres; } } }
namespace boost { namespace units { namespace cgs { typedef unit< mass_dimension, cgs::system > mass; static const mass gram; static const mass grams; static const mass gramme; static const mass grammes; } } }
namespace boost { namespace units { namespace cgs { typedef unit< mass_density_dimension, cgs::system > mass_density; } } }
namespace boost { namespace units { namespace cgs { typedef unit< momentum_dimension, cgs::system > momentum; } } }
namespace boost { namespace units { namespace cgs { typedef unit< power_dimension, cgs::system > power; } } }
namespace boost { namespace units { namespace cgs { typedef unit< pressure_dimension, cgs::system > pressure; static const pressure barye; static const pressure baryes; } } }
namespace boost { namespace units { namespace cgs { typedef unit< time_dimension, cgs::system > time; static const time second; static const time seconds; } } }
namespace boost { namespace units { namespace cgs { typedef unit< velocity_dimension, cgs::system > velocity; static const velocity centimeter_per_second; static const velocity centimeters_per_second; static const velocity centimetre_per_second; static const velocity centimetres_per_second; } } }
namespace boost { namespace units { namespace cgs { typedef unit< volume_dimension, cgs::system > volume; static const volume cubic_centimeter; static const volume cubic_centimeters; static const volume cubic_centimetre; static const volume cubic_centimetres; } } }
namespace boost { namespace units { namespace cgs { typedef unit< wavenumber_dimension, cgs::system > wavenumber; static const wavenumber kayser; static const wavenumber kaysers; static const wavenumber reciprocal_centimeter; static const wavenumber reciprocal_centimeters; static const wavenumber reciprocal_centimetre; static const wavenumber reciprocal_centimetres; } } }
namespace boost { namespace units { namespace degree { typedef make_system< boost::units::angle::degree_base_unit >::type system; typedef unit< dimensionless_type, system > dimensionless; typedef unit< plane_angle_dimension, system > plane_angle; // angle degree unit constant static const plane_angle degree; static const plane_angle degrees; } } }
namespace boost { namespace units { namespace gradian { typedef make_system< boost::units::angle::gradian_base_unit >::type system; typedef unit< dimensionless_type, system > dimensionless; typedef unit< plane_angle_dimension, system > plane_angle; // angle gradian unit constant static const plane_angle gradian; static const plane_angle gradians; } } }
namespace boost { namespace units { namespace revolution { typedef make_system< boost::units::angle::revolution_base_unit >::type system; typedef unit< dimensionless_type, system > dimensionless; typedef unit< plane_angle_dimension, system > plane_angle; // angle revolution unit constant static const plane_angle revolution; static const plane_angle revolutions; } } }
namespace boost { namespace units { namespace celsius { typedef make_system< boost::units::temperature::celsius_base_unit >::type system; typedef unit< temperature_dimension, system > temperature; static const temperature degree; static const temperature degrees; } } }
namespace boost { namespace units { template<> struct base_unit_info<abstract::length_unit_tag>; template<> struct base_unit_info<abstract::mass_unit_tag>; template<> struct base_unit_info<abstract::time_unit_tag>; template<> struct base_unit_info<abstract::current_unit_tag>; template<> struct base_unit_info<abstract::temperature_unit_tag>; template<> struct base_unit_info<abstract::amount_unit_tag>; template<> struct base_unit_info<abstract::luminous_intensity_unit_tag>; template<> struct base_unit_info<abstract::plane_angle_unit_tag>; template<> struct base_unit_info<abstract::solid_angle_unit_tag>; namespace abstract { struct length_unit_tag; struct mass_unit_tag; struct time_unit_tag; struct current_unit_tag; struct temperature_unit_tag; struct amount_unit_tag; struct luminous_intensity_unit_tag; struct plane_angle_unit_tag; struct solid_angle_unit_tag; typedef make_system< length_unit_tag, mass_unit_tag, time_unit_tag, current_unit_tag, temperature_unit_tag, amount_unit_tag, luminous_intensity_unit_tag, plane_angle_unit_tag, solid_angle_unit_tag >::type system; typedef unit< length_dimension, system > length; // abstract unit of length typedef unit< mass_dimension, system > mass; // abstract unit of mass typedef unit< time_dimension, system > time; // abstract unit of time typedef unit< current_dimension, system > current; // abstract unit of current typedef unit< temperature_dimension, system > temperature; // abstract unit of temperature typedef unit< amount_dimension, system > amount; // abstract unit of amount typedef unit< luminous_intensity_dimension, system > luminous_intensity; // abstract unit of luminous intensity typedef unit< plane_angle_dimension, system > plane_angle; // abstract unit of plane angle typedef unit< solid_angle_dimension, system > solid_angle; // abstract unit of solid angle } } }
namespace boost { namespace units { template<> struct base_unit_info<angle::arcminute_base_unit>; namespace angle { typedef scaled_base_unit< degree_base_unit, scale< 60, static_rational<-1 > > > arcminute_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<angle::arcsecond_base_unit>; namespace angle { typedef scaled_base_unit< degree_base_unit, scale< 3600, static_rational<-1 > > > arcsecond_base_unit; } } }
namespace boost { namespace units { namespace angle { struct degree_base_unit; } } }
namespace boost { namespace units { namespace angle { struct gradian_base_unit; } } }
namespace boost { namespace units { namespace angle { struct radian_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<angle::revolution_base_unit>; namespace angle { typedef scaled_base_unit< degree_base_unit, scale< 360, static_rational< 1 > > > revolution_base_unit; } } }
namespace boost { namespace units { namespace angle { struct steradian_base_unit; } } }
namespace boost { namespace units { namespace astronomical { struct astronomical_unit_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<astronomical::light_day_base_unit>; namespace astronomical { typedef scaled_base_unit< boost::units::astronomical::light_second_base_unit, scale< 86400, static_rational< 1 > > > light_day_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<astronomical::light_hour_base_unit>; namespace astronomical { typedef scaled_base_unit< boost::units::astronomical::light_second_base_unit, scale< 3600, static_rational< 1 > > > light_hour_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<astronomical::light_minute_base_unit>; namespace astronomical { typedef scaled_base_unit< boost::units::astronomical::light_second_base_unit, scale< 60, static_rational< 1 > > > light_minute_base_unit; } } }
namespace boost { namespace units { namespace astronomical { struct light_second_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<astronomical::light_year_base_unit>; namespace astronomical { typedef scaled_base_unit< boost::units::astronomical::light_second_base_unit, scale< 31557600, static_rational< 1 > > > light_year_base_unit; } } }
namespace boost { namespace units { namespace astronomical { struct parsec_base_unit; } } }
namespace boost { namespace units { namespace cgs { typedef scaled_base_unit< boost::units::si::ampere_base_unit, scale< 10, static_rational<-1 > > > biot_base_unit; } } }
namespace boost { namespace units { namespace cgs { typedef scaled_base_unit< boost::units::si::meter_base_unit, scale< 10, static_rational<-2 > > > centimeter_base_unit; } } }
namespace boost { namespace units { namespace cgs { struct gram_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::drachm_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 16, static_rational<-2 > > > drachm_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::fluid_ounce_base_unit>; namespace imperial { typedef scaled_base_unit< pint_base_unit, scale< 20, static_rational<-1 > > > fluid_ounce_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::foot_base_unit>; namespace imperial { typedef scaled_base_unit< yard_base_unit, scale< 3, static_rational<-1 > > > foot_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::furlong_base_unit>; namespace imperial { typedef scaled_base_unit< yard_base_unit, scale< 220, static_rational< 1 > > > furlong_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::gallon_base_unit>; namespace imperial { typedef scaled_base_unit< pint_base_unit, scale< 8, static_rational< 1 > > > gallon_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::gill_base_unit>; namespace imperial { typedef scaled_base_unit< pint_base_unit, scale< 4, static_rational<-1 > > > gill_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::grain_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 7000, static_rational<-1 > > > grain_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::hundredweight_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 112, static_rational< 1 > > > hundredweight_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::inch_base_unit>; namespace imperial { typedef scaled_base_unit< yard_base_unit, scale< 36, static_rational<-1 > > > inch_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::league_base_unit>; namespace imperial { typedef scaled_base_unit< yard_base_unit, scale< 5280, static_rational< 1 > > > league_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::mile_base_unit>; namespace imperial { typedef scaled_base_unit< yard_base_unit, scale< 1760, static_rational< 1 > > > mile_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::ounce_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 2, static_rational<-4 > > > ounce_base_unit; } } }
namespace boost { namespace units { namespace imperial { struct pint_base_unit; } } }
namespace boost { namespace units { namespace imperial { struct pound_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::quart_base_unit>; namespace imperial { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational< 1 > > > quart_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::quarter_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 28, static_rational< 1 > > > quarter_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::stone_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 14, static_rational< 1 > > > stone_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::thou_base_unit>; namespace imperial { typedef scaled_base_unit< yard_base_unit, scale< 36000, static_rational<-1 > > > thou_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<imperial::ton_base_unit>; namespace imperial { typedef scaled_base_unit< pound_base_unit, scale< 2240, static_rational< 1 > > > ton_base_unit; } } }
namespace boost { namespace units { namespace imperial { struct yard_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::angstrom_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::meter_base_unit, scale< 10, static_rational<-10 > > > angstrom_base_unit; } } }
namespace boost { namespace units { namespace metric { struct are_base_unit; } } }
namespace boost { namespace units { namespace metric { struct atmosphere_base_unit; } } }
namespace boost { namespace units { namespace metric { struct bar_base_unit; } } }
namespace boost { namespace units { namespace metric { struct barn_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::day_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::second_base_unit, scale< 86400, static_rational< 1 > > > day_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::fermi_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::meter_base_unit, scale< 10, static_rational<-15 > > > fermi_base_unit; } } }
namespace boost { namespace units { namespace metric { struct hectare_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::hour_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::second_base_unit, scale< 60, static_rational< 2 > > > hour_base_unit; } } }
namespace boost { namespace units { namespace metric { struct knot_base_unit; } } }
namespace boost { namespace units { namespace metric { struct liter_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::micron_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::meter_base_unit, scale< 10, static_rational<-6 > > > micron_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::minute_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::second_base_unit, scale< 60, static_rational< 1 > > > minute_base_unit; } } }
namespace boost { namespace units { namespace metric { struct mmHg_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::nautical_mile_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::meter_base_unit, scale< 1852, static_rational< 1 > > > nautical_mile_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::ton_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::kilogram_base_unit, scale< 1000, static_rational< 1 > > > ton_base_unit; } } }
namespace boost { namespace units { namespace metric { struct torr_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<metric::year_base_unit>; namespace metric { typedef scaled_base_unit< boost::units::si::second_base_unit, scale< 31557600, static_rational< 1 > > > year_base_unit; } } }
namespace boost { namespace units { namespace si { struct ampere_base_unit; } } }
namespace boost { namespace units { namespace si { struct candela_base_unit; } } }
namespace boost { namespace units { namespace si { struct kelvin_base_unit; } } }
namespace boost { namespace units { namespace si { typedef scaled_base_unit< boost::units::cgs::gram_base_unit, scale< 10, static_rational< 3 > > > kilogram_base_unit; } } }
namespace boost { namespace units { namespace si { struct meter_base_unit; } } }
namespace boost { namespace units { namespace si { struct mole_base_unit; } } }
namespace boost { namespace units { namespace si { struct second_base_unit; } } }
namespace boost { namespace units { namespace temperature { struct celsius_base_unit; } } }
namespace boost { namespace units { namespace temperature { struct fahrenheit_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::cup_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational<-1 > > > cup_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::dram_base_unit>; namespace us { typedef scaled_base_unit< pound_base_unit, scale< 16, static_rational<-2 > > > dram_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::fluid_dram_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational<-7 > > > fluid_dram_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::fluid_ounce_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 16, static_rational<-1 > > > fluid_ounce_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::foot_base_unit>; namespace us { typedef scaled_base_unit< yard_base_unit, scale< 3, static_rational<-1 > > > foot_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::gallon_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational< 3 > > > gallon_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::gill_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational<-2 > > > gill_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::grain_base_unit>; namespace us { typedef scaled_base_unit< pound_base_unit, scale< 7000, static_rational<-1 > > > grain_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::hundredweight_base_unit>; namespace us { typedef scaled_base_unit< pound_base_unit, scale< 100, static_rational< 1 > > > hundredweight_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::inch_base_unit>; namespace us { typedef scaled_base_unit< yard_base_unit, scale< 36, static_rational<-1 > > > inch_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::mil_base_unit>; namespace us { typedef scaled_base_unit< yard_base_unit, scale< 36000, static_rational<-1 > > > mil_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::mile_base_unit>; namespace us { typedef scaled_base_unit< yard_base_unit, scale< 1760, static_rational< 1 > > > mile_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::minim_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 7680, static_rational<-1 > > > minim_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::ounce_base_unit>; namespace us { typedef scaled_base_unit< pound_base_unit, scale< 2, static_rational<-4 > > > ounce_base_unit; } } }
namespace boost { namespace units { namespace us { struct pint_base_unit; } } }
namespace boost { namespace units { namespace us { struct pound_base_unit; } } }
namespace boost { namespace units { namespace us { struct pound_force_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::quart_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational< 1 > > > quart_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::tablespoon_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 2, static_rational<-5 > > > tablespoon_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::teaspoon_base_unit>; namespace us { typedef scaled_base_unit< pint_base_unit, scale< 96, static_rational<-1 > > > teaspoon_base_unit; } } }
namespace boost { namespace units { template<> struct base_unit_info<us::ton_base_unit>; namespace us { typedef scaled_base_unit< pound_base_unit, scale< 2000, static_rational< 1 > > > ton_base_unit; } } }
namespace boost { namespace units { namespace us { struct yard_base_unit; } } }
ampere
angstrom
arcminute
arcsecond
are
astronomical_unit
atmosphere
bar
barn
biot
candela
celsius
centimeter
cup
day
degree
drachm
dram
fahrenheit
fermi
fluid_dram
fluid_ounce (us)
fluid_ounce
(imperial)
foot
(us)
foot
(imperial)
furlong
gallon (us)
gallon (imperial)
gill (us)
gill (imperial)
gradian
grain (us)
grain (imperial)
gram
hectare
hour
hundredweight
(us)
hundredweight
(imperial)
inch
(us)
inch
(imperial)
kelvin
kilogram
knot
league
light_day
light_hour
light_minute
light_second
light_year
liter
meter
micron
mil
mile (us)
mile (imperial)
minim
minute
mmHg
mole
nautical_mile
ounce (us)
ounce (imperial)
parsec
pint (us)
pint (imperial)
pound (us)
pound (imperial)
pound_force
quart (us)
quart (imperial)
quarter
radian
revolution
second
steradian
stone
tablespoon
teaspoon
thou
ton (us)
ton (metric)
ton (imperial)
torr
yard (us)
yard (imperial)
year