I have just upgraded a project from Visual Studio 2005 to 2008 and suddenly I am getting compile errors using boost::multi_index:

error C2247: 'boost::multi_index::detail::random_access_index<SuperMeta,TagList>::operator []' not accessible because 'boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>' uses 'protected' to inherit from 'boost::multi_index::detail::random_access_index<SuperMeta,TagList>'

I figure that this is to do with the BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS define, so I tried changing

#if _MSC_VER <= 1400  // 1400 == VC++ 8.0
#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
#endif

to

#if _MSC_VER <= 1500  // 1500 == VC++ 9.0
#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
#endif

in visualc.hpp which fixes the compile error.  Is this a bug with the visualc.hpp config in boost? I can't believe I would be the first to spot it.  Has anyone else experienced this? Are member template friends actually supported in visual c++ 9?


SMS "HOTMAIL" naar 3010 en ontvang gratis de juiste instellingen voor Hotmail op je mobiele telefoon