Ok, sorry for the noise... composite_key expects the result_type as the
first parameter and I did not specify it...
Anyway thanks to all answers!
On Fri, Sep 2, 2011 at 3:07 PM, Ovanes Markarian
Hello *,
I try to use a multi_index container with a composite key. The container is defined as follows:
struct index_data { entry_header header; //has various public fields one of them is timestamp_ fs::entry entry; bool masked; };
typedef size_t timestamp_t; //in reallity this type is a class, but the error can be reproduced with this typedef as well
timestamp_t const& timestamp(index_data const& data) { return data.header.timestamp_; }
bool mask_state(index_data const& data) { return data.masked; }
struct entry_data_tag {};
typedef mi::multi_index_container < index_data, mi::indexed_by < mi::ordered_non_unique < mi::tag
, mi::composite_key < mi::global_fun //this could be a direct member reference, but I intially used fusion::map and reduced the problem to minimum , mi::global_fun > > > entry_index;
typedef entry_index::index
::type entry_data; void mask_all() { using namespace boost::lambda; entry_data& entries = pimpl_->indexed;
entries.find(boost::make_tuple(false)); //!!!! this line results in an error novel by gcc 4.3 }
The error description is: multi_index/composite_key.hpp:638: error: no match for 'operator*' in '*x'
Does anyone have some suggestions why that happens?
With Kind Regards, Ovanes