3 ms·
Cheat Sheet: C++ Function Parameter Choices [pdf]
- legends2k 7y agoIn our 60+ team of C++ programmers, a constant theme that keeps coming up in code reviews is how a function optimally takes its parameters. There's been enough overthinking and I came across Herb Sutter's CppCon 2014 Essentials of Modern C++ Style [1] where he explains the various cases. I made a cheat sheet (1-page PDF) for quick reference of the options and when to go for them. Comments and suggestions welcome! GitHub project [2]. # Credits - Herb Sutter, other C++ experts and the community - Emacs[3] and Org-mode[4] creators - CheatSheet by Musa Al-hassy # Links [1]: https://www.youtube.com/watch?v=xnqTKD8uD64 https://www.youtube.com/watch?v=xnqTKD8uD64 [2]: https://github.com/legends2k/cpp-param-ref https://github.com/legends2k/cpp-param-ref [3]: https://www.gnu.org/software/emacs/ https://www.gnu.org/software/emacs/ [4]: https://orgmode.org/ https://orgmode.org/ [5]: https://github.com/alhassy/CheatSheet https://github.com/alhassy/CheatSheet