類別範本tuple_element具有巢狀 typedeftype,這與 Tuple 類型 Tuple索引索引處的類型同義。 typedeftuple_element_t是tuple_element<Index, Tuple>::type的方便別名。 陣列的類別範本特製化會提供 介面array做為元素的SizeTuple,每個元素都有相同的類型。 每個特製化都有一個
template<int Idx, class Tuple> class tuple_element { typedef Ti type; }; 参数Idx 指定的元素的索引。 Tuple 元组的类型。备注模板类具有类型是的同义词在元组 Tuple类型的索引 Idx 的嵌套的 typedef。type示例复制 // std_tr1__tuple__tuple_element.cpp // compile with: /EHsc #include <tuple> #...
生成的类型都是对类似于元组的类型的引用。但是,std::tuple_element并不专门用于引用,这意味着编译器...
template<int Idx, class Ty, std::size_t N> class tuple_element<Idx, <array<Ty, N> > { typedef Ty type; }; Template Parameters Idx 元素偏移量。 Ty 元素的类型。 N 数组大小。 备注 此模板选件类是模板选件类 tuple_element Class <tuple>的专用化。它有 array的 Idx 元素的类型的同义词的...
成员类型 定义 type 若I == 0 则为T1若I == 1 则为T2 可能的实现template<std::size_t I, typename T> struct tuple_element; template<std::size_t I, typename T1, typename T2> struct tuple_element<I, std::pair<T1, T2>> { static_assert(I < 2, "std::pair has only 2 elements!"...
Wraps the type of a tuple element. 复制 template<int Idx, class Tuple> class tuple_element { typedef Ti type; }; Parameters Idx The index of the designated element. Tuple The type of the tuple. Remarks The template class has a nested typedef type that is a synonym for the type at...
The typedef tuple_element_t is a convenient alias for tuple_element<N, pair<T1, T2>>::type.Use the get function to return the element at a specified position, or of a specified type.Example: Get an element from a tupleC++ Kopija ...
std::add_const<typename std::tuple_element<I, T>::type>::type; }; (2) (since C++11) template< std::size_t I, class T > struct tuple_element< I, volatile T > { using type = typename std::add_volatile<typename std::tuple_element<I, T>::type>::type; }; (3) (since C++...
TupleElement(TupleInterface tuple, int elementIndex, java.lang.String memberUniqueName, java.lang.String memberLabel, java.lang.String levelUniqueName, java.lang.String levelDepth, java.lang.String displayInfo, java.util.Map properties, com.sas.storage.olap.TupleElementType type) Method...
问std::tuple_element与参考文献EN一、背景介绍: 函数指针始终不太灵活,它只能指向全局或静态函数,...