Add floating point type detection
This commit is contained in:
parent
068a179cef
commit
5e318d1a42
7
type.hpp
7
type.hpp
@ -36,6 +36,13 @@ template <> struct is_integral<unsigned long long int> : true_type {};
|
||||
|
||||
template <typename T> static constexpr auto is_integral_v = is_integral<T>::value;
|
||||
|
||||
template <typename T> struct is_floating_point : false_type {};
|
||||
template <> struct is_floating_point<float> : true_type {};
|
||||
template <> struct is_floating_point<double> : true_type {};
|
||||
template <> struct is_floating_point<long double> : true_type {};
|
||||
|
||||
template <typename T> static constexpr auto is_floating_point_v = is_floating_point<T>::value;
|
||||
|
||||
template <typename T, typename U> struct is_same : false_type {};
|
||||
template <typename T> struct is_same<T, T> : true_type {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user