template<typename anyFunctor = printTxt> //printTxt is somekind of functor
void testFunctor()
{
anyFunctor f;
}
void testFunctor2()
{
testFunctor();
}
1 : if type anyFunctor need 3 arguments to initialize it, what should I do?
Do I have another way to make this become more adaptable except
of passing strategies like parameter(the way of stl did)
2 : if type anyFunctor need to accept different number of variables, how could I make it adaptable?
template<typename anyFunctor = printTxt> //printTxt is somekind of functor
void testFunctor()
{
anyFunctor f;
int a = 10;
f(a);//it could accept one parameter only by the default
//what if i want to make it act like f(a, b)?
//just like the way std::bind2nd or boost::bind did
}
Do I need to pass it as arguments if I want to implement it by std::tr1::bind?
Thank you very much