cppbestpractices
cppbestpractices copied to clipboard
Collaborative Collection of C++ Best Practices. This online resource is part of Jason Turner's collection of C++ Best Practices resources. See README.md for more information.
In the 03-Style document, I read the following sentence: > If the member variable is not expected to change after the initialization, then mark it const. However, we know that...
This is a really good way to temporarily develop with `/Wall` enabled, then switching back to `/W4` after fixing all of the extra warnings. You can also disable other types...
The current wording reads "`/Wall` - Also warns on files included from the standard library, so it's not very useful and creates too many extra warnings." – this reason does...
coitre declares itself as depreacted: from https://github.com/sakra/cotire/: > The functionality provided by cotire has been superseded by features added to [CMake 3.16](https://cmake.org/cmake/help/latest/release/3.16.html). Support for [pre-compiling](https://cmake.org/cmake/help/latest/command/target_precompile_headers.html) and [unity builds](https://cmake.org/cmake/help/v3.16/prop_tgt/UNITY_BUILD.html) is now...
It is stated: > Source control is an absolute necessity for any software development project. If you are not using one yet, start using one. Which is true, but then...
While "Const as Much as Possible" is generally good practice, `const` should not be directly used on function declaration parameters, including member functions. A quick example: ``` void foo (int...
This moves the runtime performance discussion before the build time discussion It was kind of surprising to discuss build-time performance first, something that most developers don't need to be worried...
The links to the old gitbook page, purported to provide downloadable editions, are now dead links. Particularly https://www.gitbook.com/book/lefticus/cpp-best-practices , which just lands on the generic GitBook homepage. As a workaround,...
Static Analysis Flaw Finder -- https://dwheeler.com/flawfinder/ Other Tools Source Trail -- https://www.sourcetrail.com/ Herb Grind -- http://herbgrind.ucsd.edu/ Approval Tests -- https://github.com/approvals/ApprovalTests.cpp If you would rather me make a pull request to...
I was always in the - use only spaces - group for coding. Until recently, when I started using clang-format. It has many options: > UseTab (UseTabStyle) > The way...