首页 > 编程 > C++ > 正文

c++ tuple类型用法介绍

2019-11-06 07:52:28
字体:
来源:转载
供稿:网友

tuple类型是一个类似pair的模板。每个pari的成员类型都不相同,但每个pair都恰好有2个成员。不同tuple类型的成员类型不相同。 Defined in header <tuple>


construct template< class… Types > class tuple;


Member functions(constructor)

Operator=swap

Non-member functions

- make_tuple //creates a tuple object of the type defined by the argument types - tie - forward_as_tuple - tuple_cat - std::get(std::tuple)//tuple accesses specified element - operator== - operator!= - operator< - operator<= - operator> - operator>= - std::swap


Helper classes

tuple_size ———-value tuple_element———–typestd::uses_allocator
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选