65.9K
CodeProject is changing. Read more.
Home

Generic Algorithms on Runtime Types in C++ Through Type Erasure

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.87/5 (23 votes)

Oct 3, 2017

CPOL

11 min read

viewsIcon

27089

This article describes a C++ technique called type erasure and shows that it can be used to write generic algorithms on runtime types. It then examines the relationship between type erasure and other forms of polymorphism through the notion of type compatibility.

Generic Algorithms on Runtime Types in C++ Through Type Erasure - CodeProject