C++ Tidbits – Generic Programming

What is generic programming? In a nutshell is a mechanism that allows the programmer to delay the data type used in a class / method to run time. If my vague description is not enough you could check here.

The main practical reason for generic programming is to avoid duplication. For example one may have a method or class that would need to be duplicated when using different data types. That grows the code base and may be prone to mistakes after copying and editing. Continue reading “C++ Tidbits – Generic Programming”