// PR c++/66684 // { dg-do compile { target c++11 } } template struct traits { static constexpr bool foo() { return sizeof(T) > 1; } static constexpr bool bar() { return sizeof(T) > 1; } }; template struct X { X& operator=(X&&) noexcept(traits::foo()); }; template X& X::operator=(X&&) noexcept(traits::foo() && traits::bar()) // { dg-error "different exception" } { return *this; }