
Rodrigo de Salvo Braz
On Mon, 22 Nov 2004, David Abrahams wrote:
Because often the result type depends on the argument type that is actually passed:
(_1 + 3)(4)
vs.
(_1 + 3)(static_cast
("hello")) But isn't it the case that any instantiated functor object will have a well-defined result_type? In your examples it seems '(_1 + 3)' would be instantiated to different types.
The expression _1 + 3 is a function object by itself, and that's what you pass to the algorithm.
Anyway, I guess a better solution to my particular problem would be for make_transform_iterator to be able to receive a result type and make an adaptable functor out of any UnaryFunction, right?
Yes. Patches welcome. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com