Boost logo

Boost :

Subject: Re: [boost] [filesystem][spirit] problems with scoped enums with GCC 4.4 in C++0x mode
From: Francois Barel (frabar666_at_[hidden])
Date: 2009-07-23 18:50:48


Beman Dawes wrote:
> It's a bug in GCC 4.4.0. See GCC Bugzilla Bug 38064.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
>
> This little test:
>
>    enum class color { red, green };
>
>    int foo(color c )
>    {
>      return c == color::red ? 5 : 10;
>    }
>
> Compiles fine with Borland 6.10 (which also supports scoped enums) but
> fails with GCC 4.4.0.
>
> I've let one of the GCC developers know privately that this bug is
> causing us problems.
>
> I think the fix is to simply define BOOST_NO_SCOPED_ENUMS for GCC 4.4.
> I'll change the config file in trunk accordingly.

GCC 4.4.1 has been released, and includes the fix for this bug.

I think BOOST_NO_SCOPED_ENUMS no longer needs to be defined for 4.4.1
and later? The attached patch to the config file does that.

Regards,
François




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk