This meta‐function provides a compile‐time way to obtain the index of bsl::pair element, having the (template parameter) type T. If neither type of pair's element is equal to T or both pair's elements have the same type, code is not compiled.

Synopsis

Declared in <bslstl_pair.h>

template<
    class T,
    class T1,
    class T2>
struct Pair_IndexOfType;

Specializations

Name

Description

Pair_IndexOfType<T1, T1, T2>

This partial specialization of Pair_IndexOfType returns the index of first element of pair.

Pair_IndexOfType<T2, T1, T2>

This partial specialization of Pair_IndexOfType returns the index of second element of pair.

Created with MrDocs