TypeSI
Units of 'Système international' Blended for C++
|
Technical namespace for core library logic. More...
Classes | |
class | GenericPrefix |
Generic type of unit with prefix. More... | |
struct | std_pow |
struct | Tuple |
Metastructure to identify and compare typename sets. More... | |
class | Unit |
Generic unit type. More... | |
Typedefs | |
template<typename T , typename... Powers> | |
using | Unit = T |
If TYPE_SI_DISABLE_CHECKS flag is set all units are defined as their container type. More... | |
template<typename U > | |
using | Powers = decltype(getPowers(std::declval< U >())) |
Tool to get tuple of powers from unit. More... | |
template<typename T > | |
using | Dimensionless = Unit< T, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > > |
Dimensionless unit for technical purposes with 7 power values set at 0. More... | |
Functions | |
template<typename Ratio , typename Unit , typename T = decltype(+std::declval<Unit>())> | |
GenericPrefix< Ratio, Unit > | applyPrefix () |
template<typename Ratio , typename Unit , typename T = decltype(+std::declval<typename Unit::template type<Ratio>>())> | |
Unit::template type< Ratio > | applyPrefix () |
template<typename T > | |
const T & | implicit_cast (const T &t) |
Variables | |
template<typename T , typename... Powers> | |
Tuple< Powers... > | getPowers (Unit< T, Powers... >) |
Helper to get tuple of powers from unit. | |
Technical namespace for core library logic.
using Si::Internal::Dimensionless = typedef Unit<T, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0>, std::ratio<0> > |
Dimensionless unit for technical purposes with 7 power values set at 0.
T | Any number type such as float, double or long double used as a container |
using Si::Internal::Powers = typedef decltype(getPowers(std::declval<U>())) |
Tool to get tuple of powers from unit.
U | Unit type |
using Si::Internal::Unit = typedef T |
If TYPE_SI_DISABLE_CHECKS flag is set all units are defined as their container type.
T | Any number type such as float, double or long double used as a container |
Powers | Ignored here |