I’m learning about boost multiIndex and I’m following this tutorial.
The problem is that I cannot compile the code from the Hashed Indices section (the first block of code on that page) using Visual Studio 2008 🙁
Every time I try, the c++ compiler complains:
main.cpp(19) : error C2143: syntax error : missing ';' before '<'
main.cpp(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Those errors occur at the typedef on line 19 in the block of code shown above. Can someone help me shed some light on this please?
The code in that example has an implied using directive —
using namespace boost::multi_index;.Either add said using directive before the
typedef, or fully qualifymulti_index_container,indexed_by,ordered_unique,hashed_unique, etc.