Namensräume
Varianten
Aktionen

std::end(std::initializer_list)

Aus cppreference.com

 
 
 
std::initializer_list
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.
initializer_list::initializer_list
Kapazität
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
initializer_list::size
Iteratoren
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
initializer_list::begin
initializer_list::end
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.
std::begin
std::end
 
template< class E >
const E* end( initializer_list<E> il );
(seit C++11)
Die Spezialisierung von std::end für initializer_list liefert einen Zeiger auf ein nach dem letzten Element des il .
Original:
The specialization of std::end for initializer_list returns a pointer to one past the last element of il.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

il - an initializer_list

[Bearbeiten] Rückgabewert

il.end()

[Bearbeiten] Ausnahmen

noexcept specification:  
noexcept
  (seit C++11)

[Bearbeiten] Beispiel

#include <iostream>
 
int main() 
{
    // range-based for uses std::begin and std::end to iterate
    // over a given range; in this case, it's an initializer list
    for (int i : {3, 1, 4, 1}) {
        std::cout << i << '\n';
    }
}

Output:

3
1
4
1

[Bearbeiten] Siehe auch

einen Zeiger auf ein nach dem letzten Element
Original:
returns a pointer to one past the last element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(öffentliche Elementfunktion) [edit]