Use a regular iterator to iterate backwards, or struggle with reverse_iterator?

后端 未结 2 1888
予麋鹿
予麋鹿 2021-01-02 08:59

I recently learned about the right way to work with reverse iterators in C++ (specifically when you need to erase one). (See this question and this one.)

This is ho

2条回答
  •  迷失自我
    2021-01-02 10:02

    For what it's worth, Scott Meyers' Effective STL recommends that you just stick with a regular ol' iterator (Item 26).

提交回复
热议问题