summaryrefslogtreecommitdiff
path: root/asl/meta.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-06 00:33:50 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-06 00:33:50 +0100
commit48f7e22d9cc93989173afe2550fcc2f082c61773 (patch)
tree1adaa1c16b905b48eeff1997c595909d43a46cd0 /asl/meta.hpp
parent159f38d4e12bbcc48799431f4b69321a445be8ca (diff)
Start work on hashing
Diffstat (limited to 'asl/meta.hpp')
-rw-r--r--asl/meta.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/asl/meta.hpp b/asl/meta.hpp
index 84616f4..c353b0f 100644
--- a/asl/meta.hpp
+++ b/asl/meta.hpp
@@ -189,6 +189,13 @@ template<> struct _is_integer_helper<uint64_t> : true_type {};
template<typename T> concept is_integer = _is_integer_helper<un_cv_t<T>>::value;
+template<typename T> struct is_uniquely_represented : false_type {};
+template<is_integer T> struct is_uniquely_represented<T> : true_type {};
+template<> struct is_uniquely_represented<uint128_t> : true_type {};
+template<> struct is_uniquely_represented<byte> : true_type {};
+
+template<typename T> concept uniquely_represented = is_uniquely_represented<T>::value;
+
template<typename T, typename U>
concept equality_comparable_with = requires (const un_cvref_t<T>& a, const un_cvref_t<U>& b)
{