Blaze 3.9
blaze::Contains< TL, T > Struct Template Reference

Searching a type list. More...

Detailed Description

template<typename TL, typename T>
struct blaze::Contains< TL, T >

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 true, else it is set to false. 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:

using Floats = blaze::TypeList< float, double, long double >; // Defining a new type list
constexpr bool index1 = blaze::Contains< Floats, double >::value; // Value evaluates to true
constexpr bool index2 = blaze::Contains< Floats, int >::value; // Value evaluates to false
Searching a type list.
Definition: Contains.h:77
Implementation of a type list.
Definition: TypeList.h:120

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