C++ Type Erasure: Wrapping Any Type

Understanding how to write a wrapper of any type in a class in C++ to increase the level of abstraction in our code.

Debby Nirwan
Towards Data Science
6 min readOct 28, 2021

--

Photo by AltumCode on Unsplash

Introduction

We start with some basics about Generic Programming, Object Oriented Programming, and Duck Typing concepts to understand what problems this technique tries to…

--

--