[resiprocate] iterator bug?
Hello,
There is an article
"http://www.codeguru.com/Cpp/Cpp/cpp_mfc/stl/article.php/c4027".
which says "Note that we cannot write *(--v.end()) because v.end() is not a
l-value."
###################################################################
std::vector<int> v;
v.push_back(999);
// fill up the vector
//...
// following statements are equivalent:
int i = v.front();
int i = v[0];
int i = v.at(0);
int i = *(v.begin());
// following statements are equivalent:
int j = v.back();
int j = v[v.size()-1];
int j = v.at(v.size()-1);
int j = *(v.end()-1);
#################################################################
So that we can not ++v.begin ?
And is the following correct?
===================================================================
resiprocate/test/testMultipartMixedContents.cxx
MultipartRelatedContents::Parts::const_iterator i = ++mpc->parts().begin();
===================================================================
resiprocate/test/testSdp.cxx
assert(*++sdp.session().media().front().getValues("rtpmap").begin() == "101
telephone-event/8000");
===================================================================
sincerely,
zuobf
zuobf@xxxxxxxxxxxxxxx
2005-03-31