C++ Style Guide
File and Directory Architecture
Naming of Packages
???
Structure of a Project
???
Naming of files
???
Project Documentation
???
Naming Conventions
Classes
???
Functions
???
Member Variables
???
Constants
???
Best Practices
Usage of type deduction
???
Declare your constructors explicit
???
Inline your method more often
???
Use the keywork override
???
Use the keywork nullptr
???
Don’t use raw pointers, smart pointers are great !
???
Avoid C-style casting
???
Respect the declaration order of member variables
???
Declare your destructor virtual for polymorphic class
???
Declare your method constants whenever it is possible
???
Use bool instead of int for conditions
???
Declare a public ‘Ptr’ typedef in your classes
???
Recommended Tools
clang-format
cpplint
cppcheck
valgrind
Recommended References
Introductory
Intermediate
- Effective C++ (Scott Meyers)
- Effective Modern C++ (Scott Meyers)
- More Effective C++ (Scott Meyers)
- Design Patterns: Elements of Reusable Object-Oriented Software (GoF)
- C++ Core Guidelines