With the help of C++ Insights we'll dive into how things work in C++, through the eyes of the compiler.
We'll look at cases like implicit conversions and in-class initializers. We'll also walk through how the compiler generates lambdas and explore why you might care.
And of course this is C++ so it would be remiss of us not to also take a peek at one of our favourite C++ features: variadic templates!
Welcome to the compiler's world with C++ Insights, and at the very least come away from the talk with a whole new way of looking at the code you write!
Target Audience: Entwickler, Developers
C++ is not an easy language. While its intention, especially with the new Standards since C++11, is to shift more work from the developer to the compiler, this is sometimes perceived as opaque. Knowing what a statement does, is vital not only in embedded software development. It is also important while teaching C++ when questions come up like "when and where are operators involved" or "in which places do we get an implicit type conversion".
There are tools which can show us the resulting output, like Matt Godbolt's Compiler Explorer or Clang's AST dump. However, the resulting output is not C++. This makes it hard to understand for a C++ developer. As a C++ programmer, my first language is after all, C++. The Clang based tool C++ Insights (https://cppinsights.io) addresses this. It aims to show the source code with the eyes of a compiler through a source to source transformation where the resulting output is still C++. All the intentionally hidden things becomes visible.
In this talk, I will present C++ Insights and how it can assist you with teaching or programming. We will peak into the implementation of C++ Insights to see how it is implemented. Of course, I also will point out the limitations of the program.