Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template quantity

boost::units::quantity — class declaration

Synopsis

// In header: <boost/units/quantity.hpp>

template<typename Unit, typename Y> 
class quantity {
public:
  // types
  typedef quantity< Unit, Y > ; 
  typedef Y                   ;
  typedef Unit                ; 

  // private member functions
   ();

  // public member functions
  ();
  ();
  (const  );
  BOOST_CXX14_CONSTEXPR   (const  );
  template<typename YY> 
    (const  quantity< Unit, YY > &,  = );
  template<typename YY> 
    (const  quantity< Unit, YY > &,  = );
  template<typename YY> 
    BOOST_CXX14_CONSTEXPR   
    (const  quantity< Unit, YY > &);
  template<typename Unit2, typename YY> 
    (const  quantity< Unit2, YY > &,  = );
  template<typename Unit2, typename YY> 
    (const  quantity< Unit2, YY > &,  = );
  template<typename Unit2, typename YY> 
    BOOST_CXX14_CONSTEXPR   
    (const  quantity< Unit2, YY > &);
  BOOST_CONSTEXPR  const   () ;
  template<typename Unit2, typename YY> 
    BOOST_CXX14_CONSTEXPR   
    (const  quantity< Unit2, YY > &);
  template<typename Unit2, typename YY> 
    BOOST_CXX14_CONSTEXPR   
    (const  quantity< Unit2, YY > &);
  template<typename Unit2, typename YY> 
    BOOST_CXX14_CONSTEXPR   
    (const  quantity< Unit2, YY > &);
  template<typename Unit2, typename YY> 
    BOOST_CXX14_CONSTEXPR   
    (const  quantity< Unit2, YY > &);
  BOOST_CXX14_CONSTEXPR   (const  );
  BOOST_CXX14_CONSTEXPR   (const  );

  // public static functions
  BOOST_CONSTEXPR   (const  );

  // protected member functions
  (const  , int);
};

Description

quantity private member functions

  1.  ();

quantity public member functions

  1. ();
  2. ();
  3. (const   source);
  4. BOOST_CXX14_CONSTEXPR   (const   source);
  5. template<typename YY> 
      (const  quantity< Unit, YY > & source,  = );
    implicit conversion between value types is allowed if allowed for value types themselves
  6. template<typename YY> 
      (const  quantity< Unit, YY > & source,  = );
    implicit conversion between value types is not allowed if not allowed for value types themselves
  7. template<typename YY> 
      BOOST_CXX14_CONSTEXPR   
      (const  quantity< Unit, YY > & source);
    implicit assignment between value types is allowed if allowed for value types themselves
  8. template<typename Unit2, typename YY> 
      (const  quantity< Unit2, YY > & source,  = );
    explicit conversion between different unit systems is allowed if implicit conversion is disallowed
  9. template<typename Unit2, typename YY> 
      (const  quantity< Unit2, YY > & source,  = );
    implicit conversion between different unit systems is allowed if each fundamental dimension is implicitly convertible
  10. template<typename Unit2, typename YY> 
      BOOST_CXX14_CONSTEXPR   
      (const  quantity< Unit2, YY > & source);
    implicit assignment between different unit systems is allowed if each fundamental dimension is implicitly convertible
  11. 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

  12. template<typename Unit2, typename YY> 
      BOOST_CXX14_CONSTEXPR   
      (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
  13. template<typename Unit2, typename YY> 
      BOOST_CXX14_CONSTEXPR   
      (const  quantity< Unit2, YY > & source);
  14. template<typename Unit2, typename YY> 
      BOOST_CXX14_CONSTEXPR   
      (const  quantity< Unit2, YY > & source);
  15. template<typename Unit2, typename YY> 
      BOOST_CXX14_CONSTEXPR   
      (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
  16. BOOST_CXX14_CONSTEXPR   (const   source);
    can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type
  17. BOOST_CXX14_CONSTEXPR   (const   source);

quantity public static functions

  1. BOOST_CONSTEXPR   (const   val);
    Construct quantity directly from value_type (potentially dangerous).

quantity protected member functions

  1. (const   val, int);

Specializations


PrevUpHomeNext