Back to Basics: Type Erasure - Arthur O'Dwyer - CppCon 2019
http://CppCon.org
—
Discussion & Comments: https://www.reddit.com/r/cpp/
—
Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2019
—
This talk, based on Arthur's blog post ["What is Type Erasure?"](https://quuxplusone.github.io/blog/2019/03/18/what-is-type-erasure/), will explain the notion of type erasure as seen in standard library types such as std::function and std::any. We'll see how to build the most naive form of type erasure using heap allocation and virtual functions; then iteratively optimize that design to improve its performance. At the extreme, we'll see how C++2a std::function_ref achieves trivial copyability.
Attendees will leave this session confident in their ability to implement type-erased classes, such as std::function, from scratch.
—
Arthur O'Dwyer
New York
Arthur O'Dwyer is the author of "Colossal Cave: The Board Game," "Mastering the C++17 STL" (the book), and "The STL From Scratch" (the training course). He runs professional C++ training courses, is occasionally active on the C++ Standards Committee, and has a blog mostly about C++.
—
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
*-----*
Register Now For CppCon 2022: https://cppcon.org/registration/
*-----*