I am using MSVC 6 with Boost 1-32. Below is my sample code using two indeices:
struct by_id{};
struct by_symbol{};
struct StringIdPair
{
StringIdPair(int _id, const std::string & _string):
id(_id),
string(_string)
{}
int id;
std::string string;
};
typedef multi_index_container<
StringIdPair,
indexed_by<
ordered_unique, BOOST_MULTI_INDEX_MEMBER(StringIdPair, int, id) >,
ordered_unique,
BOOST_MULTI_INDEX_MEMBER(StringIdPair, std::string, string) >
>
> StringIdTable;
StringIdTable string_id_table;
When I compile it, I have following errors. The actual message is much
longer than this. I don't want paste them here to piss off every one
on this mailing list. :)
Anyway, I am not a template expert. I couldn't figure it out myself.
Any help will be appreciated. Thanks.
c:\boost\include\boost_1_32\boost\multi_index\detail\msvc_index_specifier.hpp(45)
: error C2039: 'node_class' : is not a member of 'fake_index_type<0>'
c:\boost\include\boost_1_32\boost\multi_index\detail\node_type.hpp(42)
: see reference to class template instantiation
'boost::multi_index::detail::msvc_index_specifier,struct
boost::multi_index::member_offset,4>,struct boost::multi_index::detail:
:null_arg> >::result_node_class'
being compiled
c:\boost\include\boost_1_32\boost\mpl\aux_\preprocessed\msvc60\apply_wrap.hpp(102)
: see reference to class template instantiation
'boost::multi_index::detail::index_node_applier::apply,struct boost::multi_index::member_offset,struct
boost::multi_index::detail::null_arg>,struct
boost::multi_index::ordered_unique,struct boost::multi_index::member_offset,4>,struct
boost::multi_index::detail::null_arg> >,1>,struct
boost::multi_index::detail::index_node_base<struct StringIdPair> >'
being compiled