Boost logo

Boost Users :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2006-01-24 04:23:21

[Luke, this message from you shows up at Google Groups frontend,
but somehow it hasn't really made it to the users list. Responding to
the list in the hope that at least this answer gets properly processed.]

Luke Meyers ha escrito:
> The indexed_by construct for a multi_index_container can be replaced
> an mpl::vector, so that the list can be synthesized. I would like to
> do the same thing with compound_key, to synthesize such a key based on

> a list of types. Can I do this?

Alas there's no version of composite_key accepting an MPL sequence
instead of the direct enumeration of the constituent key extractors.
But with a little MPL and preprocessor stuff, however, you can do what
you want, see the attached snippet.


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at