header
<tuple>
Tuple library
Tuples are objects that pack elements of -possibly- different types together in a single object, just like pair objects do for pairs of elements, but generalized for any number of elements.
Conceptually, they are similar to plain old data structures (C-like structs) but instead of having named data members, its elements are accessed by their order in the tuple.
The selection of particular elements within a tuple is done at the template-instantiation level, and thus, it must be specified at compile-time, with helper functions such as get and tie.
The tuple class is closely related to the pair class (defined in header <utility>): Tuples can be constructed from pairs, and pairs can be treated as tuples for certain purposes.
array containers also have certain tuple-like functionalities.
Classes
- tuple
 - Tuple (class template
)
 
Helper classes
- tuple_size
 - Tuple size traits (class template
)
 
- tuple_element
 - Tuple element type (class template
)
 
Functions
Object creation
- make_tuple
 - Construct tuple (function template
)
 
- forward_as_tuple
 - Forward as tuple (function template
)
 
- tie
 - Tie arguments to tuple elements (function template
)
 
- tuple_cat
 - Concatenate tuples (function template
)
 
Element access
- get
 - Get element (function template
)
 
Objects
- ignore
 - Ignore assignment (object
)
 
  
 
classes:
 
functions:
 
objects: