Proceeds to be donated to New York disaster relief. Problem JG Question 1. Be as complete as you can, and be sure to explain why there are two template parameters and not just one. There is a subtle genericity trap in the following functions. If so, demonstrate how, and argue whether doing so is a good idea or a bad idea.
Templates provide powerful compile-time polymorphism.
When we think of polymorphism in an object-oriented world, we think of the kind of runtime polymorphism we get from using virtual functions. Doesn't draw big crowds these days. Be as complete as you can, and be sure to explain why there are two template parameters and not just one. Assuming that we want to allow the programmer to be able to do such things without explicitly naming types, we need to use the originally-presented version that has two independent template parameters. There is a subtle genericity trap in the following functions.