Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Class template unit

boost::units::unit — class representing a model-dependent unit with no associated value


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

template<typename Dim, typename System, typename Enable> 
class unit {
  // types
  typedef unit< Dim, System > unit_type;     
  typedef unit< Dim, System > this_type;     
  typedef Dim                 dimension_type;
  typedef System              system_type;   

  // construct/copy/destruct
  unit(const this_type &);
  unit& operator=(const this_type &);

  // private member functions
   BOOST_MPL_ASSERT(unspecified) ;
   BOOST_MPL_ASSERT((is_dimension_list< Dim >)) ;


(e.g. meters, Kelvin, feet, etc...)

unit public construct/copy/destruct

  1. unit();
  2. unit(const this_type &);
  3. unit& operator=(const this_type &);

unit private member functions

  1.  BOOST_MPL_ASSERT(unspecified) ;
  2.  BOOST_MPL_ASSERT((is_dimension_list< Dim >)) ;