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<entry_data_tag>
, mi::composite_key
< mi::global_fun<index_data const&, bool, &mask_state> //this could be a direct member reference, but I intially used fusion::map and reduced the problem to minimum
, mi::global_fun<index_data const&, timestamp_t const&, ×tamp>
>
>
>
> entry_index;
typedef entry_index::index<entry_data_tag>::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