Return a non‐modifiable reference to the element of p having type TYPE.

Synopsis

Declared in <bslstl_pair.h>

template<
    class TYPE,
    class T1,
    class T2>
TYPE const&
get(bsl::pair<T1, T2> const& p) noexcept;

Description

Return a reference providing non‐modifiable access to the element of the specified p, having the (template parameter) TYPE. This function will not compile unless the types T1 and T2 are different and the TYPE is the same as either T1 or T2.

Return Value

non‐modifiable reference to the element of p of type TYPE

Parameters

Name

Description

p

pair whose element is returned

Created with MrDocs