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

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

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 2787

All 2667290

Currently are 181 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments