https://www.learncpp.com/cpp-tutorial/function-templates/

https://www.geeksforgeeks.org/templates-cpp/

  template <typename T>
class Array {
public:
    Array(T arr);
}


int main(){
    Array<int> a(arr);
}
  

Result:

  
class Array {
public:
    Array(int arr);
}


int main(){
    Array a(arr);
}