Difference between revisions of "cpp/utility/tuple/make tuple"
From cppreference.com
m (wrong header) |
m (see-also) |
||
Line 44: | Line 44: | ||
{{dcl list begin}} | {{dcl list begin}} | ||
− | {{dcl list | + | {{dcl list template | cpp/utility/tuple/dcl list tie}} |
− | {{dcl list | + | {{dcl list template | cpp/utility/tuple/dcl list forward_as_tuple}} |
+ | {{dcl list template | cpp/utility/tuple/dcl list tuple_cat}} | ||
{{dcl list end}} | {{dcl list end}} |
Revision as of 13:19, 30 August 2011
Template:cpp/utility/tuple/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<tuple>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td class="t-dcl-nopad">template< class... Types >
tuple<VTypes...> make_tuple(Types&&... args);
</td>
tuple<VTypes...> make_tuple(Types&&... args);
<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end
Creates a tuple object, deducing the target type from the types of arguments. The deduced types are Template:cpp (transformed as if passed to a function by value) unless application of Template:cpp results in Template:cpp for some type X
, in which case the deduced type is is X&
.
Parameters
args | - | zero or more arguments to construct the tuple from |
Return value
A Template:cpp/ltt object containing the given values.
Example
(C++11) |
creates a tuple of lvalue references or unpacks a tuple into individual objects (function template) |
(C++11) |
creates a tuple of forwarding references (function template) |
(C++11) |
creates a tuple by concatenating any number of tuples (function template) |