[ox/std] Fix Signed_c and Unsigned_c
This commit is contained in:
parent
9220271630
commit
1b790a34c4
8
deps/ox/src/ox/std/typetraits.hpp
vendored
8
deps/ox/src/ox/std/typetraits.hpp
vendored
@ -159,11 +159,11 @@ constexpr bool is_class_v = is_class<T>();
|
||||
template<typename T>
|
||||
constexpr bool is_signed_v = integral_constant<bool, T(-1) < T(0)>::value;
|
||||
|
||||
template<typename T, std::size_t bits>
|
||||
concept Signed_c = is_signed_v<T> && sizeof(T) == 8 * bits;
|
||||
template<typename T, std::size_t bits = sizeof(T) * 8>
|
||||
concept Signed_c = is_signed_v<T> && sizeof(T) == bits / 8;
|
||||
|
||||
template<typename T, std::size_t bits>
|
||||
concept Unsigned_c = !is_signed_v<T> && sizeof(T) == 8 * bits;
|
||||
template<typename T, std::size_t bits = sizeof(T) * 8>
|
||||
concept Unsigned_c = !is_signed_v<T> && sizeof(T) == bits / 8;
|
||||
|
||||
template<typename T, typename U>
|
||||
struct is_same: false_type {};
|
||||
|
Loading…
Reference in New Issue
Block a user