Boost logo

Boost Users :

Subject: Re: [Boost-users] Insertion/Use of boost::multi_index
From: Ram (sourceopen_at_[hidden])
Date: 2016-09-19 04:59:54


Sorry Joaquin, will do that from next time..
Corrected my code to,

typedef boost::multi_index_container<
ClassX*, //mapped value
boost::multi_index::indexed_by<ClassX*, //list of indices
boost::multi_index::hashed_unique<
boost::multi_index::const_mem_fun<ParentOfClassX, key1,
&ParentOfClassX::getkey1> //hashed index by unique key1
>,
boost::multi_index::hashed_unique<
boost::multi_index::const_mem_fun<ParentOfClassX, Vs64,
&ParentOfClassX::getkey2> //hashed index by unique key1
>,
boost::multi_index::hashed_unique<
boost::multi_index::const_mem_fun<ParentOfClassX, VString,
&ParentOfClassX::getkey3> //hashed index by unique key3/ID
>
>
>ClassXMultiKeyIndexed;

ClassXMultiKeyIndexed sample;

and tried compiling and I still get this while compiling(there are more
errors below, but removed them),
.
.
.
kytj.cpp
ky_op_tj.cpp
c:\code\lib\boost\boost\multi_index\detail\node_type.hpp(43) : error C2825:
'boost::multi_index::detail::index_node_applier::apply<
IndexSpecifierIterator,Super>::index_specifier': must be a class or
namespace when followed by '::'
        with
        [
            IndexSpecifierIterator=boost::mpl::v_iter<boost::mpl::vector4<Container
*,boost::multi_index::hashed_unique<boost::multi_index::
const_mem_fun<DBObject,key1,DBObject::getkey1>>,boost::
multi_index::hashed_unique<boost::multi_index::const_mem_
fun<DBObject,Vs64,DBObject::getkey2>>,boost::multi_index::
hashed_unique<boost::multi_index::const_mem_fun<DBObject,VString,DBObject::
getEntityName>>>,0>,
            Super=boost::multi_index::detail::hashed_index_node<
boost::multi_index::detail::hashed_index_node<boost::
multi_index::detail::hashed_index_node<boost::multi_index:
:detail::index_node_base<Container *,std::allocator<Container
*>>,boost::multi_index::detail::hashed_unique_tag>,
boost::multi_index::detail::hashed_unique_tag>,boost::
multi_index::detail::hashed_unique_tag>
        ]
        c:\code\lib\boost\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49)
: see reference to class template instantiation
'boost::multi_index::detail::index_node_applier::apply<IndexSpecifierIterator,Super>'
being compiled
        with
        [
            IndexSpecifierIterator=boost::mpl::v_iter<boost::mpl::vector4<Container
*,boost::multi_index::hashed_unique<boost::multi_index::
const_mem_fun<DBObject,key1,DBObject::getkey1>>,boost::
multi_index::hashed_unique<boost::multi_index::const_mem_
fun<DBObject,Vs64,DBObject::getkey2>>,boost::multi_index::
hashed_unique<boost::multi_index::const_mem_fun<DBObject,VString,DBObject::
getEntityName>>>,0>,
            Super=boost::multi_index::detail::hashed_index_node<
boost::multi_index::detail::hashed_index_node<boost::
multi_index::detail::hashed_index_node<boost::multi_index:
:detail::index_node_base<Container *,std::allocator<Container
*>>,boost::multi_index::detail::hashed_unique_tag>,
boost::multi_index::detail::hashed_unique_tag>,boost::
multi_index::detail::hashed_unique_tag>
        ]
        c:\code\lib\boost\boost\mpl\aux_\preprocessed\plain\bind.hpp(207) :
see reference to class template instantiation
'boost::mpl::apply_wrap2<F,T1,T2>'
being compiled
        with
        [
            F=boost::multi_index::detail::index_node_applier,
            T1=boost::mpl::v_iter<boost::mpl::vector4<Container
*,boost::multi_index::hashed_unique<boost::multi_index::
const_mem_fun<DBObject,key1,DBObject::getkey1>>,boost::
multi_index::hashed_unique<boost::multi_index::const_mem_
fun<DBObject,Vs64,DBObject::getkey2>>,boost::multi_index::
hashed_unique<boost::multi_index::const_mem_fun<DBObject,VString,DBObject::
getEntityName>>>,0>,
            T2=boost::multi_index::detail::hashed_index_node<boost::
multi_index::detail::hashed_index_node<boost::multi_index:
:detail::hashed_index_node<boost::multi_index::detail::index_node_base<Container
*,std::allocator<Container *>>,boost::multi_index::
detail::hashed_unique_tag>,boost::multi_index::detail::
hashed_unique_tag>,boost::multi_index::detail::hashed_unique_tag>
        ]
        c:\code\lib\boost\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49)
: see reference to class template instantiation
'boost::mpl::bind2<F,T1,T2>::apply<U1,U2>' being compiled
        with
        [
            F=boost::multi_index::detail::index_node_applier,
            T1=boost::mpl::_2,
            T2=boost::mpl::_1,
            U1=boost::multi_index::detail::hashed_index_node<boost::
multi_index::detail::hashed_index_node<boost::multi_index:
:detail::hashed_index_node<boost::multi_index::detail::index_node_base<Container
*,std::allocator<Container *>>,boost::multi_index::
detail::hashed_unique_tag>,boost::multi_index::detail::
hashed_unique_tag>,boost::multi_index::detail::hashed_unique_tag>,
            U2=boost::mpl::v_iter<boost::mpl::vector4<Container
*,boost::multi_index::hashed_unique<boost::multi_index::
const_mem_fun<DBObject,key1,DBObject::getkey1>>,boost::
multi_index::hashed_unique<boost::multi_index::const_mem_
fun<DBObject,Vs64,DBObject::getkey2>>,boost::multi_index::
hashed_unique<boost::multi_index::const_mem_fun<DBObject,VString,DBObject::
getEntityName>>>,0>
        ]
        c:\code\lib\boost\boost\mpl\aux_\preprocessed\plain\apply.hpp(63) :
see reference to class template instantiation
'boost::mpl::apply_wrap2<F,T1,T2>'
being compiled
        with
        [
            F=boost::mpl::bind2<boost::multi_index::detail::index_
node_applier,boost::mpl::_2,boost::mpl::_1>,
            T1=boost::multi_index::detail::hashed_index_node<boost::
multi_index::detail::hashed_index_node<boost::multi_index:
:detail::hashed_index_node<boost::multi_index::detail::index_node_base<Container
*,std::allocator<Container
.
.
.
.
.
Build log was saved at "file://c:\code\win\Debug\obj\BuildLog.htm"
ProjABC - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Thanks,
Ram



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