From 8607772d4f9e21f53c1abfd9379737403b97f430 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 5 Jan 2025 15:25:45 +0100 Subject: Fix a few mistakes in option, and make it trivial when possible --- asl/meta.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'asl/meta.hpp') diff --git a/asl/meta.hpp b/asl/meta.hpp index 43bd7cc..84616f4 100644 --- a/asl/meta.hpp +++ b/asl/meta.hpp @@ -190,7 +190,7 @@ template<> struct _is_integer_helper : true_type {}; template concept is_integer = _is_integer_helper>::value; template -concept equality_comparable_with = requires (const un_cvref_t& a, const un_cvref_t& b) +concept equality_comparable_with = requires (const un_cvref_t& a, const un_cvref_t& b) { { a == b } -> same_as; { b == a } -> same_as; @@ -200,16 +200,12 @@ concept equality_comparable_with = requires (const un_cvref_t& a, const un_cv template concept equality_comparable = equality_comparable_with; -struct niche {}; +struct niche_t {}; template -concept has_niche = constructible_from && - requires (const T& value, niche n) - { - { value == n } -> same_as; - }; +concept has_niche = constructible_from && equality_comparable_with; template -concept is_niche = same_as, niche>; +concept is_niche = same_as, niche_t>; } // namespace asl -- cgit