Namensräume
Varianten
Aktionen

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>

Aus cppreference.com
< cpp‎ | utility‎ | tuple

 
 
 
std::tuple
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
tuple::tuple
tuple::operator=
tuple::swap
Non-Member-Funktionen
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
make_tuple
tie
forward_as_tuple
None
operator=
operator!=
operator<
operator<=
operator>
operator>=
std::swap
get
Helper-Klassen
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
tuple_size
tuple_element
uses_allocator
ignore
 
definiert in Header <tuple>
template< std::size_t I, class T >
class tuple_element; /* undefined */
(1) (seit C++11)
template< std::size_t I, class... Types >
class tuple_element< I, tuple<Types...> >;
(2) (seit C++11)
template< std::size_t I, class T >

class tuple_element< I, const T > {
  typedef typename
      std::add_const<typename std::tuple_element<I, T>::type>::type type;

};
(3) (seit C++11)
template< std::size_t I, class T >

class tuple_element< I, volatile T > {
  typedef typename
      std::add_volatile<typename std::tuple_element<I, T>::type>::type type;

};
(4) (seit C++11)
template< size_t I, class T >

class tuple_element< I, const volatile T > {
  typedef typename
      std::add_cv<typename std::tuple_element<I, T>::type>::type type;

};
(5) (seit C++11)
Stellt der Kompilierung Typs indexiert Zugang zu den Arten der Elemente des Tupels .
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.

Inhaltsverzeichnis

[Bearbeiten] Mitglied Typen

Mitglied Typ
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
die Art der Ith Element des Tupels, wo I in [0, sizeof...(Types))
Original:
the type of Ith 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.

[Bearbeiten] Mögliche Implementierung

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;
};

[Bearbeiten] Beispiel

[Bearbeiten] Siehe auch

ermittelt die Art der Elemente der 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.

(class Template-Spezialisierung) [edit]
ermittelt die Art der Elemente der 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.

(class Template-Spezialisierung) [edit]