This sometimes shows up when porting code from a compiler that uses classes for vector iterators, to pointers as vector iterators. In the first case, ++v.begin() would compile, while in the second case it wouldn't, because you cannot modify the temporary created from b.begin().
Reference: The C++ Standard Library: A Tutorial and Reference
No comments:
Post a Comment