KDECore
KTypeListIndexOf Class Reference
[Typelist classes, algorithms and macros]
This class template implements a compile-time algorithm for processing typelists. More...
#include <ktypelist.h>
Detailed Description
This class template implements a compile-time algorithm for processing typelists.
It expects two type arguments: TList and T.
KTypeListIndexOf finds the index of T in TList starting at 0 and exports it through the value member. If T is not found, value is -1. Example:
typedef KMakeTypeList<char, short, int, long>::Result IntegralTypes; assert(KTypeListIndexOf<IntegralTypes, int>::value == 3); assert(KTypeListIndexOf<IntegralTypes, double>::value == -1);
- Parameters:
-
TList either a KTypeList or KDE::NullType T the type to search for in the typelist
The documentation for this class was generated from the following file:
KDE 4.3 API Reference