[Bug c++/50298] New: [C++0x][constexpr] References cannot be bound to static constexpr reference members
gintensubaru at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 5 17:58:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50298
Bug #: 50298
Summary: [C++0x][constexpr] References cannot be bound to
static constexpr reference members
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gintensubaru@gmail.com
int global_variable;
struct X {
static constexpr int& r = global_variable; // error: the value of
'global_variable' is not usable in a constant expression
};
this code should be accepted in C++0x mode, but gcc-4.7-20110903 rejects it.
see also:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49172
More information about the Gcc-bugs
mailing list