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
Comments 3Views: 11928

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
Add CommentViews: 26795

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 168

All 2054338

Currently are 98 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments