Boost logo

Boost Users :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2005-08-30 00:43:28


----- Mensaje original -----
De: Phantom <r..._at_[hidden]>
Fecha: Lunes, Agosto 29, 2005 7:59 pm
Asunto: [Boost-users] Boost::multiIndex container problems

> Hi,

> I'm trying to use the boost::multi_index_container to index a
> struct based
> on a enum and a std::string.
> While I can retrive data from the container by search on the
> string any
> attempts to such on the enum results in a compliation error.
> Anyone got any ideas as to what I need todo to get this to work :)

I haven't compiled your code, but I think the problem
lies in that you define the id index as

  mi::tag<id> ,
  mi::identity<FilterCreatorDeta­ils> >

that is, the key for this index is the *whole* FilterCreatorDetails
object; yet, you later try to use it passing a FileTypes value.
Try defining your index as:

  mi::tag<id> ,
    &FilterCreatorDetails::id_> >

and I think everything should work. Please come back here
if it doesn't.

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