Today, i refer to vector<T>::erase (c++11) in cplusplus.com and it gives me the two results:
iterator erase (const_iterator position);
iterator erase (const_iterator first, const_iterator last);
as for c++98, the results are:
iterator erase (iterator position);
iterator erase (iterator first, iterator last);
I think the results of the c++11 version in cplusplus.com are wrong because of the const_iterator.
I am a novice if i am wrong please criticize.Thank you.
Requiring iterators to modifiable values was C++98 defect which was corrected in C++11. Now most of the unnessesary requirements are relaxed, so const_iterators are now really can be used and should be preferred for const correctness.