
10 Jun
2004
10 Jun
'04
9:21 p.m.
"Peter Dimov" <pdimov@mmltd.net> writes:
David Abrahams wrote:
"Maxim Yegorushkin" <e-maxim@yandex.ru> writes:
David Abrahams <dave@boost-consulting.com> 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 http://www.boost-consulting.com