Boost logo

Boost Users :

From: Daryle Walker (darylew_at_[hidden])
Date: 2008-09-01 15:33:58


On Aug 31, 2008, at 6:56 AM, Sean Farrow wrote:

> I am looking to change from std::map to boost::bimap.
> I have the following defined:
> std::bimap<std::bitset<6>, int, BitSetComp> DotsList;
> And
> boost::bimap<std::bitset<6>, int, BitSetComp>::iterator DotsIterator;
[SNIP]
> How do I change these definitions to use boost::bimap.
> Any help appreciated.

A bimap can act as two regular maps, and does so through two special
public data members. The "left" member acts like a map<bitset, int,
BitSetComp>, and the "right" member flips the first two arguments.
There are also type-aliases defined for each iterator, left or
right. There is also a mode that acts like a std::set< std::pair<
std::bitset< 6 >, int > > >. Read the docs for the specific names
and modes.

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net