[Boost.Multi-Index] ICE w/ VC7.1

I'm just trying to use Boost.MultiIndex in a large project but I'm not being able to compile this library with VC 7.1.6030: I've got an ICE in file "apply_wrap.hpp" of Boost.MPL. I've tried to change the headers order but without success. My environment is: - Windows XP - Boost 1.33.1 - VC 7.1.6030 To demonstrate this ICE, you will find hereafter a code snippet. Thanks in advance. Marc Viala // MultiIndex Container #include <boost/config.hpp> #include <boost/multi_index_container.hpp> #include <boost/multi_index/composite_key.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/member.hpp> #include <boost/multi_index/key_extractors.hpp> // STL #include <string> using namespace boost::multi_index ; struct Item { const std::string& getCls() const { return _cls ; } const std::string& getId() const { return _id ; } std::string _cls ; std::string _id ; int _i ; int _j ; } ; void main() { typedef const_mem_fun< Item , const std::string& , &Item::getCls
key_cls ; typedef const_mem_fun< Item , const std::string& , &Item::getId key_id ; typedef composite_key<Item,key_cls,key_id> ckey_clsid ; typedef composite_key< Item , ordered_non_unique<member<Item,int,&Item::_i> > , ordered_non_unique<member<Item,int,&Item::_j> > > ckey_ij ; typedef multi_index_container< Item, indexed_by< ordered_non_unique<key_id> , ordered_non_unique<key_cls> , ordered_unique<ckey_ij> > ObjectContainer ;
ObjectContainer c ; }

Hello Marc, ----- Mensaje original ----- De: Marc Viala <mviala@acticm.com> Fecha: Viernes, Diciembre 29, 2006 7:25 pm Asunto: [Boost-users] [Boost.Multi-Index] ICE w/ VC7.1 Para: boost-users@lists.boost.org
I'm just trying to use Boost.MultiIndex in a large project but I'm not being able to compile this library with VC 7.1.6030: I've got an ICE in file "apply_wrap.hpp" of Boost.MPL. I've tried to change the headers order but without success.
My environment is: - Windows XP - Boost 1.33.1 - VC 7.1.6030
To demonstrate this ICE, you will find hereafter a code snippet.
Thanks in advance.
Marc Viala [...] typedef composite_key< Item , ordered_non_unique<member<Item,int,&Item::_i> > , ordered_non_unique<member<Item,int,&Item::_j> >
ckey_ij ;
I think the problem lies here: you must provide composite_key<> with *key extractors*, not index specifiers. Please try rewriting ckey_ij like this: typedef composite_key< Item , member<Item,int,&Item::_i> , member<Item,int,&Item::_j> > ckey_ij ; Problem solved? I'm sorry I can't try the snippet you provide myself, so please report back. Thanks for using Boost.MultiIndex! Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (2)
-
"JOAQUIN LOPEZ MU?Z"
-
Marc Viala