1 // PR c++/94205 2 // { dg-do compile { target c++14 } } 3 4 struct S 5 { 6 struct A 7 { 8 S *p; AS::A9 constexpr A(S* p): p(p) {} 10 constexpr operator int() { p->i = 5; return 6; } 11 }; 12 int i; 13 int a = A(this); 14 }; 15 16 17 constexpr S s = {}; 18 19 #define SA(X) static_assert((X),#X) 20 SA(s.i == 5 && s.a == 6); 21