r/cpp • u/Both_Helicopter_1834 • Mar 18 '26
What open source projects in C++ have the highest code quality?
My understanding of the characteristics of quality code are the conventional ones.
- operations on an object that are allowed in a particular object state do not put the object into an invalid state.
- it's prioritized to organize the implementation of each object into the smallest possible number of sub-objects.
no cryptically abbreviated names are used, except possible in very small scopes.
With the program(s)/executable(s) themselves, as well as modules with corresponding namespaces, being considered singleton objects.
Fair dinkum if you want to name projects that score well under a different understanding of code quality.
192
Upvotes
View all comments
57
u/kevinfrei Mar 18 '26 •
The LLVM/Clang/LLDB codebase is marvelous. Clean, modern, but sensibly restrained C++. Easy to follow, with an in depth test suite, and a reasonable amount of documentation. I’ve spent time in four different compilers. LLVM is light years ahead of the rest from a “code quality” perspective.
https://github.com/llvm/llvm-project