blaze::Contains< TList, Type > Class Template Reference

Searching a type list.The Contains class can be used to search the type list for a particular type Type. In contrast to the IndexOf class, the Contains class does not evaluate the index of the type but only checks whether or not the type is contained in the type list. Additionally, in contrast to the ContainsRelated class, the Contains class strictly searches for the given type Type and not for a related data type. In case the type is contained in the type list, the value member enumeration is set to 1, else it is set to 0. In order to check whether a type is part of a type list, the Contains class has to be instantiated for a particular type list and another type. The following example gives an impression of the use of the Contains class: More...

#include <TypeList.h>

Detailed Description

template<typename TList, typename Type>
class blaze::Contains< TList, Type >

Searching a type list.

The Contains class can be used to search the type list for a particular type Type. In contrast to the IndexOf class, the Contains class does not evaluate the index of the type but only checks whether or not the type is contained in the type list. Additionally, in contrast to the ContainsRelated class, the Contains class strictly searches for the given type Type and not for a related data type. In case the type is contained in the type list, the value member enumeration is set to 1, else it is set to 0. In order to check whether a type is part of a type list, the Contains class has to be instantiated for a particular type list and another type. The following example gives an impression of the use of the Contains class:

typedef BLAZE_TYPELIST_3( float, double, long double ) Floats; // Defining a new type list
const int index1 = blaze::Contains< Floats, double >::value; // Value evaluates to 1
const int index2 = blaze::Contains< Floats, int >::value; // Value evaluates to 0

The documentation for this class was generated from the following file: