my compilers::tdm gcc4.5.2
my os::windows xp sp3(32bits)
boost 1.45
Sorry, I have another problem again
template<typename accStrategy = float>
int const adaptSR(int const MAX_AL, float const CONFIDENT_LV, int const OFFSET, accStrategy PLAN)
{
return 1;
}
template<typename accStrategy = float>
int const adaptSR(int const MAX_AL, float const CONFIDENT_LV, int const OFFSET)
{
return 1;
}
template<typename T>
void testArg(T haha)
{
int const MAX_AL = 10;
float const CONFIDENT_LV = 10;
int const OFFSET = 10;
haha(MAX_AL, CONFIDENT_LV, OFFSET);
}
void testBind()
{
//boost::accumulators::accMeanStDv<float> accMSD;
bindClass bc;
float a = 3;
testArg(boost::bind<int>(adaptSR<int>, _1, _2, _3) );
testArg(boost::bind<int>(adaptSR<float>, _1, _2, _3, a) );
testArg(boost::bind<int>(adaptSR<bindClass>, _1, _2, _3, bc ));
testArg(boost::bind<int>(adaptSR<bindClass>, _1, _2, _3, boost::cref(bc) ));
}
error message
error: too few arguments to function
I don't know how to solve the overloaded problem like this one
looks like the compiler is able to catch the "first" function I declare only
It can't catch the second one
Thanks a lot