staticIndexOf

Returns the index of the first occurrence of T in the sequence TList. If not found, -1 is returned.

  1. template staticIndexOf(T, TList...)
  2. template staticIndexOf(alias T, TList...)
    template staticIndexOf (
    TList...
    ) {
    enum staticIndexOf;
    }

Examples

import std.stdio;

void foo()
{
    writefln("The index of long is %s",
             staticIndexOf!(long, AliasSeq!(int, long, double)));
    // prints: The index of long is 1
}
Suggestion Box / Bug Report