From 9ad66705d35ece57eedaae17e33a5d570539f7eb Mon Sep 17 00:00:00 2001 From: Dimo Markov Date: Sun, 8 Oct 2023 15:48:07 +0300 Subject: [PATCH] Added CT::Similar --- source/Core/Common.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/Core/Common.hpp b/source/Core/Common.hpp index d21f808..3465e0f 100644 --- a/source/Core/Common.hpp +++ b/source/Core/Common.hpp @@ -301,6 +301,12 @@ namespace Langulus concept Same = ::std::same_as, Decay> and ((::std::same_as, Decay>) and ...); + /// True if unqualified T1 matches all unqualified T2 + /// @attention ignores cv-qualifications only + template + concept Similar = ::std::same_as>, Decvq>> + and ((::std::same_as>, Decvq>>) and ...); + /// True if T1 matches exactly T2, including density and cv-qualifiers template concept Exact = ::std::same_as @@ -312,6 +318,12 @@ namespace Langulus concept SameAsOneOf = ::std::same_as, Decay> or ((::std::same_as, Decay>) or ...); + /// True if unqualified T1 matches any of unqualified T2 + /// @attention ignores cv-qualifications only + template + concept SimilarAsOneOf = ::std::same_as< Decvq>, Decvq>> + or ((::std::same_as< Decvq>, Decvq>>) or ...); + /// True if T1 matches exactly one of T2, including density and cvq template concept ExactAsOneOf = ::std::same_as