it++; // OK : Widely used expression for moving iterator.
it_prev = it-1; // ERROR : What I expected; + - operators never existed
it_prev = std::prev(it) // OK
it_next3 = it+3; // ERROR : also, nothing like this exists
it_next3 = std::next(it,3) // OK
为什么 Iterator 类没有 + - 运算符作为成员函数?
或者std::prev()
作为一个成员函数来做到这一点?
it_prev = it.prev() // nothing like this
prev
定义迭代器外部的函数是否有特殊原因?