// PR c++/50043 // { dg-do compile { target c++11 } } struct True1 {}; struct True2 { ~True2(); }; struct True3 { ~True3(){ throw 0; } }; struct False { ~False() noexcept(false); }; template struct A : Base { }; template struct B { Member mem; }; template struct C : Base { Member mem; }; #define SA(X) static_assert(X, #X) SA( noexcept(True1())); SA( noexcept(True2())); SA( noexcept(True3())); SA(!noexcept(False())); SA( noexcept(A())); SA( noexcept(A())); SA( noexcept(A())); SA(!noexcept(A())); SA( noexcept(B())); SA( noexcept(B())); SA( noexcept(B())); SA(!noexcept(B())); SA( noexcept(C())); SA( noexcept(C())); SA( noexcept(C())); SA( noexcept(C())); SA( noexcept(C())); SA( noexcept(C())); SA(!noexcept(C())); SA(!noexcept(C())); SA(!noexcept(C())); SA(!noexcept(C())); SA(!noexcept(C())); SA(!noexcept(C()));