
I am trying to use Boost Multi_Index from build 1.34.1 to set up a collection of structs. This Multi Index container will have 2 unique keys (ID and Name), since I have to be able to search it with either key. I made the compiler-specific corrections for VC++ 6.0 SP5: boost::multi_index::multi_index_container member_offset<A,int,offsetof(A,x)> My complete declaration is: struct ID(); struct Name(); typedef boost::multi_index::multi_index_container< PDCUTestMessage, boost::multi_index::ordered_unique< boost::multi_index::tag<ID>, boost::multi_index::member_offset<PDCUTestMessage, char, offsetof(PDCUTestMessage, id)> >, boost::multi_index::ordered_unique< boost::multi_index::tag<Name>, boost::multi_index::member_offset<PDCUTestMessage, string, offsetof(PDCUTestMessage, name)> > >
PDCUMessageList;
Later, I attempt to set up indicies for both of these keys, according to VC++ 6.0 compiler-specific syntax to bypass the Get/Tag issue: typedef index<PDCUMessageList, ID>::type IDIndex; typedef index<PDCUMessageList, Name>::type NameIndex; Now the error. using the above code, I get the following error: error C2039: 'type': is not a member of "global namespace" referencing the two typedef lines above. I can't figure out what I am doing wrong? Quick responses are much appreciated! Thanks! Chris