
Hello all,I'm a newbie to multi-index. I ran into a strange problem with
VS2008. When using BOOST_AUTO with multi-index I'm getting compilation
errors (C2248) . Please see the following code.
*<snip>*
*
*
#include <iostream>
#include <string>
using namespace std ;
#include
Container ;
typedef Container::index<byNumber>::type TestByNumber ; typedef Container::index<byString>::type TestByString ; Container c ; c.insert (Test(5, "Surya")) ; c.insert (Test(15, "Kiran")) ; //TestByNumber& tests = c.get<byNumber>() ; BOOST_AUTO(tests, c.get<byNumber>()) ; BOOST_FOREACH (Test t, tests) cout << t << endl ; return 0 ; } *</snip>* * * Compilation for this case fails with C2248. If I replace the BOOST_AUTO with the previous line's statement, compilation goes well. This happens with VS2008 only. with VS2005, there's no issue with BOOST_AUTO. Am I missing something here? Thanks, Surya