diff --git a/01.Introduction.pdf b/01.Introduction.pdf index 8b2d5e8..789bfe6 100644 Binary files a/01.Introduction.pdf and b/01.Introduction.pdf differ diff --git a/02.Basic_Concepts_I.pdf b/02.Basic_Concepts_I.pdf index 286d757..2ba9ca1 100644 Binary files a/02.Basic_Concepts_I.pdf and b/02.Basic_Concepts_I.pdf differ diff --git a/03.Basic_Concepts_II.pdf b/03.Basic_Concepts_II.pdf index 686f8b0..4ce2eaa 100644 Binary files a/03.Basic_Concepts_II.pdf and b/03.Basic_Concepts_II.pdf differ diff --git a/04.Basic_Concepts_III.pdf b/04.Basic_Concepts_III.pdf index 9dac2cc..dd50b17 100644 Binary files a/04.Basic_Concepts_III.pdf and b/04.Basic_Concepts_III.pdf differ diff --git a/05.Basic_Concepts_IV.pdf b/05.Basic_Concepts_IV.pdf new file mode 100644 index 0000000..5bb48dd Binary files /dev/null and b/05.Basic_Concepts_IV.pdf differ diff --git a/05.Utilities.pdf b/06.Utilities.pdf similarity index 85% rename from 05.Utilities.pdf rename to 06.Utilities.pdf index 4d0333c..768cbed 100644 Binary files a/05.Utilities.pdf and b/06.Utilities.pdf differ diff --git a/06.Object_Oriented_I.pdf b/07.Object_Oriented_I.pdf similarity index 65% rename from 06.Object_Oriented_I.pdf rename to 07.Object_Oriented_I.pdf index d5e3e06..b91e42a 100644 Binary files a/06.Object_Oriented_I.pdf and b/07.Object_Oriented_I.pdf differ diff --git a/07.Object_Oriented_II.pdf b/08.Object_Oriented_II.pdf similarity index 88% rename from 07.Object_Oriented_II.pdf rename to 08.Object_Oriented_II.pdf index 3d20559..8a8b8ea 100644 Binary files a/07.Object_Oriented_II.pdf and b/08.Object_Oriented_II.pdf differ diff --git a/08.Templates_I.pdf b/09.Templates_I.pdf similarity index 87% rename from 08.Templates_I.pdf rename to 09.Templates_I.pdf index e77854d..a94af34 100644 Binary files a/08.Templates_I.pdf and b/09.Templates_I.pdf differ diff --git a/09.Templates_II.pdf b/10.Templates_II.pdf similarity index 72% rename from 09.Templates_II.pdf rename to 10.Templates_II.pdf index fb4409d..5191180 100644 Binary files a/09.Templates_II.pdf and b/10.Templates_II.pdf differ diff --git a/10.Iterators_Containers_Alg.pdf b/11.Iterators_Containers_Alg.pdf similarity index 91% rename from 10.Iterators_Containers_Alg.pdf rename to 11.Iterators_Containers_Alg.pdf index c9536db..5a8b1a2 100644 Binary files a/10.Iterators_Containers_Alg.pdf and b/11.Iterators_Containers_Alg.pdf differ diff --git a/11.Translation_Units.pdf b/12.Translation_Units.pdf similarity index 72% rename from 11.Translation_Units.pdf rename to 12.Translation_Units.pdf index 8cd832e..b6ca4d3 100644 Binary files a/11.Translation_Units.pdf and b/12.Translation_Units.pdf differ diff --git a/12.Code_Convention.pdf b/13.Code_Convention.pdf similarity index 89% rename from 12.Code_Convention.pdf rename to 13.Code_Convention.pdf index 3c665a6..048ab59 100644 Binary files a/12.Code_Convention.pdf and b/13.Code_Convention.pdf differ diff --git a/13.Debugging_Tools.pdf b/14.Ecosystem.pdf similarity index 81% rename from 13.Debugging_Tools.pdf rename to 14.Ecosystem.pdf index b3d207a..4881915 100644 Binary files a/13.Debugging_Tools.pdf and b/14.Ecosystem.pdf differ diff --git a/14.Advanced_Topics.pdf b/15.Advanced_Topics.pdf similarity index 71% rename from 14.Advanced_Topics.pdf rename to 15.Advanced_Topics.pdf index 7d2575b..472f4c2 100644 Binary files a/14.Advanced_Topics.pdf and b/15.Advanced_Topics.pdf differ diff --git a/16.Optimization_I.pdf b/16.Optimization_I.pdf new file mode 100644 index 0000000..82b0ae6 Binary files /dev/null and b/16.Optimization_I.pdf differ diff --git a/15.Optimization.pdf b/17.Optimization_II.pdf similarity index 55% rename from 15.Optimization.pdf rename to 17.Optimization_II.pdf index 93c31da..86fbd57 100644 Binary files a/15.Optimization.pdf and b/17.Optimization_II.pdf differ diff --git a/LICENSE b/LICENSE index 22f5eb5..5e056fe 100644 --- a/LICENSE +++ b/LICENSE @@ -1,29 +1,29 @@ -BSD 3-Clause License - -Copyright (c) 2018, Modern C++ Programming -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +BSD 3-Clause License + +Copyright (c) 2020, Modern C++ Programming +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 966a19c..b27a083 100644 --- a/README.md +++ b/README.md @@ -3,162 +3,183 @@ Open access C++ course, University of Verona (UNIVR), Italy -[Short list of C++ online compilers](https://rawgit.com/FedericoUnivr/Modern-CPP-Programming/master/html/OnlineCompiler.html) +### Essential Tool ### + +Online compiler and execution: [CompilerExplorer](https://godbolt.org/) + +* for code execution: [Add new..] -> [execution only] ## TOPICS ## -[**1. Introduction**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/01.Introduction.pdf) +**1. Introduction** * A Little History of C/C++ Programming Languages * C++ Philosophy * Why C++? -* Course References +* Course Overview and References +* Who I Am -[**2. Basic Concepts I**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/02.Basic_Concepts_I.pdf) +**2. Basic Concepts I** +* Prerequirements: Compiler, editor, etc. * Hello World * C++ Primitive Types -* auto and decltype +* Integral Data Types * Floating-point Arithmetic -* (Strongly Typed) Enumerators -* Union and Bitfield -* Math Operators -* Statement and Control Flow +* Floating-point Issues -[**3. Basic Concepts II**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/03.Basic_Concepts_II.pdf) +**3. Basic Concepts II** + +* Enumerators +* `union` and Bitfield +* `using`, `decltype`, and `auto` +* Math Operators +* Statements and Control Flow + +**4. Basic Concepts III** * Memory Management: Heap and Stack +* Initialization * Pointers and References -* sizeof Operator -* const / constexpr -* Explicit Type Conversion (Cast) +* `sizeof` Operator +* `const` and `constexpr` +* Explicit Type Conversion -[**4. Basic Concepts III**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/04.Basic_Concepts_III.pdf) +**5. Basic Concepts IV** * Declaration and Definition * Functions * Preprocessing -[**5. Utilities**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/05.Utilities.pdf) +**6. Utilities** * I/O Stream * Filesystem Library -* Math Library +* Math Functions * Algorithm Library -* String and String View +* `std::string` and `std::string_view` * Random Numbers * Time Measuring -[**6. C++ Object Oriented Programming I**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf) +**7. C++ Object Oriented Programming I** -* C++ Classes and Hierarchy -* Constructor +* C++ Classes +* Class Constructor * Copy Construcor -* Destructor -* Class Keyword: this, static, const, mutable, using, friend, delete +* Class Destructor +* Initialization and Defaulted Members +* Class Keywords -[**7. C++ Object Oriented Programming II**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf) +**8. C++ Object Oriented Programming II** * Polymorphism -* Keyword: virtual, override, final -* Operator overloading: <<, (), = -* Special Object: Aggregate, Trivial class, Standard layout, POD +* Operator overloading +** Special Objects -[**8. C++ Templates and Meta-programming I**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/08.Templates_I.pdf) +**9. C++ Templates and Meta-programming I** * Function Templates -* Type Deduction -* Compile-Time Utilities: static_assert, decltype, declval, using +* Compile-Time Utilities * Type Traits * Template Parameters -[**9. C++ Templates and Meta-programming II**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/09.Templates_II.pdf) +**10. C++ Templates and Meta-programming II** * Class Templates * Template Meta-Programming -* SFINAE +* SFINAE: Substitution Failure Is Not An Error * Variadic Template * STD Template Utility -[**10. Containers, Iterators, and Algorithms**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/10.Iterators_Containers_Alg.pdf) +**11. Containers, Iterators, and Algorithms** * Containers and Iterators -* Sequence Containers: array, vector, list, deque, forward_list -* Associative Containers: set, map -* Container Adaptors: stack, queue, priority_queue +* Sequence Containers: `array`, `vector`, `list`, `deque`, `forward_list` +* Associative Containers: `set`, `map` +* Container Adaptors: `stack`, `queue`, `priority_queue` * Implement a Custom Iterator * Iterator Utility Methods * Algorithms Library * Lambda Expressions -[**11. Translation Units**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/11.Translation_Units.pdf) +**12. Translation Units** -* Basic concepts, linkage, scope +* Basic Concepts +* Linkage * Variables Storage -* Dealing with Multiple Files and Templates -* #include Issues +* Function Template +* Class Template +* Undefined Behavior and Summary +* `#include` Issues * Namespace -* Libraries +* How to Compile: static and dynamic libraries -[**12. Code Conventions**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/12.Code_Convention.pdf) +**13. Code Conventions** -* Coding Style -* Naming and formatting -* Maintainability and Documentation -* C++ Guidelines +* C++ Project Organization +* Coding Styles and Conventions +* `#include` and `namespace` +* Variables and Prepossessing +* Functions and Classes +* Modern C++ Features +* Control Flow +* Naming and Formatting -[**13. Debugging and Tools**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/13.Debugging_Tools.pdf) +**14. Ecosystem** -* Debugging: Assertion, execution, memory, sanitizers +* Execution Debugging: `gdb` and `assert` +* Memory Debugging: `valgrind` +* Sanitizers: `address`, `leak`, `memory`, `undefined behavior` +* Debugging Summary * CMake -* Code Checking and Analysis: warnings and static analyzers -* Code Quality (Linter) -* Code Testing -* Code Commenting (Doxygen) -* Code Statistics: lines, cyclomatic complexity -* Other Tools: formating, code explorer +* Code Checking and Analysis: `warnings` and `static analyzers` +* Code Quality: `linters` +* Code Testing: `unit test`, `coverage` +* Code Commenting: `doxygen` +* Code Statistics: `lines count`, `cyclomatic complexity` +* Other Tools: code `formating`, `exploring`, `benchmarking` -[**14. Advanced Topics**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/14.Advanced_Topics.pdf) +**15. Advanced Topics** * Move Semantic +* Copy Elision and RVO * Type deduction -* C++ Idioms: rule of three/five, singleton, PILP, CRTP +* C++ Idioms: `rule of zero/three/five`, `singleton`, `PILP`, `CRTP` * Smart Pointers -* Concurrency +* Concurrency: `std::thread` -[**15. Optimization**](https://github.com/FedericoUnivr/Modern-CPP-Programming/blob/master/15.Optimization.pdf) -(ongoing) +**16. Optimization I** -* Concepts: optimization cycles, complexity, performane bounds +* General Concepts: asymptotic complexity, optimization cycle, Ahmdal Law, etc. * I/O Operations -* Memory Locality and Memory Access Patterns +* Locality and Memory Access Patterns * Arithmetic * Control Flow * Functions * C++ Objects + +**17. Optimization II** + * Compiler Optimizations * Libraries and Data Structures * Profiling * Parallel Computing -* Compile Time ### Reporting bugs and contributing ### If you find any typos please report them by using the repository (**issues** panel). -We are also ready to engage in improving and extending the course material. ## Author ## * `Federico Busato`, Dept. of Computer Science, University of Verona (Italy) [federico.busato@univr.it](mailto:federico.busato@univr.it), now Nvidia Corporation ([fbusato@nvidia.com](mailto:fbusato@nvidia.com)) -* `Alessandro Danese`, Dept. of Computer Science, University of Verona (Italy) [alessandro.danese@univr.it](mailto:alessandro.danese@univr.it) ## License ## > BSD 3-Clause License > -> Copyright (c) 2019, Modern C++ Programming +> Copyright (c) 2020, Modern C++ Programming > All rights reserved. > > Redistribution and use in source and binary forms, with or without diff --git a/html/OnlineCompiler.html b/html/OnlineCompiler.html deleted file mode 100644 index 25b7876..0000000 --- a/html/OnlineCompiler.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Online C++ Compilers - -
-
- Wandbox (support different compilers) -
-
-
- C++ Shell -
-
-
- OnlineGdb -
-
-
- IDEone -
-
-
- Cloud9 (online virtual machine) -
-
-
-
- - diff --git a/html/bgimage.jpg b/html/bgimage.jpg deleted file mode 100644 index c582fbd..0000000 Binary files a/html/bgimage.jpg and /dev/null differ