std::list<T,Allocator>:: pop_front
From ja.cppreference.net
|
void
pop_front
(
)
;
|
(C++26以降constexpr) | |
コンテナの最初の要素を削除します。
|
empty() が true の場合、動作は未定義です。 |
(C++26まで) |
|
empty() が true の場合:
|
(C++26以降) |
削除された要素への参照とイテレータは無効化されます。
計算量
定数。
例
このコードを実行
出力:
chars.front(): 'A' chars.front(): 'B' chars.front(): 'C' chars.front(): 'D'
関連項目
|
末尾の要素を削除する
(public member function) |
|
|
先頭に要素を挿入する
(public member function) |
|
|
最初の要素にアクセスする
(public member function) |