TypeSI
Units of 'Système international' Blended for C++
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
Si::Internal Namespace Reference

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, UnitapplyPrefix ()
 
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.
 

Detailed Description

Technical namespace for core library logic.

Typedef Documentation

◆ Dimensionless

template<typename T >
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.

Template Parameters
TAny number type such as float, double or long double used as a container

◆ Powers

template<typename U >
using Si::Internal::Powers = typedef decltype(getPowers(std::declval<U>()))

Tool to get tuple of powers from unit.

Template Parameters
UUnit type

◆ Unit

template<typename T , typename... Powers>
using Si::Internal::Unit = typedef T

If TYPE_SI_DISABLE_CHECKS flag is set all units are defined as their container type.

Template Parameters
TAny number type such as float, double or long double used as a container
PowersIgnored here