A C++ library which enables the construction of containers maintaining one or more indices with different sorting and access semantics.
0
votes
0answers
15 views
Again about Boost::multi_index_container, error c3849, what is wrong with binding to an int?
I have below code, but seems something is wrong with 'int age', code is as below:
struct MyStruct
{
char* firstName;
char* secondName;
int age;
};
typedef composite_key
...
0
votes
1answer
12 views
describe boost multi_index iterator type by its index tag
Using boost multi-index, I happen to have the following type for the iterator:
multi_index_set::nth_index<2>::type::iterator
I'd like go get rid of the nth_index<2> part of the type and ...
1
vote
1answer
27 views
Boost multi_index_container partial index search based on results of partial_index_search
To illustrate my question, I copied below code from the "Phonebook" example of Boost help doc.
struct phonebook_entry
{
std::string family_name;
std::string given_name;
std::string ssn;
...
0
votes
1answer
24 views
boost::multi_index::composite_key_result, how to get the char* that make up the composite_key?
For below code:
struct MyStruct
{
char* firstName;
char* secondName;
int age;
};
typedef composite_key
<MyStruct*,
BOOST_MULTI_INDEX_MEMBER(MyStruct, char*, firstName),
...
0
votes
1answer
19 views
boost multi_index_container composite_key_compare
I am trying to write a calculation intensive program. And I need char* to be the fields of comparsion for the composite_key_compare of the multi_index_container. However, it doesn't seem to work. Code ...
0
votes
1answer
46 views
boost.multiindex and addres of value as key
I have a struct:
struct user_context {
struct user_id;
struct user_name;
struct user_address;
boost::int64_t user_id() const;
const std::string& user_name() const;
};
I want to ...
0
votes
1answer
19 views
Boost.MultiIndex template substitution failure?
I'm attempting to use boost::multi_index_container and it seems to be choking on the template metaprogramming magic somewhere. I'm getting a massive error dump ending in:
...
1
vote
1answer
32 views
Sql IN analog in boost::multi_index
I use boost::multi_index and retrieve data like this:
sample_set::index<my_indx>::type::iterator s, end;
boost::tie(s,end) = samples.get<my_indx>().equal_range(
boost::make_tuple( ...
0
votes
1answer
47 views
error: ‘template’ (as a disambiguator) is only allowed within templates
I have following definitions:
typedef boost::multi_index_container<
ModelPtr,
boost::multi_index::indexed_by<
...
1
vote
2answers
52 views
Boost multi_index unqiue index issue
I'm trying to create a URL managing object using boost::multi_index. It has 2 indexes, one indexes position of each path item and one indexes key to find that item.
class InternalPath
{
public:
...
0
votes
0answers
35 views
Accessing the elements of Boost MultiIndex
Suppose I have the the following Multi-Index structure
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include ...
0
votes
1answer
24 views
boost relocate function, what is the effect?
What does relocate() mean in boost multi-index container?
I have read the manual from boost documentations, but I want to see a simple example and see the difference of using and not using the ...
0
votes
1answer
48 views
boost multi index container, class with pure virtual functions
I want to create multi_index_container with type A storing objects of type C, which is derived from B which is derived from A. Problem is that in A I have pure virtual function. When I try to compile ...
0
votes
0answers
27 views
Multi_index_container composite_index lookups
I have 3 questions. Do not hesitate to answer any of these questions separately:
Context
I have a custom class as follows (simplified example):
class A {
public:
double property1;
double ...
0
votes
1answer
32 views
Trouble defining multi_index_container ordered_non_unique
I'm playing around with some boost containers, but I recently came a blockade as I can't seem to define multi_index_container correctly. I'm following an example i grabbed offline but it still gives ...