Type Erasure

Download c++ eBook

Introduction

Type erasure is a set of techniques for creating a type that can provide a uniform interface to various underlying types, while hiding the underlying type information from the client. std::function<R(A...)>, which has the ability to hold callable objects of various types, is perhaps the best known example of type erasure in C++.

Related Examples

Stats

183 Contributors: 5
Thursday, March 16, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook