|
Boost Users : |
From: Bruno Martínez (br1_at_[hidden])
Date: 2005-10-19 15:46:37
Hi.
I have the following problem with MultiIndex. For
struct Base {
int id;
};
struct Der : Base {
};
I can't make a key extractor.
This way
typedef multi_index_container<
Der,
indexed_by<
ordered_unique<member<Der, int, &Der::id> >
>Set;
doesn't work because &Der::id is of type pointer to member of Base.
This other
typedef multi_index_container<
Der,
indexed_by<
ordered_unique<member<Base, int, &Base::id> >
>Set;
doesn't work because of the ChainedPtr overloads in member.
I tried casting &Der::id to the appropiate type, but couldn't make it
work. Maybe the solution is to put some enable_ifs in member.
Regards,
Bruno
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net