KDECore
KTypeListIndexOf< TList, T > Class Template Reference
#include <ktypelist.h>
Detailed Description
template<class TList, class T>
class KTypeListIndexOf< TList, T >
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
Definition at line 535 of file ktypelist.h.
The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Sep 13 2019 18:06:14 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Sep 13 2019 18:06:14 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.