C++ Type Traits Without Compiler Intrinsics - The Promise of Static Reflection in C++
summary
Argues that C++ static reflection (C++26 value‑based meta::info and the uni‑brow reflection operator) makes many existing type traits implementable without compiler intrinsics, showing a proof‑of‑concept (Gobbolt, Bloomberg/Clang) and experimenting with Microsoft Copilot for code generation. Maps trait implementations across MSVC (≈ one third template, rest intrinsics), Clang (mostly intrinsics), and GCC (between), and claims this could yield a more portable standard library and simpler trait maintenance.
AI-written summary · about
chapters (10)
- 0:00Introduction and agenda
- 1:33Speaker introduction
- 3:07Introduction to type traits
- 11:18Template-based implementation
- 20:17Compiler-internal implementation
- 28:36Analysis of current challenges
- 32:47Static reflection in C++26
- 43:57Discarded type-based reflection
- 45:29Reflection-based type traits
- 53:40Summary and future prospects
