Changes

Jump to: navigation, search

C++ Code Style Guide

109 bytes added, 09:45, 28 January 2021
Taboos
We have legacy and new code. fixes of the legacy, which are small patches actually, adhere to the enclosing style.
For new code, see below.
== Naming Conventions ==
# Names should be readable, better to do not use abbreviations
# "Camel" case [https://en.wikipedia.org/wiki/CamelCase CamelCase] for names (for example, AuditValue)# . Class, namespace, enum names should start with uppercase (for example, Audit). Other names should start with lowercase (Audit->getValue())
# Typedefs should have "_t" or "_type" suffix (myFavoriteType_t)
# Member value should have "m_" prefix (m_store)
# We do not use RTTI (no dynamic_cast<>)
# We do not use exceptions
# We do not use syntax allowed by C++11 standard
# We do not use conversion operators (int())
# We do not use polymorphic inheritance
# We do not use assembler inlines
# We do not use "friends"
# Use references to objects rather than pointers, even for smart pointers.
# Group related classes to a single namespace
# We do not welcome a polymorphic inheritance
# If possible, avoid manual memory management (use of "new" and "delete" operators)
# If possible, avoid low-level thread management API ("pthread_xxx"), better to use boost or QT wrappers over it.

Navigation menu