Boost logo

Boost Users :

From: Marc Viala (mviala_at_[hidden])
Date: 2006-12-29 13:23:32


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 ;
}
 
 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net