Versions Compared

Key

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

...

This noncompliant code example, and the subsequent compliant solutions, are assumed to eventually call std::terminate() in accordance with the ERR50-CPP-EX1 exception described in ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()abruptly terminate the program. Indicating the nature of the problem to the operator is elided for brevity.

...

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

This rule supplements FIO42-C. Close files when they are no longer needed.

 

Bibliography

[ISO/IEC 14882-2014]Subclause 27.9.1, "File Streams"

...