diff --git a/BAN/include/BAN/Traits.h b/BAN/include/BAN/Traits.h index 5902978235..646e5af0e3 100644 --- a/BAN/include/BAN/Traits.h +++ b/BAN/include/BAN/Traits.h @@ -34,8 +34,10 @@ namespace BAN template struct either_or { using type = T1; }; template using either_or_t = typename either_or::type; - struct true_type { static constexpr bool value = true; }; - struct false_type { static constexpr bool value = false; }; + template struct integral_constant { static constexpr T value = V; }; + template inline constexpr T integral_constant_v = integral_constant::value; + using true_type = integral_constant; + using false_type = integral_constant; template struct is_same : false_type {}; template struct is_same : true_type {}; @@ -87,9 +89,6 @@ namespace BAN template struct is_base_of { static constexpr bool value = __is_base_of(Base, Derived); }; template inline constexpr bool is_base_of_v = is_base_of::value; - template struct integral_constant { static constexpr T value = V; }; - template inline constexpr T integral_constant_v = integral_constant::value; - namespace detail { template> struct is_signed { static constexpr bool value = T(-1) < T(0); };