bsl::get

get overloads

Synopses

Declared in <bslstl_pair.h>

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

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

Return a modifiable reference to the INDEXth element of p.

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;
» more...

Return a reference to the alternative of type t_TYPE in obj.

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

Return a reference to the alternative at index t_INDEX in 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);
» more...

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

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

Return a non-modifiable reference to the INDEXth element of p.

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;
» more...

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);
» more...

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);
» more...

Return a modifiable rvalue reference to the element of p of type TYPE.

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

Return a modifiable rvalue reference to the INDEXth element of p.

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;
» more...

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);
» more...

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);
» more...

Return a non-modifiable rvalue reference to the element of p of TYPE.

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

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);
» more...

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);
» more...

Return Value

  • modifiable reference to the element of p of type TYPE
  • modifiable reference to the INDEXth element of p
  • reference to the alternative of type t_TYPE
  • reference to the alternative at index t_INDEX
  • non-modifiable reference to the element of p of type TYPE
  • non-modifiable reference to the INDEXth element of p
  • const reference to the alternative of type t_TYPE
  • const reference to the alternative at index t_INDEX
  • modifiable rvalue reference to the element of p of type TYPE
  • modifiable rvalue reference to the INDEXth element of p
  • rvalue reference to the alternative of type t_TYPE
  • rvalue reference to the alternative at index t_INDEX
  • non-modifiable rvalue reference to the element of p of type TYPE
  • const rvalue reference to the alternative of type t_TYPE
  • const rvalue reference to the alternative at index t_INDEX

Parameters

NameDescription
ppair whose element is returned
objvariant whose alternative is accessed