std::list<T,Allocator>::front
提供: cppreference.com
reference front(); |
||
const_reference front() const; |
||
コンテナ内の最初の要素を指す参照を返します。
空のコンテナに対する front
の呼び出しは未定義です。
目次 |
[編集] 引数
(なし)
[編集] 戻り値
最初の要素を指す参照。
[編集] 計算量
一定。
[編集] ノート
コンテナ c
に対して、式 c.front() は *c.begin() と同等です。
[編集] 例
関連項目
最後の要素にアクセスします (パブリックメンバ関数) |