Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::units::make_dimension_list< Seq > Struct Template Reference

Reduce dimension list to cardinal form. More...

#include <units_fwd.hpp>

Public Types

typedef detail::sort_dims< Seq >
::type 
type
 

Detailed Description

template<typename Seq>
struct boost::units::make_dimension_list< Seq >

Reduce dimension list to cardinal form.

This algorithm collapses duplicate base dimension tags and sorts the resulting list by the tag ordinal value. Dimension lists that resolve to the same dimension are guaranteed to be represented by an identical type.

The argument should be an MPL forward sequence containing instances of the dim template.

The result is also an MPL forward sequence. It also supports the following metafunctions to allow use as a dimension.

  • mpl::plus is defined only on two equal dimensions and returns the argument unchanged.
  • mpl::minus is defined only for two equal dimensions and returns the argument unchanged.
  • mpl::negate will return its argument unchanged.
  • mpl::times is defined for any dimensions and adds corresponding exponents.
  • mpl::divides is defined for any dimensions and subtracts the exponents of the right had argument from the corresponding exponents of the left had argument. Missing base dimension tags are assumed to have an exponent of zero.
  • static_power takes a dimension and a static_rational and multiplies all the exponents of the dimension by the static_rational.
  • static_root takes a dimension and a static_rational and divides all the exponents of the dimension by the static_rational.

Member Typedef Documentation

template<typename Seq>
typedef detail::sort_dims<Seq>::type boost::units::make_dimension_list< Seq >::type

The documentation for this struct was generated from the following file: