Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
std::tuple< Types > Class Template Reference

a heterogeneous, fixed-size collection of values More...

Inheritance diagram for std::tuple< Types >:
Inheritance graph

Public Member Functions

template<class U1, class U2, class = enable_if_t< (sizeof...(Types) == 2U) && are_all_arguments_v<is_assignable, U1&&, U2&&> >>
auto operator= (pair< U1, U2 > &&other) noexcept(are_all_arguments_v< is_nothrow_assignable, U1 &&, U2 && >) -> tuple &
 move-assign-from-pair constructor
 
template<class U1, class U2, class = enable_if_t< (sizeof...(Types) == 2U) && are_all_arguments_v<is_assignable, U1 const&, U2 const&> >>
auto operator= (pair< U1, U2 > const &other) noexcept(are_all_arguments_v< is_nothrow_assignable, U1 const &, U2 const & >) -> tuple &
 copy-assign-from-pair constructor
 
template<class... UTypes, class = enable_if_t< (sizeof...(UTypes) != 0U) && are_all_arguments_v<is_assignable, UTypes&&...> >>
auto operator= (tuple< UTypes... > &&other) noexcept(are_all_arguments_v< is_nothrow_assignable, UTypes &&... >) -> tuple &
 move-from-other-tuple assignment
 
template<class... UTypes, class = enable_if_t< (sizeof...(UTypes) != 0U) && are_all_arguments_v<is_assignable, UTypes const&...> >>
auto operator= (tuple< UTypes... > const &other) noexcept(are_all_arguments_v< is_nothrow_assignable, UTypes const &... >) -> tuple &
 copy-from-other-tuple assignment
 
template<bool B = arene::base::all_of_v<arene::base::is_swappable_v<Types>...>, arene::base::constraints< enable_if_t< B > > = nullptr>
auto swap (tuple &rhs) noexcept(arene::base::all_of_v< arene::base::is_nothrow_swappable_v< Types >... >) -> void
 swap with another tuple
 

Friends

template<size_t I, class Tuple, arene::base::constraints< std::enable_if_t< std::is_same< Tuple, tuple >::value > > = nullptr>
constexpr auto __get_tuple_impl (Tuple &tup) noexcept -> tuple_detail::tuple_leaf_t< I, Tuple > &
 obtain the tuple_leaf element at a specified index
 

Detailed Description

template<class... Types>
class std::tuple< Types >

a heterogeneous, fixed-size collection of values

Template Parameters
Typesthe types of elements that the tuple stores

Member Function Documentation

◆ operator=() [1/4]

template<class... Types>
template<class U1, class U2, class = enable_if_t< (sizeof...(Types) == 2U) && are_all_arguments_v<is_assignable, U1&&, U2&&> >>
auto std::tuple< Types >::operator= ( pair< U1, U2 > && other) -> tuple&
inlinenoexcept

move-assign-from-pair constructor

Template Parameters
U1first parameter to assign from
U2second parameter to assign from
Parameters
otherpair containing values to initialize with

Initializes each element of the tuple by moving the values in other

Note
Requires:

◆ operator=() [2/4]

template<class... Types>
template<class U1, class U2, class = enable_if_t< (sizeof...(Types) == 2U) && are_all_arguments_v<is_assignable, U1 const&, U2 const&> >>
auto std::tuple< Types >::operator= ( pair< U1, U2 > const & other) -> tuple&
inlinenoexcept

copy-assign-from-pair constructor

Template Parameters
U1first parameter to assign from
U2second parameter to assign from
Parameters
otherpair containing values to initialize with

Initializes each element of the tuple with a copy of the values in other

Note
Requires:

◆ operator=() [3/4]

template<class... Types>
template<class... UTypes, class = enable_if_t< (sizeof...(UTypes) != 0U) && are_all_arguments_v<is_assignable, UTypes&&...> >>
auto std::tuple< Types >::operator= ( tuple< UTypes... > && other) -> tuple&
inlinenoexcept

move-from-other-tuple assignment

Template Parameters
UTypesparameter pack of types to move assign from
Parameters
othertuple containing values to move assign from

Initializes each element of the tuple from the values in other

Note
Requires:

◆ operator=() [4/4]

template<class... Types>
template<class... UTypes, class = enable_if_t< (sizeof...(UTypes) != 0U) && are_all_arguments_v<is_assignable, UTypes const&...> >>
auto std::tuple< Types >::operator= ( tuple< UTypes... > const & other) -> tuple&
inlinenoexcept

copy-from-other-tuple assignment

Template Parameters
UTypesparameter pack of types to assign from
Parameters
othertuple containing values to assign from

Initializes each element of the tuple from the values in other

Note
Requires:

◆ swap()

template<class... Types>
template<bool B = arene::base::all_of_v<arene::base::is_swappable_v<Types>...>, arene::base::constraints< enable_if_t< B > > = nullptr>
auto std::tuple< Types >::swap ( tuple< Types > & rhs) -> void
inlinenoexcept

swap with another tuple

Parameters
rhsthe other tuple to swap this with
Postcondition
Equivalent to having invoked swap(get<Idx>(*this),get<Idx>(rhs)) for every element.
Note
Requires:

Friends And Related Symbol Documentation

◆ __get_tuple_impl

template<class... Types>
template<size_t I, class Tuple, arene::base::constraints< std::enable_if_t< std::is_same< Tuple, tuple >::value > > = nullptr>
auto __get_tuple_impl ( Tuple & tup) -> tuple_detail::tuple_leaf_t<I, Tuple>&
friend

obtain the tuple_leaf element at a specified index

Template Parameters
Ituple element index
Parameters
tupreference to a tuple
Returns
reference to the value containing the I 'th element
Note
The SFINAE constraint is to prevent ambiguity for a tuple of tuples. Without the constraint, ADL finds this friend through the associated classes of the template arguments, causing the inner tuple instantiations' friends to also be viable candidates via implicit derived-to-base conversion.

The documentation for this class was generated from the following file: