Talk: C++ Insights: See your source code with the eyes of a compiler

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 to 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 how 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.