I believe Haskell did that for decades before C++.

Haskell was created in 1990, five years after C++.

Haskell had generics from the beginning. Whereas C++ only added templates to its specification in 1998.

Miranda had it since its release in 1985.

I was using the STL in 1994 with Zortech C++