Difference between std::remove and erase for vector?

后端 未结 8 1932
失恋的感觉
失恋的感觉 2020-12-12 18:42

I have a doubt that I would like to clarify in my head. I am aware of the different behavior for std::vector between erase and std::remove

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 19:40

    std::remove is an algorithm from the STL which is quite container agnostic. It requires some concept, true, but it has been designed to also work with C arrays, which are static in sizes.

提交回复
热议问题