Re: [boost] multi_index problem in VC 7.1

Hi Brock, ----- Mensaje original ----- De: Brock Peabody <brock.peabody@npcinternational.com> Fecha: Lunes, Noviembre 7, 2005 7:07 pm Asunto: [boost] multi_index problem in VC 7.1
If I try to compile the very first example in multi index I get the following error:
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\boost\multi_index\detail\node_type.hpp(56) : error C2903: 'node_class' : symbol is neither a class template nor a functiontemplate
I get this with 1.33 and 1.32. I've tried many different compiler options. Here is my latest command line:
/Ox /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "NOMINMAX" /D "_AFXDLL" /D "_MBCS" /FD /EHsc /MD /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /nologo /c /Wp64 /Zi /TP
I've dug around a bit and I can't make any sense of this problem. Has anyone else seen this?
The exact code I'm compiling is:
#include <boost/multi_index/key_extractors.hpp> #include <boost/multi_index_container.hpp>
[...] I think you forgot to #include <boost/multi_index/ordered_index.hpp> Does this solve your problem? Similar difficulties have been reported at times here in the list, maybe I should update the doc snippets so that the necessary #include's are explicitly shown. HTH, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Hi Joaquin,
On Behalf Of JOAQUIN LOPEZ MU?Z
I think you forgot to
#include <boost/multi_index/ordered_index.hpp>
Does this solve your problem?
Yes!
Similar difficulties have been reported at times here in the list, maybe I should update the doc snippets so that the necessary #include's are explicitly shown.
I would also suggest that instead of (or in addition to) having multi_index_container.hpp in the root of boost, you could put a multi_index.hpp that included all of the commonly used files. Thanks, Brock

I'm having trouple compiling multi_index_container<> with VC++7.1 I started from bidirectional_map example from the library (http://www.boost.org/libs/multi_index/doc/examples.html#example4), that compiles and works just fine. then i've added third tempate parameter CompareLessT to the bidirectional map: template<typename FromT, typename ToT, typename CompareLessT> struct bidir_map { typedef std::pair<std::string, std::string> value_type; typedef multi_index_container< value_type , indexed_by< ordered_unique< tag<from> , member<value_type, FromT, &value_type::first> , CompareLessT> , ordered_unique< tag<to> , member<value_type, ToT, &value_type::second> > , CompareLessT > > type; }; and it stops compiling giving me infamous INTERNAL COMPILER ERROR: e:\edatools\boost\1.32.0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(48) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2712) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information I might choose to ms's technical support, but had a bad feeling it wont do much good :).
participants (3)
-
Alexander Ivanov
-
Brock Peabody
-
JOAQUIN LOPEZ MU?Z