Programming in C++17
Course objectives
Delegates will learn:
- new elements of the C++ language and standard library introduced in the C++17 standard
- structured bindings for tuples, structs, and user types (tuple protocol)
- control flow statements with an initialization section
- use of constexpr if in generic code
- new features in C++ templates, such as parameter deduction for template classes (CTAD) and fold expressions
- new types available in the Standard Library
std::string_view,std::optional,std::any, andstd::variant - concurrent algorithms - Parallel STL
Course syllabus
C++17 – new language features
- Structured bindings
ifandswitchstatements with initializers- Static inline class members
- Aggregates in C++17
- Copy Elision and Return Value Optimisation (RVO)
- Using new attributes -
[[nodiscard]],[[maybe_unused]], etc. - Nested namespaces
- Lambda expressions in C++17
constexprin C++17
C++17 – novelties in templates
- constexpr if in generic code
- Class Template Argument Deduction - CTAD
- Fold expressions
- Pack expansion in using declaration
- Template NTTP params with
autoplaceholder - Variable templates with
auto - New tools in standard library
type_traitsimprovements- new tools:
std::invoke, etc.
C++17 – what’s new in the Standard Library
std::bytestd::string_viewstd::optionalstd::variantand visitation mechanism- Dynamic objects -
std::any - Handling files in C++17
- New text conversion functions
- Multithreading extensions -
std::scoped_lockandstd::shared_lock
STL in C++17
- New STL algorithms in C++17
- Parallel algorithms - Parallel Execution Policies
C++20 – novelties
- Concepts
- Ranges library
Prerequisites
Attendance of our Programming in C++11/14 course or equivalent experience with C++