Loading…
CppCon 2019 has ended
Friday, September 20 • 13:30 - 14:30
Back to Basics: Type Erasure

Log in to save this to your schedule and see who's attending!

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.

Speakers
avatar for Arthur O'Dwyer

Arthur O'Dwyer

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... Read More →


Friday September 20, 2019 13:30 - 14:30
Aurora A

Attendees (300)




Twitter Feed