Template pattern v.s. Interface pattern
As a library programmer, the decision between using templates or using inheritance may be a difficult decision. Everyone wants their libraries to be generic. Which pattern is better? Template pattern Templates allow you to write code that does the same thing on…