Skip to content
mikebd edited this page Dec 8, 2014 · 5 revisions

C++ Coding Standards

See also:

External References:

Informal Guidelines

  • Follow local conventions
  • Prefer developer productivity over rigorous formal standards within the constrained supported development & runtime environment - Ubuntu 12.04 LTS, GCC 4.6.3
  • Performance and scalability enhancements should be backed by empirical evidence of their benefit based on profiling
  • Automated unit tests are good, especially if they are discrete, robust and non-brittle.

Formal Rules

  • Macros are acceptable. Multi-statement macros should be wrapped with do { ... } while(false).
  • Once RTBkit is stated to be compatible with (slightly less formal guarantee than "certified" for) development and runtime on Ubuntu 14.04 LTS, there will likely be an embargo for some time (3-6 months?) on the introduction of new code that requires GCC > 4.6 (default on Ubuntu 12.04 LTS) to give the community a chance to upgrade before requiring a higher GCC version.
    • C++0x/C++11 Support in GCC
    • Conditional compilation to leverage newer compiler features and bug fixes may be acceptable in extremely well justified cases. This is not a strategy to be abused as it can quickly degrade the overall comprehensibility of the code.
Clone this wiki locally