std::end(std::initializer_list)
提供: cppreference.com
< cpp | utility | initializer list
template< class E > const E* end( initializer_list<E> il ) noexcept; |
(C++11以上) | |
template< class E > constexpr const E* end( initializer_list<E> il ) noexcept; |
(C++11以上) (C++14未満) |
|
std::end の initializer_list
に対するオーバーロードは、 il
の最後の要素のひとつ次を指すポインタを返します。
目次 |
[編集] 引数
il | - | initializer_list
|
[編集] 戻り値
il.end()。
[編集] 例
Run this code
#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'; } }
出力:
3 1 4 1
[編集] 関連項目
最後の要素の1つ次へのポインタを返します (パブリックメンバ関数) |