Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this noncompliant code example and the following compliant solution, we presume the existence of a Bad class with a destructor that can throw, and although it . Although although this class violates this rule, we cannot modify it: 

Code Block
bgColor#FFcccc
langcpp
// Assume that this class is provided by a 3rd party and it is not something
// that can be modified by the user.
class Bad {
  ~Bad() noexcept(false);
};

...