traits.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include <type_traits>
  3. #include <nall/stdint.hpp>
  4. //pull all type traits used by nall from std namespace into nall namespace
  5. //this removes the requirement to prefix type traits with std:: within nall
  6. namespace nall {
  7. using std::add_const;
  8. using std::conditional;
  9. using std::conditional_t;
  10. using std::decay;
  11. using std::declval;
  12. using std::enable_if;
  13. using std::enable_if_t;
  14. using std::false_type;
  15. using std::is_floating_point;
  16. using std::is_floating_point_v;
  17. using std::forward;
  18. using std::initializer_list;
  19. using std::is_array;
  20. using std::is_base_of;
  21. using std::is_base_of_v;
  22. using std::is_function;
  23. using std::is_integral;
  24. using std::is_integral_v;
  25. using std::is_same;
  26. using std::is_same_v;
  27. using std::is_signed;
  28. using std::is_signed_v;
  29. using std::is_unsigned;
  30. using std::is_unsigned_v;
  31. using std::move;
  32. using std::nullptr_t;
  33. using std::remove_extent;
  34. using std::remove_reference;
  35. using std::swap;
  36. using std::true_type;
  37. }
  38. namespace std {
  39. #if INTMAX_BITS >= 128
  40. template<> struct is_signed<int128_t> : true_type {};
  41. template<> struct is_unsigned<uint128_t> : true_type {};
  42. #endif
  43. }