C++ Insights: See your source code with the eyes of a compiler
summary
C++ Insights is a Clang-based source-to-source tool that shows what the compiler actually does by transforming code back into readable C++, emitting things like implicit integer promotions, temporary copies from post-increment, lambda closure classes with captured members, and range-for expansion. It runs as a website or CLI, aims to produce compilable C++ output, relies on the Clang AST, and exposes template instantiations (with placement limitations), stdlib noise, partial C++17/C++20 support, and compiler warnings so invisible behavior becomes visible.
AI-written summary · about
chapters (25)
- 0:00Introduction to speaker
- 1:30Why C++ Insights exists
- 4:22Demonstrating implicit casts
- 6:11Tool goals and open source
- 7:54Limitations and AST
- 11:05Handling templates
- 14:45AST complexity and purpose
- 17:22Default arguments
- 18:46Object initialization
- 22:31Narrowing and warnings
- 24:41In-class member initialization
- 27:17Lambda expressions
- 30:41Constexpr parameters
- 33:01Range-based for loops
- 35:09Iterators and const map keys
- 38:30For loops with initializers
- 40:19Multiple initializations
- 42:01Variadic templates and fold
- 44:57Template overload resolution
- 48:00Constexpr if
- 48:27Else if and static assert
- 51:18Template parameter types
- 52:39Fold expressions demo
- 54:25Generic lambdas
- 56:30Conclusion and Q&A
related talks
01h 04mC++ Insights: Peek behind the curtains of your C++ compiler
01h 08mReflections: Compile-time Introspection of Source Code
48mOptView2 - Helping the Compiler Generate Better Code
01h 16m“What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”
32mTeaching Old Compilers New Tricks: Transpiling C++17 to C++11
55mHow to Implement Your First Compiler Feature:The Story of Concepts in Clang
47mAutomatic C++ source code generation with clang
51mCompile-time tools supporting generic programming in C++
