Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-26 07:28:17


From: "Ed Brey" <brey_at_[hidden]>

> The real world can be surprising. At least it surprised me. The
> following actually compiled (and hopefully is legal C++):
>
> float (&pi)() = boost::math::constants<float>::pi;
> a = pi() * r * r;

And if you're lucky, the compiler will inline pi().

--
Peter Dimov
Multi Media Ltd.

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