diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-11-28 23:53:55 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | 27c3969e69f5525ccb0bc462a615a14142b5f178 (patch) | |
tree | a11ebc28cb6c2609d5e04913f63d5c1ba1181e0e /asl/meta.hpp | |
parent | 3dc9bc3a6cefa30c553c6ec21b1545db98e26b6d (diff) |
Add float utilities, & float formatting with dragonbox
Diffstat (limited to 'asl/meta.hpp')
-rw-r--r-- | asl/meta.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/meta.hpp b/asl/meta.hpp index ab25a88..35e238b 100644 --- a/asl/meta.hpp +++ b/asl/meta.hpp @@ -160,6 +160,12 @@ template<typename T, int N> struct _is_array_helper<T[N]> : true_type {}; template<typename T> concept is_array = _is_array_helper<T>::value;
+template<typename T> struct _is_floating_point_helper : false_type {};
+template<> struct _is_floating_point_helper<float> : true_type {};
+template<> struct _is_floating_point_helper<double> : true_type {};
+
+template<typename T> concept is_floating_point = _is_floating_point_helper<un_cv_t<T>>::value;
+
struct niche {};
template<typename T>
|