aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constinit15.C
blob: b6215587badb54343e965481ff9732a02f378794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/92058 - constinit malfunction in static data member.
// { dg-do compile { target c++20 } }

struct B {
    B() {}
};

struct A {
    constinit static inline B b1{}; // { dg-error "does not have a constant initializer|call to non-.constexpr. function" "" { target { ! implicit_constexpr } } }
};

int main() {
    A a;
}