std::tuple
From Cppreference
C++ Standard Library | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Utilities library | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::tuple | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <tuple>
|
||
template< class... Types >
class tuple; |
(since C++11) | |
Class template std::tuple is a heterogeneous fixed-size collection of values. It is a generalization of std::pair.
[edit] Member functions
constructs new tuple (public member function) |
|
assigns the contents (public member function) |
|
swaps the contents (public member function) |
[edit] Non-member functions
creates a tuple object of the type defined by the argument types (function template) |
|
creates a tuple of lvalue references or unpacks a tuple into individual objects (function template) |
|
creates a tuple of rvalue references (function template) |
|
creates a tuple by concatenating any number of tuples (function template) |
|
accesses specified element (function template) |
|
lexicographically compares the values in the tuple (function template) |
|
(C++11)
|
specializes the std::swap algorithm (function template) |
[edit] Helper classes
obtains the size of tuple at compile time (class template specialization) |
|
obtains the type of the specified element (class template specialization) |
|
(C++11)
|
specializes the std::uses_allocator type trait (class template specialization) |
placeholder to skip an element when unpacking a tuple using tie (constant) |