I understand that when we insert values into the STL map, a copy is made and stored. I have code that essentially does a find on the map and obtains an iterator.
I then intend to use the iterator to change the value in the map. The results are not what I would expect ie: the value is not changed when accessed from another part of the program. I suspect its because the change I am applying is to a copy of value. the relevant code is as follows.
ObjectMappingType::iterator it = objectMapping_.find(symbol);
if (it == objectMapping_.end()) {
throw std::invalid_argument("Unknown symbol: " + symbol);
}
get<3>(it->second) = value;
NOTE: I am actually trying to change a value inside a boost::tuple that is stored as the 'value' part of the map.