-
Notifications
You must be signed in to change notification settings - Fork 2
isPermutationType
Igor Zarzycki edited this page Jan 24, 2022
·
3 revisions
Defined in "crap/algorithm.d/ispermutationtype.h".
Defined in "crap/algorithm".
template <template <class, class> class Operator, class ... Types1> struct isPermutationType;
Checks if passed Types1...
are (according to comparing for equality Operator
) premutation of other Types2...
passed by with
member type (for details see isPermutationType :: with).
-
Operator
- comparator checking for equality. -
Types1...
- types to be checked if are forming a permutation ofTypes2...
(for details see isPermutationType :: with).
-
with
- give possibility to pass second set of arguments namedTypes2...
(for details see isPermutationType :: with).
#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.
/*...*/
};