get overloads

Synopses

Declared in <bslstl_pair.h>

Return a reference providing 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.

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

Return a reference providing modifiable access to the element of the specified p, having the ordinal number specified by the (template parameter) INDEX. This function will not compile unless the INDEX is either 0 or 1.

template<
    std::size_t INDEX,
    class T1,
    class T2>
std::tuple_element<INDEX, bsl::pair<T1, T2>>::type&
get(bsl::pair<T1, T2>& p) noexcept;

Return a reference to the alternative object with type (template parameter) t_TYPE in the specified obj. If t_TYPE is not the type of the currently active alternative, throw an exception of type bad_variant_access. t_TYPE shall appear exactly once in the variant's list of alternatives.

template<
    class t_TYPE,
    class t_HEAD,
    class... t_TAIL>
t_TYPE&
get(variant<t_HEAD, t_TAIL...>& obj);

Return a reference to the alternative object at index (template parameter) t_INDEX in the specified obj. If t_INDEX is not the index of the currently active alternative, throw an exception of type bad_variant_access. t_INDEX shall be a valid index for the variant type of obj.

template<
    std::size_t t_INDEX,
    class t_HEAD,
    class... t_TAIL>
variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>>::type&
get(variant<t_HEAD, t_TAIL...>& obj);

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.

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

Return a reference providing non‐modifiable access to the element of the specified p, having the ordinal number specified by the (template parameter) INDEX. This function will not compile unless the INDEX is either 0 or 1.

template<
    std::size_t INDEX,
    class T1,
    class T2>
std::tuple_element<INDEX, bsl::pair<T1, T2>>::type const&
get(bsl::pair<T1, T2> const& p) noexcept;

See the first get overload above.

template<
    class t_TYPE,
    class t_HEAD,
    class... t_TAIL>
t_TYPE const&
get(variant<t_HEAD, t_TAIL...> const& obj);

See the first get overload above.

template<
    std::size_t t_INDEX,
    class t_HEAD,
    class... t_TAIL>
variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>>::type const&
get(variant<t_HEAD, t_TAIL...> const& obj);

Return a rvalue reference providing 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.

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

Return a rvalue reference providing modifiable access to the element of the specified p, having the ordinal number specified by the (template parameter) INDEX. This function will not compile unless the INDEX is either 0 or 1.

template<
    std::size_t INDEX,
    class T1,
    class T2>
std::tuple_element<INDEX, bsl::pair<T1, T2>>::type&&
get(bsl::pair<T1, T2>&& p) noexcept;

See the first get overload above.

template<
    class t_TYPE,
    class t_HEAD,
    class... t_TAIL>
t_TYPE&&
get(variant<t_HEAD, t_TAIL...>&& obj);

See the first get overload above.

template<
    std::size_t t_INDEX,
    class t_HEAD,
    class... t_TAIL>
variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>>::type&&
get(variant<t_HEAD, t_TAIL...>&& obj);

Return a rvalue 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.

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

See the first get overload above.

template<
    class t_TYPE,
    class t_HEAD,
    class... t_TAIL>
t_TYPE const&&
get(variant<t_HEAD, t_TAIL...> const&& obj);

See the first get overload above.

template<
    std::size_t t_INDEX,
    class t_HEAD,
    class... t_TAIL>
variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>>::type const&&
get(variant<t_HEAD, t_TAIL...> const&& obj);

Created with MrDocs