[ox/std] Add is_pointer and is_pointer_v

(synced from 6610b501b3)
This commit is contained in:
2021-04-17 10:56:24 -05:00
parent bd35d417cc
commit fcd5a8f114
+13
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;