Zserio C++17 runtime library  0.5.0
Built for Zserio 2.17.0
Types.h
Go to the documentation of this file.
1 #ifndef ZSERIO_TYPES_H_INC
2 #define ZSERIO_TYPES_H_INC
3 
4 #include <cstdint>
5 #include <limits>
6 #include <string_view>
7 #include <type_traits>
8 
9 #include "zserio/BitSize.h"
12 #include "zserio/Traits.h"
13 
14 namespace zserio
15 {
16 
24 template <typename T>
26 {};
27 
28 namespace detail
29 {
30 
41 template <typename VALUE_TYPE>
42 class NumericTypeWrapper
43 {
44 public:
46  using ValueType = VALUE_TYPE;
47 
51  constexpr explicit NumericTypeWrapper() noexcept :
52  m_value()
53  {}
54 
60  constexpr NumericTypeWrapper(ValueType value) noexcept :
61  m_value(value)
62  {}
63 
67  constexpr operator ValueType() const noexcept
68  {
69  return m_value;
70  }
71 
80  constexpr NumericTypeWrapper& operator++() noexcept
81  {
82  ++m_value;
83  return *this;
84  }
85 
86  constexpr NumericTypeWrapper operator++(int) noexcept
87  {
88  NumericTypeWrapper old = *this;
89  operator++();
90  return old;
91  }
92 
93  constexpr NumericTypeWrapper& operator--() noexcept
94  {
95  --m_value;
96  return *this;
97  }
98 
99  constexpr NumericTypeWrapper operator--(int) noexcept
100  {
101  NumericTypeWrapper old = *this;
102  operator--();
103  return old;
104  }
105 
106  constexpr NumericTypeWrapper& operator+=(ValueType value) noexcept
107  {
108  m_value += value;
109  return *this;
110  }
111 
112  constexpr NumericTypeWrapper& operator-=(ValueType value) noexcept
113  {
114  m_value -= value;
115  return *this;
116  }
117 
118  constexpr NumericTypeWrapper& operator*=(ValueType value) noexcept
119  {
120  m_value *= value;
121  return *this;
122  }
123 
124  constexpr NumericTypeWrapper& operator/=(ValueType value) noexcept
125  {
126  m_value /= value;
127  return *this;
128  }
129 
130  constexpr NumericTypeWrapper& operator%=(ValueType value) noexcept
131  {
132  m_value %= value;
133  return *this;
134  }
135 
136  constexpr NumericTypeWrapper& operator&=(ValueType value) noexcept
137  {
138  m_value &= value;
139  return *this;
140  }
141 
142  constexpr NumericTypeWrapper& operator|=(ValueType value) noexcept
143  {
144  m_value |= value;
145  return *this;
146  }
147 
148  constexpr NumericTypeWrapper& operator^=(ValueType value) noexcept
149  {
150  m_value ^= value;
151  return *this;
152  }
153 
154  constexpr NumericTypeWrapper& operator<<=(ValueType value) noexcept
155  {
156  m_value <<= value;
157  return *this;
158  }
159 
160  constexpr NumericTypeWrapper& operator>>=(ValueType value) noexcept
161  {
162  m_value >>= value;
163  return *this;
164  }
165 
168 private:
169  ValueType m_value;
170 };
171 
172 class BoolWrapper : public NumericTypeWrapper<bool>
173 {
174 public:
175  using NumericTypeWrapper<bool>::NumericTypeWrapper;
176 };
177 
178 constexpr bool operator<(const BoolWrapper& lhs, const BoolWrapper& rhs)
179 {
180  return static_cast<int>(lhs) < static_cast<int>(rhs);
181 }
182 
183 constexpr bool operator>(const BoolWrapper& lhs, const BoolWrapper& rhs)
184 {
185  return rhs < lhs;
186 }
187 
188 constexpr bool operator<=(const BoolWrapper& lhs, const BoolWrapper& rhs)
189 {
190  return !(rhs < lhs);
191 }
192 
193 constexpr bool operator>=(const BoolWrapper& lhs, const BoolWrapper& rhs)
194 {
195  return !(lhs < rhs);
196 }
197 
198 template <BitSize BIT_SIZE, bool IS_SIGNED, typename = void>
199 struct fixed_int_value_type;
200 
201 template <BitSize BIT_SIZE>
202 struct fixed_int_value_type<BIT_SIZE, true, std::enable_if_t<(BIT_SIZE > 0 && BIT_SIZE <= 8)>>
203 {
204  using type = int8_t;
205 };
206 
207 template <BitSize BIT_SIZE>
208 struct fixed_int_value_type<BIT_SIZE, true, std::enable_if_t<(BIT_SIZE > 8 && BIT_SIZE <= 16)>>
209 {
210  using type = int16_t;
211 };
212 
213 template <BitSize BIT_SIZE>
214 struct fixed_int_value_type<BIT_SIZE, true, std::enable_if_t<(BIT_SIZE > 16 && BIT_SIZE <= 32)>>
215 {
216  using type = int32_t;
217 };
218 
219 template <BitSize BIT_SIZE>
220 struct fixed_int_value_type<BIT_SIZE, true, std::enable_if_t<(BIT_SIZE > 32 && BIT_SIZE <= 64)>>
221 {
222  using type = int64_t;
223 };
224 
225 template <BitSize BIT_SIZE>
226 struct fixed_int_value_type<BIT_SIZE, false, std::enable_if_t<(BIT_SIZE > 0 && BIT_SIZE <= 8)>>
227 {
228  using type = uint8_t;
229 };
230 
231 template <BitSize BIT_SIZE>
232 struct fixed_int_value_type<BIT_SIZE, false, std::enable_if_t<(BIT_SIZE > 8 && BIT_SIZE <= 16)>>
233 {
234  using type = uint16_t;
235 };
236 
237 template <BitSize BIT_SIZE>
238 struct fixed_int_value_type<BIT_SIZE, false, std::enable_if_t<(BIT_SIZE > 16 && BIT_SIZE <= 32)>>
239 {
240  using type = uint32_t;
241 };
242 
243 template <BitSize BIT_SIZE>
244 struct fixed_int_value_type<BIT_SIZE, false, std::enable_if_t<(BIT_SIZE > 32 && BIT_SIZE <= 64)>>
245 {
246  using type = uint64_t;
247 };
248 
249 template <BitSize BIT_SIZE, bool IS_SIGNED>
250 using fixed_int_value_type_t = typename fixed_int_value_type<BIT_SIZE, IS_SIGNED>::type;
251 
252 template <BitSize BIT_SIZE, bool IS_SIGNED>
253 class FixedIntWrapper : public NumericTypeWrapper<fixed_int_value_type_t<BIT_SIZE, IS_SIGNED>>
254 {
255 public:
256  using ValueType = fixed_int_value_type_t<BIT_SIZE, IS_SIGNED>;
257  using NumericTypeWrapper<ValueType>::NumericTypeWrapper;
258 
259  static_assert(BIT_SIZE > 0, "BitSize cannot be 0!");
260  static_assert((BIT_SIZE + 7) / 8 <= sizeof(ValueType), "BitSize doesn't fit to the VALUE_TYPE!");
261 };
262 
263 template <typename VALUE_TYPE>
264 class DynIntWrapper : public NumericTypeWrapper<VALUE_TYPE>
265 {
266 public:
267  using NumericTypeWrapper<VALUE_TYPE>::NumericTypeWrapper;
268 };
269 
270 enum class VarIntType : uint8_t
271 {
272  VAR16,
273  VAR32,
274  VAR64,
275  VAR,
276  VARSIZE
277 };
278 
279 template <typename VALUE_TYPE, VarIntType VAR_TYPE>
280 class VarIntWrapper : public NumericTypeWrapper<VALUE_TYPE>
281 {
282  static_assert(
283  VAR_TYPE != VarIntType::VARSIZE || std::is_unsigned_v<VALUE_TYPE>, "VARSIZE must be unsigned!");
284 
285 public:
286  using NumericTypeWrapper<VALUE_TYPE>::NumericTypeWrapper;
287 };
288 
289 enum class FloatType : uint8_t
290 {
291  FLOAT16,
292  FLOAT32,
293  FLOAT64
294 };
295 
296 template <typename VALUE_TYPE, FloatType FLOAT_TYPE>
297 class FloatWrapper : public NumericTypeWrapper<VALUE_TYPE>
298 {
299 public:
300  using NumericTypeWrapper<VALUE_TYPE>::NumericTypeWrapper;
301 };
302 
303 // helper traits to check if range checking is needed (used in checkedCast)
304 template <typename T>
305 struct needs_range_check
306 {};
307 
308 template <typename T>
309 inline constexpr bool needs_range_check_v = needs_range_check<T>::value;
310 
311 template <>
312 struct needs_range_check<BoolWrapper> : std::false_type
313 {};
314 
315 template <BitSize BIT_SIZE, bool IS_SIGNED>
316 struct needs_range_check<FixedIntWrapper<BIT_SIZE, IS_SIGNED>>
317 {
318  using ValueType = typename FixedIntWrapper<BIT_SIZE, IS_SIGNED>::ValueType;
319 
320  static constexpr bool value = sizeof(ValueType) * 8 != BIT_SIZE ||
321  (BIT_SIZE != 8 && BIT_SIZE != 16 && BIT_SIZE != 32 && BIT_SIZE != 64);
322 };
323 
324 template <typename VALUE_TYPE>
325 struct needs_range_check<DynIntWrapper<VALUE_TYPE>> : std::true_type
326 {};
327 
328 template <typename VALUE_TYPE, VarIntType VAR_TYPE>
329 struct needs_range_check<VarIntWrapper<VALUE_TYPE, VAR_TYPE>>
330 {
331  static constexpr bool value = VAR_TYPE != VarIntType::VAR;
332 };
333 
334 template <typename VALUE_TYPE, FloatType FLOAT_TYPE>
335 struct needs_range_check<FloatWrapper<VALUE_TYPE, FLOAT_TYPE>> : std::false_type
336 {
337  // TODO[mikir]: Does it have sense to have range checking for Float16?
338 };
339 
340 // range checker used by checkedCast, specialized for particular types when needed
341 template <typename T>
342 struct RangeChecker
343 {
344  static constexpr void check(typename T::ValueType value, std::string_view fieldName = "")
345  {
346  std::string_view fieldNamePrefix = (fieldName.empty()) ? "" : " for field ";
347  if constexpr (std::is_signed_v<typename T::ValueType>)
348  {
349  if (value < NumericLimits<T>::min() || value > NumericLimits<T>::max())
350  {
351  throw OutOfRangeException("Value '")
352  << value << "' out of range '<" << NumericLimits<T>::min() << ", "
353  << NumericLimits<T>::max() << ">'" << fieldNamePrefix << fieldName << "!";
354  }
355  }
356  else
357  {
358  if (value > NumericLimits<T>::max())
359  {
360  throw OutOfRangeException("Value '")
361  << value << "' out of bounds '" << NumericLimits<T>::max() << "'" << fieldNamePrefix
362  << fieldName << "!";
363  }
364  }
365  }
366 };
367 
368 template <typename VALUE_TYPE>
369 struct RangeChecker<DynIntWrapper<VALUE_TYPE>>
370 {
371  static constexpr void check(VALUE_TYPE value, BitSize numBits, std::string_view fieldName = "")
372  {
373  std::string_view fieldNamePrefix = (fieldName.empty()) ? "" : " for field ";
374  if constexpr (std::is_signed_v<VALUE_TYPE>)
375  {
376  if (value < NumericLimits<DynIntWrapper<VALUE_TYPE>>::min(numBits) ||
377  value > NumericLimits<DynIntWrapper<VALUE_TYPE>>::max(numBits))
378  {
379  throw OutOfRangeException("Value '")
380  << value << "' out of range '<"
381  << NumericLimits<DynIntWrapper<VALUE_TYPE>>::min(numBits) << ", "
382  << NumericLimits<DynIntWrapper<VALUE_TYPE>>::max(numBits) << ">'" << fieldNamePrefix
383  << fieldName << "!";
384  }
385  }
386  else
387  {
388  if (value > NumericLimits<DynIntWrapper<VALUE_TYPE>>::max(numBits))
389  {
390  throw OutOfRangeException("Value '")
391  << value << "' out of bounds '"
392  << NumericLimits<DynIntWrapper<VALUE_TYPE>>::max(numBits) << "'" << fieldNamePrefix
393  << fieldName << "!";
394  }
395  }
396  }
397 };
398 
399 } // namespace detail
400 
404 template <>
405 struct NumericLimits<detail::BoolWrapper>
406 {
407  static constexpr detail::BoolWrapper min() noexcept
408  {
409  return false;
410  }
411 
412  static constexpr detail::BoolWrapper max() noexcept
413  {
414  return true;
415  }
416 };
417 
421 template <BitSize BIT_SIZE, bool IS_SIGNED>
422 struct NumericLimits<detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED>>
423 {
424  using ValueType = typename detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED>::ValueType;
425 
426  static constexpr detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED> min() noexcept
427  {
428  if constexpr (!detail::needs_range_check_v<detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED>>)
429  {
430  return std::numeric_limits<ValueType>::min();
431  }
432  else if constexpr (std::is_signed_v<ValueType>)
433  {
434  return static_cast<ValueType>(-static_cast<ValueType>(1ULL << (BIT_SIZE - 1U)));
435  }
436  else
437  {
438  return 0;
439  }
440  }
441 
442  static constexpr detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED> max() noexcept
443  {
444  if constexpr (!detail::needs_range_check_v<detail::FixedIntWrapper<BIT_SIZE, IS_SIGNED>>)
445  {
446  return std::numeric_limits<ValueType>::max();
447  }
448  else if constexpr (std::is_signed_v<ValueType>)
449  {
450  return static_cast<ValueType>((1ULL << (BIT_SIZE - 1U)) - 1U);
451  }
452  else
453  {
454  return static_cast<ValueType>((1ULL << BIT_SIZE) - 1U);
455  }
456  }
457 };
458 
462 template <typename VALUE_TYPE, detail::VarIntType VAR_TYPE>
463 struct NumericLimits<detail::VarIntWrapper<VALUE_TYPE, VAR_TYPE>>
464 {
465  static constexpr detail::VarIntWrapper<VALUE_TYPE, VAR_TYPE> min() noexcept
466  {
467  if constexpr (std::is_signed_v<VALUE_TYPE>)
468  {
469  if constexpr (VAR_TYPE == detail::VarIntType::VAR)
470  {
471  return std::numeric_limits<VALUE_TYPE>::min();
472  }
473  else
474  {
475  return -max();
476  }
477  }
478  else
479  {
480  return 0;
481  }
482  }
483 
484  static constexpr detail::VarIntWrapper<VALUE_TYPE, VAR_TYPE> max() noexcept
485  {
486  if constexpr (VAR_TYPE == detail::VarIntType::VAR16)
487  {
488  return static_cast<VALUE_TYPE>((UINT64_C(1) << (FIRST_BYTE_BITS + 8)) - 1);
489  }
490  else if constexpr (VAR_TYPE == detail::VarIntType::VAR32)
491  {
492  return static_cast<VALUE_TYPE>((UINT64_C(1) << (FIRST_BYTE_BITS + 7 + 7 + 8)) - 1);
493  }
494  else if constexpr (VAR_TYPE == detail::VarIntType::VAR64)
495  {
496  return static_cast<VALUE_TYPE>((UINT64_C(1) << (FIRST_BYTE_BITS + 7 + 7 + 7 + 7 + 7 + 7 + 8)) - 1);
497  }
498  else if constexpr (VAR_TYPE == detail::VarIntType::VAR)
499  {
500  return std::numeric_limits<VALUE_TYPE>::max();
501  }
502  else // VARSIZE
503  {
504  return (UINT64_C(1) << (2U + 7U + 7U + 7U + 8U)) - 1;
505  }
506  }
507 
508 private:
509  static constexpr uint64_t FIRST_BYTE_BITS = std::is_signed_v<VALUE_TYPE> ? 6 : 7;
510 };
511 
515 template <typename VALUE_TYPE>
516 struct NumericLimits<detail::DynIntWrapper<VALUE_TYPE>>
517 {
518  static constexpr detail::DynIntWrapper<VALUE_TYPE> min(BitSize numBits)
519  {
520  if constexpr (std::is_signed_v<VALUE_TYPE>)
521  {
522  checkNumBits(numBits);
523 
524  return minSignedValue(numBits);
525  }
526  else
527  {
528  return 0;
529  }
530  }
531 
532  static constexpr detail::DynIntWrapper<VALUE_TYPE> max(BitSize numBits)
533  {
534  checkNumBits(numBits);
535 
536  if constexpr (std::is_signed_v<VALUE_TYPE>)
537  {
538  return maxSignedValue(numBits);
539  }
540  else
541  {
542  return maxUnsignedValue(numBits);
543  }
544  }
545 
546 private:
547  static constexpr void checkNumBits(BitSize numBits)
548  {
549  if (numBits < 1 || numBits > sizeof(VALUE_TYPE) * 8)
550  {
551  throw OutOfRangeException("Dynamic bit field numBits '")
552  << numBits << "' out of range '<1, " << sizeof(VALUE_TYPE) * 8 << ">'!";
553  }
554  }
555 
556  static constexpr VALUE_TYPE minSignedValue(BitSize numBits)
557  {
558  if constexpr (std::is_same_v<VALUE_TYPE, int64_t>)
559  {
560  if (numBits == 64)
561  {
562  return INT64_MIN;
563  }
564  }
565 
566  return static_cast<VALUE_TYPE>(-static_cast<int64_t>(1ULL << (numBits - 1U)));
567  }
568 
569  static constexpr VALUE_TYPE maxSignedValue(BitSize numBits)
570  {
571  if constexpr (std::is_same_v<VALUE_TYPE, int64_t>)
572  {
573  if (numBits == 64)
574  {
575  return INT64_MAX;
576  }
577  }
578 
579  return static_cast<VALUE_TYPE>((1ULL << (numBits - 1U)) - 1U);
580  }
581 
582  static constexpr VALUE_TYPE maxUnsignedValue(BitSize numBits)
583  {
584  if constexpr (std::is_same_v<VALUE_TYPE, uint64_t>)
585  {
586  if (numBits == 64)
587  {
588  return UINT64_MAX;
589  }
590  }
591 
592  return static_cast<VALUE_TYPE>((1ULL << numBits) - 1U);
593  }
594 };
595 
601 template <>
602 struct NumericLimits<detail::FloatWrapper<float, detail::FloatType::FLOAT16>>
603 {
604  static constexpr detail::FloatWrapper<float, detail::FloatType::FLOAT16> min() noexcept
605  {
606  return 6.103515625e-05F;
607  }
608 
609  static constexpr detail::FloatWrapper<float, detail::FloatType::FLOAT16> max() noexcept
610  {
611  return 65504.F;
612  }
613 };
614 
618 template <>
619 struct NumericLimits<detail::FloatWrapper<float, detail::FloatType::FLOAT32>>
620 {
621  static constexpr detail::FloatWrapper<float, detail::FloatType::FLOAT32> min() noexcept
622  {
623  return std::numeric_limits<float>::min();
624  }
625 
626  static constexpr detail::FloatWrapper<float, detail::FloatType::FLOAT32> max() noexcept
627  {
628  return std::numeric_limits<float>::max();
629  }
630 };
631 
635 template <>
636 struct NumericLimits<detail::FloatWrapper<double, detail::FloatType::FLOAT64>>
637 {
638  static constexpr detail::FloatWrapper<double, detail::FloatType::FLOAT64> min() noexcept
639  {
640  return std::numeric_limits<double>::min();
641  }
642 
643  static constexpr detail::FloatWrapper<double, detail::FloatType::FLOAT64> max() noexcept
644  {
645  return std::numeric_limits<double>::max();
646  }
647 };
648 
658 template <typename T, std::enable_if_t<is_numeric_wrapper_v<T>, int> = 0>
659 constexpr T fromCheckedValue(typename T::ValueType value) noexcept(!detail::needs_range_check_v<T>)
660 {
661  if constexpr (detail::needs_range_check_v<T>)
662  {
663  detail::RangeChecker<T>::check(value);
664  }
665 
666  return T(value);
667 }
668 
681 template <typename T, std::enable_if_t<is_numeric_wrapper_v<T>, int> = 0>
682 constexpr T fromCheckedValue(typename T::ValueType value, BitSize numBits)
683 {
684  detail::RangeChecker<T>::check(value, numBits);
685 
686  return T(value);
687 }
688 
698 template <typename T, std::enable_if_t<is_numeric_wrapper_v<T>, int> = 0>
699 constexpr typename T::ValueType toCheckedValue(T wrapper) noexcept(!detail::needs_range_check_v<T>)
700 {
701  if constexpr (detail::needs_range_check_v<T>)
702  {
703  detail::RangeChecker<T>::check(wrapper);
704  }
705 
706  return wrapper;
707 }
708 
721 template <typename T, std::enable_if_t<is_numeric_wrapper_v<T>, int> = 0>
722 constexpr typename T::ValueType toCheckedValue(T wrapper, BitSize numBits)
723 {
724  detail::RangeChecker<T>::check(wrapper, numBits);
725 
726  return wrapper;
727 }
728 
732 using Bool = detail::BoolWrapper;
733 
734 using Int1 = detail::FixedIntWrapper<1, true>;
735 using Int2 = detail::FixedIntWrapper<2, true>;
736 using Int3 = detail::FixedIntWrapper<3, true>;
737 using Int4 = detail::FixedIntWrapper<4, true>;
738 using Int5 = detail::FixedIntWrapper<5, true>;
739 using Int6 = detail::FixedIntWrapper<6, true>;
740 using Int7 = detail::FixedIntWrapper<7, true>;
741 using Int8 = detail::FixedIntWrapper<8, true>;
742 using Int9 = detail::FixedIntWrapper<9, true>;
743 using Int10 = detail::FixedIntWrapper<10, true>;
744 using Int11 = detail::FixedIntWrapper<11, true>;
745 using Int12 = detail::FixedIntWrapper<12, true>;
746 using Int13 = detail::FixedIntWrapper<13, true>;
747 using Int14 = detail::FixedIntWrapper<14, true>;
748 using Int15 = detail::FixedIntWrapper<15, true>;
749 using Int16 = detail::FixedIntWrapper<16, true>;
750 using Int17 = detail::FixedIntWrapper<17, true>;
751 using Int18 = detail::FixedIntWrapper<18, true>;
752 using Int19 = detail::FixedIntWrapper<19, true>;
753 using Int20 = detail::FixedIntWrapper<20, true>;
754 using Int21 = detail::FixedIntWrapper<21, true>;
755 using Int22 = detail::FixedIntWrapper<22, true>;
756 using Int23 = detail::FixedIntWrapper<23, true>;
757 using Int24 = detail::FixedIntWrapper<24, true>;
758 using Int25 = detail::FixedIntWrapper<25, true>;
759 using Int26 = detail::FixedIntWrapper<26, true>;
760 using Int27 = detail::FixedIntWrapper<27, true>;
761 using Int28 = detail::FixedIntWrapper<28, true>;
762 using Int29 = detail::FixedIntWrapper<29, true>;
763 using Int30 = detail::FixedIntWrapper<30, true>;
764 using Int31 = detail::FixedIntWrapper<31, true>;
765 using Int32 = detail::FixedIntWrapper<32, true>;
766 using Int33 = detail::FixedIntWrapper<33, true>;
767 using Int34 = detail::FixedIntWrapper<34, true>;
768 using Int35 = detail::FixedIntWrapper<35, true>;
769 using Int36 = detail::FixedIntWrapper<36, true>;
770 using Int37 = detail::FixedIntWrapper<37, true>;
771 using Int38 = detail::FixedIntWrapper<38, true>;
772 using Int39 = detail::FixedIntWrapper<39, true>;
773 using Int40 = detail::FixedIntWrapper<40, true>;
774 using Int41 = detail::FixedIntWrapper<41, true>;
775 using Int42 = detail::FixedIntWrapper<42, true>;
776 using Int43 = detail::FixedIntWrapper<43, true>;
777 using Int44 = detail::FixedIntWrapper<44, true>;
778 using Int45 = detail::FixedIntWrapper<45, true>;
779 using Int46 = detail::FixedIntWrapper<46, true>;
780 using Int47 = detail::FixedIntWrapper<47, true>;
781 using Int48 = detail::FixedIntWrapper<48, true>;
782 using Int49 = detail::FixedIntWrapper<49, true>;
783 using Int50 = detail::FixedIntWrapper<50, true>;
784 using Int51 = detail::FixedIntWrapper<51, true>;
785 using Int52 = detail::FixedIntWrapper<52, true>;
786 using Int53 = detail::FixedIntWrapper<53, true>;
787 using Int54 = detail::FixedIntWrapper<54, true>;
788 using Int55 = detail::FixedIntWrapper<55, true>;
789 using Int56 = detail::FixedIntWrapper<56, true>;
790 using Int57 = detail::FixedIntWrapper<57, true>;
791 using Int58 = detail::FixedIntWrapper<58, true>;
792 using Int59 = detail::FixedIntWrapper<59, true>;
793 using Int60 = detail::FixedIntWrapper<60, true>;
794 using Int61 = detail::FixedIntWrapper<61, true>;
795 using Int62 = detail::FixedIntWrapper<62, true>;
796 using Int63 = detail::FixedIntWrapper<63, true>;
797 using Int64 = detail::FixedIntWrapper<64, true>;
798 
799 using UInt1 = detail::FixedIntWrapper<1, false>;
800 using UInt2 = detail::FixedIntWrapper<2, false>;
801 using UInt3 = detail::FixedIntWrapper<3, false>;
802 using UInt4 = detail::FixedIntWrapper<4, false>;
803 using UInt5 = detail::FixedIntWrapper<5, false>;
804 using UInt6 = detail::FixedIntWrapper<6, false>;
805 using UInt7 = detail::FixedIntWrapper<7, false>;
806 using UInt8 = detail::FixedIntWrapper<8, false>;
807 using UInt9 = detail::FixedIntWrapper<9, false>;
808 using UInt10 = detail::FixedIntWrapper<10, false>;
809 using UInt11 = detail::FixedIntWrapper<11, false>;
810 using UInt12 = detail::FixedIntWrapper<12, false>;
811 using UInt13 = detail::FixedIntWrapper<13, false>;
812 using UInt14 = detail::FixedIntWrapper<14, false>;
813 using UInt15 = detail::FixedIntWrapper<15, false>;
814 using UInt16 = detail::FixedIntWrapper<16, false>;
815 using UInt17 = detail::FixedIntWrapper<17, false>;
816 using UInt18 = detail::FixedIntWrapper<18, false>;
817 using UInt19 = detail::FixedIntWrapper<19, false>;
818 using UInt20 = detail::FixedIntWrapper<20, false>;
819 using UInt21 = detail::FixedIntWrapper<21, false>;
820 using UInt22 = detail::FixedIntWrapper<22, false>;
821 using UInt23 = detail::FixedIntWrapper<23, false>;
822 using UInt24 = detail::FixedIntWrapper<24, false>;
823 using UInt25 = detail::FixedIntWrapper<25, false>;
824 using UInt26 = detail::FixedIntWrapper<26, false>;
825 using UInt27 = detail::FixedIntWrapper<27, false>;
826 using UInt28 = detail::FixedIntWrapper<28, false>;
827 using UInt29 = detail::FixedIntWrapper<29, false>;
828 using UInt30 = detail::FixedIntWrapper<30, false>;
829 using UInt31 = detail::FixedIntWrapper<31, false>;
830 using UInt32 = detail::FixedIntWrapper<32, false>;
831 using UInt33 = detail::FixedIntWrapper<33, false>;
832 using UInt34 = detail::FixedIntWrapper<34, false>;
833 using UInt35 = detail::FixedIntWrapper<35, false>;
834 using UInt36 = detail::FixedIntWrapper<36, false>;
835 using UInt37 = detail::FixedIntWrapper<37, false>;
836 using UInt38 = detail::FixedIntWrapper<38, false>;
837 using UInt39 = detail::FixedIntWrapper<39, false>;
838 using UInt40 = detail::FixedIntWrapper<40, false>;
839 using UInt41 = detail::FixedIntWrapper<41, false>;
840 using UInt42 = detail::FixedIntWrapper<42, false>;
841 using UInt43 = detail::FixedIntWrapper<43, false>;
842 using UInt44 = detail::FixedIntWrapper<44, false>;
843 using UInt45 = detail::FixedIntWrapper<45, false>;
844 using UInt46 = detail::FixedIntWrapper<46, false>;
845 using UInt47 = detail::FixedIntWrapper<47, false>;
846 using UInt48 = detail::FixedIntWrapper<48, false>;
847 using UInt49 = detail::FixedIntWrapper<49, false>;
848 using UInt50 = detail::FixedIntWrapper<50, false>;
849 using UInt51 = detail::FixedIntWrapper<51, false>;
850 using UInt52 = detail::FixedIntWrapper<52, false>;
851 using UInt53 = detail::FixedIntWrapper<53, false>;
852 using UInt54 = detail::FixedIntWrapper<54, false>;
853 using UInt55 = detail::FixedIntWrapper<55, false>;
854 using UInt56 = detail::FixedIntWrapper<56, false>;
855 using UInt57 = detail::FixedIntWrapper<57, false>;
856 using UInt58 = detail::FixedIntWrapper<58, false>;
857 using UInt59 = detail::FixedIntWrapper<59, false>;
858 using UInt60 = detail::FixedIntWrapper<60, false>;
859 using UInt61 = detail::FixedIntWrapper<61, false>;
860 using UInt62 = detail::FixedIntWrapper<62, false>;
861 using UInt63 = detail::FixedIntWrapper<63, false>;
862 using UInt64 = detail::FixedIntWrapper<64, false>;
863 
864 template <size_t BIT_SIZE>
865 using Int = detail::FixedIntWrapper<BIT_SIZE, true>;
866 
867 template <size_t BIT_SIZE>
868 using UInt = detail::FixedIntWrapper<BIT_SIZE, false>;
869 
870 using DynInt8 = detail::DynIntWrapper<int8_t>;
871 using DynInt16 = detail::DynIntWrapper<int16_t>;
872 using DynInt32 = detail::DynIntWrapper<int32_t>;
873 using DynInt64 = detail::DynIntWrapper<int64_t>;
874 
875 using DynUInt8 = detail::DynIntWrapper<uint8_t>;
876 using DynUInt16 = detail::DynIntWrapper<uint16_t>;
877 using DynUInt32 = detail::DynIntWrapper<uint32_t>;
878 using DynUInt64 = detail::DynIntWrapper<uint64_t>;
879 
880 using VarInt16 = detail::VarIntWrapper<int16_t, detail::VarIntType::VAR16>;
881 using VarInt32 = detail::VarIntWrapper<int32_t, detail::VarIntType::VAR32>;
882 using VarInt64 = detail::VarIntWrapper<int64_t, detail::VarIntType::VAR64>;
883 using VarInt = detail::VarIntWrapper<int64_t, detail::VarIntType::VAR>;
884 
885 using VarUInt16 = detail::VarIntWrapper<uint16_t, detail::VarIntType::VAR16>;
886 using VarUInt32 = detail::VarIntWrapper<uint32_t, detail::VarIntType::VAR32>;
887 using VarUInt64 = detail::VarIntWrapper<uint64_t, detail::VarIntType::VAR64>;
888 using VarUInt = detail::VarIntWrapper<uint64_t, detail::VarIntType::VAR>;
889 
890 using VarSize = detail::VarIntWrapper<uint32_t, detail::VarIntType::VARSIZE>;
891 
892 using Float16 = detail::FloatWrapper<float, detail::FloatType::FLOAT16>;
893 using Float32 = detail::FloatWrapper<float, detail::FloatType::FLOAT32>;
894 using Float64 = detail::FloatWrapper<double, detail::FloatType::FLOAT64>;
895 
906 template <typename VALUE_TYPE>
907 CppRuntimeException& operator<<(CppRuntimeException& exception, detail::NumericTypeWrapper<VALUE_TYPE> value)
908 {
909  return exception << static_cast<VALUE_TYPE>(value);
910 }
911 
912 namespace detail
913 {
914 
915 template <typename T, std::enable_if_t<is_numeric_wrapper_v<T>, int> = 0>
916 void validate(T wrapper, std::string_view fieldName) noexcept(!detail::needs_range_check_v<T>)
917 {
918  if constexpr (detail::needs_range_check_v<T>)
919  {
920  detail::RangeChecker<T>::check(wrapper, fieldName);
921  }
922 }
923 
924 template <typename T, std::enable_if_t<is_numeric_wrapper_v<T>, int> = 0>
925 void validate(T wrapper, BitSize numBits, std::string_view fieldName)
926 {
927  detail::RangeChecker<T>::check(wrapper, numBits, fieldName);
928 }
929 
930 inline BitSize bitSizeOf(BoolWrapper, BitSize = 0)
931 {
932  return 1;
933 }
934 
935 template <BitSize BIT_SIZE, bool IS_SIGNED>
936 BitSize bitSizeOf(FixedIntWrapper<BIT_SIZE, IS_SIGNED>, BitSize = 0)
937 {
938  static_assert(BIT_SIZE != 0, "Variable dynamic bit fields not allowed here!");
939  return BIT_SIZE;
940 }
941 
942 BitSize bitSizeOf(VarInt16 value, BitSize = 0);
943 
944 BitSize bitSizeOf(VarInt32 value, BitSize = 0);
945 
946 BitSize bitSizeOf(VarInt64 value, BitSize = 0);
947 
948 BitSize bitSizeOf(VarUInt16 value, BitSize = 0);
949 
950 BitSize bitSizeOf(VarUInt32 value, BitSize = 0);
951 
952 BitSize bitSizeOf(VarUInt64 value, BitSize = 0);
953 
954 BitSize bitSizeOf(VarInt value, BitSize = 0);
955 
956 BitSize bitSizeOf(VarUInt value, BitSize = 0);
957 
958 BitSize bitSizeOf(VarSize value, BitSize = 0);
959 
960 inline BitSize bitSizeOf(Float16, BitSize = 0)
961 {
962  return 16;
963 }
964 
965 inline BitSize bitSizeOf(Float32, BitSize = 0)
966 {
967  return 32;
968 }
969 
970 inline BitSize bitSizeOf(Float64, BitSize = 0)
971 {
972  return 64;
973 }
974 
975 inline BitSize initializeOffsets(BoolWrapper value, BitSize bitPosition)
976 {
977  return bitSizeOf(value, bitPosition);
978 }
979 
980 template <BitSize BIT_SIZE, bool IS_SIGNED>
981 BitSize initializeOffsets(FixedIntWrapper<BIT_SIZE, IS_SIGNED> value, BitSize bitPosition)
982 {
983  return bitSizeOf(value, bitPosition);
984 }
985 
986 BitSize initializeOffsets(VarInt16 value, BitSize = 0);
987 
988 BitSize initializeOffsets(VarInt32 value, BitSize = 0);
989 
990 BitSize initializeOffsets(VarInt64 value, BitSize = 0);
991 
992 BitSize initializeOffsets(VarUInt16 value, BitSize = 0);
993 
994 BitSize initializeOffsets(VarUInt32 value, BitSize = 0);
995 
996 BitSize initializeOffsets(VarUInt64 value, BitSize = 0);
997 
998 BitSize initializeOffsets(VarInt value, BitSize = 0);
999 
1000 BitSize initializeOffsets(VarUInt value, BitSize = 0);
1001 
1002 BitSize initializeOffsets(VarSize value, BitSize = 0);
1003 
1004 inline BitSize initializeOffsets(Float16 value, BitSize bitPosition)
1005 {
1006  return bitSizeOf(value, bitPosition);
1007 }
1008 
1009 inline BitSize initializeOffsets(Float32 value, BitSize bitPosition)
1010 {
1011  return bitSizeOf(value, bitPosition);
1012 }
1013 
1014 inline BitSize initializeOffsets(Float64 value, BitSize bitPosition)
1015 {
1016  return bitSizeOf(value, bitPosition);
1017 }
1018 
1019 } // namespace detail
1020 
1021 } // namespace zserio
1022 
1023 #endif // ifndef ZSERIO_TYPES_H_INC
Definition: BitBuffer.h:602
uint8_t numBits(uint64_t numValues)
detail::FixedIntWrapper< 39, false > UInt39
Definition: Types.h:837
detail::FixedIntWrapper< 14, true > Int14
Definition: Types.h:747
detail::FixedIntWrapper< 6, false > UInt6
Definition: Types.h:804
detail::DynIntWrapper< uint16_t > DynUInt16
Definition: Types.h:876
detail::FixedIntWrapper< 19, true > Int19
Definition: Types.h:752
detail::FixedIntWrapper< 44, false > UInt44
Definition: Types.h:842
detail::FixedIntWrapper< 31, false > UInt31
Definition: Types.h:829
detail::FixedIntWrapper< 23, false > UInt23
Definition: Types.h:821
detail::FixedIntWrapper< 28, false > UInt28
Definition: Types.h:826
bool operator>(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
Definition: BitBuffer.h:525
detail::FixedIntWrapper< 45, false > UInt45
Definition: Types.h:843
detail::FixedIntWrapper< 33, false > UInt33
Definition: Types.h:831
detail::FixedIntWrapper< 60, true > Int60
Definition: Types.h:793
detail::FixedIntWrapper< 2, false > UInt2
Definition: Types.h:800
detail::FixedIntWrapper< 35, true > Int35
Definition: Types.h:768
constexpr T fromCheckedValue(typename T::ValueType value) noexcept(!detail::needs_range_check_v< T >)
Definition: Types.h:659
detail::FixedIntWrapper< 64, false > UInt64
Definition: Types.h:862
detail::FixedIntWrapper< 48, false > UInt48
Definition: Types.h:846
detail::DynIntWrapper< uint32_t > DynUInt32
Definition: Types.h:877
detail::FixedIntWrapper< 16, true > Int16
Definition: Types.h:749
detail::FixedIntWrapper< 61, false > UInt61
Definition: Types.h:859
detail::FixedIntWrapper< 4, true > Int4
Definition: Types.h:737
detail::FixedIntWrapper< 59, false > UInt59
Definition: Types.h:857
detail::FixedIntWrapper< 49, true > Int49
Definition: Types.h:782
detail::FixedIntWrapper< 9, true > Int9
Definition: Types.h:742
detail::FixedIntWrapper< 2, true > Int2
Definition: Types.h:735
detail::FixedIntWrapper< 37, true > Int37
Definition: Types.h:770
detail::FixedIntWrapper< 10, true > Int10
Definition: Types.h:743
detail::FixedIntWrapper< BIT_SIZE, true > Int
Definition: Types.h:865
detail::BoolWrapper Bool
Definition: Types.h:732
detail::FixedIntWrapper< 18, true > Int18
Definition: Types.h:751
detail::FixedIntWrapper< 15, false > UInt15
Definition: Types.h:813
detail::FixedIntWrapper< 56, false > UInt56
Definition: Types.h:854
detail::FixedIntWrapper< 20, true > Int20
Definition: Types.h:753
detail::VarIntWrapper< uint64_t, detail::VarIntType::VAR > VarUInt
Definition: Types.h:888
unsigned int BitSize
Definition: BitSize.h:8
detail::FixedIntWrapper< 7, true > Int7
Definition: Types.h:740
detail::FixedIntWrapper< 16, false > UInt16
Definition: Types.h:814
detail::FixedIntWrapper< 56, true > Int56
Definition: Types.h:789
detail::FixedIntWrapper< 11, false > UInt11
Definition: Types.h:809
detail::FixedIntWrapper< 8, false > UInt8
Definition: Types.h:806
detail::FixedIntWrapper< 53, true > Int53
Definition: Types.h:786
detail::FixedIntWrapper< 63, true > Int63
Definition: Types.h:796
detail::FixedIntWrapper< 26, true > Int26
Definition: Types.h:759
detail::FixedIntWrapper< 14, false > UInt14
Definition: Types.h:812
detail::FixedIntWrapper< 25, true > Int25
Definition: Types.h:758
detail::FixedIntWrapper< 42, false > UInt42
Definition: Types.h:840
detail::FixedIntWrapper< 32, true > Int32
Definition: Types.h:765
detail::FixedIntWrapper< 5, false > UInt5
Definition: Types.h:803
detail::FixedIntWrapper< 17, false > UInt17
Definition: Types.h:815
detail::FixedIntWrapper< 6, true > Int6
Definition: Types.h:739
detail::FloatWrapper< float, detail::FloatType::FLOAT16 > Float16
Definition: Types.h:892
detail::FixedIntWrapper< 20, false > UInt20
Definition: Types.h:818
detail::FloatWrapper< float, detail::FloatType::FLOAT32 > Float32
Definition: Types.h:893
detail::FixedIntWrapper< 49, false > UInt49
Definition: Types.h:847
detail::FixedIntWrapper< 51, true > Int51
Definition: Types.h:784
detail::FixedIntWrapper< 28, true > Int28
Definition: Types.h:761
detail::VarIntWrapper< int32_t, detail::VarIntType::VAR32 > VarInt32
Definition: Types.h:881
detail::FixedIntWrapper< 40, false > UInt40
Definition: Types.h:838
detail::FixedIntWrapper< 40, true > Int40
Definition: Types.h:773
detail::FixedIntWrapper< 30, true > Int30
Definition: Types.h:763
detail::FixedIntWrapper< 60, false > UInt60
Definition: Types.h:858
detail::FixedIntWrapper< 42, true > Int42
Definition: Types.h:775
detail::FixedIntWrapper< 7, false > UInt7
Definition: Types.h:805
detail::DynIntWrapper< int8_t > DynInt8
Definition: Types.h:870
detail::FixedIntWrapper< 3, true > Int3
Definition: Types.h:736
detail::FixedIntWrapper< 38, false > UInt38
Definition: Types.h:836
detail::DynIntWrapper< uint64_t > DynUInt64
Definition: Types.h:878
detail::FixedIntWrapper< 43, false > UInt43
Definition: Types.h:841
detail::VarIntWrapper< uint16_t, detail::VarIntType::VAR16 > VarUInt16
Definition: Types.h:885
bool operator<(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
Definition: BitBuffer.h:519
detail::FixedIntWrapper< 36, false > UInt36
Definition: Types.h:834
detail::FixedIntWrapper< 58, true > Int58
Definition: Types.h:791
detail::FixedIntWrapper< 22, true > Int22
Definition: Types.h:755
detail::FixedIntWrapper< 25, false > UInt25
Definition: Types.h:823
detail::FixedIntWrapper< 29, false > UInt29
Definition: Types.h:827
detail::FixedIntWrapper< 1, false > UInt1
Definition: Types.h:799
detail::DynIntWrapper< int64_t > DynInt64
Definition: Types.h:873
detail::FixedIntWrapper< 55, false > UInt55
Definition: Types.h:853
detail::FixedIntWrapper< 45, true > Int45
Definition: Types.h:778
detail::FixedIntWrapper< 11, true > Int11
Definition: Types.h:744
detail::FixedIntWrapper< 39, true > Int39
Definition: Types.h:772
detail::FixedIntWrapper< 58, false > UInt58
Definition: Types.h:856
detail::FixedIntWrapper< 43, true > Int43
Definition: Types.h:776
detail::FixedIntWrapper< 24, true > Int24
Definition: Types.h:757
detail::FixedIntWrapper< 3, false > UInt3
Definition: Types.h:801
detail::VarIntWrapper< uint64_t, detail::VarIntType::VAR64 > VarUInt64
Definition: Types.h:887
detail::FixedIntWrapper< 18, false > UInt18
Definition: Types.h:816
detail::FixedIntWrapper< 22, false > UInt22
Definition: Types.h:820
detail::FixedIntWrapper< 4, false > UInt4
Definition: Types.h:802
detail::FixedIntWrapper< 34, true > Int34
Definition: Types.h:767
detail::FixedIntWrapper< 54, false > UInt54
Definition: Types.h:852
detail::FixedIntWrapper< 32, false > UInt32
Definition: Types.h:830
detail::FixedIntWrapper< 41, true > Int41
Definition: Types.h:774
detail::FixedIntWrapper< 37, false > UInt37
Definition: Types.h:835
detail::FixedIntWrapper< 27, true > Int27
Definition: Types.h:760
detail::FixedIntWrapper< 13, true > Int13
Definition: Types.h:746
detail::FixedIntWrapper< 57, true > Int57
Definition: Types.h:790
detail::FixedIntWrapper< 53, false > UInt53
Definition: Types.h:851
constexpr T::ValueType toCheckedValue(T wrapper) noexcept(!detail::needs_range_check_v< T >)
Definition: Types.h:699
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)
Definition: BitBuffer.h:553
detail::FixedIntWrapper< 62, false > UInt62
Definition: Types.h:860
detail::FixedIntWrapper< 15, true > Int15
Definition: Types.h:748
detail::FixedIntWrapper< 46, false > UInt46
Definition: Types.h:844
detail::FixedIntWrapper< 12, true > Int12
Definition: Types.h:745
detail::FixedIntWrapper< 10, false > UInt10
Definition: Types.h:808
detail::FixedIntWrapper< 52, false > UInt52
Definition: Types.h:850
detail::FixedIntWrapper< 8, true > Int8
Definition: Types.h:741
detail::FixedIntWrapper< 64, true > Int64
Definition: Types.h:797
detail::FixedIntWrapper< 48, true > Int48
Definition: Types.h:781
detail::FixedIntWrapper< 41, false > UInt41
Definition: Types.h:839
detail::FixedIntWrapper< 30, false > UInt30
Definition: Types.h:828
detail::FixedIntWrapper< 26, false > UInt26
Definition: Types.h:824
detail::FixedIntWrapper< 36, true > Int36
Definition: Types.h:769
detail::FixedIntWrapper< 19, false > UInt19
Definition: Types.h:817
detail::FixedIntWrapper< 35, false > UInt35
Definition: Types.h:833
detail::FixedIntWrapper< BIT_SIZE, false > UInt
Definition: Types.h:868
detail::FixedIntWrapper< 50, true > Int50
Definition: Types.h:783
detail::VarIntWrapper< int16_t, detail::VarIntType::VAR16 > VarInt16
Definition: Types.h:880
detail::FixedIntWrapper< 13, false > UInt13
Definition: Types.h:811
bool operator<=(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
Definition: BitBuffer.h:531
detail::FixedIntWrapper< 46, true > Int46
Definition: Types.h:779
detail::FixedIntWrapper< 29, true > Int29
Definition: Types.h:762
detail::FixedIntWrapper< 55, true > Int55
Definition: Types.h:788
detail::FixedIntWrapper< 33, true > Int33
Definition: Types.h:766
detail::FixedIntWrapper< 61, true > Int61
Definition: Types.h:794
detail::FixedIntWrapper< 57, false > UInt57
Definition: Types.h:855
detail::DynIntWrapper< int16_t > DynInt16
Definition: Types.h:871
detail::FloatWrapper< double, detail::FloatType::FLOAT64 > Float64
Definition: Types.h:894
detail::FixedIntWrapper< 38, true > Int38
Definition: Types.h:771
detail::FixedIntWrapper< 17, true > Int17
Definition: Types.h:750
detail::FixedIntWrapper< 24, false > UInt24
Definition: Types.h:822
detail::FixedIntWrapper< 47, true > Int47
Definition: Types.h:780
detail::VarIntWrapper< uint32_t, detail::VarIntType::VAR32 > VarUInt32
Definition: Types.h:886
detail::FixedIntWrapper< 21, true > Int21
Definition: Types.h:754
detail::FixedIntWrapper< 50, false > UInt50
Definition: Types.h:848
detail::FixedIntWrapper< 62, true > Int62
Definition: Types.h:795
detail::FixedIntWrapper< 34, false > UInt34
Definition: Types.h:832
detail::FixedIntWrapper< 54, true > Int54
Definition: Types.h:787
detail::DynIntWrapper< int32_t > DynInt32
Definition: Types.h:872
detail::FixedIntWrapper< 23, true > Int23
Definition: Types.h:756
bool operator>=(const BasicBitBufferView< ALLOC > &lhs, const BasicBitBufferView< ALLOC > &rhs)
Definition: BitBuffer.h:537
detail::FixedIntWrapper< 21, false > UInt21
Definition: Types.h:819
detail::FixedIntWrapper< 44, true > Int44
Definition: Types.h:777
detail::FixedIntWrapper< 1, true > Int1
Definition: Types.h:734
detail::FixedIntWrapper< 51, false > UInt51
Definition: Types.h:849
detail::DynIntWrapper< uint8_t > DynUInt8
Definition: Types.h:875
detail::FixedIntWrapper< 12, false > UInt12
Definition: Types.h:810
detail::FixedIntWrapper< 9, false > UInt9
Definition: Types.h:807
detail::FixedIntWrapper< 47, false > UInt47
Definition: Types.h:845
detail::FixedIntWrapper< 59, true > Int59
Definition: Types.h:792
detail::VarIntWrapper< int64_t, detail::VarIntType::VAR > VarInt
Definition: Types.h:883
detail::FixedIntWrapper< 63, false > UInt63
Definition: Types.h:861
detail::VarIntWrapper< int64_t, detail::VarIntType::VAR64 > VarInt64
Definition: Types.h:882
detail::VarIntWrapper< uint32_t, detail::VarIntType::VARSIZE > VarSize
Definition: Types.h:890
detail::FixedIntWrapper< 31, true > Int31
Definition: Types.h:764
detail::FixedIntWrapper< 27, false > UInt27
Definition: Types.h:825
detail::FixedIntWrapper< 52, true > Int52
Definition: Types.h:785
detail::FixedIntWrapper< 5, true > Int5
Definition: Types.h:738