Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Wordsmithing

...

Noncompliant Code Example (function-try-block)

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

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);
};

...