Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-05-09 17:15:52


"Andy Little" <andy_at_[hidden]> writes:

> "David Abrahams" wrote
>> "Arkadiy Vertleyb" wrote
>>>> 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.
>
> FWIW I would prefer to live with BOOST_TYPEOF and type
> registration. I have no doubt that registration will have its
> problems but only by familiarity will they be solved.

Huh? How will familiarity with the problem help? I can't ask my
library's users to register types.

Anyway, I can understand you saying "I'm content to live with...," but
really, why would you _prefer_ a world where people like me, who
aren't so content, can't get satisfaction?

> Anyway somebody already proposed a similar looking alternative on
> comp.std.c++:
>
> http://tinyurl.com/gc7wn

That proposal addresses something quite a bit different from mine.
He's trying to get the result type of invoking a function, whereas I'm
trying to get the type of the lazy function object that's created by
Boost.Bind and/or Boost.Lambda. The difference is that the former
can't be achieved without builtin typeof or registration, whereas the
latter can.

-- 
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