Boost logo

Boost :

From: Ed Brey (brey_at_[hidden])
Date: 2001-05-14 13:23:43


From: "Peter Dimov" <pdimov_at_[hidden]>
> double const pi = 3.14...;
>
> will not constant-fold, while
>
> inline double const pi()
> {
> return 3.14....;
> }
>
> will? I'm probably misunderstanding something.

No misunderstanding. MSVC6 constant-folds an expression that uses the
inline function, but not the const double. I haven't looked at what
other compilers do.


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