Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2005-03-01 06:52:21

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:

I'll look into whether that change was the cause.


"Self-respect: the secure feeling that no one, as yet, is suspicious."
	- H.L. Mencken

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