feat(kernel/std): add is_floating_point type trait

This commit is contained in:
EnderIce2 2025-05-10 14:58:16 +00:00
parent 75d51fb9d9
commit c491351fd0
Signed by: enderice2
GPG Key ID: FEB6B8A8507BA62E

View File

@ -721,4 +721,12 @@ namespace std
template <class T>
constexpr bool is_pointer_v = is_pointer<T>::value;
template <class T>
struct is_floating_point : std::integral_constant<bool, std::is_same<float, typename std::remove_cv<T>::type>::value || std::is_same<double, typename std::remove_cv<T>::type>::value || std::is_same<long double, typename std::remove_cv<T>::type>::value>
{
};
template <class T>
constexpr bool is_floating_point_v = is_floating_point<T>::value;
}