Boost logo

Boost :

Subject: Re: [boost] [filesystem][spirit] problems with scoped enums with GCC 4.4 in C++0x mode
From: Beman Dawes (bdawes_at_[hidden])
Date: 2009-05-19 09:23:38

On Tue, May 19, 2009 at 6:03 AM, Richard Webb
<richard.webb_at_[hidden]> wrote:
> (forwarding from the Spirit list)
> As discussed in the thread @
> the regression tests for Filesystem and Spirit 2 are pretty much all failing
> in GCC 4.4 in C++0x mode, due to problems with scoped enums and operator ==.
> Does anyone have any other ideas about the problem?

It's a bug in GCC 4.4.0. See GCC Bugzilla Bug 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.

Thanks for the heads up,


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