http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49604

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|forward-declared enum in    |forward-declared enum's
                   |class scope is private in   |elements in class scope
                   |context of constexpr        |gets default access (class
                   |                            |vs struct)

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-01 
03:51:29 UTC ---
>It works fine without the constexpr.

I have the same failure even without constexpr.

Here is a testcase which should fail but currently is accepted:
struct Foo
{
private:
    int val;
    enum impl_t : int;
public:
    Foo(impl_t v) : val(v) {}
};
enum Foo::impl_t : int { X };

Foo test = Foo::X;

Reply via email to