SI  2.5.4
A header only c++ library that provides type safety and user defined literals for handling physical values defined in the International System of Units.
catalytic_activity.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include "detail/number_parser.h"
16 #include "detail/unit.h"
17 #include "detail/unit_symbol.h"
18 #include "substance.h"
19 #include "time.h"
20 
21 namespace SI {
22 
23 template <typename _type, class _ratio = std::ratio<1>>
25 
27 template <typename _type>
29 template <typename _type>
31 template <typename _type>
33 template <typename _type>
35 template <typename _type>
37 template <typename _type>
39 template <typename _type>
41 template <typename _type>
43 template <typename _type>
45 template <typename _type>
47 template <typename _type>
49 template <typename _type>
51 template <typename _type>
53 
54 // specialize unit_symbol for usage with stream operators
55 template <>
56 struct unit_symbol<'K', std::ratio<1>>
57  : SI::detail::unit_symbol_impl<'k', 'a', 't'> {};
58 
59 template <typename _ratio>
60 struct unit_symbol<'K', _ratio>
61  : SI::detail::unit_symbol_impl<SI::detail::ratio_prefix<_ratio>::value, 'k',
62  'a', 't'> {};
63 
64 namespace detail {
66 }
67 
68 inline namespace literals {
69 template <char... _digits> constexpr atto_katal_t<int64_t> operator""_akat() {
70  return atto_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
71 }
72 
73 template <char... _digits> constexpr femto_katal_t<int64_t> operator""_fkat() {
74  return femto_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
75 }
76 
77 template <char... _digits> constexpr pico_katal_t<int64_t> operator""_pkat() {
78  return pico_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
79 }
80 
81 template <char... _digits> constexpr nano_katal_t<int64_t> operator""_nkat() {
82  return nano_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
83 }
84 
85 template <char... _digits> constexpr micro_katal_t<int64_t> operator""_ukat() {
86  return micro_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
87 }
88 
89 template <char... _digits> constexpr milli_katal_t<int64_t> operator""_mkat() {
90  return milli_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
91 }
92 
93 template <char... _digits> constexpr katal_t<int64_t> operator""_kat() {
94  return katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
95 }
96 
97 template <char... _digits> constexpr kilo_katal_t<int64_t> operator""_kkat() {
98  return kilo_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
99 }
100 
101 template <char... _digits> constexpr mega_katal_t<int64_t> operator""_Mkat() {
102  return mega_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
103 }
104 
105 template <char... _digits> constexpr giga_katal_t<int64_t> operator""_Gkat() {
106  return giga_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
107 }
108 
109 template <char... _digits> constexpr tera_katal_t<int64_t> operator""_Tkat() {
110  return tera_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
111 }
112 
113 template <char... _digits> constexpr peta_katal_t<int64_t> operator""_Pkat() {
114  return peta_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
115 }
116 
117 template <char... _digits> constexpr exa_katal_t<int64_t> operator""_Ekat() {
118  return exa_katal_t<int64_t>{SI::detail::parsing::Number<_digits...>::value};
119 }
120 
121 constexpr atto_katal_t<long double> operator""_akat(long double value) {
122  return atto_katal_t<long double>{value};
123 }
124 
125 constexpr femto_katal_t<long double> operator""_fkat(long double value) {
126  return femto_katal_t<long double>{value};
127 }
128 
129 constexpr pico_katal_t<long double> operator""_pkat(long double value) {
130  return pico_katal_t<long double>{value};
131 }
132 
133 constexpr nano_katal_t<long double> operator""_nkat(long double value) {
134  return nano_katal_t<long double>{value};
135 }
136 
137 constexpr micro_katal_t<long double> operator""_ukat(long double value) {
138  return micro_katal_t<long double>{value};
139 }
140 
141 constexpr milli_katal_t<long double> operator""_mkat(long double value) {
142  return milli_katal_t<long double>{value};
143 }
144 
145 constexpr katal_t<long double> operator""_kat(long double value) {
146  return katal_t<long double>{value};
147 }
148 
149 constexpr kilo_katal_t<long double> operator""_kkat(long double value) {
150  return kilo_katal_t<long double>{value};
151 }
152 
153 constexpr mega_katal_t<long double> operator""_Mkat(long double value) {
154  return mega_katal_t<long double>{value};
155 }
156 
157 constexpr giga_katal_t<long double> operator""_Gkat(long double value) {
158  return giga_katal_t<long double>{value};
159 }
160 
161 constexpr tera_katal_t<long double> operator""_Tkat(long double value) {
162  return tera_katal_t<long double>{value};
163 }
164 
165 constexpr peta_katal_t<long double> operator""_Pkat(long double value) {
166  return peta_katal_t<long double>{value};
167 }
168 
169 constexpr exa_katal_t<long double> operator""_Ekat(long double value) {
170  return exa_katal_t<long double>{value};
171 }
172 
173 } // namespace literals
174 } // namespace SI
BUILD_UNIT_FROM_DIVISION(electric_conductance_t, electric_current_t, electric_potential_t) template< typename _type
Definition: absorbed_dose.h:18
interface class for number
Definition: number_parser.h:111
Compile time string provider for conversion of unit types to strings.
Definition: unit_symbol.h:21
base template class for holding values of type _type to be multiplied with a ratio _ratio
Definition: unit.h:51
Base struct. Unusable needs template overloading.
Definition: unit_symbol.h:64