Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-08 16:20:26

Peder Holt <peder.holt_at_[hidden]> writes:

> On 6/8/05, David Abrahams <dave_at_[hidden]> wrote:
>> Peder Holt <peder.holt_at_[hidden]> writes:
>> Maybe I'm missing something obvious, but I don't see how any of this
>> leads to compile-time constants. On a conforming compiler, a
>> calculation involving floating-point is not a compile-time constant.
> In that case VC7.1,VC8.0 beta and GCC3.2 got it wrong somewhere :)

That's a known extension in vc7.1. The head of the VC++ team himself
told me about it (his favorite unintentional extension, I think), and
told me it was gone in vc8.x, I'm pretty sure. I'm surprised to hear
that it works for you there. Can't speak for GCC.

> (1.0<2.0) yields a compile-time bool,
> long(2.0) yield a compile-time long.
> On the above compilers, that is.

Throw a test at comeau online. If it works there, I'll be amazed.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at