Replace deprecated throw() with noexcept