[Bug c++/49172] New: [C++0x][constexpr] References should be declarable with constexpr
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Thu May 26 12:45:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49172
Summary: [C++0x][constexpr] References should be declarable
with constexpr
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
CC: jason@redhat.com
This is a reminder entry to realize the FDIS change, that references can now be
declared as constexpr (7.1.5 p9).
gcc 4.7.0 20110521 (experimental) in C++0x mode rejects the following code with
errors at the positions #1 and #2:
//---
void g() {};
constexpr void(&rg)() = g; // #1
int i;
constexpr int const& ri = i; // #2
//---
"error: 'const' qualifiers cannot be applied to 'void (&)()'|
error: 'const' qualifiers cannot be applied to 'const int&'"
This code should be accepted.
More information about the Gcc-bugs
mailing list