[#BloombergLP-bslstl-Pair_IndexOfType-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Pair&lowbar;IndexOfType
:relfileprefix: ../../
:mrdocs:

Metafunction giving the index of the pair element having type `T`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;pair&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class T,
    class T1,
    class T2&gt;
struct Pair&lowbar;IndexOfType;
----

== Description

This meta&hyphen;function provides a compile&hyphen;time way to obtain the index of `bsl&colon;&colon;pair` element, having the (template parameter) type `T`&period; If neither type of pair&apos;s element is equal to `T` or both pair&apos;s elements have the same type, code is not compiled&period;

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Pair_IndexOfType-00c.adoc[`Pair&lowbar;IndexOfType&lt;T1, T1, T2&gt;`] 
| This partial specialization of `Pair&lowbar;IndexOfType` returns the index of first element of pair&period;
| xref:BloombergLP/bslstl/Pair_IndexOfType-006.adoc[`Pair&lowbar;IndexOfType&lt;T2, T1, T2&gt;`] 
| This partial specialization of `Pair&lowbar;IndexOfType` returns the index of second element of pair&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
