• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

KTypeListIndexOf< TList, T > Class Template Reference
Typelist classes, algorithms and macros

#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);
KTypeListIndexOf
This class template implements a compile-time algorithm for processing typelists.
Definition: ktypelist.h:535
KTypeList
The building block of typelists of any length.
Definition: ktypelist.h:454
Parameters
TListeither a KTypeList or KDE::NullType
Tthe 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:
  • ktypelist.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal