1 // PR c++/53903 2 // { dg-do compile { target c++11 } } 3 4 struct T 5 { noexceptT6 T() noexcept(false) { } noexceptT7 ~T() noexcept(false) { } 8 }; 9 10 T t; 11 12 struct A 13 { 14 A() noexcept; 15 ~A() noexcept; 16 17 T t; 18 }; 19 20 A::A() noexcept = default; 21 A::~A() noexcept = default; 22 23 struct U 24 { noexceptU25 U() noexcept(false) { } noexceptU26 ~U() noexcept(false) { } 27 }; 28 29 U u; 30 31 struct B 32 { 33 B() noexcept(false); 34 ~B() noexcept(false); 35 36 U u; 37 }; 38 39 B::B() noexcept(false) = default; 40 B::~B() noexcept(false) = default; 41 42 B b; 43 44 struct V 45 { noexceptV46 V() noexcept(false) { } noexceptV47 ~V() noexcept(false) { } 48 }; 49 50 V v; 51 52 struct C 53 { 54 C() noexcept = default; 55 ~C() noexcept = default; 56 57 V v; 58 }; 59 60 C c; 61