Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-05-09 19:28:55


"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote
>
>> I can't ask my
>> library's users to register types.
>
> Don't you have to ask them to do something else, so that result_of works?

No, we'd implement the necessary type computations to make result_of
work. Remember, result_of takes types as inputs, not objects.

So,

   result_of<bind_(std::minus<int>, int, _1_)>::type

just requires that bind_ know about the types produced by boost::bind.
And in

   result_of<minus_(int, _1_)>::type

minus_ would just have to know how the operator- in the lambda library
works.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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