mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
feat(kernel/std): implement std::is_pointer_v
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
3edb4b4761
commit
23d0056098
@ -693,4 +693,32 @@ namespace std
|
|||||||
|
|
||||||
template <class F, class... ArgTypes>
|
template <class F, class... ArgTypes>
|
||||||
using invoke_result_t = typename invoke_result<F, ArgTypes...>::type;
|
using invoke_result_t = typename invoke_result<F, ArgTypes...>::type;
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
struct is_pointer : std::false_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
struct is_pointer<T *> : std::true_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
struct is_pointer<T *const> : std::true_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
struct is_pointer<T *volatile> : std::true_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
struct is_pointer<T *const volatile> : std::true_type
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
constexpr bool is_pointer_v = is_pointer<T>::value;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user