Defines a base unit. More...
#include <base_unit.hpp>
Public Types | |
typedef void | boost_units_is_base_unit_type |
INTERNAL ONLY. More... | |
typedef base_unit | this_type |
INTERNAL ONLY. More... | |
typedef Dim | dimension_type |
The dimensions of this base unit. More... | |
typedef Derived | type |
Provided for mpl compatability. More... | |
typedef unit< Dim, heterogeneous_system < heterogeneous_system_impl < list < heterogeneous_system_dim < Derived, static_rational < 1 > >, dimensionless_type > , Dim, no_scale > > > | unit_type |
The unit corresponding to this base unit. More... | |
Friends | |
Derived * | check_double_register (const units::base_unit_ordinal< N > &) |
Check for C++0x. More... | |
detail::yes | boost_units_unit_is_registered (const units::base_unit_ordinal< N > &) |
Register this ordinal INTERNAL ONLY. More... | |
detail::yes | boost_units_unit_is_registered (const units::base_unit_pair< Derived, N > &) |
But make sure we can identify the current instantiation! INTERNAL ONLY. More... | |
Defines a base unit.
To define a unit you need to provide the derived class (CRTP), a dimension list and a unique integer.
It is designed so that you will get an error message if you try to use the same value in multiple definitions.
typedef void boost::units::base_unit< Derived, Dim, N, class >::boost_units_is_base_unit_type |
INTERNAL ONLY.
typedef Dim boost::units::base_unit< Derived, Dim, N, class >::dimension_type |
The dimensions of this base unit.
typedef base_unit boost::units::base_unit< Derived, Dim, N, class >::this_type |
INTERNAL ONLY.
typedef Derived boost::units::base_unit< Derived, Dim, N, class >::type |
Provided for mpl compatability.
typedef unit< Dim, heterogeneous_system< heterogeneous_system_impl< list< heterogeneous_system_dim<Derived,static_rational<1> >, dimensionless_type >, Dim, no_scale > > > boost::units::base_unit< Derived, Dim, N, class >::unit_type |
The unit corresponding to this base unit.
|
friend |
Register this ordinal INTERNAL ONLY.
|
friend |
But make sure we can identify the current instantiation! INTERNAL ONLY.
|
friend |
Check for C++0x.
In C++0x, we have to have identical arguments but a different return type to trigger an error. Note that this is only needed for clang as check_base_unit will trigger an error earlier for compilers with less strict name lookup. INTERNAL ONLY