[ox/std] Add is_pointer and is_pointer_v

This commit is contained in:
Gary Talent 2021-04-17 10:56:24 -05:00
parent cd1db371eb
commit 6610b501b3

View File

@ -117,6 +117,19 @@ struct enable_if<true, T> {
};
template<typename T>
struct is_pointer {
static constexpr bool value = false;
};
template<typename T>
struct is_pointer<T*> {
static constexpr bool value = true;
};
template<typename T>
constexpr bool is_pointer_v = is_pointer<T>::value;
template<typename T>
struct remove_pointer {
using type = T;