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;
Return a modifiable reference to the INDEX`th 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;
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);
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);
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;
Return a non‐modifiable reference to the INDEX`th 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;
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 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;
Return a modifiable rvalue reference to the INDEX`th 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;
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 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;
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 Value
-
modifiable reference to the element of
pof typeTYPE -
modifiable reference to the
INDEX`th 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
pof typeTYPE -
non‐modifiable reference to the
INDEX`th 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
pof typeTYPE -
modifiable rvalue reference to the
INDEX`th 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
pof typeTYPE -
const rvalue reference to the alternative of type
t_TYPE -
const rvalue reference to the alternative at index
t_INDEX
Parameters
Name |
Description |
p |
pair whose element is returned |
obj |
variant whose alternative is accessed |
Created with MrDocs