Advanced C++
This serves as documentation for more advanced/modern features of C++ that are not currently covered in the curriculum at many universities.
Some topics covered aren't necessarily C++ specific, but are more general software engineering aspects. The examples will be provided in C++.
A short list of things that will be covered are as follows (in some tentative order):
General software engineering
- Unit testing
- Using the standard library
- How and why OO is super important, or, designing a good API
C++11/C++14
- Type deduction
- Smart pointers (
std::unique_ptr
,std::shared_ptr
, etc.) - The Big Five (copy ctor, move ctor, copy-assignment ctor, move-assignment ctor, destructor) (instead of C++03 Big Three)
- Functional programming (lambdas,
std::function
, etc.) - The new threading library (so long,
pthread
s!) - RAII (Resource Acquisition is Initialization)
const
correctness and why it's important
Prerequisites
Because many features of modern C++ are related to facilitating object-oriented programming, I expect all readers to be comfortable with basic OO using C++.
I also expect all readers to have a compiler that supports compiling with the flag -std=c++14
, which allows for features of the C++14 standard.
Notes
This book is neither affiliated with nor endorsed by any university. This work is created with the intent to be freely available and voluntarily done for those interested in C++.
I am not perfect. If there are mistakes, please let me know. I will happily fix them and give you credit if you'd like. Just send me an email (below) with the error, a fix/improvement, and if/how you'd like to be attributed. You can also start a discussion and I will address it as soon as possible.
Authors
- Elijah Rippeth - [email protected]