class declaration More...
#include <units_fwd.hpp>
Public Types | |
typedef quantity< Unit, Y > | this_type |
typedef Y | value_type |
typedef Unit | unit_type |
Public Member Functions | |
quantity () | |
quantity (unspecified_null_pointer_constant_type) | |
quantity (const this_type &source) | |
this_type & | operator= (const this_type &source) |
template<class YY > | |
quantity (const quantity< Unit, YY > &source, typename boost::enable_if< detail::is_non_narrowing_conversion< YY, Y > >::type *=0) | |
implicit conversion between value types is allowed if allowed for value types themselves More... | |
template<class YY > | |
quantity (const quantity< Unit, YY > &source, typename boost::disable_if< detail::is_non_narrowing_conversion< YY, Y > >::type *=0) | |
implicit conversion between value types is not allowed if not allowed for value types themselves More... | |
template<class YY > | |
this_type & | operator= (const quantity< Unit, YY > &source) |
implicit assignment between value types is allowed if allowed for value types themselves More... | |
template<class Unit2 , class YY > | |
quantity (const quantity< Unit2, YY > &source, typename boost::disable_if< mpl::and_< typename is_implicitly_convertible< Unit2, Unit >::type, detail::is_non_narrowing_conversion< YY, Y > >, typename detail::disable_if_is_same< Unit, Unit2 >::type >::type *=0) | |
explicit conversion between different unit systems is allowed if implicit conversion is disallowed More... | |
template<class Unit2 , class YY > | |
quantity (const quantity< Unit2, YY > &source, typename boost::enable_if< mpl::and_< typename is_implicitly_convertible< Unit2, Unit >::type, detail::is_non_narrowing_conversion< YY, Y > >, typename detail::disable_if_is_same< Unit, Unit2 >::type >::type *=0) | |
implicit conversion between different unit systems is allowed if each fundamental dimension is implicitly convertible More... | |
template<class Unit2 , class YY > | |
this_type & | operator= (const quantity< Unit2, YY > &source) |
implicit assignment between different unit systems is allowed if each fundamental dimension is implicitly convertible More... | |
const value_type & | value () const |
constant accessor to value More... | |
template<class Unit2 , class YY > | |
this_type & | operator+= (const quantity< Unit2, YY > &source) |
can subtract a quantity of the same type if subtract_typeof_helper<value_type,value_type>::type is convertible to value_type More... | |
template<class Unit2 , class YY > | |
this_type & | operator-= (const quantity< Unit2, YY > &source) |
template<class Unit2 , class YY > | |
this_type & | operator*= (const quantity< Unit2, YY > &source) |
template<class Unit2 , class YY > | |
this_type & | operator/= (const quantity< Unit2, YY > &source) |
can multiply a quantity by a scalar value_type if multiply_typeof_helper<value_type,value_type>::type is convertible to value_type More... | |
this_type & | operator*= (const value_type &source) |
can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type More... | |
this_type & | operator/= (const value_type &source) |
Static Public Member Functions | |
static this_type | from_value (const value_type &val) |
Construct quantity directly from value_type (potentially dangerous). More... | |
Protected Member Functions | |
quantity (const value_type &val, int) | |
class declaration
typedef quantity<Unit,Y> boost::units::quantity< Unit, Y >::this_type |
typedef Unit boost::units::quantity< Unit, Y >::unit_type |
typedef Y boost::units::quantity< Unit, Y >::value_type |
|
inline |
References BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY.
|
inline |
References BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY.
|
inline |
References BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY.
|
inline |
implicit conversion between value types is allowed if allowed for value types themselves
References BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY.
|
inlineexplicit |
implicit conversion between value types is not allowed if not allowed for value types themselves
References BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY.
|
inlineexplicit |
explicit conversion between different unit systems is allowed if implicit conversion is disallowed
References boost::BOOST_STATIC_ASSERT(), BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY, and boost::program_options::value().
|
inline |
implicit conversion between different unit systems is allowed if each fundamental dimension is implicitly convertible
References boost::BOOST_STATIC_ASSERT(), BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY, and boost::program_options::value().
|
inlineexplicitprotected |
|
inlinestatic |
Construct quantity directly from value_type
(potentially dangerous).
Referenced by boost::units::acos(), boost::units::asin(), boost::units::atan(), boost::units::atan2(), and boost::numeric::odeint::detail::set_unit_value_impl< boost::units::quantity< Unit, T >, V >::set_value().
|
inline |
References boost::BOOST_STATIC_ASSERT(), and boost::units::quantity< Unit, Y >::value().
|
inline |
can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type
|
inline |
can subtract a quantity of the same type if subtract_typeof_helper<value_type,value_type>::type is convertible to value_type
|
inline |
|
inline |
can multiply a quantity by a scalar value_type if multiply_typeof_helper<value_type,value_type>::type is convertible to value_type
References boost::BOOST_STATIC_ASSERT(), and boost::units::quantity< Unit, Y >::value().
|
inline |
References boost::source().
|
inline |
|
inline |
implicit assignment between value types is allowed if allowed for value types themselves
References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().
|
inline |
implicit assignment between different unit systems is allowed if each fundamental dimension is implicitly convertible
References boost::BOOST_STATIC_ASSERT(), and boost::program_options::value().
|
inline |
constant accessor to value
can add a quantity of the same type if add_typeof_helper<value_type,value_type>::type is convertible to value_type
Referenced by boost::units::BOOST_PREVENT_MACRO_SUBSTITUTION(), boost::units::cos(), boost::units::detail::do_print_prefixed_impl(), boost::units::fmod(), boost::units::frexp(), boost::units::ldexp(), boost::units::modf(), boost::units::quantity< Unit, Y >::operator*=(), boost::units::quantity< Unit, Y >::operator/=(), boost::units::operator<(), boost::units::operator<=(), boost::units::sin(), boost::units::sqrt(), boost::units::tan(), and boost::numeric::odeint::detail::get_unit_value_impl< boost::units::quantity< Unit, T > >::value().