type erasure

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: 46073

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: 75621

My Newest E-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)

Blog archive

Source Code

Visitors

Today 3386

Yesterday 5806

Week 3386

Month 172803

All 7440643

Currently are 194 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments