Boost logo

Boost Users :

From: Phantom (rob_at_[hidden])
Date: 2005-08-30 11:20:02

Thanks for the reply :)
You're inital code caused an internal compiler error (see build log after
this email), however I took another look at the example and changed it to
the following and it worked fine :

mi::ordered_unique< mi::tag<id>,
BOOST_MULTI_INDEX_MEMBER(FilterCreatorDetails, FileTypes, id_)

so thanks for the pointer :)

----- Build log for overload follows -----

------ Build started: Project: Game Texture Loader, Configuration: Debug
Win32 ------

: fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 2701)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more
Generating Code...
Generating Code...

Build Time 0:13
Build log was saved at "file://d:\My Documents\Visual Studio Projects\Game
Texture Loader\Debug\BuildLog.htm"
Game Texture Loader - 1 error(s), 0 warning(s)

------ Build started: Project: GTLTester, Configuration: Debug Win32 ------

GTLTester - up-to-date.
Build Time 0:00

---------------------- Done ----------------------

    Build: 1 succeeded, 1 failed, 0 skipped

----- Original Message -----
From: "Joaquín Mª López Muñoz" <joaquin_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Tuesday, August 30, 2005 6:43 AM
Subject: Re: [Boost-users] Boost::multiIndex container problems


----- 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 mailing list

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