
7 May
2009
7 May
'09
4:26 p.m.
Steven Watanabe wrote:
AMDG
Mathias Gaunard wrote:
Tushar Chowdhury wrote:
As of now I failed to get such an algo.
boost::assign(m.equal_range(old_key), new_key); ?
?????
boost::assign is a namespace.
My bad, I meant 'fill', not 'assign'. I confused it with the assign member of containers. boost::fill being just like std::fill but taking a range instead of two iterators. It's in the accepted update to the range library that doesn't seem to be in the trunk yet. Otherwise, you'd have to write std::pair<TheMap::iterator, TheMap::iterator> r = m.equal_range(old_key); std::assign(r.first, r.second, new_key);