Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-06-10 15:11:59

David Abrahams wrote:
> "Maxim Yegorushkin" <e-maxim_at_[hidden]> writes:
>> David Abrahams <dave_at_[hidden]> wrote:
>> I wonder, why doesn't boost::lambda::ret<> privide that functionality
>> of boost::make_adaptable<>? It would certainly made sense and saved
>> me and hopefully other people from troubles.
> It can't. The result type of the lambda expression depends on its
> inputs. result_type is only one type. Adaptable functions are
> fundamentally non-polymorphic.

The result type of ret<R>(expr) is always R. That's what it does. That's
_all_ it does. ;-)

The result type of bind<R>(...) is also R, and the TR1 bind requires a
::result_type in this case, but lambda doesn't conform yet.

Boost list run by bdawes at, gregod at, cpdaniel at, john at