A C++ library which enables the construction of containers maintaining one or more indices with different sorting and access semantics.
Questions tagged [boost-multi-index]
248 questions
2
votes
2 answers
Wildcard search inside a Boost.MultiIndex data structure?
I'm trying to optimize my application by reducing round-trips to my database. As part of that effort, I've been moving some of the tables into memory, storing them as Boost.MultiIndex containers.
As a side-effect of this process, I've lost the…

Runcible
- 7,006
- 12
- 42
- 62
2
votes
1 answer
gdb.lookup_type returns invalid type with boost::multi_index_container
I'm using gdb-7.5, on RHEL 6, compiled with gcc-4.7.2. I'm trying to
write a pretty printer for boost::multi_index and ran into problems
with gdb.lookup_type.
Below given code has the following declaration.
TestSet ts;
Now, at the gdb command…

Surya
- 1,139
- 1
- 11
- 30
2
votes
3 answers
Persistence of boost multi_index_container stored in a file
Can I rely on boost multi_index_container allocated within memory mapped file? Will be this kind of "database" portable between computers with the same endianess?

Dejwi
- 4,393
- 12
- 45
- 74
2
votes
0 answers
Map supporting multiple keys for each value in c++
I'm looking for either a ready made associative map container that supports multiple keys (aliases) that map to a single value.
If there's no ready made solution, am I likely to have to resort to using 2 separate maps or is there a better way?
It…

goji
- 6,911
- 3
- 42
- 59
2
votes
2 answers
Java LinkedHashSet index validity
I've been porting a big chunk of Java code to C++ and have had to implement things like LinkedHashSet as I've gone. I've made a reasonable facsimile of LinkedHashSet/Map by using Boost's Multi-Index Containers.
As I'm porting the code I'm running…

xwhatsit
- 153
- 1
- 7
2
votes
1 answer
how to modify the read only elements of boost multi index?
I have just noticed that i am not able to make changes in the boost multi index container elements. Is this true? (based on the following simplified code) look at the "update" function:
#include
#include…

rahman
- 4,820
- 16
- 52
- 86
1
vote
1 answer
access boost multi-index container in without iterator
sorry if this is a newB question,
please conider the following code:
#include
#include
#include
#include…

rahman
- 4,820
- 16
- 52
- 86
1
vote
2 answers
Boost::multi_index. Faster solution?
I've posted a question yesterday and I solved this by using multi_map:
Having a composite key for hash map in c++
This works like a charm but the problem happens when the datasrt is big enough.
My data set is around 10M big, and it takes +350secs…

devEvan
- 361
- 4
- 16
1
vote
1 answer
`boost::multi_index_container` in shared memory?
I would be interested in something like a multi index container in shared memory.
Is it possible to allocate, e.g., a boost::multi_index_container in shared memory, so that different executables can read/write its data? How?
Thank's.

Pietro
- 12,086
- 26
- 100
- 193
1
vote
0 answers
multi_index_container and virtual list controls
I'm having a hard time with the multi_index_container.
This is basically what I need:
Virtual list control.
Sort the items in multiple ways (so I wanted to use multi_index_container).
Access items randomly, according to how they are sorted and…

Steffen
- 23
- 4
1
vote
0 answers
Check if boost::multiindex container is comparable
In my function I want to check if calss is comparable and perform comparison only if it is:
template
int compare(const T& a, const T& b)
{
if constexpr (std::three_way_comparable) {
std::cerr << "comparable " <<…

uni
- 539
- 1
- 9
- 21
1
vote
1 answer
Pointer/reference stability in boost::multi_index
https://www.boost.org/doc/libs/1_81_0/libs/multi_index/doc/tutorial/indices.html#guarantees discusses iterator stability on rehash. However, this doesn't necessarily imply pointer and reference stability. Which operations on boost::multi_index, if…

Andy Shulman
- 1,895
- 3
- 23
- 32
1
vote
1 answer
Boost keywords template
My question is about this code:
auto& lookup = container.template get<1>();
container.relocate(container.begin(),container.template project<0>(it));
1st: .template
From what I've found, this template keyword specified on my container is using a…

Keorus
- 17
- 4
1
vote
1 answer
Equivalent of GROUP BY COUNT using boost multi-index
I'm using boost::multi_index_container to perform some operations on satellite data.
I have a data structure that looks like this:
struct SatData {
std::string sat_system;
std::string band;
int index;
uint64_t time;
double data;
…

mcamurri
- 153
- 11
1
vote
1 answer
How to overload the [] operator for boost::multi_index_container
I need to overload the [] operator for boost::multi_index_container.
It would look like something like this :
template
using my_set = boost::multi_index_container<
T,
boost::multi_index::indexed_by<
…

Armure
- 25
- 5