This class has been canceled.
Modern C++ Training Essentials is a two-day online training course with programming examples, taught by Mike Shah. It is offered at the Gaylord Rockies from 09:00 to 17:00 Aurora time (MDT) on Saturday and Sunday, September 14th and 15th, 2024 (immediately prior to the conference). Lunch is included.
Course Description
The Modern C++ Training course provides you with an overview of C++11/14/17/20 language and library features.
Modern C++ changes the way we write code, by providing a more expressive language to write high performance and maintainable code. We will begin with an introduction to modern C++ with core C++11 standard language features which provide quality of life improvements for all C++ programmer (e.g. auto, ranged-based for, enhanced enums, constexpr, lambda expressions, smart pointers, std::function, and threading support).
This training will proceed to show new advancements in the language and library to enhance code writing capabilities for application and library developers.
Prerequisites
Attendees should have some C++98 or C++03 experience, and otherwise basic ability to write and compile C++ programs.
Course Topics
- Section 1 – Overview of Modern C++ Language
- Overview: Provide attendees an overview of the Modern C++ language. This day will focus primarily on the quality of life improvements from C++11.
- C++ Evolution
- History of the language
- Why we should care and be excited
- High level overview of Modern C++ ‘s most important features focusing on making a more expressive and readable language
- Example converting legacy C++98 to C++11
- ranged-for
- nullptr
- auto
- enhanced enums
- Initialization and Uniform Initialization Syntax
- Initializer Lists
- lambda expressions
- Copying versus moving
- decltype
- using
- trailing return types
- std::function
- Attendee Exercise: Setting up code exercises and Practicing the Conversion
- Example converting legacy C++98 to C++11
- High level overview of Modern C++ ‘s most important STL Library Features
- Example converting legacy C++98 to C++11 STL Code
- Why you should care about the STL, even if you don’t want to use the STL
- Example converting legacy C++98 to C++11 STL Code
- Some notes on motivation, design of library, and parallel support.
- New STL C++11 Containers
- New STL C++11 Algorithms
- Attendee Exercise: Using new STL library features
- Day recap and takeaways
- Section recap and takeaways
- C++ Evolution
- Overview: Provide attendees an overview of the Modern C++ language. This day will focus primarily on the quality of life improvements from C++11.
- Section 2 – Overview of Modern C++ Language Continued
- Overview: Provide attendees an overview of the Modern C++ language. This day will focus primarily on the quality of life improvements that also came beyond C++ 11 (i.e. 14/17/20).
- High level overview of Modern C++ ‘s most important features focusing on enhancements to performance and safety
- General Utilities
- pair, tuple, optional, variant
- Language Semantics
- Revisiting object ownership and lifetime
- C++ Memory Model
- Attendee Exercise: on ownership and lifetime
- Smart Pointers
- unique_ptr
- shared_ptr
- weak_ptr
- Attendee Exercise/Game: Choose the right pointer
- Concurrency
- thread, locking, and async support
- Attendee Exercise: on ownership and lifetime
- General Utilities
- Section recap and takeaways
- High level overview of Modern C++ ‘s most important features focusing on enhancements to performance and safety
- Overview: Provide attendees an overview of the Modern C++ language. This day will focus primarily on the quality of life improvements that also came beyond C++ 11 (i.e. 14/17/20).
- Section 3 – Libraries
- Overview: This day will focus on how to write better library code.
- Enhancements to Library Code Writers
- RAII revisited
- Writing a class in Modern C++
- default member functions
- delete
- Default member initialization
- Deduction guides (CTAD and ADL)
- Delegating Constructors
- Inheriting Constructors
- Alignment control (alignof, alignas)
- Attendee Exercise: Writing a class
- Compile-time computation
- revisiting ‘constexpr’
- A better ‘assert’ static_assert
- Templates and Concepts
- Template Basics
- Templates and generic programming
- Concepts in C++20
- Attendee Exercise: Writing and debugging templates
- Section recap and takeaways
- Enhancements to Library Code Writers
- Overview: This day will focus on how to write better library code.
- Section 4 – Modern C++ Tooling and Software Construction
- Overview: This day will focus on software design and tooling for larger scale projects.
- How to start a Modern C++ Project
- Environment setup
- Tooling
- How to remember all of the new things we have learned
- Linters (e.g. cppcheck, clang-tidy)
- Attendee Exercise: Find the warnings!
- How to write safer code:
- Static and dynamic analyzers
- How to remember all of the new things we have learned
- Modern C++ Software Design
- The Rule of 0/3/5
- Policy-based design with templates
- Compile-time and Run-time Polymorphism revisited
- Attendee Exercise: Writing a class/library
- Performance and tooling Revisited • Profile-Guide Optimizations
- Link-Time Optimization
- How C++20 modules may improve compilation time
- Attendee Exercise: Find the warnings!
- Link-Time Optimization
- Where to get better at C++ • Resources
- Section recap and takeaways
- How to start a Modern C++ Project
- Overview: This day will focus on software design and tooling for larger scale projects.
Register Here
Course Instructor
Mike Shah is currently an Associate Teaching Professor at Northeastern University in the Khoury College of Computer Sciences. His primary teaching interests are in computer systems, computer graphics, and software engineering. His research interests are related to performance engineering (dynamic analysis), software visualization, and computer graphics.
In the past several years, Mike has enjoyed speaking and training at professional programming conferences such as CppCon, C++ on Sea, Core C++, ACCU, DConf, and Handmade Seattle.
Along with teaching, training, and research work, Mike has occasional juggles consulting work as a 3D Senior Graphics Engineer using Modern C++.