public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51319] New: [4.7 Regression] Eigen3 enums not accepted
@ 2011-11-26 21:51 marc.glisse at normalesup dot org
  2011-11-29 22:46 ` [Bug c++/51319] " reichelt at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-11-26 21:51 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-05 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-26 21:51 [Bug c++/51319] New: [4.7 Regression] Eigen3 enums not accepted marc.glisse at normalesup dot org
2011-11-29 22:46 ` [Bug c++/51319] " reichelt at gcc dot gnu.org
2011-12-04 22:08 ` fabien at gcc dot gnu.org
2011-12-05 22:05 ` fabien at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).