Boost logo

Boost Users :

From: Sean Farrow (sean.farrow_at_[hidden])
Date: 2008-09-02 02:22:27


Hi:
I got that far, however I carn't seem to declare iterators properly:
With the previously used map scheme, my iterator was declared as
follows:
Std::map<std::bitset<6>, int>::iterator DotsIterator;
How do I convert this to use boost::bimap.
Cheers
Sean.

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Daryle Walker
Sent: 01 September 2008 20:34
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Changing from std::map to boost::bimap

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 mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
 
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3406 (20080902) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
 
 
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3406 (20080902) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.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