Boost logo

Boost Users :

From: Jia Pu (very.funny.j_at_[hidden])
Date: 2004-12-13 20:45:33


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<tag<by_id>, BOOST_MULTI_INDEX_MEMBER(StringIdPair, int, id) >,
                ordered_unique<tag<by_symbol>,
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::ordered_unique<struct boost::multi_index::tag
<struct by_symbol,struct boost::mpl::na,struct boost::mpl::na>,struct
boost::multi_index::member_offset<struct StringIdPair,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,4>,struct boost::multi_index::detail:
:null_arg> >::result_node_class<struct
boost::multi_index::detail::index_node_base<struct StringIdPair> >'
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::mpl::v_iter<struct boost::mpl::vector2<st
ruct boost::multi_index::ordered_unique<struct
boost::multi_index::tag<struct by_id,struct boost::mpl::na,struct
boost::mpl::na>,struct boost::multi_index::member_offset<struct
StringIdPair,int,0>,struct
boost::multi_index::detail::null_arg>,struct
boost::multi_index::ordered_unique<struct
boost::multi_index::tag<struct by_symbol,struct boost::mpl::na,struct
boost::mpl::na>,struct boost::multi_index::member_offset<struct
StringIdPair,class std::basic_string<char,struct
std::char_traits<char>,c
lass std::allocator<char> >,4>,struct
boost::multi_index::detail::null_arg> >,1>,struct
boost::multi_index::detail::index_node_base<struct StringIdPair> >'
being compiled


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net