Skip to content

Commit

Permalink
Merge pull request #1219 from range3/fix/erase_after
Browse files Browse the repository at this point in the history
forward_list::erase_afterのサンプルコード修正
  • Loading branch information
faithandbrave authored Dec 20, 2023
2 parents 45786aa + a2f2ca3 commit 041ff2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions reference/forward_list/forward_list/erase_after.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ int main()

// 条件一致した要素を削除する
if (*next == 1) {
// 削除された要素の次を指すイテレータが返される。
it = ls.erase_after(it);
ls.erase_after(it);
}
// 要素削除をしない場合に、イテレータを進める
else {
Expand Down

0 comments on commit 041ff2d

Please sign in to comment.