I simplified my problem to make sure it was not because of my class or something like that, this is the exact content(related to boost::multi_index) in the header file,
example.h
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/mem_fun.hpp>
#include <boost/multi_index/hashed_index.hpp>
using namespace boost::multi_index;
using boost::multi_index::multi_index_container;
using boost::multi_index::hashed_unique;
using boost::multi_index::indexed_by;
typedef multi_index_container<
int,
indexed_by<
hashed_unique<identity<int> >
>
> int_multiset;
and then below it in the header file I have my class written,
as follows,
class MgrABC : public MainManager {
public:
int_multiset sample1;
<already existing code>
.
.
.
protected:
virtual void _handler();
<already existing code>
.
.
.
};
In the corresponding cpp file
example.cpp
void MgrABC::_handler() {
<already existing code 4 or 5 lines of variable declarations>
.
.
.
this->sample1.insert(1);
<already existing code>
.
.
.
}
This simple code is not compiling with this same error,
c:\sample\common\lib\boost\boost\multi_index\detail\index_base.hpp(105) : see reference to function template instantiation 'void boost::detail::allocator::construct<int>(void *,const Type &)' being compiled
with
[
Type=int
]
c:\sample\common\lib\boost\boost\multi_index\detail\index_base.hpp(102) : while compiling class template member function 'boost::multi_index::detail::hashed_index_node<Super,Category> *boost::multi_index::detail::index_base<Value,IndexSpecifierList,Allocator>::insert_(const int &,boost::multi_index::detail::hashed_index_node<Super,Category> *&,boost::multi_index::detail::lvalue_tag)'
c:\sample\common\lib\boost\boost\multi_index\hashed_index.hpp(93) : see reference to class template instantiation 'boost::multi_index::detail::index_base<Value,IndexSpecifierList,Allocator>' being compiled
c:\sample\common\lib\boost\boost\multi_index_container.hpp(100) : see reference to class template instantiation 'boost::multi_index::detail::hashed_index<KeyFromValue,Hash,Pred,SuperMeta,TagList,Category>' being compiled
c:\sample\example.h(102) : see reference to class template instantiation 'boost::multi_index::multi_index_container<Value,IndexSpecifierList>' being compiled