Welcome to our last meetup for the year of 2023.
This time Dimitris Platis will give a talk about SFINAE.
We are kindly hosted and sponsored by Evidente this time
ABSTRACT
If you are into C++, you may have heard of SFINAE. It's an obscure principle where errors are... OK.
SFINAE stands for Substitution Failure Is Not An Error. It's used with templates and allows us to select one implementation over another based on "characteristics" or "traits" of the types we use.
For example, let's assume we have a Player class template with an Addon type as a template parameter.
The Addon can be a Car, a Bicycle, a Boat, a Jetpack, a Horse, a Helicopter, etc.
We implement a method called move(), which does different things depending on the Addon:
- Travel by air if the Addon provides flying capabilities
- By land if the Addon provides driving capabilities
- By sea if the Addon provides sailing capabilities
SFINAE allows us to select the correct implementation of move() based on the Addon type.
The goal of the talk is to help you get comfortable with SFINAE.
We present and explain multiple examples so that by the end of it, you will be able to understand, write, and know when to use SFINAE and when NOT to.
Prerequisites
You need to be fairly comfortable with classes, templates and C++.
We will thoroughly explain SFINAE assuming no knowledge on the subject, however due to time constraints we may avoid into C++ fundamentals.
ABOUT EVIDENTE
Evidente is a Swedish engineering company, committed to key aspects of developing products with embedded systems. Our customers include some of the leading Scandinavian high-tech companies, all sharing the same level of expectation - Embedded Excellence.
AGENDA
18:00 - Doors open, with fika/snacks/food and mingling
18:30 - Event starts, welcome from Evidente
18:40 - Speech starts
20:00 - Event finishes
Welcome!