Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-03-12 07:48:30


Daniel Frey <d.frey_at_[hidden]> writes:

> Thorsten Ottosen wrote:
>> "Paul A Bristow" <boost_at_[hidden]> wrote in message
>> news:001501c40795$ce631ce0$0c010101_at_hetp3...
>>
>>>>From a very quick study of this, this radical proposal avoids nasty
>>>brackets "pi()" by adding a new C++ keyword implicit to make "pi" have
>>>the same effect.
>> Considering what Daniel can do, I don't think the math constant part
>> of the
>> proposal brings anything.
>
> Basically, I agree. When I sorted out the VC-issues and finished the
> documentation, I'll have a deeper look at the ICF-proposal and post
> some comments to csc++. FWIW, my gut feeling is that the proposal it
> not worth the trouble.
>
> However: I can do many, but not all things proposed. There is one
> thing (syntax) that I cannot do but that I like very much:
>
> pi<T>
>
> In my constant library, this is spelled 'pi.get<T>()'. Alternatives
> that don't work: 'static_cast<T>(pi)', 'T(pi)', 'pi.operator T()'. If
> anyone has a cool idea how this can be improved, let me know :)

   get<T>(pi)

Why doesn't

   T(pi)

work?

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