summaryrefslogtreecommitdiff
path: root/asl/meta.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-31 01:16:12 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-31 01:16:12 +0100
commitb2eddfabffeb78fc5b49f9c17d70175d2dfed2e0 (patch)
tree4f292d1608b0c5f4f60dab65af66a7c29156f425 /asl/meta.hpp
parent739f53210466415affd5b0ebd5b3da5c251d232c (diff)
Some work on buffer move
Diffstat (limited to 'asl/meta.hpp')
-rw-r--r--asl/meta.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/asl/meta.hpp b/asl/meta.hpp
index 3fd76b4..133d2fb 100644
--- a/asl/meta.hpp
+++ b/asl/meta.hpp
@@ -164,6 +164,17 @@ 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;
+template<typename T, typename U>
+concept equality_comparable_with = requires (const un_cvref_t<T>& a, const un_cvref_t<T>& b)
+{
+ { a == b } -> same_as<bool>;
+ { b == a } -> same_as<bool>;
+ { a != b } -> same_as<bool>;
+ { b != a } -> same_as<bool>;
+};
+
+template<typename T> concept equality_comparable = equality_comparable_with<T, T>;
+
struct niche {};
template<typename T>