Constraining C++ Templates in C++20 and Before
C++ Concepts is one of the most significant and long-awaited features of C++20. They improve template interfaces by explicitly stating the compile-time contract between the user and the architect of the code, which limits the number of compilation errors and makes them much more user-friendly when they occur. The workshop will describe this C++20 feature, its similarities, and differences to Concepts TS (provided with gcc-7), and will present ways to benefit from a significant part of the functionality in current production C++ projects that can use only "legacy" C++11 features.
Preconditions to take part in the workshop:
- Recent working experience with C++ templates.
- A laptop with a web browser and access to the Internet.
- C++ Templates in a Nutshell
- C++ template definition
- Template parameters
- Template specialization
- Introduction to C++20 Concepts
- Concept Definition
- Constraining Types with Concepts
- requires Clause
- requires Expression
- Concept Categories
- C++ Standard Library Concepts
- Constraint Normalization
- Concepts TS
- Major Differences from C++20 Concepts
- Concepts Emulation in C++17
- Type Traits
- Constraining Class Template Parameters
Mateusz is a software architect, principal engineer, and security champion with many years of experience in designing, writing and maintaining C++ code for fun and living.
He worked on many different projects both in large corporations and small Open Source groups. His main areas of interest and expertise are code performance, low latency, stability, and security.
Through all those years he became an expert in many different domains. IP networking, UMTS, WiMax, graphics (OpenGL and DirectX), media, OpenCL, storage devices, finance, GPS navigation are only a few of subjects he worked on up to now. His experience is ranging from creating user applications down to kernel mode drivers.
Mateusz is an active voting member of the ISO C++ Committee (WG21) where, together with the best C++ experts in the world, he shapes the next official version of the C++ language. He is also a member of WG21 Study Group 14 (SG14) responsible for driving performance and low latency subjects in the Committee. In 2013 Mateusz won “Bench Games 2013” – worldwide competition in the C++ language knowledge.