[ox/std] Add is_pointer and is_pointer_v
This commit is contained in:
parent
cd1db371eb
commit
6610b501b3
13
deps/ox/src/ox/std/typetraits.hpp
vendored
13
deps/ox/src/ox/std/typetraits.hpp
vendored
@ -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>
|
template<typename T>
|
||||||
struct remove_pointer {
|
struct remove_pointer {
|
||||||
using type = T;
|
using type = T;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user