mirror of
https://github.com/federico-busato/Modern-CPP-Programming.git
synced 2025-04-20 00:19:03 +03:00
Compare commits
166 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f06595b962 | ||
![]() |
cfa7dbda27 | ||
![]() |
47a42672ea | ||
![]() |
a9e3135b0b | ||
![]() |
eb235590f4 | ||
![]() |
b7c3fd5f9f | ||
![]() |
1c9d3f2005 | ||
![]() |
46d0031b2d | ||
![]() |
25579c90d9 | ||
![]() |
f3cf69acc9 | ||
![]() |
381982525f | ||
![]() |
8acb2f8897 | ||
![]() |
5e681f5a52 | ||
![]() |
9141830dc8 | ||
![]() |
b26455c1c1 | ||
![]() |
425e3d6722 | ||
![]() |
36da04fd67 | ||
![]() |
e2388403fc | ||
![]() |
13bb9df9ff | ||
![]() |
5b64253950 | ||
![]() |
497eea83a7 | ||
![]() |
36c7c5a2ae | ||
![]() |
88952f06ac | ||
![]() |
610260ac74 | ||
![]() |
22c0a3348d | ||
![]() |
80a700f245 | ||
![]() |
ae54ce2047 | ||
![]() |
32db0c7279 | ||
![]() |
5d5c78a7a5 | ||
![]() |
7c744d6c17 | ||
![]() |
c9ef7b016d | ||
![]() |
1cd4fe9c2b | ||
![]() |
d0f2e38d7f | ||
![]() |
81b8263824 | ||
![]() |
986cd3c311 | ||
![]() |
ff392ce694 | ||
![]() |
a00a3769da | ||
![]() |
3058f89090 | ||
![]() |
27b24c22b8 | ||
![]() |
f9d8ee13b9 | ||
![]() |
28774d6ceb | ||
![]() |
ef550dd8c8 | ||
![]() |
7aefe1943c | ||
![]() |
f5adf0efc7 | ||
![]() |
9999ec05fa | ||
![]() |
4cae38a271 | ||
![]() |
77a2f0bc86 | ||
![]() |
7bb0aadf56 | ||
![]() |
114be91d73 | ||
![]() |
f4ca57d119 | ||
![]() |
1edb6ff55b | ||
![]() |
29036ce6d2 | ||
![]() |
75115339c9 | ||
![]() |
72cc567643 | ||
![]() |
139d92838d | ||
![]() |
b90acc09a7 | ||
![]() |
442fc2b9a7 | ||
![]() |
34e185f6f5 | ||
![]() |
03b5ea3661 | ||
![]() |
c9b5dd2a2d | ||
![]() |
56bc7403ca | ||
![]() |
30cd9bfafc | ||
![]() |
27fbee27ed | ||
![]() |
37ab804233 | ||
![]() |
b505b4d301 | ||
![]() |
65bd1a567b | ||
![]() |
f4650c1149 | ||
![]() |
a8236f6733 | ||
![]() |
93e10a1017 | ||
![]() |
cea2329900 | ||
![]() |
2bb5f82e0a | ||
![]() |
bf64feb893 | ||
![]() |
5cec82a8f4 | ||
![]() |
4da0bcc6cb | ||
![]() |
50a2f76ca5 | ||
![]() |
08c8e8fb06 | ||
![]() |
f76c792c6f | ||
![]() |
62719c75cc | ||
![]() |
6e5a34f163 | ||
![]() |
e230d5a785 | ||
![]() |
59a9daea05 | ||
![]() |
de8e55fd10 | ||
![]() |
00f01e2c44 | ||
![]() |
3ff164bb33 | ||
![]() |
8d74011469 | ||
![]() |
4946c98e47 | ||
![]() |
fe4e49e863 | ||
![]() |
4e71cb9e71 | ||
![]() |
ec01f52e22 | ||
![]() |
81edc9db04 | ||
![]() |
3fd98c1eba | ||
![]() |
2bf93294cd | ||
![]() |
51138db9ac | ||
![]() |
ad91033373 | ||
![]() |
509d6b2b85 | ||
![]() |
6bdaf4ea32 | ||
![]() |
35b53172a2 | ||
![]() |
05332f39ae | ||
![]() |
83d53a9524 | ||
![]() |
b0a5a23cb5 | ||
![]() |
8d5c68e99a | ||
![]() |
1c13649a5b | ||
![]() |
6b78e33641 | ||
![]() |
8f5cd864bc | ||
![]() |
f57539a175 | ||
![]() |
fabc8139ee | ||
![]() |
12ce686a05 | ||
![]() |
e5cb382d5e | ||
![]() |
a9dc790369 | ||
![]() |
38789ed119 | ||
![]() |
237c0d54b7 | ||
![]() |
6ad0835e38 | ||
![]() |
d0ee153b2d | ||
![]() |
aa8bc7e444 | ||
![]() |
ea0b088570 | ||
![]() |
3542d72dc0 | ||
![]() |
4f262ae34a | ||
![]() |
c5882e2d0a | ||
![]() |
ed5fd14bf5 | ||
![]() |
f1f39b2bbb | ||
![]() |
90e5148851 | ||
![]() |
378d9776ac | ||
![]() |
70c5a65060 | ||
![]() |
c7b0d5982c | ||
![]() |
173c7c92a9 | ||
![]() |
f0efe83315 | ||
![]() |
46746df8ff | ||
![]() |
fe1f6934eb | ||
![]() |
056e904e49 | ||
![]() |
e87d769085 | ||
![]() |
9018dfdaa8 | ||
![]() |
002c0c80f8 | ||
![]() |
f16afe68fa | ||
![]() |
383c747b07 | ||
![]() |
aea876016d | ||
![]() |
cbd8d114f1 | ||
![]() |
db113a2e3f | ||
![]() |
54da4a86d0 | ||
![]() |
5aa657d2cd | ||
![]() |
d9752a4981 | ||
![]() |
674d5dfa8a | ||
![]() |
2765deb98a | ||
![]() |
0845d53cdb | ||
![]() |
81dc24fdce | ||
![]() |
4fcca5c22a | ||
![]() |
47c2c5b228 | ||
![]() |
b1dc558c16 | ||
![]() |
2d8f6517e8 | ||
![]() |
f1ffd1695e | ||
![]() |
abc0c896f4 | ||
![]() |
47b799fa12 | ||
![]() |
0aa69c0b8c | ||
![]() |
e797891cc0 | ||
![]() |
bb4114aa81 | ||
![]() |
cecf8944bb | ||
![]() |
90691c6bc6 | ||
![]() |
3c7a7ac410 | ||
![]() |
cc6b8e0625 | ||
![]() |
5c49c8db3f | ||
![]() |
8351f8b577 | ||
![]() |
9bc1c648a4 | ||
![]() |
d6789cb5f1 | ||
![]() |
d07000e3ff | ||
![]() |
a9ceb476b1 | ||
![]() |
8efcf6db2a | ||
![]() |
36fe069450 |
Binary file not shown.
BIN
02.Preparation.pdf
Normal file
BIN
02.Preparation.pdf
Normal file
Binary file not shown.
BIN
03.Basic_Concepts_I.pdf
Normal file
BIN
03.Basic_Concepts_I.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
06.Basic_Concepts_IV.pdf
Normal file
BIN
06.Basic_Concepts_IV.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
07.Basic_Concepts_V.pdf
Normal file
BIN
07.Basic_Concepts_V.pdf
Normal file
Binary file not shown.
BIN
08.Object_Oriented_I.pdf
Normal file
BIN
08.Object_Oriented_I.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
10.Templates_I.pdf
Normal file
BIN
10.Templates_I.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
13.Translation_Units_II.pdf
Normal file
BIN
13.Translation_Units_II.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
15.Code_Convention_II.pdf
Normal file
BIN
15.Code_Convention_II.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
21.Advanced_Topics_II.pdf
Normal file
BIN
21.Advanced_Topics_II.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
23.Optimization_II.pdf
Normal file
BIN
23.Optimization_II.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
25.Software_Design_I.pdf
Normal file
BIN
25.Software_Design_I.pdf
Normal file
Binary file not shown.
BIN
26.Software_Design_II.pdf
Normal file
BIN
26.Software_Design_II.pdf
Normal file
Binary file not shown.
370
README.md
370
README.md
@ -8,149 +8,179 @@
|
||||
<img src="https://img.shields.io/github/v/release/federico-busato/Modern-CPP-Programming?style=for-the-badge"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a alt="Stars">
|
||||
<img src="https://img.shields.io/github/stars/federico-busato/Modern-CPP-Programming?style=for-the-badge"/>
|
||||
</a>
|
||||
<a href="https://github.com/federico-busato/Modern-CPP-Programming/network/members" alt="Forks">
|
||||
<img src="https://img.shields.io/github/forks/federico-busato/Modern-CPP-Programming?style=for-the-badge"/>
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/federico-busato/Modern-CPP-Programming/commits/master" alt="Commits">
|
||||
<img src="https://badgen.net/github/commits/federico-busato/Modern-CPP-Programming?style=for-the-badge&scale=1.2"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/federico-busato/Modern-CPP-Programming/network/members" alt="Forks">
|
||||
<img src="https://img.shields.io/github/forks/federico-busato/Modern-CPP-Programming?style=for-the-badge"/>
|
||||
</a>
|
||||
<a alt="Stars">
|
||||
<img src="https://img.shields.io/github/stars/federico-busato/Modern-CPP-Programming?style=for-the-badge"/>
|
||||
<a href="https://github.com/federico-busato/Modern-CPP-Programming-Material/issues" alt="Issues">
|
||||
<img src="https://badgen.net/github/closed-issues/federico-busato/Modern-CPP-Programming?style=for-the-badge&scale=1.2"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## C++11 / C++14 / C++17 / C++20 / (C++23)
|
||||
## C++03 / C++11 / C++14 / C++17 / C++20 / C++23 / C++26
|
||||
|
||||
This *open-access* course is directed at those who are already familiar with C and object-oriented programming towards a proficiency level of C++ programming. The course covers the basics of C++ programming and moves on to advanced C++ semantics and concepts.
|
||||
|
||||
**Key features**:
|
||||
|
||||
- *Free and frequently updated*
|
||||
- *26 lectures, 1800+ slides*
|
||||
- Include the *last language standard* concepts and features
|
||||
- *Practical teaching*: small structured descriptions associated to code
|
||||
- *Practical teaching*: non-verbose, short structured descriptions associated with code
|
||||
- *Minimal code examples* for showing just a specific feature or issue without digressing
|
||||
- *Complementary language aspects*: tools, coding conventions, project organization, and code optimization
|
||||
- *Experience-based*: many aspects, examples, and problems come from real-world cases faced during my work as software engineer
|
||||
|
||||
If you enjoy the course or you find it useful, please add a **Star**
|
||||
*If you enjoy the course or you find it useful*, please add a **Star**
|
||||
|
||||
[](https://github.com/federico-busato/Modern-CPP-Programming)
|
||||
|
||||
## CHAPTERS
|
||||
|
||||
| | TITLE | MAIN FOCUS |
|
||||
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
|
||||
| **1** | **[Introduction](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/01.Introduction.pdf)** | History of C/C++, Areas of Applications, Course introduction |
|
||||
| **2** | **[Basic Concepts I - Fundamental Types](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/02.Basic_Concepts_I.pdf)** | Integral data types, floating-point, operators, and conversion |
|
||||
| **3** | **[Basic Concepts II - Entities and Control Flow](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/03.Basic_Concepts_II.pdf)** | Enumerators, structures, control flow statements |
|
||||
| **4** | **[Basic Concepts III - Memory Management](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/04.Basic_Concepts_III.pdf)** | Heap, Stack, pointers, references, const properties, conversion operators |
|
||||
| **5** | **[Basic Concepts IV - Functions and Preprocessing](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/05.Basic_Concepts_IV.pdf)** | Functions, lambda expressions, preprocessing directives |
|
||||
| **6** | **[C++ Object Oriented Programming I - Class Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf)** | Class hierarchy, constructor, destructor, class keywords |
|
||||
| **7** | **[C++ Object Oriented Programming II - Polymorphism and Operator Overloading](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf)** | Polymorphism, operators overloading |
|
||||
| **8** | **[C++ Templates and Meta-programming I - Function Templates and Compile-Time Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/08.Templates_I.pdf)** | Function template, type traits |
|
||||
| **9** | **[C++ Templates and Meta-programming II - Class Templates and SFINAE](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/09.Templates_II.pdf)** | Class template, SFINAE |
|
||||
| **10** | **[Translation Units I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/10.Translation_Units_I.pdf)** | Linkage and One Definition Rule |
|
||||
| **11** | **[Translation Units II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/11.Translation_Units_II.pdf)** | Dealing with multiple translation units and files, `#include`, and modules |
|
||||
| **12** | **[Code Conventions](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/12.Code_Convention.pdf)** | Project organization and main code conventions |
|
||||
| **13** | **[Ecosystem I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/13.Ecosystem_I.pdf)** | Debugging, and testing |
|
||||
| **14** | **[Ecosystem II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/14.Ecosystem_II.pdf)** | Cmake, documenting, and other Tools |
|
||||
| **15** | **[Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/15.Utilities.pdf)** | Main `std` libraries |
|
||||
| **16** | **[Containers, Iterators, and Algorithms](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/16.Iterators_Containers_Alg.pdf)** | Containers, iterators, algorithms, ranges |
|
||||
| **17** | **[Advanced Topics I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/17.Advanced_Topics_I.pdf)** | Move semantics, universal reference, type deduction |
|
||||
| **18** | **[Advanced Topics II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/18.Advanced_Topics_II.pdf)** | Error handling, C++ idioms, smart pointers |
|
||||
| **19** | **[Optimization I - Basic Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/19.Optimization_I.pdf)** | Ahmdal Law, performance bounds, architecture concepts (ILP, SIMD, etc.), memory hierarchy |
|
||||
| **20** | **[Optimization II - Code Optimization](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/20.Optimization_II.pdf)** | Arithmetic optimizations, memory optimizations, etc. |
|
||||
| **21** | **[Optimization III - Non-Coding Optimizations and Benchmarking](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/21.Optimization_III.pdf)** | Compiler optimizations, profiling and benchmarking tools |
|
||||
| # | TITLE | MAIN FOCUS |
|
||||
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| **1** | [**Introduction**](01.Introduction.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/01.Introduction.html)) | History of C/C++, Areas of applications, Course introduction |
|
||||
| **2** | [**Preparation**](02.Preparation.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/02.Preparation.html)) | Books, How to compile, Hello world |
|
||||
| **3** | [**Basic Concepts I**](03.Basic_Concepts_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/03.Basic_Concepts_I.html)) | Type System, Fundamental types, and Operators |
|
||||
| **4** | [**Basic Concepts II**](04.Basic_Concepts_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/04.Basic_Concepts_II.html)) | Integral and Floating-point types and their arithmetic |
|
||||
| **5** | [**Basic Concepts III**](05.Basic_Concepts_III.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/05.Basic_Concepts_III.html)) | Entities, Enumerators, Structures, Control flow statements |
|
||||
| **6** | [**Basic Concepts IV**](06.Basic_Concepts_IV.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/06.Basic_Concepts_IV.html)) | Heap, Stack, Pointers, References, Const properties, Conversion operators |
|
||||
| **7** | [**Basic Concepts V**](07.Basic_Concepts_V.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/07.Basic_Concepts_V.html)) | Functions, Lambda expressions, Preprocessing directives |
|
||||
| **8** | [**Object-Oriented Programming I**](08.Object_Oriented_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/08.Object_Oriented_I.html)) | Class hierarchy, Constructor, Destructor, Class keywords |
|
||||
| **9** | [**Object Oriented Programming II**](09.Object_Oriented_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/09.Object_Oriented_II.html)) | Polymorphism, Operators overloading |
|
||||
| **10** | [**Templates and Meta-programming I**](10.Templates_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/10.Templates_I.html)) | Function template, Type traits, Compile-time utilities |
|
||||
| **11** | [**Templates and Meta-programming II**](11.Templates_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/11.Templates_II.html)) | Class template, SFINAE |
|
||||
| **12** | [**Translation Units I**](12.Translation_Units_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/12.Translation_Units_I.html)) | Linkage and One Definition Rule |
|
||||
| **13** | [**Translation Units II**](13.Translation_Units_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/13.Translation_Units_II.html)) | Dealing with multiple translation units and files,`#include`, Modules |
|
||||
| **14** | [**Code Conventions I**](14.Code_Convention_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/14.Code_Convention_I.html)) | Project organization, code conventions intro, entities conventions |
|
||||
| **15** | [**Code Conventions II**](15.Code_Convention_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/15.Code_Convention_II.html)) | Template, namespace, modern c++, maintainability , naming, and formatting conventions |
|
||||
| **16** | [**Debugging and Testing**](16.Debugging.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/16.Debugging.html)) | Execution/memory debugging, Sanitizers, Harding techniques, Unit test, Test-Driven Development |
|
||||
| **17** | [**Ecosystem**](17.Ecosystem.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/17.Ecosystem.html)) | Cmake, Documenting, and Other Tools |
|
||||
| **18** | [**Utilities**](18.Utilities.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/18.Utilities.html)) | Main `std` libraries |
|
||||
| **19** | [**Containers, Iterators, and Algorithms**](19.Iterators_Containers_Alg.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/19.Iterators_Containers_Alg.html)) | Containers, Iterators, Algorithms, Ranges |
|
||||
| **20** | [**Advanced Topics I**](20.Advanced_Topics_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/20.Advanced_Topics_I.html)) | Move semantics, Universal reference, Type deduction |
|
||||
| **21** | [**Advanced Topics II**](21.Advanced_Topics_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/21.Advanced_Topics_II.html)) | Error handling, C++ idioms, Smart pointers |
|
||||
| **22** | [**Performance Optimizations I**](22.Optimization_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/22.Optimization_I.html)) | Ahmdal Law, Performance bounds, Architecture concepts (ILP, SIMD, etc.), Memory hierarchy |
|
||||
| **23** | [**Performance Optimizations II**](23.Optimization_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/23.Optimization_II.html)) | Arithmetic optimizations, Memory optimizations, etc. |
|
||||
| **24** | [**Performance Optimizations III**](24.Optimization_III.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/24.Optimization_III.html)) | Compiler optimizations, Profiling, Benchmarking tools |
|
||||
| **25** | [**Software Design I**](25.Software_Design_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/25.Software_Design_I.html)) | Basic Concepts, Principles, Use cases |
|
||||
| **26** | [**Software Design II**](26.Software_Design_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/26.Software_Design_II.html)) | Design Patterns and Idioms |
|
||||
|
||||
***ALL-IN-ONE BOOK***: [**modern-cpp.pdf**](modern-cpp.pdf) (could be a few commits behind), [html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/modern-cpp.html)
|
||||
|
||||
## TOPICS IN DETAILS
|
||||
|
||||
**[1. Introduction](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/01.Introduction.pdf)**
|
||||
**[1. Introduction](01.Introduction.pdf)**
|
||||
|
||||
* **A Little History of C/C++ Programming Languages**
|
||||
* **Areas of Application and Popularity**
|
||||
* **C++ Philosophy**
|
||||
* **C++ Weakness**
|
||||
* **Books and References**
|
||||
* **C++ Weakness**: C++ alternatives, Why switching to a new language is hard?
|
||||
* **The Course**
|
||||
|
||||
**[2. Basic Concepts I - Fundamental Types](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/02.Basic_Concepts_I.pdf)**
|
||||
**[2. Preparation](02.Preparation.pdf)**
|
||||
|
||||
* **Preparation**: What compiler should I use?, What editor/IDE compiler should I use?, How to compile?
|
||||
* **Hello World**: I/O Stream
|
||||
* **C++ Fundamental Types Overview**: Arithmetic types, Non-standard arithmetic types, `void` type, Pointer type and `nullptr`
|
||||
- **Books and References**
|
||||
- **Slide Legend**
|
||||
- **What Editor/ IDE/Compiler Should I Use?**
|
||||
- **How to compile?**
|
||||
- **Hello World**: I/O Stream
|
||||
|
||||
**[3. Basic Concepts I - Type System, Fundamental Types, and Operators](03.Basic_Concepts_I.pdf)**
|
||||
|
||||
* **The C++ Type System**: Type categories, Type properties
|
||||
* **C++ Fundamental Types Overview**: Arithmetic types, Suffix and prefix, Non-standard arithmetic types, `void` type, `nullptr`
|
||||
* **Conversion Rules**
|
||||
* **`auto` declaration**
|
||||
* **C++ Operators**: Operators precedence, Prefix/Postfix increment/decrement, Assignment, Compound , and comma operators, Spaceship operator `<=>` , Safe Comparison Operators
|
||||
* **Integral Data Types**: Fixed width integers and `size_t`, When use signed/unsigned integer? Promotion, Truncation, Undefined behavior
|
||||
* **Floating-point Types and Arithmetic**: Normal/Denormal values, Infinity, Not a Number (`NaN`), Summary, Properties
|
||||
* **`auto` Keyword**
|
||||
* **C++ Operators**: Operators precedence, Prefix/Postfix increment/decrement semantic, Assignment, compound, and comma operators, Spaceship operator `<=>` , Safe comparison operators
|
||||
|
||||
**[4. Basic Concepts II - Integral and Floating-point Types](04.Basic_Concepts_II.pdf)**
|
||||
|
||||
* **Integral Data Types**: Fixed width integers, `size_t`, `ptrdiff_t`, `uintptr_t`, Arithmetic Operation Semantics, Promotion, Truncation, Undefined behavior, Saturation Arithmentic
|
||||
* **Floating-point Types and Arithmetic**: IEEE Floating-point standard and other representations, Normal/Denormal values, Infinity, Not a Number (`NaN`), Machine Epsilon, Units at the Last Place (ULP), Cheatsheet, Limits and useful functions, Arithmetic properties, Special values behavior, Undefined behavior, Detect floating-point errors
|
||||
* **Floating-point Issues**: Catastrophic cancellation, Floating-point comparison
|
||||
|
||||
**[3. Basic Concepts II - Entities and Control Flow](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/03.Basic_Concepts_II.pdf)**
|
||||
**[5. Basic Concepts III - Entities and Control Flow](05.Basic_Concepts_III.pdf)**
|
||||
|
||||
* **Entities**
|
||||
* **Declaration and Definition**
|
||||
* **Enumerators**
|
||||
* **`struct`, Bitfield, `union`**
|
||||
* **Control Flow**: `if` Statement, `for` Loop, Range-base `for` loop, `switch`, `goto`
|
||||
* **Control Flow**: `if` statement, `for` and `while` loops, Range-base `for` loop, `switch`, `goto`, Avoid unused variable warning
|
||||
* **Namespace**: Explicit global namespace, namespace alias, `using`-declaration, `using namespace`-directive, `inline` namespace
|
||||
* **Attributes**: `[[nodiscard]]`, `[[maybe_unused]]`, `[[deprecated]]`, `[[noreturn]]`
|
||||
|
||||
**[4. Basic Concepts III - Memory Management](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/04.Basic_Concepts_III.pdf)**
|
||||
**[6. Basic Concepts IV - Memory Concepts](06.Basic_Concepts_IV.pdf)**
|
||||
|
||||
* **Heap and Stack**: Stack Memory, `new`, `delete`, Non-allocating placement allocation, Non-throwing allocation, Memory leak
|
||||
* **Initialization**: Variable initialization, Uniform initialization, Fixed-size array initialization, Structure initialization, Dynamic array initialization
|
||||
* **Pointers and References**: Pointer Operations, Address-of operator `&`, Reference
|
||||
* **Constant and Literals, `const`, `constexpr`, `consteval`, `constinit`**
|
||||
* **Explicit Type Conversion**: `static_cast`, `const_cast`, `reinterpret_cast`, Type punning
|
||||
* `sizeof` Operator
|
||||
* **Pointers**: Pointer operations, Address-of operator `&`, `struct` member access, `void` pointer, Pointer conversion, Pointer arithmetic, Wild and dangling pointers
|
||||
* **Heap and Stack**: Stack memory, `new`, `delete`, Non-allocating placement allocation, Non-throwing allocation, Memory leak
|
||||
* **Initialization**: Variable initialization, Uniform initialization, Array initialization, Structure initialization, Structure Binding, Dynamic memory initialization
|
||||
* **References**
|
||||
* **`Const` and Constant Expressions**: Contants and literals, `const`, `constexpr`, `consteval`, `constinit`, `if constexpr`, `std::is constant evaluated()`, `if consteval`
|
||||
* **`volatile` keyword**
|
||||
* **Explicit Type Conversion**: `static_cast`, `const_cast`, `reinterpret_cast`, Type punning, `std::bit_cast`, Uniform initialization conversion, `gls::narrow_cast`
|
||||
* **`sizeof` Operator**: overview, `[[no_unique_address]]`
|
||||
|
||||
**[5. Basic Concepts IV - Functions and Preprocessing](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/05.Basic_Concepts_IV.pdf)**
|
||||
**[7. Basic Concepts V - Functions and Preprocessing](07.Basic_Concepts_V.pdf)**
|
||||
|
||||
* **Declaration and Definition**
|
||||
* **Functions**: Pass by-value, Pass by-pointer, Pass by-reference, Function signature and Overloading, Default parameters, Attributes
|
||||
* **Function Objects and Lambda Expressions**: Function pointer, Function object (or Functor), Capture list, Other features, Capture list and classes
|
||||
* **Preprocessing**: Preprocessors, Common errors, Useful macro, Stringizing operator (`#`), `#pragma` and `#error`, Token-Pasting Operator (`##`), Variadic Macro
|
||||
* **Functions**: Pass-by-value, Pass-by-pointer, Pass-by-reference, Function signature and overloading, Overloading and `=delete`, Default parameters
|
||||
* **Function Pointer and Function Objects**
|
||||
* **Lambda Expressions**: Capture list, Lambda expression and function relation, Parameter notes, Composability, Recursion, `constexpr/consteval`, `template`, `mutable`, `[[nodiscard]]`, Capture list and classes
|
||||
* **Preprocessing**: Preprocessors, Common errors, Source location macros, Conditional compiling macros, Stringizing operator (`#`), `#error` and `#warning`, `#pragma`, Token-pasting operator `##`, Variadic macro
|
||||
|
||||
**[6. C++ Object-Oriented Programming I - Class Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf)**
|
||||
**[8. Object-Oriented Programming I - Class Concepts](08.Object_Oriented_I.pdf)**
|
||||
|
||||
* **C++ Classes**: RAII Idiom
|
||||
* **Class Hierarchy**: Access specifiers, Inheritance access specifiers
|
||||
* **Class Constructor**: Default constructor, Class initialization, Uniform initialization, Delegate constructor, `explicit` keyword
|
||||
* **C++ Classes**: RAII idiom
|
||||
* **Class Hierarchy**
|
||||
* **Access specifiers**: Inheritance access specifiers, When use `public/protected/private` for data members?
|
||||
* **Class Constructor**: Default constructor, Class initialization, Uniform initialization for objects, Delegate constructor, `explicit` keyword, `[[nodiscard]]` and classes
|
||||
* **Copy Constructor**
|
||||
* **Class Destructor**
|
||||
* **Defaulted Members** (`= default`)
|
||||
* **Defaulted Constructors, Destructor, and Operators** (`= default`)
|
||||
* **Class Keywords**: `this`, `static`, `const`, `mutable`, `using`, `friend`, `delete`
|
||||
|
||||
**[7. C++ Object-Oriented Programming II - Polymorphism and Operator Overloading](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf)**
|
||||
**[9. Object-Oriented Programming II - Polymorphism and Operator Overloading](09.Object_Oriented_II.pdf)**
|
||||
|
||||
* **Polymorphism**: `virtual` methods, Virtual table, `override` keyword, `final` keyword, Common errors, Pure virtual method, Abstract class and interface
|
||||
* **Polymorphism**: C++ mechanisms for polymorphism, `virtual` methods, Virtual table, `override` keyword, `final` keyword, Common errors, Pure virtual method, Abstract class and interface
|
||||
* **Inheritance Casting and Run-time Type Identification**
|
||||
* **Operator Overloading**: Overview, Subscript operator `[]`, Comparison operator `<`, Spaceship operator `<=>`, Function call operator `()`, Conversion operator `T()`, Return type overloading resolution, Increment and decrement operators `++`/`--`, Assignment operator `=`, Stream operator `<<`, Operator Notes
|
||||
* **C++ Special Objects**: Aggregate, Trivial class, Standard-layout class, Plain old data (POD), Hierarchy
|
||||
* **Operator Overloading**: Overview, Comparison operator `<`, Spaceship operator `<=>`, Subscript operator `[]`, Multidimensional subscript operator `[]`, Function call operator `()`, static operator `[]` and operator `()`, Conversion operator `T()`, Return type overloading resolution, Increment and decrement operators `++`/`--`, Assignment operator `=`, Stream operator `<<`, Operator notes
|
||||
* **C++ Object Layout**: Aggregate, Trivial class, Standard-layout class, Plain old data (POD), Hierarchy
|
||||
|
||||
**[8. C++ Templates and Meta-programming I - Function Templates and Compile-Time Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/08.Templates_I.pdf)**
|
||||
**[10. Templates and Meta-programming I - Function Templates and Compile-Time Utilities](10.Templates_I.pdf)**
|
||||
|
||||
* **Function Template**: Overview, Template parameters, Template parameter - default value, Specialization, Overloading
|
||||
* **Function Template**: Overview, Template instantiation, Templat parameters, Template parameter - default value, Overloading, Specialization
|
||||
* **Template Variable**
|
||||
* **Template Parameter Types**: Template Parameter Types, Generic Type Notes,
|
||||
`auto` Placeholder, Class template parameter type, Array and pointer types, Function type
|
||||
* **Compile-Time Utilities**: `static_assert`, `decltype` Keyword, `using` Keyword
|
||||
* **Template Parameter Types**: Generic Type Notes, `auto` Placeholder, Class template parameter type, Array and pointer types, Function type
|
||||
* **Compile-Time Utilities**: `static_assert`, `using` keyword, `decltype` keyword
|
||||
* **Type Traits**: Overview, Type traits library, Type manipulation
|
||||
|
||||
**[9. C++ Templates and Meta-programming II - - Class Templates and SFINAE](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/09.Templates_II.pdf)**
|
||||
**[11. Templates and Meta-programming II - Class Templates and SFINAE](11.Templates_II.pdf)**
|
||||
|
||||
* **Class Template**: Class specialization
|
||||
* **Class Template - Advanced Concepts**: Class + Function - Specialization, Dependent Names - `typename` and `template` Keywords, `friend` Keyword, Template Template Arguments
|
||||
* **Class Template**: Class specialization, Class template constructor
|
||||
* **Constructor template automatic deduction (CTAD)**
|
||||
* **Class Template - Advanced Concepts**: Class + Function - specialization, Dependent names - `typename` and `template` keywords, Class template hierarchy and `using`, `friend` keyword, Template template arguments
|
||||
* **Template Meta-Programming**
|
||||
* **SFINAE: Substitution Failure Is Not An Error**: Function SFINAE, Class SFINAE, Class + Function SFINAE
|
||||
* **Variadic Template**: Folding Expression, Variadic class template
|
||||
* **C++20 Concepts**: Overview, `concept` Keyword, `requires` Clause, `requires` Expression, `requires` Expression + Clause, `requires` Clause + Expression, `requires` and `constexpr`, Nested `requires`
|
||||
* **SFINAE: Substitution Failure Is Not An Error**: Function SFINAE, Class SFINAE
|
||||
* **Variadic Template**: Folding expression, Variadic class template
|
||||
* **C++20 Concepts**: Overview, `concept` keyword, `requires` clause, `requires` expression, `requires` expression + clause, `requires` clause + expression, `requires` and `constexpr`, Nested `requires`
|
||||
* **Template Debugging**
|
||||
|
||||
**[10. Translation Units I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/10.Translation_Units_I.pdf)**
|
||||
**[12. Translation Units I - Linkage and One Definition Rule](12.Translation_Units_I.pdf)**
|
||||
|
||||
* **Basic Concepts**: Translation unit, Local and global scope, Linkage
|
||||
* **Storage Class and Duration**: Storage duration, Storage class, `static` and `extern` keywords, Internal/External linkage examples
|
||||
* **Linkage of `const` and `constexpr`**: Static Initialization Order Fiasco
|
||||
* **Storage Class and Duration**: Storage duration, Storage class, `static` keyword, Anonymous namespace, `extern` keywords
|
||||
* **Linkage of `const` and `constexpr`**: Static initialization order fiasco
|
||||
* **Linkage Summary**
|
||||
* **Dealing with Multiple Translation Units**: Class in multiple translation units
|
||||
* **One Definition Rule (ODR)**: Global variable issues, ODR - Point 3, `inline` functions/variables, `constexpr` and `inline`
|
||||
@ -158,137 +188,155 @@ If you enjoy the course or you find it useful, please add a **Star**
|
||||
* **ODR - Class Template**: Cases, `extern` keyword
|
||||
* **ODR Undefined Behavior and Summary**
|
||||
|
||||
**[11. Translation Units II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/11.Translation_Units_II.pdf)**
|
||||
**[13. Translation Units II - Include, Module, and Namespace](13.Translation_Units_II.pdf)**
|
||||
|
||||
- **`#include` Issues**: Forward declaration, Include guard, Circular dependencies, Common linking errors
|
||||
- **C++20 Modules**: Overview, Terminology, Visibility and Reachability, Module unit types, Keywords, Global module fragment, Private module gragment, Header module unit, Module partitions
|
||||
- **Namespace**: Namespace functions vs. `static` methods, Namespace alias, Anonymous namespace, `inline` namespace, Attributes and namespace
|
||||
- **Compiling Multiple Translation Units**: Fundamental compiler flags, Compile Methods, Deal with libraries, Build static/dynamic libraries, Find dynamic library dependencies, Analyze object/executable symbols
|
||||
- **`#include` Issues**: Include guard, Forward declaration, Circular dependencies, Common linking errors
|
||||
- **C++20 Modules**: Overview, Terminology, Visibility and reachability, Module unit types, Keywords, Global module fragment, Private module fragment, Header module unit, Module partitions
|
||||
- **Compiling Multiple Translation Units**: Fundamental compiler flags, Compile Methods
|
||||
- **Libraries in C++**: Static library, Build static libraries, Using static libraries, Dynamic library, Build dynamic libraries, Using dynamic libraries, Application binary interface (ABI), Demangling, Find Dynamic library dependencies, Analyze object/executable symbols
|
||||
|
||||
**[12. Code Conventions](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/12.Code_Convention.pdf)**
|
||||
**[14. Code Conventions I](14.Code_Convention_I.pdf)**
|
||||
|
||||
* **C++ Project Organization**: Project directories, Project files, `src/include` directories
|
||||
* **Coding Styles and Conventions**
|
||||
* **`#include`**
|
||||
* **Macro and Preprocessing**
|
||||
* **Namespace**
|
||||
* **Variables**
|
||||
* **Functions**
|
||||
* **Structs and Classes**
|
||||
* **Control Flow**
|
||||
* **Modern C++ Features**
|
||||
* **Maintainability**
|
||||
* **Naming and Formatting**
|
||||
* **Code Documentation**
|
||||
* **C++ Project Organization**: Project directories, Project files, "Common" project organization notes, Alternative - “Canonical” project organization
|
||||
* **Coding Styles and Conventions**: Overview, Popular coding styles
|
||||
* **Header Files and `#include`**: `#include` guard, `#include` syntax, order of `#include`, Common header/source filename conventions
|
||||
* **Preprocessing**: Macro, Preprocessing statements
|
||||
* **Variables**: `static` global variables, conversions
|
||||
* **Enumerators**
|
||||
* **Arithmetic Types**: Signed vs. unsigned integral types, integral types conversion, Integral types: size and other issues, Floating-point types
|
||||
* **Functions**: Function parameters, Function arguments, function return values, Function specifiers, lambda expressions
|
||||
* **Structs and Classes**: `struct` vs `class`, Initialization, Braced initializer lists, Special member functions, `=default`, `=delete`, Other issues, Inheritance, Style
|
||||
|
||||
**[13. Ecosystem I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/13.Ecosystem_I.pdf)**
|
||||
**[15. Code Conventions II](15.Code_Convention_II.pdf)**
|
||||
|
||||
* **Debugging**
|
||||
* **Assertion**
|
||||
* **Execution debugging**
|
||||
* **Memory Debugging**: `valgrind`, Stack protection
|
||||
* **Sanitizers**: Address sanitizer, Leak sanitizer, Memory sanitizers, Undefined behavior sanitizer
|
||||
- **`auto`**
|
||||
- **Templates and Type Deduction**
|
||||
- **Control Flow**: Redundant control flow , `if/else`, Comparison, `switch`, `for/while`
|
||||
- **Namespace**: `using namespace` directive, Anoymous/unnamed namespace, Namespace and class design, Style
|
||||
- **Modern C++ Features**: Keywords, Features, Class, Library
|
||||
- **Maintainability**: Code comprehension, Functions, Template and Debuction, Library
|
||||
- Portability
|
||||
- **Naming**: Entities, Variables, Functions, Style conventions, Enforcing naming styles
|
||||
- **Readability and Formatting**: Horizontal spacing, Pointers/References, Vertical spacing, Braces, Type decorators, Reduce code verbosity, Other issues
|
||||
- **Code Documentation**: Function documentation, Comment syntax, File documentation
|
||||
|
||||
**[16. Debugging and Testing](16.Debugging.pdf)**
|
||||
|
||||
* **Debugging Overview**
|
||||
* **Assertions**
|
||||
* **Execution debugging**: Breakpoints, Watchpoints / Catchpoints, Control flow, Stack and info, Print, Disassemble, `std::breakpoint`
|
||||
* **Memory Debugging**: `valgrind`
|
||||
* **Hardening Techniques**: Stack usage, Standard library checks, Undefined behavior protections, Control flow protections
|
||||
* **Sanitizers**: Address sanitizer, Leak sanitizer, Memory sanitizers, Undefined behavior sanitizer, Sampling-baed sanitizer
|
||||
* **Debugging Summary**
|
||||
* **Code Checking and Analysis**: Compiler warnings, Static analyzers
|
||||
* **Code Testing**: Unit test, Code coverage, Fuzz testing
|
||||
* **Compiler Warnings**
|
||||
* **Static Analysis**
|
||||
* **Code Testing**: Unit testing, Test-Driven Development (TDD), Code coverage, Fuzz testing
|
||||
* **Code Quality**: `clang-tidy`
|
||||
|
||||
**[14. Ecosystem II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/14.Ecosystem_II.pdf)**
|
||||
**[17. Ecosystem - Cmake and Other Tools](17.Ecosystem.pdf)**
|
||||
|
||||
- **CMake**: `cmake` and `ctest`
|
||||
- **Code Documentation**: `doxygen`
|
||||
- **Code Statistics**: Count lines of code, Cyclomatic complexity analyzer
|
||||
- **Other Tools**: Code formatting - `clang-format`, `Compiler Explorer`, Code transformation - `CppInsights`, Code autocompletion - `GitHub Co-Pilot/TabNine/Kite`, Local code search - `ripgrep`, Code search engine - `searchcode/grep.app`, Code benchmarking - `Quick-Bench`, Font for Coding
|
||||
- **Other Tools**: Code formatting - `clang-format`, `Compiler Explorer`, Code transformation - `CppInsights`, AI-powered code completion -Local code search - `ugrep`, `ripgrep`, `hypergrep`, Code search engine - `searchcode/grep.app`, Code benchmarking - `Quick-Bench`, Font for coding
|
||||
|
||||
**[15. Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/15.Utilities.pdf)**
|
||||
**[18. Utilities](18.Utilities.pdf)**
|
||||
|
||||
* **I/O Stream**: Manipulator, `ofstream/ifstream`
|
||||
* **Strings**: `std::string`, Conversion from/to numeric values, `std::string_view`, `std::format`, `std::print`
|
||||
* **View**: `std::span`
|
||||
* **Math Libraries**
|
||||
* **Strings**: `std::string`, Conversion from/to numeric balues, `std::string_view`, `std::format`
|
||||
* **Random Number**: Basic Concepts, C++ `<random>`, Seed, PRNG period and quality, Distribution, Quasi-random
|
||||
* **Random Number**: Basic concepts, C++ `<random>`, Seed, PRNG period and quality, Distribution, Recent algorithms and Performance, Quasi-random
|
||||
* **Time Measuring**: Wall-Clock time, User time, System time
|
||||
* **Std Template Classes**: `std::byte` `std::pair`, `std::tuple`, `std::variant`, `std::optional`, `std::any`
|
||||
* **Std Class Templates**: `std::pair`, `std::tuple`, `std::variant`, `std::optional`, `std::any`, `std::stacktrace`
|
||||
* **Filesystem Library**: Query methods, Modify methods
|
||||
|
||||
**[16. Containers, Iterators, and Algorithms](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/16.Iterators_Containers_Alg.pdf)**
|
||||
**[19. Containers, Iterators, and Algorithms](19.Iterators_Containers_Alg.pdf)**
|
||||
|
||||
* **Containers and Iterators**
|
||||
* **Sequence Containers**: `std::array`, `std::vector`, `std::list`, `std::deque`, `std::forward_list`
|
||||
* **Sequence Containers**: `std::array`, `std::vector`, `std::deque`, `std::list`, `std::forward_list`
|
||||
* **Associative Containers**: `std::set`, `std::map`, `std::multiset`
|
||||
* **Container Adaptors**: `std::stack`, `std::queue`, `std::priority_queue`
|
||||
* **View**: `std::span`
|
||||
* **Implement a Custom Iterator**: Semantic, Implement a simple Iterator
|
||||
* **Implement a Custom Iterator**: Implement a simple Iterator
|
||||
* **Iterator Notes**:
|
||||
* **Iterator Utility Methods**: `std::advance`, `std::next`, `std::prev`, `std::distance`, Container access methods, Iterator traits
|
||||
* **Algorithms Library**: `std::find_if`, `std::sort`, `std::accumulate`, `std::generate`, `std::remove_if`
|
||||
* **C++20 Ranges**: Key concepts, Range view, Range adaptor, Range factory, Range algorithms, Range actions
|
||||
|
||||
**[17. Advanced Topics I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/17.Advanced_Topics_I.pdf)**
|
||||
**[20. Advanced Topics I](20.Advanced_Topics_I.pdf)**
|
||||
|
||||
* **Move Semantic**: `lvalues` and `rvalues` references, Move semantic, Compiler implicitly declared, `std::move`
|
||||
* **Move Semantic**: `lvalues` and `rvalues` references, Move semantic, `std::move`, Class declaration semantic
|
||||
* **Universal Reference and Perfect Forwarding**: Universal reference, Reference collapsing rules, Perfect forwarding
|
||||
* **Value Categories**
|
||||
* **`&`, `&&` Overloading - Ref-qualifiers**
|
||||
* **`&`, `&&` Ref-qualifiers and `volatile` Overloading**
|
||||
* **Copy Elision and RVO**
|
||||
* **Type Deduction**: Pass by-reference, Pass by-pointer, Pass by-value, `auto` deduction
|
||||
* **Type Deduction**: Pass by-reference, Pass-by-pointer, Pass-by-value, `auto` deduction, `auto(x)`: Decay-copy
|
||||
* **`const` Correctness**
|
||||
|
||||
**[18. Advanced Topics II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/18.Advanced_Topics_II.pdf)**
|
||||
**[21. Advanced Topics II](21.Advanced_Topics_II.pdf)**
|
||||
|
||||
- **Undefined Behavior**
|
||||
- **Error Handling**: C++ Exceptions, Defining custom exceptions, `noexcept` keyword, Memory allocation issues, Alternative error handling approaches
|
||||
- **C++ Idioms**: Rule of zero/three/five, Singleton, PIMPL, CRTP, Template Virtual Functions
|
||||
- **Undefined Behavior:** Illegal behavior, Platform specific behavior, unspecified behavior, Detecting undefined behavior
|
||||
- **Error Handling**: Recoverable error handing, Return code, C++ Exceptions, Defining custom exceptions, `noexcept` keyword, Memory allocation issues, Return code and exception summary, `std::expected`, Alternative error handling approaches
|
||||
- **Smart pointers**: `std::unique_ptr`, `std::shared_ptr`, `std::weak_ptr`
|
||||
- **Concurrency**: Thread Methods, Mutex, Atomic, Task-based parallelism
|
||||
- **Concurrency**: Thread methods, Mutex, Atomic, Task-based parallelism
|
||||
|
||||
**[19. Optimization I - Basic Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/19.Optimization_I.pdf)**
|
||||
**[22. Optimization I - Basic Concepts](22.Optimization_I.pdf)**
|
||||
|
||||
* **Overview**
|
||||
* **Basic Concepts**: Asymptotic complexity, Time-Memory Trade-off, Developing Cycle, Ahmdal's law, Throughput, Bandwidth, Latency, Performance bounds, Arithmetic intensity
|
||||
* **Basic Architecture Concepts**: Instruction-level parallelism, Little’s law, Data-level parallelism, Thread-level parallelism, RISC, CISC Instruction sets
|
||||
* **Memory Hierarchy**: Memory hierarchy concepts, Memory locality
|
||||
* **Introduction**: Moore's Law, Moore's Law limitations, Reasons for optimizing
|
||||
* **Basic Concepts**: Asymptotic complexity, Time-Memory trade-off, Developing cycle, Ahmdal's law, Throughput, Bandwidth, Latency, Performance bounds, Arithmetic intensity
|
||||
* **Basic Architecture Concepts**: Instruction throughput (IPC), In-Order, and Out-of-Order Execution, Instruction pipelining, Instruction-level parallelism (ILP), Little’s law, Data-level parallelism (DLP) and vector instructions (SIMD), Thread-level parallelism (TLP), Single Instruction Multiple Threads (SIMT), RISC, CISC instruction sets
|
||||
* **Memory Hierarchy**: Memory hierarchy concepts, Memory locality, Core-to-core latency and thread affinity, Memory ordering model
|
||||
|
||||
**[20. Optimization II - Code Optmization](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/20.Optimization_II.pdf)**
|
||||
**[23. Optimization II - Code Optimization](23.Optimization_II.pdf)**
|
||||
|
||||
* **I/O Operations**: `printf`, Memory mapped I/O, Speed up raw data loading
|
||||
* **Memory Optimizations**: Heap memory, Stack memory, Cache utilization, data alignment
|
||||
* **Arithmetic**: Data types, Operations, Conversion, Floating-point, Compiler intrinsic functions, Value in a range, Lookup table
|
||||
* **Control Flow**: Loop hoisting, Loop unrolling, Branch hints, Compiler hints, Recursion
|
||||
* **Functions**: Function call cost, Argument passing, Function optimizations, Function inlining, Pointers aliasing
|
||||
* **C++ Objects**: Object RAII optimizations
|
||||
* **Memory Optimizations**: Heap memory, Stack memory, Cache utilization, Data alignment, Memory Prefetch
|
||||
* **Arithmetic Types**: Data types, Arithmetic operations, Conversion, Floating-point, Compiler intrinsic functions, Value in a range, Lookup table
|
||||
* **Control Flow**: Branhes, Branch Hints - `[[likely]]` / `[[unlikely]]`, Signed/Unsigned integers, Loops, Loop hoisting, Loop unrolling, Assertions, Compiler hints `[[assume]]/std::unreacheable()`, Recursion
|
||||
* **Functions**: Function call cost, Argument passing, Function inlining, Function attributes, Pointers aliasing
|
||||
* **Object-Oriented Programming**
|
||||
* **Std Library and Other Language Aspects**
|
||||
|
||||
**[21. Optimization III - Non-Coding Optimizations and Benchmarking](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/21.Optimization_III.pdf)**
|
||||
**[24. Optimization III - Non-Coding Optimizations and Benchmarking](24.Optimization_III.pdf)**
|
||||
|
||||
* **Compiler Optimizations**: About the compiler, Architecture flags, Optimization flags, Help the Compiler to produce better code, Profile guided optimization (PGO), Post-Processing Binary Optimizer
|
||||
* **Compiler Transformation Techniques**
|
||||
* **Libraries and Data Structures**: External libraries, Std library
|
||||
* **Performance Benchmarking**: What to test?, Workload/Dataset quality, Cache behavior, Stable CPU performance, Program memory layout, Measurement overhead and compiler Optimizations, Metric evaluation
|
||||
* **Compiler Optimizations**: About the compiler, Compiler optimization flags, Floating-point optimization flags, Linker optimization flags, Architecture flags, Help the compiler to produce better code, Profile guided optimization (PGO), Post-processing binary optimizer, Polyhedral optimizations
|
||||
* **Compiler Transformation Techniques**: Basic transformations, Loop unswitching, Loop fusion, Loop fission, Loop interchange, Loop tiling
|
||||
* **Libraries and Data Structures**
|
||||
* **Performance Benchmarking**: What to test?, Workload/Dataset quality, Cache behavior, Stable CPU performance, Multi-threads considerations, Program memory layout, Measurement overhead, Compiler optimizations, Metric evaluation
|
||||
* **Profiling**: `gprof`, `uftrace`, `callgrind`, `cachegrind`, `perf` Linux profiler
|
||||
* **Parallel Computing**: Concurrency vs. Parallelism, Performance scaling, Gustafson’s Law, Parallel programming languages
|
||||
* **Parallel Computing**: Concurrency vs. parallelism, Performance scaling, Gustafson's Law, Parallel programming languages
|
||||
|
||||
**[25. Software Design I - Basic Concepts (DRAFT)](25.Software_Design_I.pdf)**
|
||||
|
||||
- **Books and References**
|
||||
- **Basic Concepts**: Abstraction, interface, and module, Class Invariant
|
||||
- **Software Design Principles**: Separation of concern, Low coupling, high cohesion, Encapsulation and information hiding, Design by contract, Problem decomposition, Code reuse
|
||||
- **Software Complexity**: Software entropy, Technical debt
|
||||
- **The SOLID Design Principles**
|
||||
- **Class Design**: The class interface principle, Member functions vs. free functions, namespace functions vs. class static methods
|
||||
- **BLAS GEMM Case Study**
|
||||
- **Owning Objects and Views**
|
||||
- **Value vs. Reference Semantic**
|
||||
- **Global Variables**
|
||||
|
||||
**[26. Software Design II - Design Patterns and Idioms (DRAFT)](26.Software_Design_II.pdf)**
|
||||
|
||||
- **C++ Idioms**: Rule of Zero, Rule of Three, Rule of Five
|
||||
- **Design Pattern**: Singleton, Pointer to implementation (PIMPL), Curiously Recurring Template Pattern (CRTP), Template virtual functions
|
||||
|
||||
### Roadmap
|
||||
|
||||
1. Software Design Chapter
|
||||
1. Improve Software Design Chapters
|
||||
2. Build Aspects Chapter (e.g. reducing build time)
|
||||
|
||||
### Essential Tool
|
||||
### Reporting bugs 🐛 and contributing
|
||||
|
||||
Online compiler and execution: [CompilerExplorer](https://godbolt.org/)
|
||||
|
||||
* for code execution: [Add new..] -> [execution only]
|
||||
|
||||
### Reporting bugs and contributing
|
||||
|
||||
If you find any typo, conceptual error, or section to improve, please report them by writing directly to me or by using the `issue` panel
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/federico-busato/Modern-CPP-Programming-Material/issues" alt="Issues">
|
||||
<img src="https://img.shields.io/github/issues-closed/federico-busato/Modern-CPP-Programming?style=for-the-badge"/>
|
||||
</a>
|
||||
</p>
|
||||
If you find any typo, conceptual error, or section to improve, please report them by using the `issue` panel.
|
||||
|
||||
## Author
|
||||
|
||||
`Federico Busato`
|
||||
`Federico Busato`, https://federico-busato.github.io/
|
||||
|
||||
- Twitter: [twitter.com/fedebusato](https://twitter.com/fedebusato)
|
||||
- Linkedin: [www.linkedin.com/in/federico-busato/](https://www.linkedin.com/in/federico-busato/)
|
||||
- 🌐 LinkedIn: [www.linkedin.com/in/federico-busato/](https://www.linkedin.com/in/federico-busato/)
|
||||
- 🦋 Bluesky: [fbusato.bsky.social](https://bsky.app/profile/fbusato.bsky.social)
|
||||
|
1364
htmls/01.Introduction.html
Normal file
1364
htmls/01.Introduction.html
Normal file
File diff suppressed because one or more lines are too long
806
htmls/02.Preparation.html
Normal file
806
htmls/02.Preparation.html
Normal file
File diff suppressed because one or more lines are too long
1260
htmls/03.Basic_Concepts_I.html
Normal file
1260
htmls/03.Basic_Concepts_I.html
Normal file
File diff suppressed because one or more lines are too long
2426
htmls/04.Basic_Concepts_II.html
Normal file
2426
htmls/04.Basic_Concepts_II.html
Normal file
File diff suppressed because one or more lines are too long
1630
htmls/05.Basic_Concepts_III.html
Normal file
1630
htmls/05.Basic_Concepts_III.html
Normal file
File diff suppressed because one or more lines are too long
2411
htmls/06.Basic_Concepts_IV.html
Normal file
2411
htmls/06.Basic_Concepts_IV.html
Normal file
File diff suppressed because one or more lines are too long
1720
htmls/07.Basic_Concepts_V.html
Normal file
1720
htmls/07.Basic_Concepts_V.html
Normal file
File diff suppressed because one or more lines are too long
1811
htmls/08.Object_Oriented_I.html
Normal file
1811
htmls/08.Object_Oriented_I.html
Normal file
File diff suppressed because one or more lines are too long
1781
htmls/09.Object_Oriented_II.html
Normal file
1781
htmls/09.Object_Oriented_II.html
Normal file
File diff suppressed because one or more lines are too long
1331
htmls/10.Templates_I.html
Normal file
1331
htmls/10.Templates_I.html
Normal file
File diff suppressed because one or more lines are too long
1930
htmls/11.Templates_II.html
Normal file
1930
htmls/11.Templates_II.html
Normal file
File diff suppressed because one or more lines are too long
1674
htmls/12.Translation_Units_I.html
Normal file
1674
htmls/12.Translation_Units_I.html
Normal file
File diff suppressed because one or more lines are too long
1244
htmls/13.Translation_Units_II.html
Normal file
1244
htmls/13.Translation_Units_II.html
Normal file
File diff suppressed because one or more lines are too long
2050
htmls/14.Code_Convention_I.html
Normal file
2050
htmls/14.Code_Convention_I.html
Normal file
File diff suppressed because one or more lines are too long
2277
htmls/15.Code_Convention_II.html
Normal file
2277
htmls/15.Code_Convention_II.html
Normal file
File diff suppressed because one or more lines are too long
1984
htmls/16.Debugging.html
Normal file
1984
htmls/16.Debugging.html
Normal file
File diff suppressed because one or more lines are too long
1091
htmls/17.Ecosystem.html
Normal file
1091
htmls/17.Ecosystem.html
Normal file
File diff suppressed because one or more lines are too long
2313
htmls/18.Utilities.html
Normal file
2313
htmls/18.Utilities.html
Normal file
File diff suppressed because one or more lines are too long
1924
htmls/19.Iterators_Containers_Alg.html
Normal file
1924
htmls/19.Iterators_Containers_Alg.html
Normal file
File diff suppressed because one or more lines are too long
1474
htmls/20.Advanced_Topics_I.html
Normal file
1474
htmls/20.Advanced_Topics_I.html
Normal file
File diff suppressed because one or more lines are too long
1655
htmls/21.Advanced_Topics_II.html
Normal file
1655
htmls/21.Advanced_Topics_II.html
Normal file
File diff suppressed because one or more lines are too long
1629
htmls/22.Optimization_I.html
Normal file
1629
htmls/22.Optimization_I.html
Normal file
File diff suppressed because one or more lines are too long
2303
htmls/23.Optimization_II.html
Normal file
2303
htmls/23.Optimization_II.html
Normal file
File diff suppressed because one or more lines are too long
1938
htmls/24.Optimization_III.html
Normal file
1938
htmls/24.Optimization_III.html
Normal file
File diff suppressed because one or more lines are too long
977
htmls/25.Software_Design_I.html
Normal file
977
htmls/25.Software_Design_I.html
Normal file
File diff suppressed because one or more lines are too long
687
htmls/26.Software_Design_II.html
Normal file
687
htmls/26.Software_Design_II.html
Normal file
File diff suppressed because one or more lines are too long
31760
htmls/modern-cpp.html
Normal file
31760
htmls/modern-cpp.html
Normal file
File diff suppressed because one or more lines are too long
BIN
modern-cpp.pdf
Normal file
BIN
modern-cpp.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user