Modern C++ and Guidelines
摘要
This chapter covers some guidelines and best practices when working with modern C++. The guidelines include discussion on 1) the auto keyword and type deduction,2) how to think about memory ownership and how to use smart pointers (covering both unique pointers and shared pointers), 3) different mechanisms for handling functions, and 4) how to organize code into header files (.hpp or .h extension) and implementation files (.cpp extension). After reading this chapter, one should feel more confident in developing safer and more transparent C++ code.