STRUCT TEMPLATE DIM(3)

NAME
boost::units::dim - Dimension tag/exponent pair for a single fundamental dimension.

SYNOPSIS

// In header: <boost/units/dim.hpp>
template<typename T, typename V>
struct dim {
  // types
  typedef dim         type;
  typedef unspecified tag;
  typedef T           tag_type;
  typedef V           value_type;
};

DESCRIPTION

The dim class represents a single dimension tag/dimension exponent pair. That is, dim<tag_type,value_type> is a pair where tag_type represents the fundamental dimension being represented and value_type represents the exponent of that fundamental dimension as a static_rational. tag_type must be a derived from a specialization of base_dimension. Specialization of the following Boost.MPL metafunctions are provided

    &#8226; mpl::plus for two dims

    &#8226; mpl::minus for two dims

    &#8226; mpl::negate for a dim

These metafunctions all operate on the exponent, and require that the dim operands have the same base dimension tag. In addition, multiplication and division by static_rational is supported.

    &#8226; mpl::times for a static_rational and a dim in either order

    &#8226; mpl::divides for a static_rational and a dim in either order

These metafunctions likewise operate on the exponent only.