In moving some code from VS6 to VS2008 (bear with me, this is not a VS
question, I'm just setting context), we find new crashes that weren't there
before and we think they're related to trying an operation on a multimap
that is empty - for example,
std::multimap<d ouble, aStructWeHaveDe fined>::iterato r low;
low = c.begin() ; // c is empty (i.e. c.empty()==1) but we haven't
checked for it
In VS6 these crashed did not occur, in VS2008 they do. Can anyone tell me
what is supposed to happen? Is there an exception thrown, or does c.begin()
return some value indicating that the multimap is empty, or is it undefined?
I've had a root through Josuttis but he doesn't go into what happens when
you do something so silly as play around with empty multimaps.
Moschops
question, I'm just setting context), we find new crashes that weren't there
before and we think they're related to trying an operation on a multimap
that is empty - for example,
std::multimap<d ouble, aStructWeHaveDe fined>::iterato r low;
low = c.begin() ; // c is empty (i.e. c.empty()==1) but we haven't
checked for it
In VS6 these crashed did not occur, in VS2008 they do. Can anyone tell me
what is supposed to happen? Is there an exception thrown, or does c.begin()
return some value indicating that the multimap is empty, or is it undefined?
I've had a root through Josuttis but he doesn't go into what happens when
you do something so silly as play around with empty multimaps.
Moschops
Comment