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

Dimension tag/exponent pair for a single fundamental dimension. More...

#include <units_fwd.hpp>

Public Types

typedef dim type
 
typedef detail::dim_tag tag
 
typedef T tag_type
 
typedef V value_type
 

Detailed Description

template<typename T, typename V>
struct boost::units::dim< T, V >

Dimension tag/exponent pair for a single fundamental dimension.

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

- @c mpl::plus for two @c dims
- @c mpl::minus for two @c dims
- @c mpl::negate for a @c 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.

- @c mpl::times for a @c static_rational and a @c dim in either order
- @c mpl::divides for a @c static_rational and a @c dim in either order

These metafunctions likewise operate on the exponent only.

Member Typedef Documentation

template<typename T , typename V >
typedef detail::dim_tag boost::units::dim< T, V >::tag
template<typename T , typename V >
typedef T boost::units::dim< T, V >::tag_type
template<typename T , typename V >
typedef dim boost::units::dim< T, V >::type
template<typename T , typename V >
typedef V boost::units::dim< T, V >::value_type

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