Hi,
When I try to create a object of this,
typedef boost::multi_index_container<
ClassX*, //mapped value
boost::multi_index::indexed_by< //list of indices
boost::multi_index::hashed_unique<
boost::multi_index::const_mem_fun //hashed index by unique Key1
,
boost::multi_index::hashed_unique<
boost::multi_index::const_mem_fun //hashed index by unique Key1
ClassXMultiKeyIndexed;
like,
ClassXMultiKeyIndexed sample;
and insert a pointer like this,
ClassX *a;
ClassXMultiKeyIndexed sample;
//a is not NULL and is filled up before the below insert
sample.insert(a);
This is the compilation error, it compiles fine if "sample.insert(a)" is
commented out.
Compilation error :
Compiling...
stm_container_manager_abc.cpp
c:\code\common\lib\boost\boost\detail\allocator_utilities.hpp(153) : error
C2061: syntax error : identifier 'p'
c:\code\common\lib\boost\boost\multi_index\detail\index_base.hpp(105) : see
reference to function template instantiation 'void
boost::detail::allocator::construct(void *,const Type &)' being
compiled
with
[
Type=Container *
]
c:\code\common\lib\boost\boost\multi_index\detail\index_base.hpp(102) :
while compiling class template member function
'boost::multi_index::detail::hashed_index_node
*boost::multi_index::detail::index_base::insert_(Container
*const &,boost::multi_index::detail::hashed_index_node
*&,boost::multi_index::detail::lvalue_tag)'
with
[
Super=boost::multi_index::detail::hashed_index_node>,boost::multi_index::detail::hashed_unique_tag>,
Category=boost::multi_index::detail::hashed_unique_tag,
Value=Container *,
IndexSpecifierList=boost::multi_index::indexed_by>,boost::multi_index::hashed_unique>>,
Allocator=std::allocator
]
c:\code\common\lib\boost\boost\multi_index\hashed_index.hpp(93) :
see reference to class template instantiation
'boost::multi_index::detail::index_base'
being compiled
with
[
Value=Container *,
IndexSpecifierList=boost::multi_index::indexed_by>,boost::multi_index::hashed_unique>>,
Allocator=std::allocator
]
c:\code\common\lib\boost\boost\multi_index\hashed_index.hpp(93) :
see reference to class template instantiation
'boost::multi_index::detail::hashed_index'
being compiled
with
[
KeyFromValue=boost::multi_index::const_mem_fun,
Hash=boost::hashboost::long_long_type,
Pred=std::equal_to<__int64>,
SuperMeta=boost::multi_index::detail::nth_layer<2,Container
*,boost::multi_index::indexed_by>,boost::multi_index::hashed_unique>>,std::allocator>,
TagList=boost::mpl::vector0boost::mpl::na,
Category=boost::multi_index::detail::hashed_unique_tag
]
c:\code\common\lib\boost\boost\multi_index_container.hpp(100) : see
reference to class template instantiation
'boost::multi_index::detail::hashed_index'
being compiled
with
[
KeyFromValue=boost::multi_index::const_mem_fun,
Hash=boost::hashboost::long_long_type,
Pred=std::equal_to<__int64>,
SuperMeta=boost::multi_index::detail::nth_layer<1,Container
*,boost::multi_index::indexed_by>,boost::multi_index::hashed_unique>>,std::allocator>,
TagList=boost::mpl::vector0boost::mpl::na,
Category=boost::multi_index::detail::hashed_unique_tag
]
c:\code\common\src\biz\model\stm-stow_model\stm_container_manager_abc.h(323)
: see reference to class template instantiation
'boost::multi_index::multi_index_container' being
compiled
with
[
Value=Container *,
IndexSpecifierList=boost::multi_index::indexed_by>,boost::multi_index::hashed_unique>>
]
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 ==========