From the Modern Maintainable Code blog:
by Mark Isaacson
This is the second article of a series on code reuse. This article provides a discussion of how to approach the problem of having multiple implementations of a single idea and how to programmatically select between them based on patterns in the type information of the parameters.
Out in the real world, functions like
use the same techniques discussed to leverage std::memcpy internally when it's safe to do so.