Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-05-09 22:31:29


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

> "David Abrahams" wrote
>> "Andy Little" 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.
>
> Why not? We all want decltype and auto in the language dont we?
> BOOST_TYPEOF is the closest we have. Show your users how to use it
> while we wait for language support.

Because I want to serve my users, not force them to learn about an
interim solution that they won't need when the real feature comes out.
Furthermore, it's _my_ library that needs result_of, so basically I
would be telling users, "if you get a cryptic error message that looks
like ___________, find some of the types in it and register them with
this cryptic macro." I'd rather that people enjoy my library than
have them vent frustration at me about how unusable Boost is.

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