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

             Bug #: 51319
           Summary: [4.7 Regression] Eigen3 enums not accepted
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: marc.gli...@normalesup.org


This is likely related to Bug 51312 and/or Bug 51305, but let me report it just
to be sure:

template<int> struct X{};
struct Base {
        enum { a=1 };
};
struct Der : Base {
        using Base::a;
        typedef X<(int)a> Y;
};

$ g++ u.cc -c          
u.cc:7:26: error: 'using Base::a' cannot appear in a constant-expression
u.cc:7:27: error: template argument 1 is invalid

$ g++ -std=c++0x u.cc -c
u.cc:7:26: error: invalid cast from type 'Base' to type 'int'
u.cc:7:27: error: template argument 1 is invalid

Reply via email to