Modern C++ can be really hard to learn! This project aims at teaching just the beauty of modern C++ -- not through documentation but through simple code snippets; corner cases are intentionally omitted.
In order to benefit from this project, it's assumed that readers are already familiar with the C++98 language. This project aims at showing the "beautiful delta" between C++98 and modern C++.
Cross-cutting language aspects that are either considered to be part of the core language or are so small that they don't warrant their own chapter, e. g.:
- Static assertions
auto
types- Range-based
for
loops initializer_list
constexpr
expressions- Scoped
enum
- User-defined literals
Shows how the auto
keyword works.
Demonstrates how to use lambda expressions.
Features that pertain mostly to classes, e. g:
final
,override
,default
,delete
specifiers- Constructor delegation
- Initialization of non-static members
A primer on lvalues, rvalues, lvalue references and rvalue references.
Shows the motivation behind move semantics and how to implement it in your class.
Demonstrates the various aspecs of multi-threading, including:
- Launching threads with
std::thread
std::mutex
andstd::condition_variable
std::promise
andstd::future
- Launching and synchronizing threads with
std::async
Introduces smart pointers, e. g.:
std::unique_ptr
std::shared_ptr
std::weak_ptr
Gives an overview of the following containers:
std::array
std::forward_list
std::unordered_set
andstd::unordered_multiset
std::unordered_map
andstd::unordered_multimap
Introduces smart pointers, e. g.:
std::unique_ptr
std::shared_ptr
std::weak_ptr
Shows how to use variadic (arbitrary-number-of-argument) templates and what "perfect forwarding" is about.
Miscellaneous topics, like:
- Algorithms
std::tuple
- Memory alignment
- Type traits
Cross-cutting language aspects that are either considered to be part of the core language or are so small that they don't warrant their own chapter, e. g.:
Lot's of C++14 stuff :-)