C++ Function Template
Template is powerful in C++, you can do all sort of crazy thing
template 
T fun(T a, T b){
    return a + b;
}
// You can use default argument too
template 
T fun(T a, T b = 0){
    return a + b;
}
C++ class template
template
class MyClass{ 
    public:
        MyClass(T a, T b=0){
        }
};