[Bug c++/59123] New: [c++11] can't forward-declare an object later defined constexpr
eric.niebler at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 14 00:33:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59123
Bug ID: 59123
Summary: [c++11] can't forward-declare an object later defined
constexpr
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Clang accepts the following. I think it's legal. g++ 4.8.1 rejects it:
// Fwd-declarations
struct S;
extern const S s;
// (... later) definitions
struct S {};
constexpr S s {};
More information about the Gcc-bugs
mailing list