|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
元组的主模板、特化实现和辅助函数 更多...
类 | |
| struct | tuple_size< array< T, Size > > |
| 数组的元组大小特化 更多... | |
| struct | tuple_element< Idx, array< T, Size > > |
| 数组的元组元素类型特化 更多... | |
| struct | tuple_size< typename > |
| 获取tuple大小的特化 更多... | |
| struct | tuple_element< Index, Types > |
| 获取tuple元素类型的特化 更多... | |
| struct | tuple_element< 0, tuple< This, Rest... > > |
| 获取tuple第一个元素类型的特化 更多... | |
| struct | tuple_element< Index, tuple< This, Rest... > > |
| 递归获取tuple元素类型的特化 更多... | |
| struct | tuple_size< pair< T1, T2 > > |
| pair的tuple_size特化,固定为2 更多... | |
| struct | tuple_element< Index, pair< T1, T2 > > |
| pair的tuple_element特化 更多... | |
| struct | tuple<> |
| 空元组特化 更多... | |
| struct | tuple< This, Rest... > |
| 元组主模板 更多... | |
类型定义 | |
| template<size_t Index, typename... Types> | |
| using | tuple_element_t = typename tuple_element<Index, Types...>::type |
| tuple_element的类型别名 | |
| template<size_t Index, typename... Types> | |
| using | tuple_extract_base_t = typename tuple_element<Index, Types...>::tuple_type |
| 获取tuple元素基类型的类型别名 | |
函数 | |
| template<typename Func, typename Tuple> | |
| constexpr decltype(auto) | apply (Func &&f, Tuple &&t) noexcept(inner::__apply_unpack_tuple< _NEFORCE is_nothrow_invocable, Func, Tuple >::value) |
| 将元组元素解包作为参数调用函数 | |
| template<size_t Index, typename... Types> | |
| NEFORCE_NODISCARD constexpr tuple_element_t< Index, Types... > & | get (tuple< Types... > &t) |
| 获取元组中指定位置的元素引用 | |
| template<size_t Index, typename... Types> | |
| NEFORCE_NODISCARD constexpr const tuple_element_t< Index, Types... > & | get (const tuple< Types... > &t) |
| 获取元组中指定位置的元素常量引用 | |
| template<size_t Index, typename... Types> | |
| NEFORCE_NODISCARD constexpr tuple_element_t< Index, Types... > && | get (tuple< Types... > &&t) |
| 获取元组中指定位置的元素右值引用 | |
| template<size_t Index, typename... Types> | |
| NEFORCE_NODISCARD constexpr const tuple_element_t< Index, Types... > && | get (const tuple< Types... > &&t) |
| 获取元组中指定位置的元素常量右值引用 | |
| template<typename... Types> | |
| NEFORCE_NODISCARD constexpr tuple< unwrap_ref_decay_t< Types >... > | make_tuple (Types &&... args) |
| 从参数创建元组 | |
| template<typename... Types> | |
| NEFORCE_NODISCARD constexpr tuple< Types &... > | tie (Types &... args) noexcept |
| 创建引用元组 | |
| template<typename... Types> | |
| NEFORCE_NODISCARD constexpr tuple< Types &&... > | forward_as_tuple (Types &&... args) noexcept |
| 创建转发引用元组 | |
| template<typename T, typename Tuple, enable_if_t< inner::constructible_from_tuple< T, Tuple >::value, int > = 0> | |
| NEFORCE_NODISCARD constexpr T | make_from_tuple (Tuple &&tup) noexcept(noexcept(inner::__broaden_make_from_tuple< T >(_NEFORCE forward< Tuple >(tup), make_index_sequence< tuple_size< remove_reference_t< Tuple > >::value >{}))) |
| 从元组构造对象 | |
| template<typename... Tuples> | |
| NEFORCE_NODISCARD constexpr inner::tuple_cat_bind_t< Tuples... >::Ret | tuple_cat (Tuples &&... tuples) |
| 连接多个元组 | |
变量 | |
| template<typename T, size_t Size> | |
| NEFORCE_INLINE17 constexpr size_t | tuple_size_v< array< T, Size > > = Size |
| 元组大小值 | |
| template<typename T, size_t Size> | |
| NEFORCE_INLINE17 constexpr size_t | tuple_size_v< const array< T, Size > > = Size |
| 常量数组的元组大小值 | |
| template<typename T> | |
| constexpr size_t | tuple_size_v = tuple_size<remove_cvref_t<T>>::value |
| tuple_size的类型别名 | |
元组的主模板、特化实现和辅助函数
| using tuple_element_t = typename tuple_element<Index, Types...>::type |
| using tuple_extract_base_t = typename tuple_element<Index, Types...>::tuple_type |
|
constexprnoexcept |
将元组元素解包作为参数调用函数
| Func | 可调用对象类型 |
| Tuple | 元组类型 |
| f | 可调用对象 |
| t | 元组 |
将元组中的元素解包,作为参数调用函数。 支持完美转发,可以处理元组的不同引用和常量限定。
引用了 forward().
被这些函数引用 signal< Types >::emit_executor(), get_current_task_group(), lazy_thread::lazy_thread(), thread::start() , 以及 thread::thread().
|
constexprnoexcept |
创建转发引用元组
| Types | 转发引用类型 |
| args | 转发引用参数 |
引用了 forward().
被这些函数引用 binder< Func(BoundArgs...)>::operator()(), binder< Func(BoundArgs...)>::operator()(), bindrer< Res, Func(BoundArgs...)>::operator()(), bindrer< Res, Func(BoundArgs...)>::operator()() , 以及 tuple_cat().
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexpr |
从参数创建元组
| Types | 参数类型 |
| args | 参数 |
引用了 forward().
被这些函数引用 signal< Types >::emit_executor(), get_current_task_group(), lazy_thread::lazy_thread(), thread::start(), thread::thread() , 以及 thread_pool::wait().
|
constexprnoexcept |
|
constexpr |
|
constexpr |