diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-11-22 17:13:03 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | 58bb86fd2f0ecd740fc5bc8078de44221c12c70a (patch) | |
tree | 79e83f044d643211d3f9ebfd933e9dea92b2d04e /asl/meta.hpp | |
parent | f5ef1937eafb3d96b3683d92639a193694210c70 (diff) |
Add a niche to box
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
|