From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-05-09 12:55:30
"David Abrahams" <dave_at_[hidden]> wrote
> "Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:
> > "David Abrahams" <dave_at_[hidden]> wrote
> >> One happy day, we'll have auto and decltype...
> >> Until then, we have no reasonable way to declare the type of bind
> >> expressions. So I got to thinking, maybe something like this could be
> >> made to work:
> >> result_of<bind_(std::minus<int>, int, _1_)>::type
> >> f = bind(std::minus<int>(), 3, _1);
> >> For lambda, I guess we could do something like this:
> >> result_of<minus_(int, _1_)>::type f = 3 - _1;
> >> Does this direction make sense?
> > Any particular reason why BOOST_TYPEOF is not an option?
> It requires type registration, whereas this approach should not.
> That's the only reason.
Do you mean the type registration of bind/lambda types or user-defined
types? Does result_of work with expression containing user-defined types
with no additional requirements to these types?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk