Matt S Trentini
Heya Boosters,
I ran into a problem using boost::bind yesterday and, although I found a workaround, I've got a few questions. For the record I'm using boost 1.30.
I stumbled onto the issue that boost::bind doesn't define the argument_type typedef (I was trying to use std::not1). After trawling the web I found a discussion, and useful workaround, about this here:
Questions that arose from this:
o Why doesn't boost::bind support argument_type?
Because it doesn't know what you will pass to it ;-) Consider: struct polymorphic_function_object { template <class T> T operator()(T x) const; }; What should argument_type be in the result of bind(polymorphic_function_object(), _1) ??
o What other standard library function adapters does this affect? - Is it all that are derived from unary_function?
Any that require an argument_type typedef, I suppose.
o Has the operator! addition been incorporated into later versions of boost? - If not, why not?
Have you looked at the Boost lambda library? It incorporates all the operators. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com