|
Boost Users : |
Subject: [Boost-users] [MultiIndex] is it possible to create multi-key key-extractors?
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2010-08-08 09:05:06
Hi,
For the following struct:
struct Flower
{
int type;
string name;
std::list<string> aliases;
};
I want to create a multiindexed container that indexes Flower objects by
type, name, and aliases, where aliases is some iteratable collection of
strings. I just don't know if it's possible to create a multi-key
key-extractor for aliases. So far I've come up with the following:
typedef boost::multi_index_container<
Flower,
indexed_by<
ordered_unique<
member<Flower, int, &Flower::type>
>,
ordered_unique<
member<Flower, string, &Flower::name>
>,
ordered_unique<
//What goes here ... ?
>
>
> FlowerMngr;
Thanks,
-Mostafa
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