During a conversation on boost::bind
, it was noted that std::bind1st
exists in C++03, but that it is "almost unusable".
I can't find anything solid to back this up.
The boost::bind
documentation says:
boost::bind is a generalization of the standard functions std::bind1st and std::bind2nd. It supports arbitrary function objects, functions, function pointers, and member function pointers, and is able to bind any argument to a specific value or route input arguments into arbitrary positions. bind does not place any requirements on the function object; in particular, it does not need the result_type, first_argument_type and second_argument_type standard typedefs.
perhaps suggesting that these restrictions do apply to std::bind1st
.
Other than the obvious restriction on number of arguments, what are the advantages of boost::bind
to std::bind1st
/std::bind2nd
? Is there any merit to the assertion that std::bind1st
is "almost unusable" in C++03?