|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-07-14 17:22:41
----- Original Message -----
From: "Mark Rodgers" <mark.rodgers_at_[hidden]>
> > Terriffic. I think the difference is that MSVC's native <limits>
> > uses enums to define static constants, and the compiler is able
> > to use these at compile time. The STLport uses out-of-line static
> > const bools.
> > Boris, take note!
>
> STLport is wrong in this case. 18.2.1p3 is quite explicit that
> your code is valid. The constants must be usable as integral
> constant expressions, which means they should be enums or in line.
Ah, well, it also specifies that the type is bool, not some enum, and since
MSVC doesn't support inline integer static class constants a compromise had
to be made.
On the other hand, I would agree that the compromise chosen for the STLport
is much less useful than the one chosen for MSVC's library.
Boris, do you think this could be changed?
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk