This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49172] New: [C++0x][constexpr] References should be declarable with constexpr
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 May 2011 12:33:53 +0000
- Subject: [Bug c++/49172] New: [C++0x][constexpr] References should be declarable with constexpr
- Auto-submitted: auto-generated
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.