Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2004-11-22 10:26:00


Rodrigo de Salvo Braz <braz_at_[hidden]> writes:

> Hello,
>
> I am trying to use transform_iterator with a lambda functor, but the
> compiler complains that the lambda functor does not contain a type called
> 'result_type', which the transform_iterator requires.
>
> I would have expected lambda functors to have this type. Any ideas on why
> it doesn't?

Because often the result type depends on the argument type that is
actually passed:

         (_1 + 3)(4)

vs.

         (_1 + 3)(static_cast<char const*>("hello"))

HTH,

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net