![]() |
Home | Libraries | People | FAQ | More |
boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y>
// In header: <boost/units/quantity.hpp> template<typename System, typename Y> class quantity<, > { public: // types typedef quantity< unit< dimensionless_type, System >, Y > ; typedef Y ; typedef System ; typedef dimensionless_type ; typedef unit< ; // construct/copy/destruct (); (); (const ); template<typename YY> (const quantity< unit< YY > &, = ); template<typename YY> (const quantity< unit< YY > &, = ); template<typename System2, typename Y2> (const quantity< unit< dimensionless_type, System2 >, Y2 > &, = , = , = ); template<typename System2, typename Y2> (const quantity< unit< dimensionless_type, System2 >, Y2 > &, = , = , = ); template<typename System2, typename Y2> (const quantity< unit< dimensionless_type, System2 >, Y2 > &, = ); BOOST_CXX14_CONSTEXPR (const ); template<typename YY> BOOST_CXX14_CONSTEXPR (const quantity< unit< YY > &); template<typename System2> BOOST_CXX14_CONSTEXPR (const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(System2), Y > &); // public member functions BOOST_CONSTEXPR () ; BOOST_CONSTEXPR const () ; BOOST_CXX14_CONSTEXPR (const ); BOOST_CXX14_CONSTEXPR (const ); BOOST_CXX14_CONSTEXPR (const ); BOOST_CXX14_CONSTEXPR (const ); // public static functions BOOST_CONSTEXPR (const ); };
Specialization for dimensionless quantities. Implicit conversions between unit systems are allowed because all dimensionless quantities are equivalent. Implicit construction and assignment from and conversion to value_type
is also allowed.
quantity
public
construct/copy/destruct();
( val);construction from raw
value_type
is allowed (const source);
template<typename YY> (const quantity< unit< YY > & source, = );implicit conversion between value types is allowed if allowed for value types themselves
template<typename YY> (const quantity< unit< YY > & source, = );implicit conversion between value types is not allowed if not allowed for value types themselves
template<typename System2, typename Y2> (const quantity< unit< dimensionless_type, System2 >, Y2 > & source, = , = , = );implicit conversion between different unit systems is allowed
template<typename System2, typename Y2> (const quantity< unit< dimensionless_type, System2 >, Y2 > & source, = , = , = );implicit conversion between different unit systems is allowed
template<typename System2, typename Y2> (const quantity< unit< dimensionless_type, System2 >, Y2 > & source, = );
conversion between different unit systems is explicit when the units are not equivalent.
BOOST_CXX14_CONSTEXPR (const source);
template<typename YY> BOOST_CXX14_CONSTEXPR (const quantity< unit< YY > & source);implicit assignment between value types is allowed if allowed for value types themselves
template<typename System2> BOOST_CXX14_CONSTEXPR (const quantity< BOOST_UNITS_DIMENSIONLESS_UNIT(System2), Y > & source);implicit assignment between different unit systems is allowed
quantity
public member functionsBOOST_CONSTEXPR () ;implicit conversion to
value_type
is allowed BOOST_CONSTEXPR const () ;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
BOOST_CXX14_CONSTEXPR (const source);can subtract a quantity of the same type if subtract_typeof_helper<value_type,value_type>::type is convertible to value_type
BOOST_CXX14_CONSTEXPR (const source);can multiply a quantity by a scalar value_type if multiply_typeof_helper<value_type,value_type>::type is convertible to value_type
BOOST_CXX14_CONSTEXPR (const val);can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type
BOOST_CXX14_CONSTEXPR (const val);