
On Tue, Mar 01, 2005 at 03:59:36AM -0600, Aleksey Gurtovoy wrote:
Jeff Garland writes:
I realize this is an experimental compiler, but I notice date-time isn't building because of an MPL failure. Similar problem in the MPL tests. I looked at the code, but I have no idea what the problem could be, possibly something simple?
Just looked into it, and it appears to be a GCC bug: they seem to disallow any cast notation in integral constant expressions, while section 5.19 [expr.const] para 1 explicitly allows type conversions to integral or enumeration types:
[...] Floating literals (2.13.3) can appear only if they are cast to integral or enumeration types. Only type conversions to integral or enumeration types can be used. [...]
If you could verify that the following stripped down version of the code in question is rejected, I'd submit a corresponding bug report:
template< int n > struct int_ {}; typedef int_< static_cast<int>(5) > n;
This is possibly related to a recent change to deprecate a GCC extension, see the note I added, second paragraph from the bottom, here: http://gcc.gnu.org/onlinedocs/gcc/Deprecated-Features.html#Deprecated-Featur... I'll look into whether that change was the cause. jon -- "Self-respect: the secure feeling that no one, as yet, is suspicious." - H.L. Mencken