Patrice Roy has been playing with C++ either professionally, for pleasure or (most of the time) both for almost 30 years. After a few years doing R&D and working on military flight simulators, he has moved on to academics and has been teaching computer science since 1998. Since 2005, he has been involved more specifically in helping graduate students and professionals from the fields of real-time systems and game programming develop the skills they need to face today’s challenges.
Patrice has been a participating member in the ISO C++ Standards Committee since late 2014 and has been involved with the ISO Programming Language Vulnerabilities working group since late 2015. He has five kids, and his wife ensures their house is home to a continuously changing number of cats, dogs and other animals.
Generic programming has been both a scary aspect and a strength of C++ for decades now. Seen as something that is often complex to express yet easy to use, this programming paradigm pervades contemporary C++ programs, and many are those who use the standard library without noticing how much of it is made of generic types and algorithms.
This course proposes an exploration of generic programming through many lenses. From relatively simple use cases, we will move to expressing one’s own generic types, writing efficient and safe generic containers and algorithms, writing and using type traits, solving real problems through template metaprogramming (the reputedly scary part; we’ll make it fun), variadic templates, programming with constexpr, fold expressions, and getting acquainted with the beauty of concepts. In the end, we will write less code to get better results.
The target audience is intermediate-level developers who:
Junior developers can benefit from this course if they are willing to explore this part of the C++ language. Developers coming to C++ from another language might find the course surprisingly instructive, as they might gain a better understanding of the workings of other languages too – generic programming in C++ is quite different from generic programming in Java or C# programmers. More advanced developers might also enjoy this course if looking for a greater familiarity with modern C++ and its usefulness in their daily tasks. Please examine the Selected Approach and Expected contents sections below to ensure you make the right choice for your needs.
This course will concentrate on standard C++ and avoid most compiler-specific and operating system-specific techniques and tools.
Since the class will involve problem-solving exercises, participants must bring their laptops (or equivalent development tool) and at least one recent C++ compiler of their choice; compilers that support at least C++ 17 (ideally C++ 20) are obviously preferable given the subject matter. As mentioned previously, we will strive to constrain ourselves to standard C++ only, and will be avoiding non-portable or platform-specific code as much as possible.
The format for this course will be a combination of lecture-style presentation of features and tricks and exercise solving. We will typically start with a concrete problem to solve, and a minimal objective to achieve, and work towards reaching that objective for some short time. A presentation of potential solutions will follow, accompanied by a discussion where participants’ input is encouraged.
Topics covered in this course include:
The workshop takes place on the weekend prior to the start of the conference (July 16 & July 17). Find out more details about fees and about the schedule here.