☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-tracking-const13.C
☽
☼
gcc/testsuite/g++.dg/cpp1y/constexpr-tracking-const13.C
code
plain
raw
1
// PR c++/91264
2
// { dg-do compile { target c++14 } }
3
4
struct A {
5
mutable int i;
6
constexpr A() : i(0) { }
7
};
8
struct B {
9
A a;
10
constexpr B() : a{} { }
11
};
12
13
constexpr void
14
g ()
15
{
16
const B b;
17
b.a.i = 42;
18
}
19
20
static_assert((g(), 1), "");