C
cpisztest
I am using boost::bind and boost::function in a project, but to my my distress, they are asking that it compile in msvc7.1
Evidently, msvc7.1 can't handle boost::bind. I've tried everything suggested in the docs and everything I could google up. It works in msvc8.0 and up.
Is there an old school alternative?
Here is my code snippet
struct MyFunctor
{
int m_myInt;
//
MyFunctor(int theInt)
:
m_myInt(theInt)
{
}
//
void DoIt(MyTemplateClass::CollectionType::iterator it)
{
MyTemplateClass::EnrolleeType item = it->second;
if( item->GetData(false) == m_myInt)
{
item->DoStuff();
}
}
};
MyFunctor functor(10);
MyTemplateClass::ForEach(boost::bind(&MyFunctor:
oIt, &functor, _1));
Here is the error it is giving me (which is alien speak to me):
error C2780: 'boost::_bi::bind_t<_bi::dm_result<MT::* ,A1>::type,boost::_mfi::dm<M,T>,_bi::list_av_1<A1>::type> boost::bind(M T::* ,A1)' : expects 2 arguments - 3 provided
Evidently, msvc7.1 can't handle boost::bind. I've tried everything suggested in the docs and everything I could google up. It works in msvc8.0 and up.
Is there an old school alternative?
Here is my code snippet
struct MyFunctor
{
int m_myInt;
//
MyFunctor(int theInt)
:
m_myInt(theInt)
{
}
//
void DoIt(MyTemplateClass::CollectionType::iterator it)
{
MyTemplateClass::EnrolleeType item = it->second;
if( item->GetData(false) == m_myInt)
{
item->DoStuff();
}
}
};
MyFunctor functor(10);
MyTemplateClass::ForEach(boost::bind(&MyFunctor:
Here is the error it is giving me (which is alien speak to me):
error C2780: 'boost::_bi::bind_t<_bi::dm_result<MT::* ,A1>::type,boost::_mfi::dm<M,T>,_bi::list_av_1<A1>::type> boost::bind(M T::* ,A1)' : expects 2 arguments - 3 provided