Absolute units (points rather than vectors). More...
#include <iosfwd>
#include <boost/units/detail/absolute_impl.hpp>
Classes | |
singleton | boost::units::absolute< Y > |
A wrapper to represent absolute units (points rather than vectors). More... | |
Namespaces | |
boost | |
Duration formatting facet for input. | |
boost::units | |
Macros | |
#define | BOOST_UNITS_DEFINE_CONVERSION_OFFSET(From, To, type_, value_) |
Macro to define the offset between two absolute units. More... | |
Functions | |
template<class Y > | |
absolute< Y > | boost::units::operator+ (const absolute< Y > &aval, const Y &rval) |
add a relative value to an absolute one More... | |
template<class Y > | |
absolute< Y > | boost::units::operator+ (const Y &rval, const absolute< Y > &aval) |
add a relative value to an absolute one More... | |
template<class Y > | |
absolute< Y > | boost::units::operator- (const absolute< Y > &aval, const Y &rval) |
subtract a relative value from an absolute one More... | |
template<class Y > | |
Y | boost::units::operator- (const absolute< Y > &aval1, const absolute< Y > &aval2) |
subtracting two absolutes gives a difference More... | |
template<class D , class S , class T > | |
quantity< absolute< unit< D, S > >, T > | boost::units::operator* (const T &t, const absolute< unit< D, S > > &) |
creates a quantity from an absolute unit and a raw value More... | |
template<class D , class S , class T > | |
quantity< absolute< unit< D, S > >, T > | boost::units::operator* (const absolute< unit< D, S > > &, const T &t) |
creates a quantity from an absolute unit and a raw value More... | |
template<class Char , class Traits , class Y > | |
std::basic_ostream< Char, Traits > & | boost::units::operator<< (std::basic_ostream< Char, Traits > &os, const absolute< Y > &aval) |
Print an absolute unit. More... | |
Absolute units (points rather than vectors).
Operations between absolute units, and relative units like temperature differences.
#define BOOST_UNITS_DEFINE_CONVERSION_OFFSET | ( | From, | |
To, | |||
type_, | |||
value_ | |||
) |
Macro to define the offset between two absolute units.
Requires the value to be in the destination units e.g
BOOST_UNITS_DEFINE_CONVERSION_FACTOR
is also necessary to specify the conversion factor. Like BOOST_UNITS_DEFINE_CONVERSION_FACTOR
this macro defines both forward and reverse conversions so defining, e.g., the conversion from celsius to fahrenheit as above will also define the inverse conversion from fahrenheit to celsius.