Type Erasure

Type Erasure

Type erasure based on templates is a pretty sophisticated technique. It allows you to bridge dynamic polymorphism (object orientation) with static polymorphism (templates).

Read more
Views: 28106

C++ Core Guidelines: Type Erasure with Templates

In the last post C++ Core Guidelines: Type Erasure, I presented two ways to implement type erasure: void pointers and object orientation. In this post, I bridge dynamic polymorphism (object-orientation) with static polymorphism (templates) to get type erasure with templates.

Read more
Views: 57696

C++ Core Guidelines: Type Erasure

Rule "T.5: Combine generic and OO techniques to amplify their strengths, not their costs"  of the core guidelines to generic programming uses type erasure as an example. Type erasure? Really! Of course, it takes me two posts to explain this advanced template technique.

Read more
Views: 91902

Mentoring

Stay Informed about my Mentoring

 

English Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Interactive Course: The All-in-One Guide to C++20

Subscribe to the newsletter (+ pdf bundle)

All tags

Blog archive

Source Code

Visitors

Today 1058

Yesterday 4552

Week 42172

Month 186343

All 11667497

Currently are 132 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments