類別範本tuple_element具有巢狀 typedeftype,這與 Tuple 類型 Tuple索引索引處的類型同義。 typedeftuple_element_t是tuple_element<Index, Tuple>::type的方便別名。 陣列的類別範本特製化會提供 介面array做為元素的SizeTuple,每個元素都有相同的類型。 每個特製化都有一個巢狀 typedeftype,與的 Index元素array類型...
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> #...
Tuple(Int32, String).element_type(1) # Error: undefined method 'element_type' for Tuple(Int32, String).class For some reason it doesn't work even on aliases of Tuple instances, so these macros are private for now; the currently use cases do not require this macro to be public or pro...
成员类型 定义 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!"...
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 元素的类型的同义词的...
在这两种情况下,生成的类型都是对类似于元组的类型的引用。但是,std::tuple_element并不专门用于引用...
Wraps the type of a pair element. template<class T1, class T2> class tuple_element<0, pair<T1, T2> > { typedef T1 type; }; template<class T1, class T2> class tuple_element<1, pair<T1, T2> > { typedef T2 type; }; Parameters ...
obtains the type of the specified element (class template specialization) std::tuple_element<std::array> (C++11) obtains the type of the elements of array (class template specialization) std::tuple_element<std::ranges::subrange> (C++20) obtains the type of the iterator or the sentinel...
void setType(com.sas.storage.olap.TupleElementType elementType) Set the type of this element. void setUniqueLevelName(java.lang.String uniqueLevelName) Set unique level name for this element java.lang.String toString() Returns the label of this tuple elementConstructor...
The typedeftuple_element_tis a convenient alias fortuple_element<Index, Tuple>::type. The class template specialization for arrays provides an interface to anarrayas a tuple ofSizeelements, each of which has the same type. Each specialization has a nested typedeftypethat is a synonym for the ...