
Peder Holt <peder.holt@gmail.com> writes:
On 6/8/05, David Abrahams <dave@boost-consulting.com> wrote:
Peder Holt <peder.holt@gmail.com> 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 www.boost-consulting.com