Boost logo

Boost :

Subject: Re: [boost] Does Boost has an utility to replace all OLD Keys with NEW one for MultiMap/Map?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-05-07 12:26:41

Steven Watanabe wrote:
> 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);

Boost list run by bdawes at, gregod at, cpdaniel at, john at