std::tuple_element<div class="t-tr-text"><std::tuple><div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig"><std::tuple></div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div>
Da cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Definido no cabeçalho <tuple>
|
||
template< std::size_t I, class T > class tuple_element; /* undefined */ |
(1) | (desde C++11) |
template< std::size_t I, class... Types > class tuple_element< I, tuple<Types...> >; |
(2) | (desde C++11) |
template< std::size_t I, class T > class tuple_element< I, const T > { |
(3) | (desde C++11) |
template< std::size_t I, class T > class tuple_element< I, volatile T > { |
(4) | (desde C++11) |
template< size_t I, class T > class tuple_element< I, const volatile T > { |
(5) | (desde C++11) |
Fornece compilação do tipo de acesso indexado aos tipos de elementos do tuplo.
Original:
Provides compile-type indexed access to the types of the elements of the tuple.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Índice |
[editar] Tipos de membro
Tipo de membro
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
type | o tipo de elemento
I th da tupla, onde I está na [0, sizeof...(Types)) Original: the type of I th element of the tuple, where I is in [0, sizeof...(Types)) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Possível implementação
template< std::size_t I, class T > struct tuple_element; // recursive case template<std::size_t I, class Head, class... Tail > struct tuple_element<I, std::tuple<Head, Tail...>> : std::tuple_element<I-1, std::tuple<Tail...>> { }; // base case template< class Head, class... Tail > struct tuple_element<0, std::tuple<Head, Tail...>> { typedef Head type; }; |
[editar] Exemplo
Esta seção está incompleta Motivo: sem exemplo |
[editar] Veja também
obtém o tipo dos elementos de array Original: obtains the type of the elements of array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (especialização modelo. classe) | |
obtém o tipo dos elementos de pair Original: obtains the type of the elements of pair The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (especialização modelo. classe) |