Blaze  3.6
blaze::TypeList< Ts > Struct Template Reference

Implementation of a type list.The TypeList class template represents a list of data types of arbitrary size. The following example gives an impression how type lists are used and manipulated: More...

#include <TypeList.h>

Detailed Description

template<typename... Ts>
struct blaze::TypeList< Ts >

Implementation of a type list.

The TypeList class template represents a list of data types of arbitrary size. The following example gives an impression how type lists are used and manipulated:

// Creating a type list consisting of two fundamental floating point data types
// Appending a type to the type list
using Floats = blaze::Append< Tmp, long double >::Type; // Type list contains all floating point data types
// Calculating the length of the type list (at compile time!)
const int length = blaze::Length< Floats >::value; // Value evaluates to 3
// Accessing a specific type of the type list via indexing
// Searching the type list for a specific type
constexpr bool index1 = blaze::Contains< Floats, double >::value; // Value evaluates to 1
constexpr bool index2 = blaze::Contains< Floats, int >::value; // Value evaluates to 0
// Estimating the index of a specific type in the type list
constexpr bool index3 = blaze::IndexOf< Floats, double >::value; // Value evaluates to 1
constexpr bool index4 = blaze::IndexOf< Floats, int >::value; // Value evaluates to 3
// Erasing the first occurrence of float from the type list
// Removing all duplicates from the type list
using NoDuplicates = blaze::Unique< Floats >::Type;

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