[Bug c++/51319] New: [4.7 Regression] Eigen3 enums not accepted
marc.glisse at normalesup dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 26 21:51:00 GMT 2011
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
More information about the Gcc-bugs
mailing list