From 58bb86fd2f0ecd740fc5bc8078de44221c12c70a Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Fri, 22 Nov 2024 17:13:03 +0100 Subject: Add a niche to box --- asl/meta.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'asl/meta.hpp') 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 struct _is_array_helper : true_type {}; template concept is_array = _is_array_helper::value; +struct niche {}; + +template +concept has_niche = constructible_from && + requires (const T& value, niche n) + { + { value == n } -> same_as; + }; + } // namespace asl -- cgit