Boost.Bimap is a bidirectional maps library for C++.
Questions tagged [boost-bimap]
38 questions
0
votes
1 answer
Is C++ bimap possible with one side of view having different key than other side of the view value? How to do that?
At the beginning I needed a map, so I used std::map.
Then, some requirements were added and I needed to also get "keys" for "value" (foos for bar), so I used
boost::bimaps::bimap<
…

Lukas Salich
- 959
- 2
- 12
- 30
0
votes
1 answer
Insert boost::dynamic_bitset<> into boost::bimap
I am trying to insert boost::dynamic_bitset<> into boost::bimap. However, it is very slow as compared to inserting integers or strings. Minimal Example is given, the code of which is shown below
// Example program
#include
#include…

AwaitedOne
- 992
- 3
- 19
- 42
0
votes
0 answers
Boost bimap takes much memory
I looked into this, but not helpful to me.
I have a boost bimap where I have 1 million entries of long long int. Theoretically it takes 1000000*8*2 bytes = 16 MB of memory. But I found that total memory used is 73 MB. I don't know what is going…

AwaitedOne
- 992
- 3
- 19
- 42
0
votes
1 answer
How to find the memory take by boost bimap
I have a boost bimap
#include
#include
#include
#include
#include
namespace bimaps = boost::bimaps;
typedef boost::bimap

AwaitedOne
- 992
- 3
- 19
- 42
0
votes
1 answer
Find all the keys of repeated element in bimap
I want to access all the keys of a repeated element in bimap. I have some example code below
#include
#include
#include
#include
#include
#include…

AwaitedOne
- 992
- 3
- 19
- 42
0
votes
2 answers
How to make reference variable to boost::bimap.left?
I'm using boost::bimap to map integers to strings:
typedef boost::bimap ParamIDStrings;
typedef ParamIDStrings::value_type id_pair;
extern const ParamIDStrings paramIDStrings;
I'm trying to create reference variables so I can…

DBedrenko
- 4,871
- 4
- 38
- 73
0
votes
1 answer
Is it legal to re-declare a member class after defining it?
I have a problem with compiling boost.bimap library. My test program is a blank main function and only one include directive(like #include ).
After some investigations I found out that preprocessor had made some interesting…

alex.demid
- 25
- 2
-1
votes
1 answer
How do I test if the result from boost::bimap "right.find" was found or not?
I am new to using boost::bimap so forgive me if this sounds like a basic question. I am using boost 1.75.0.
Take this snippet of code:
if (rBiMapStudentItemDescBefore.right.count(aryStrStudentItemDesc[i]) > 0)
{
auto it =…

Andrew Truckle
- 17,769
- 16
- 66
- 164