Open Search
    ParameterPack< T >::IndexOf< X > Struct Template Reference

    #include <apibase.h>

    Detailed Description

    template<typename... T>
    template<typename X>
    struct maxon::ParameterPack< T >::IndexOf< X >

    IndexOf finds the index of type X in the parameter pack T. The index can be found in the member value of IndexOf. If there is no unique such index because X doesn't exist at all in T or exists more than once, a negative value is used. The member found counts the number of occurrences.

    ParameterPack<Int, Float, String, String>::IndexOf<Float>::value == 1
    ParameterPack<Int, Float, String, String>::IndexOf<String>::value < 0 // Ambiguous.
    ParameterPack<Int, Float, String, String>::IndexOf<String>::found == 2
    ParameterPack<Int, Float, String, String>::IndexOf<Char>::value < 0 // Not found.
    char Char
    signed 8 bit character
    Definition: apibase.h:183
    Float64 Float
    Definition: apibase.h:196
    static constexpr Int found
    Definition: apibase.h:862
    static constexpr Int value
    Definition: apibase.h:861
    Template Parameters
    XType to search for.

    Static Public Attributes

    static constexpr Int value
     
    static constexpr Int found
     

    Member Data Documentation

    ◆ value

    constexpr Int value
    staticconstexpr

    ◆ found

    constexpr Int found
    staticconstexpr