by your logic, a vector with 3 elements is a different type to a vector with 4 elements. this is where original pascal famously went off the rails
It is actually dependent typing.
Not being able to express types properly is a major issue in c++ and in all other programming languages that do not allow this kind of typing.
The lack of this facility prohibits programmers for declaring their intent properly to the compiler, forcing programmers to keep that information in their head.
To me, it's the no 1 issue that c++ must deal with. It will solve a myriad of problems.