Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

30 Zeilen
544 B

  1. #pragma once
  2. #include <cstddef>
  3. #include <type_traits>
  4. namespace utl {
  5. namespace mp {
  6. template<typename T>
  7. struct tag_const { };
  8. template<typename T, T t>
  9. struct integral_constant :
  10. public std::integral_constant<T, t>
  11. {
  12. using tag = tag_const<T>;
  13. };
  14. template<bool B>
  15. using c_bool = integral_constant<bool, B>;
  16. template<size_t S>
  17. using c_size_t = integral_constant<size_t, S>;
  18. using c_true = c_bool<true>;
  19. using c_false = c_bool<false>;
  20. using c_zero = c_size_t<0>;
  21. }
  22. }