// PR c++/113158 // { dg-do compile { target c++11 } } template struct V { static constexpr bool t = false; }; struct base { virtual int f() = 0; }; template struct derived : base { int f() noexcept(V::t) override; }; struct base2 { virtual int f() noexcept = 0; }; template struct W { static constexpr bool t = B; }; template struct derived2 : base2 { int f() noexcept(W::t) override; // { dg-error "looser exception specification" } }; void g () { derived d1; derived2 d2; // { dg-message "required from here" } derived2 d3; }