Hi: I am using a bitset to store up to 63 different values as a key in a mapp This does appear to be working though, as I carn't seem to get an iterator to accept any bitset even though it is defined, has any one go any othe ideas as to how I could tackle this issue. Regards Sean. __________ Information from ESET NOD32 Antivirus, version of virus signature database 3390 (20080826) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
AMDG Sean Farrow wrote:
Hi: I am using a bitset to store up to 63 different values as a key in a mapp This does appear to be working though, as I carn't seem to get an iterator to accept any bitset even though it is defined, has any one go any othe ideas as to how I could tackle this issue.
What exactly are you trying to do? I can guess that you have something like std::map<std::bitset<6>, int> m; but I have no idea what you mean by getting "an iterator to accept a bitset" Could you please clarify? In Christ, Steven Watanabe
Hi: Ok, in maps I have: std::map <std::bitset<6>, int, BitSetComp> SignsList, DotsList; This translates to in bimap: typedef boost::bimap<std::bitset<6>, int, BitSetComp> DotsList, SignsList; The iterator for the map is: std::map<std::bitset<6>, int>::iterator DotsIterator, SignsIterator; I carn't get this translated to bimap iterators. Currently, the following doesn't work: typedef boost::bimap<std::bitset<6>, int, BitSetComp>::left_map::const_iterator DotsIterator, SignsIterator; Can someone tell me what is wrong with this code/what the correction is. I've read the docs and carn' seemto se anything! Any help apreciated. Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: 02 September 2008 22:35 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Bitset issue AMDG Sean Farrow wrote:
Hi: I am using a bitset to store up to 63 different values as a key in a mapp This does appear to be working though, as I carn't seem to get an iterator to accept any bitset even though it is defined, has any one go any othe ideas as to how I could tackle this issue.
What exactly are you trying to do? I can guess that you have something like std::map<std::bitset<6>, int> m; but I have no idea what you mean by getting "an iterator to accept a bitset" Could you please clarify? In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 3409 (20080902) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 3409 (20080902) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
On Wed, Sep 3, 2008 at 3:39 AM, Sean Farrow <sean.farrow@seanfarrow.co.uk> wrote:
Hi: Ok, in maps I have: std::map <std::bitset<6>, int, BitSetComp> SignsList, DotsList; This translates to in bimap: typedef boost::bimap<std::bitset<6>, int, BitSetComp> DotsList, SignsList;
Do you really want typedef there? I think what you mean is boost::bimap<std::bitset<6>, int, BitSetComp> DotsList, SignsList; It doesn't make sense to use the keyword typedef there. With typedef you probably would be writing something like, typedef boost::bimap<std::bitset<6>, int, BitSetComp> my_bimap; my_bimap DotsList, SignsList; Rgds, anna -- Abusive Language on Internet http://missingrainbow.blogspot.com/2008/08/abusive-language-on-internet.html
Hi: Your right! What is wrong with this iterator definition: boost::bimap< std::bitset<6>, int, BitSetComp>::left_map::iterator DotsIterator; I get the following 4 errors: error C2903: 'rebind' : symbol is neither a class template nor a function template bimap_core.hpp 408 error C2039: 'rebind' : is not a member of 'BitSetComp' bimap_core.hpp 408 error C2146: syntax error : missing ',' before identifier 'rebind' bimap_core.hpp 408 error C2065: 'rebind' : undeclared identifier bimap_core.hpp 408 Any help apreciated, I'm pulling my fair out as we speak! Sean -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Annamalai Gurusami Sent: 03 September 2008 17:48 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Bitset issue On Wed, Sep 3, 2008 at 3:39 AM, Sean Farrow <sean.farrow@seanfarrow.co.uk> wrote:
Hi: Ok, in maps I have: std::map <std::bitset<6>, int, BitSetComp> SignsList, DotsList; This translates to in bimap: typedef boost::bimap<std::bitset<6>, int, BitSetComp> DotsList, SignsList;
Do you really want typedef there? I think what you mean is boost::bimap<std::bitset<6>, int, BitSetComp> DotsList, SignsList; It doesn't make sense to use the keyword typedef there. With typedef you probably would be writing something like, typedef boost::bimap<std::bitset<6>, int, BitSetComp> my_bimap; my_bimap DotsList, SignsList; Rgds, anna -- Abusive Language on Internet http://missingrainbow.blogspot.com/2008/08/abusive-language-on-internet. html _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 3412 (20080903) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 3412 (20080903) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
On Wed, Sep 3, 2008 at 12:19 PM, Sean Farrow <sean.farrow@seanfarrow.co.uk> wrote:
Hi: Your right! What is wrong with this iterator definition: boost::bimap< std::bitset<6>, int, BitSetComp>::left_map::iterator DotsIterator;
I think the problem is in the third template parameter. The third template argument to boost::bimap is different from that of the std::map. Please read the following section of the documentation: http://www.boost.org/doc/libs/1_35_0/libs/bimap/doc/html/boost_bimap/the_tut... Rgds, anna
I get the following 4 errors: error C2903: 'rebind' : symbol is neither a class template nor a function template bimap_core.hpp 408 error C2039: 'rebind' : is not a member of 'BitSetComp' bimap_core.hpp 408 error C2146: syntax error : missing ',' before identifier 'rebind' bimap_core.hpp 408 error C2065: 'rebind' : undeclared identifier bimap_core.hpp 408 Any help apreciated, I'm pulling my fair out as we speak! Sean
-- Abusive Language on Internet http://missingrainbow.blogspot.com/2008/08/abusive-language-on-internet.html
Hi: Ok, how do I use a custom comparison operator in an iterator, This isn't covered in the instantiation scheme. Cheers Sean. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Annamalai Gurusami Sent: 03 September 2008 19:03 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Bitset issue On Wed, Sep 3, 2008 at 12:19 PM, Sean Farrow <sean.farrow@seanfarrow.co.uk> wrote:
Hi: Your right! What is wrong with this iterator definition: boost::bimap< std::bitset<6>, int, BitSetComp>::left_map::iterator DotsIterator;
I think the problem is in the third template parameter. The third template argument to boost::bimap is different from that of the std::map. Please read the following section of the documentation: http://www.boost.org/doc/libs/1_35_0/libs/bimap/doc/html/boost_bimap/the _tutorial/complete_instantiation_scheme.html Rgds, anna
I get the following 4 errors: error C2903: 'rebind' : symbol is neither a class template nor a function template bimap_core.hpp 408 error C2039: 'rebind' : is not a member of 'BitSetComp' bimap_core.hpp 408 error C2146: syntax error : missing ',' before identifier 'rebind' bimap_core.hpp 408 error C2065: 'rebind' : undeclared identifier bimap_core.hpp 408 Any help apreciated, I'm pulling my fair out as we speak! Sean
-- Abusive Language on Internet http://missingrainbow.blogspot.com/2008/08/abusive-language-on-internet. html _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users __________ Information from ESET NOD32 Antivirus, version of virus signature database 3412 (20080903) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 3412 (20080903) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
participants (3)
-
Annamalai Gurusami
-
Sean Farrow
-
Steven Watanabe