
Hello,
I've encountered a problem compiling code that uses boost
multi_index_container. I'm using both Microsoft Visual Studio 2005 and
Apple's gcc 4.0.1. Visual Studio was very picky about how I used
namespaces. I finally got it working with the code below.
The key to success was the 'using namespace boost::multi_index' line. If
I attempted to prefix the members directly, eg.
typedef typename boost::multi_index::nth_index_const_iterator<0>::type
left_const_iterator;
or
namespace mi=boost::multi_index;
typedef typename mi::nth_index_const_iterator<0>::type left_const_iterator;
it would fail to compile.
However, when I attempt to compile the same code on Mac OS X using gcc
4.0.1 I get the following errors. Does anyone know why?
src.cpp:98:error: wrong number of template arguments (1, should be 2)
/boost/boost/multi_index_container_fwd.hpp:46: error: provided for
'template