diff options
Diffstat (limited to 'asl/meta.hpp')
-rw-r--r-- | asl/meta.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/asl/meta.hpp b/asl/meta.hpp index f0397a1..72b36fd 100644 --- a/asl/meta.hpp +++ b/asl/meta.hpp @@ -160,4 +160,13 @@ template<typename T, int N> struct _is_array_helper<T[N]> : true_type {}; template<typename T> concept is_array = _is_array_helper<T>::value;
+struct niche {};
+
+template<typename T>
+concept has_niche = constructible_from<T, niche> &&
+ requires (const T& value, niche n)
+ {
+ { value == n } -> same_as<bool>;
+ };
+
} // namespace asl
|