Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-04-28 12:19:49


Daniel Walker wrote:

> One area where it could do better is in adaptability for call
> wrappers. In TR1 3.3/3 call wrappers with weak result types (the
> wrappers that bind must generate when the Result template parameter is
> not explicitly used) are required be un-adaptable (no result_type
> member) if the bound function object has no result_type member. It
> could do better if it provided a result<> member that used result_of.

std::result_of is required to do the right thing for every function object
returned by the standard library, including the result of std::bind. It is
not specified whether this is done via a nested result<> or via another
mechanism.

> To go one step further, if Boost provided a result_of implementation
> using decltype in addition to a TR1 compliant result_of, Boost.Bind
> could support perfect, generic, non-intrusive return type deduction.

Every C++0x compiler is expected to implement result_of in terms of
decltype.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2194.pdf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk