std::end(std::initializer_list)
Aus 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. |
<metanoindex/>
<tbody> </tbody> 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.
You can help to correct and verify the translation. Click here for instructions.
Parameter
| il | - | an initializer_list
|
Rückgabewert
il.end()
Ausnahmen
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
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) | |