https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123845
Bug ID: 123845
Summary: allow non-empty constexpr constructor bodies in c++11
as an extension
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
C++14 allows non-empty constexpr constructor bodies (and multiple statements
inside constexpr function bodies):
struct A {
int m;
constexpr A() : m(42) { ++m; }
};
It would be convenient to allow this in C++11 mode as an extension, which would
enable us to trivially resolve PR libstdc++/114865. Note Clang already
supports this.