Hi,
I changed a type from a struct to a boost::shared_ptr.
Consequently I had to change "iterator->second.member" to "iterator->second->member" in some places. Well, so I did, but afterwards all these places looked like "iterator->second>-member"! (The iterator coming from a map where the second entry had the type in question.)
This is reproducable in my real-life project. Changing the "->" (or ">-") back to a point, erasing the point (with backspace) and typing "->" results in a ">-".
And the coolest thing about it: For once I was able to reproduce the bug in a small code snippet :-)
#include <boost/shared_ptr.hpp>
#include <map>
struct myStruct {
bool myMember;
};
typedef boost::shared_ptr<myStruct> myPtr;
void doSomething( void )
{
myPtr test;
std::map<int, myPtr> myMap;
for (std::map<int, myPtr>::const_iterator it = myMap.begin(); it != myMap.end(); ++it) {
if (it->second.myMember) {
// do something
}
}
}
Change the dot in front of the red myMember to a "->", placing the caret behind the "." and using the key sequence Backspace - >, and you'll see "it->second>-myMember". (At least if you do it on my computer.)
Regards, Thomas