Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: changed "different" to secondary in the second para

The CERT C++ Coding Standard was developed specifically for versions of the C++ programming language defined by the following:

  • ISO/IEC 14882-2014, Programming Languages — CLanguages—C++, Fourth Edition, 2014 [ISO/IEC 14882-2014]

...

The C++ Standard documents existing practice where possible. That is, most features must be tested in an implementation before being included in the standard. The CERT C++ Coding Standard has a different secondary purpose: to establish a set of best practices, which sometimes requires introducing new practices that may not be widely known or used when existing practices are inadequate. To put it a different way, the CERT C++ Coding Standard attempts to drive change rather than just document it.

Some vendors have extensions to C++, and some also have implemented only part of the C++ Standard before stopping development. Consequently, it is not possible to back up and discuss only C++98, C++03, or C++11. The vendor support equation is too complicated to draw a line and say that a certain compiler supports exactly a certain standard. Whatever demarcation point is selected, different vendors are on opposite sides of it for different parts of the language. Supporting all possibilities would require testing the cross-product of each compiler with each language feature. Consequently, we have selected a demarcation point that is the most recent in time so that the rules and recommendations defined by the standard will be applicable for as long as possible. As a result of the variations in support, source-code portability is enhanced when the programmer uses only the features specified by C++14. This is one of many trade-offs between security and portability inherent to C++ language programming.

...

In general, the CERT coding standards try to avoid the inclusion of controversial rules that lack a broad consensus.

 Image Removed Image Removed Image Removed