The return values of bind1st and bind2nd are derived from unary_function. By calling them, I think they provide a function object that accepts one argument. But this maybe is wrong.
Here is my code.
template<typename _T>
class fun: public std::unary_function<_T, _T>
{
public:
_T operator()(_T arg1, _T arg2) const {return arg1 + arg2;}
};
int main() {
bind2nd(fun<int>(),10)(10); //My intention is to directly call the results of bind2nd
}
A lot of build errors occur. Why is this wrong?