diff --git a/BAN/include/BAN/Traits.h b/BAN/include/BAN/Traits.h index 1db6ca6f..b85b7073 100644 --- a/BAN/include/BAN/Traits.h +++ b/BAN/include/BAN/Traits.h @@ -46,6 +46,18 @@ namespace BAN template inline constexpr bool is_lvalue_reference_v = is_lvalue_reference::value; template concept lvalue_reference = is_lvalue_reference_v; + template struct is_constructible { static constexpr bool value = __is_constructible(T, Args...); }; + template inline constexpr bool is_constructible_v = is_constructible::value; + + template struct is_default_constructible { static constexpr bool value = is_constructible_v; }; + template inline constexpr bool is_default_constructible_v = is_default_constructible::value; + + template struct is_copy_constructible { static constexpr bool value = is_constructible_v; }; + template inline constexpr bool is_copy_constructible_v = is_copy_constructible::value; + + template struct is_move_constructible { static constexpr bool value = is_constructible_v; }; + template inline constexpr bool is_move_constructible_v = is_move_constructible::value; + template struct is_integral { static constexpr bool value = requires (T t, T* p, void (*f)(T)) { reinterpret_cast(t); f(0); p + t; }; }; template inline constexpr bool is_integral_v = is_integral::value; template concept integral = is_integral_v;