Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-06-10 16:21:48

"Peter Dimov" <pdimov_at_[hidden]> writes:

> 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. ;-)

Sorry, I thought it was something else.

Dave Abrahams
Boost Consulting

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