Skip to content

C++ Type Erasure allows the creation of polymorphic value data types – Michael Hava using std::cpp 2024

Michael Hava gave a presentation on C++ Type Erasure at the conference “using std::cpp 2024” from April 24-26 at the Universidad Carlos III de Madrid.

Runtime polymorphism is realized in C++ with the virtual keyword. This approach requires the use of “reference semantics” and contradicts the concept of value semantics, which forms the basis for the STL. The “type erasure” idiom allows the creation of polymorphic value data types. Although there is no dedicated language support, it is an important tool for creating loosely coupled architectures and should be familiar to any advanced C++ developer. The talk presents the basic implementation techniques and discusses the use of type erasure in the standard library.

The whole lecture is available on YouTube:

About Michael Hava


Michael Hava, Senior Software Developer and C++ expert at RISC Software GmbH, is part of the C++ standardization committee. He joined RISC Software in 2011 during his master studies at the University of Applied Sciences Upper Austria – Campus Hagenberg. Since then, he has promoted the introduction of modern C++ in various areas of engineering. With the aim of extending this promotion to education, he returned to his former university of applied sciences as a part-time lecturer in 2016. After attending his first C++ standardization meeting in 2019, he became a founding member of the Austrian C++ working group and serves as chair of the national committee. He remains in the LEWG most of the time and several of his papers are already accepted for C++26.









    Michael Florian Hava, MSc

    Senior Software Architect

    Read more