|
| template<typename Tag, typename U1, typename... U2, enable_if_t< is_same< Tag, exact_arg_construct_tag >::value, int > = 0> |
| constexpr | tuple (Tag, U1 &&this_arg, U2 &&... rest_arg) |
| | 精确参数构造函数
|
| template<typename Tag, typename Tuple, size_t... Index, enable_if_t< is_same< Tag, unpack_utility_construct_tag >::value, int > = 0> |
| constexpr | tuple (Tag, Tuple &&tup, index_sequence< Index... > idx) |
| | 解包工具构造函数
|
| template<typename Tag, typename Tuple, enable_if_t< is_same< Tag, unpack_utility_construct_tag >::value, int > = 0> |
| constexpr | tuple (Tag, Tuple &&tup) |
| | 解包工具构造函数
|
|
| tuple (const tuple &)=default |
| | 拷贝构造函数
|
|
| tuple (tuple &&)=default |
| | 移动构造函数
|
| template<typename T = This, enable_if_t< conjunction< is_copy_assignable< T >, is_copy_assignable< Rest >... >::value, int > = 0> |
| MSTL_CONSTEXPR14 tuple & | operator= (type_identity_t< const tuple & > tup) noexcept(conjunction< is_nothrow_copy_assignable< T >, is_nothrow_copy_assignable< Rest >... >::value) |
| | 拷贝赋值运算符
|
| template<typename T = This, enable_if_t< conjunction< is_move_assignable< T >, is_move_assignable< Rest >... >::value, int > = 0> |
| MSTL_CONSTEXPR14 tuple & | operator= (type_identity_t< tuple && > tup) noexcept(conjunction< is_nothrow_move_assignable< T >, is_nothrow_move_assignable< Rest >... >::value) |
| | 移动赋值运算符
|
| template<typename... U, enable_if_t< conjunction< negation< is_same< tuple, tuple< U... > > >, _INNER tuple_assignable< tuple, const U &... > >::value, int > = 0> |
| MSTL_CONSTEXPR14 tuple & | operator= (const tuple< U... > &tup) noexcept(_INNER tuple_nothrow_assignable< tuple, const U &... >::value) |
| | 从其他元组拷贝赋值
|
| template<typename... U, enable_if_t< conjunction< negation< is_same< tuple, tuple< U... > > >, _INNER tuple_assignable< tuple, U... > >::value, int > = 0> |
| MSTL_CONSTEXPR14 tuple & | operator= (tuple< U... > &&tup) noexcept(_INNER tuple_nothrow_assignable< tuple, U... >::value) |
| | 从其他元组移动赋值
|
| template<typename T1, typename T2, enable_if_t< _INNER tuple_assignable< tuple, const T1 &, const T2 & >::value, int > = 0> |
| MSTL_CONSTEXPR14 tuple & | operator= (const pair< T1, T2 > &pir) noexcept(_INNER tuple_nothrow_assignable< tuple, const T1 &, const T2 & >::value) |
| | 从pair拷贝赋值
|
| template<typename T1, typename T2, enable_if_t< _INNER tuple_assignable< tuple, T1, T2 >::value, int > = 0> |
| MSTL_CONSTEXPR14 tuple & | operator= (pair< T1, T2 > &&pir) noexcept(_INNER tuple_nothrow_assignable< tuple, T1, T2 >::value) |
| | 从pair移动赋值
|
|
tuple & | operator= (const volatile tuple &)=delete |
| | 禁止volatile拷贝赋值
|
| MSTL_CONSTEXPR14 base_type & | get_rest () noexcept |
| | 获取剩余元素的元组引用
|
| MSTL_CONSTEXPR14 const base_type & | get_rest () const noexcept |
| | 获取剩余元素的元组常量引用
|
| template<typename... U> |
| MSTL_NODISCARD constexpr bool | equal_to (const tuple< U... > &t) const |
| | 比较两个元组是否相等
|
| template<typename... U> |
| MSTL_NODISCARD constexpr bool | less_to (const tuple< U... > &rhs) const |
| | 比较两个元组的大小关系
|
|
MSTL_NODISCARD constexpr bool | operator== (const tuple &rhs) const noexcept |
| | 相等比较运算符
|
|
MSTL_NODISCARD constexpr bool | operator< (const tuple &rhs) const noexcept |
| | 小于比较运算符
|
| MSTL_NODISCARD constexpr size_t | to_hash () const noexcept |
| | 计算元组的哈希值
|
| MSTL_CONSTEXPR14 void | swap (tuple &t) noexcept(conjunction< is_nothrow_swappable< This >, is_nothrow_swappable< Rest >... >::value) |
| | 交换两个元组的内容
|
| MSTL_NODISCARD constexpr bool | operator== (const tuple< This, Rest... > &rhs) const noexcept(noexcept(derived()==rhs)) |
| | 相等比较运算符
|
| MSTL_NODISCARD constexpr bool | operator!= (const tuple< This, Rest... > &rhs) const noexcept(noexcept(!(*this==rhs))) |
| | 不等比较运算符
|
| MSTL_NODISCARD constexpr bool | operator< (const tuple< This, Rest... > &rhs) const noexcept(noexcept(derived()< rhs)) |
| | 小于比较运算符
|
| MSTL_NODISCARD constexpr bool | operator> (const tuple< This, Rest... > &rhs) const noexcept(noexcept(rhs< derived())) |
| | 大于比较运算符
|
| MSTL_NODISCARD constexpr bool | operator<= (const tuple< This, Rest... > &rhs) const noexcept(noexcept(!(derived() > rhs))) |
| | 小于等于比较运算符
|
| MSTL_NODISCARD constexpr bool | operator>= (const tuple< This, Rest... > &rhs) const noexcept(noexcept(!(derived()< rhs))) |
| | 大于等于比较运算符
|
| MSTL_NODISCARD constexpr size_t | to_hash () const noexcept(noexcept(derived().to_hash())) |
| | 获取对象的哈希值
|
template<typename This, typename... Rest>
struct tuple< This, Rest... >
元组主模板
- 模板参数
-
使用递归继承实现元组,每个元组包含当前元素和继承自剩余元素的元组。
在文件 tuple.hpp 第 233 行定义.