struct B { B() {} }; struct A { constexpr static inline B b2{}; constinit static inline B b1{}; }; int main() { A a; } Here b2 fails but b1 succeeds.
Mine.
Going to be fixed by https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01777.html
Author: mpolacek Date: Fri Nov 8 21:40:45 2019 New Revision: 277990 URL: https://gcc.gnu.org/viewcvs?rev=277990&root=gcc&view=rev Log: PR c++/92058 - constinit malfunction in static data member. * g++.dg/cpp2a/constinit15.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp2a/constinit15.C Modified: trunk/gcc/testsuite/ChangeLog
Fixed.