Content „What’s new in C++11, C++14, C++17 and C++20“
A C++ training for experienced C++ programmers who want to learn the latest C++11, C++14, C++17 and C++20 extensions with Visual Studio 2022.
C++ has been greatly extended in recent years (C++11, C++14 and C++17). The new standard is called C++ 17 and makes programming with C++ easier, safer, more elegant and more efficient. The extensions include
- initializer lists (which simplify initializations and check for type safety), lambda expressions (which simplify callback functions and the use of STL algorithms), simplifications in class definition, safer conversions, move semantics (which is faster), etc.
- new classes of the standard library (STL) such as faster hash containers, smart pointers (which often avoid memory leaks), multithreading classes (for parallel execution of threads), Unicode strings, etc.
- parallel algorithms of the standard library, which are significantly faster than before C++17 simply by specifying another argument.
The contents (here detailed as pdf) of this course can be adapted to the wishes of the participants.
1. What’s new in the Visual Studio 2022 IDE
- New features for the Editor, Refactoring, Debugger, Solution Explorer etc.
- The Visual Studio C++ Core Guideline Checker
2. Core features from C++11, C++14 and C++17
- The data types long long and unsigned long long
- The null pointer literal nullptr
- Binary Literals and Separators
- Strongly typed enumeration types (enums)
- inline variables
- constexpr Values and Functions
- Variable definitions and constexpr in if and switch
- Type inference: Implicit type assignments with auto and decltype
- The range-based for loop
- Initializer lists – type-safe and uniform initialization
- Explicit constructors and conversion functions
- Move Semantics
- R-value References
- In the Standard Library
- Implementing in Your Own Classes
- Compile time assert: static_assert
- What’s new for Classes
- override, final, extended friend declarations
- =delete and =default
- Delegating Constructors and Implicitly Created Constructors
- Initializer for non-static data elements
- Attributes
- Compiler Feature Tests
- Macros with … (Variadic Macros)
3. Function objects and lambda expressions
- The call operator (), predicates and arithmetic function objects
- Binder, functional adapter
- The function-wrapper std::function
- Lambda expressions
4. Templates and the STL
- Generic Functions: Function Templates
- Generic Classes: Class Templates
- type traits
- Type inference in templates with decltype
5. STL algorithms and lambda expressions
With lambda expressions, the standard library algorithms can be used more easily.
- The different types of iterators
- Using STL algorithms with lambda expressions
6. Extensions of the standard library (STL)
- Move semantics and optimization on the basis of type traits#
- Extensions for Strings
- The string classes u16string and u32string
- conversion functions
- „raw string Literale, Unicode String Literale
- string_view
- Enhancements for Container Classes
- Iterators, memory management for vectors, emplace for containers
- Enhancements for Stream Classes
- Unordered Associative Containers (Hash Containers)
- Regular expressions
- Fixed Size Array Container
- tuples
- random numbers
- New Algorithms
- The Exception Class system_error
- Filesystem
- Parallel Algorithms
7. Smart pointer (C++11)
- unique_ptr
- shared_ptr
- weak_ptr
- exception_ptr
8. Multithreading (C++11)
- The thread class
- Starting Functions and Lambda Expressions as Threads
- Exceptions in Threads
- Pass on an exception with promise
- Critical sections, mutexes and lock_guard
- Atomic data types
- Avoiding deadlocks
- Thread-Local Variables
- Futures, Promises and async
- Condition variables for thread synchronization
About this C++ Training
Target audience for this C++ training
Experienced C++ programmers who want to learn the state of the art C++ (C++11, C++14 and C++17).
Requirements: Good knowledge of C++
Teaching style of the C++ course
Lecture with many examples. A balanced combination of theory and practice.
- At the beginning of a new topic, an overview of applications, basic ideas and syntax is given.
- The concepts and the syntax are illustrated by using carefully selected and proven examples. Often, best practices“ are presented.
- The manuscript contains numerous practical exercises.
- If desired, tasks from the work of the students can also be dealt with. This should be arranged before the start of the training.
Training Materials
Extensive and detailed training materials (approx. 200 pages) – Full text, no PowerPoint slides containing only keywords. Therefore, the course materials can also be used as a reference at work.
Place and time of this C++ training
This seminar is offered as an inhouse seminar (at your site). The implementation as a face-to-face seminar is preferred, but is also possible as an online seminar. Dates by arrangement.
Duration: 5 days
Lecturer
Prof. Richard Kaiser has been conducting seminars for companies for many years, mainly on software development and the programming languages C#, C++ and C. He knows the requirements of practice and addresses them in detail, both in the basic concepts and in the details. His clients include renowned global corporations and small and medium-sized enterprises. He is the author of several books on C++, most recently „C++ mit Visual Studio 2019“. He was a member of the DIN standardization committee Information Technology NI-22 for many years.