-
Notifications
You must be signed in to change notification settings - Fork 2
isPermutationType::with
Igor Zarzycki edited this page Jan 24, 2022
·
4 revisions
Defined in "crap/algorithm.d/ispermutationtype.h".
Defined in "crap/algorithm".
template <template <class, class> class Operator, class ... Types1> struct isPermutationType
{
/*...*/
template <class ... Types2> struct with;
/*...*/
};
Nested in isPermutationType
(for details see isPermutationType). Checks if passed Types1...
(by isPartitionType
nesting type - for details see isPermutationType - Template parameters section) are (according to comparing for equality Operator
passed by isPartitionType
nesting type - for detials see isPermutationType - Template parameters section) premutation of other Types2...
.
-
Types2...
- types to be checked if are forming a permutation ofTypes1...
(for details see isPermutationType - Template parameters section) with equality defined byOperator
(for details see isPermutationType - Template parameters section) binary comparator.
-
value
- true ifTypes1...
is permutation ofTypes2...
where equality is defined byOperator
(seeOperator
in isPermutationType - Template parameters section) binary comparator. False if not.
-
value_type
- type of fieldvalue
. May not bebool
but should be castable to this type.
-
constexpr operator value_type () const noexcept
- casts whole object to itsvalue_type
returningvalue
.
#include "crap/algorithm.d/ispermutationtype.h"
template <class ... Types> class myAwsomeVariant
{
/*...*/
template <class ... OtherTypes,
std :: enable_if_t<crap :: isPermutationType <std :: is_same, Types...> :: template with<OtherTypes...>(), void*> = nullptr>
myAwsomeVariant(const myAwsomeVariant<OtherTypes...>&);
//Allow copying from other variants if their types form permutation of this one.
/*...*/
};