isPermutationType - HaxyM/crap GitHub Wiki

crap :: isPermutationType

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).

Template parameters

  • Operator - comparator checking for equality.
  • Types1... - types to be checked if are forming a permutation of Types2... (for details see isPermutationType :: with).

Layout

Member types

Usage example

#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.
 /*...*/
};

See also