TypeSI
Units of 'Système international' Blended for C++
|
Generic type of unit with prefix. More...
#include <si_prefix.hpp>
Public Member Functions | |
const Unit & | raw () const |
Getter for raw Unit reference without prefix applied. | |
GenericPrefix (const T &value) | |
Explicit constructor from container type. | |
template<typename AnotherUnit , typename std::enable_if< std::is_same< Internal::Powers< AnotherUnit >, Internal::Powers< Unit > >::value, int >::type = 0> | |
GenericPrefix (const GenericPrefix< Ratio, AnotherUnit > &unit) | |
Implicit constructor from same units with different container type. | |
template<typename AnotherUnit , typename std::enable_if< std::is_same< T, Unit >::value||std::is_same< Internal::Powers< AnotherUnit >, Internal::Powers< Unit > >::value, int >::type = 0> | |
GenericPrefix (const AnotherUnit &unit) | |
Constructor from Unit type(implicit by default, can be made
explicit by TYPE_SI_DISALLOW_IMPLICIT_PREFIX_CONVERSIONS macro) | |
template<typename AnotherRatio , typename AnotherUnit , typename std::enable_if< std::is_same< Internal::Powers< AnotherUnit >, Internal::Powers< Unit > >::value, int >::type = 0> | |
GenericPrefix (const GenericPrefix< AnotherRatio, AnotherUnit > &unit) | |
Explicit constructor from unit with different prefix(implicit by
default, can be made explicit by
TYPE_SI_DISALLOW_IMPLICIT_PREFIX_CONVERSIONS macro) | |
T | operator+ () const |
Conversion to container type via unary '+'. | |
template<typename U > | |
decltype(std::declval< Unit >()==std::declval< Unit >()) | operator== (const U &unit) const |
Operator '=='. | |
template<typename U > | |
decltype(std::declval< Unit >() !=std::declval< Unit >()) | operator!= (const U &unit) const |
Operator '!='. | |
template<typename U > | |
decltype(std::declval< Unit >()< std::declval< Unit >()) | operator< (const U &unit) const |
Operator '<'. | |
template<typename U > | |
decltype(std::declval< Unit >()<=std::declval< Unit >()) | operator<= (const U &unit) const |
Operator '<='. | |
template<typename U > | |
decltype(std::declval< Unit >() > std::declval< Unit >()) | operator> (const U &unit) const |
Operator '>'. | |
template<typename U > | |
decltype(std::declval< Unit >() >=std::declval< Unit >()) | operator>= (const U &unit) const |
Operator '>='. | |
template<typename U > | |
GenericPrefix | operator+ (const U &unit) const |
Operator '+'. | |
template<typename U > | |
GenericPrefix | operator+= (const U &unit) |
Operator '+='. | |
template<typename U > | |
GenericPrefix | operator- (const U &unit) const |
Operator '-'. | |
template<typename U > | |
GenericPrefix | operator-= (const U &unit) |
Operator '-='. | |
template<typename AnotherRatio , typename AnotherUnit > | |
GenericPrefix< std::ratio_multiply< Ratio, AnotherRatio >, decltype(std::declval< Unit >() *std::declval< AnotherUnit >())> | operator* (const GenericPrefix< AnotherRatio, AnotherUnit > &unit) const |
Operator '*' for units with prefix. | |
template<typename AnotherUnit > | |
GenericPrefix< Ratio, decltype(std::declval< Unit >() *std::declval< AnotherUnit >())> | operator* (const AnotherUnit &unit) const |
Operator '*' for units without prefix. | |
GenericPrefix | operator*= (const T &value) |
Operator '*=' for container type. | |
template<typename AnotherRatio , typename AnotherUnit > | |
GenericPrefix< std::ratio_divide< Ratio, AnotherRatio >, decltype(std::declval< Unit >()/std::declval< AnotherUnit >())> | operator/ (const GenericPrefix< AnotherRatio, AnotherUnit > &unit) const |
Operator '/' for units with prefix. | |
template<typename AnotherUnit > | |
GenericPrefix< Ratio, decltype(std::declval< Unit >() *std::declval< AnotherUnit >())> | operator/ (const AnotherUnit &unit) const |
Operator '/' for units without prefix. | |
GenericPrefix | operator/= (const T &value) |
Operator '/=' for container type. | |
Generic type of unit with prefix.
Ratio | std::ratio representing prefix |
Unit | Templated class of SI unit |