Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template base_unit

boost::units::base_unit

Synopsis

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

template<typename Derived, typename Dim,  N> 
class base_unit : public  {
public:
  // types
  typedef Dim         ;  // The dimensions of this base unit. 
  typedef Derived     ;            // Provided for mpl compatability. 
  typedef  ;       // The unit corresponding to this base unit. 
};

Description

Defines a base unit. To define a unit you need to provide the derived class (CRTP), a dimension list and a unique integer.

boost::units::base_unit<

It is designed so that you will get an error message if you try to use the same value in multiple definitions.


PrevUpHomeNext