summaryrefslogtreecommitdiff
path: root/asl/meta.hpp
diff options
context:
space:
mode:
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)
{