
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 ------ Compiling... GTL_internal.cpp g:\Boost\include\boost-1_33\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(48) : 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 information Generating Code... Compiling... GameTextureLoader.cpp 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@tid.es> To: <boost-users@lists.boost.org> Sent: Tuesday, August 30, 2005 6:43 AM Subject: Re: [Boost-users] Boost::multiIndex container problems Hello, ----- Mensaje original ----- De: Phantom <r...@phantom-web.co.uk> 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::ordered_unique< mi::tag<id> , mi::identity<FilterCreatorDetails> > 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::ordered_unique< mi::tag<id> , mi::member< FilterCreatorDetails,FileTypes, &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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users