definition of templated function in header c++
function templates are special functions that can operate with generic types this allows us to create a function template whose functionality can be adapted to more than one type or class without repeating the entire code for each type in c++ this can be achieved using template parameters a template parameter is a special kind of parameter that can be used to pass a type as argument just like regular function parameters can be used to pass values to a function template parameters allow to pass also types to a function