I use boost::multi_index_container, and I'm trying to refer to the member member in the template argument, but it is unclear how to do this:
struct Foo {
int unique_value;
};
struct Bar {
Foo foo;
double non_unique_value;
};
multi_index_container<Bar, boost::multi_index::indexed_by<
ordered_unique< member< Foo, int, &Bar::foo::unique_value > >,
ordered_non_unique< member< Bar, double, &Bar::non_unique_value > >
> >
How can I refer to unique_valuein a template argument? I understand why what I did does not work: I must report that it Foois a type that is a member Barand do something more similar to Bar::Foo::some_value, but it is not clear how I can indicate this.
source
share