标签:
本文主要举例:
tuple_size
|
|
foo contains: 100 y |
tie----(unpack)
|
|
Output:
myint contains: 10 mychar contains: a |
member type | definition |
---|---|
type | The Ith type in the tuple object |
|
|
Output:
mytuple contains: 10 and a |
tuple_size
member constant | definition |
---|---|
value | The number of elements in the tuple or tuple-like object. This is a constexpr value of the unsigned integral type size_t. |
|
|
Output:
mytuple has 3 elements |
forward_as_tuple
A tuple object with rvalue references to args suitable to be forwarded as argument to a function.
|
|
Output:
John Smith, 25 John Daniels, 22 |
tuple_cat
A tuple object of the appropriate type to hold args.
The type of the returned object (tuple<CTypes...>
) is the tuple type that contains the ordered sequence of all the extended types inTuples.
|
|
Output:
myauto contains: 3.14 pi 10 a |
ignore tie
A tuple with lvalue references to args.
|
|
Output:
myint contains: 10 mychar contains: a |
标签:
原文地址:http://www.cnblogs.com/guxuanqing/p/4872798.html