Boost logo

Boost Users :

From: Hammann, Jochen (Jochen.Hammann_at_[hidden])
Date: 2004-12-07 08:40:59


Hello,

I'm new in using the MultiIndex container of Boost 1.32.0. To get familiar
with this library I wrote a small example. During the compilation with
the Microsoft Visual C++ 7.1 compiler I encounter an internal compiler error.

The error occurs, if I use the MultiIndex container with the following
configuration:
- Specification of tagged indices.
- Specification of one composite_key template parameter.
- Specification of at least three indices.

Example:

struct SFirst { };
struct SSecond { };
struct SBoth { };

typedef std::pair<std::wstring, std::wstring> Element_t;

typedef multi_index_container<Element_t,
  indexed_by<ordered_non_unique<tag<SFirst>, member<Element_t, std::wstring, &Element_t::first> >,
             ordered_non_unique<tag<SSecond>, member<Element_t, std::wstring, &Element_t::second> >,
             ordered_unique<tag<SBoth>, composite_key<Element_t,
                                                      member<Element_t, std::wstring, &Element_t::first>,
                                                      member<Element_t, std::wstring, &Element_t::second> > > > > MultiIndex_t;

//...

int main(int argc, char** argv)
{
   MultiIndex_t test;

   MultiIndex_t::index<SBoth>::type& both = test.get<SBoth>();

   return 0;
}

If I compile this code I get the following internal compiler error:

d:\Libraries\DLLs\Boost\Boost_1_32_0\inc\boost\tuple\detail\tuple_basic.hpp(612) : 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

If I try to access the first (#0) and second (#1) index with their respective tags,
everything works fine. Also, I'm able to access all three indices by their numerical
value without an error.

Is the declaration of the MultiIndex_t typedef wrong?

Regards,

   Jochen.


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