4 ms·
>An std::vector is a vector in the mathematical sense No, because you can't prove that std::vector<T> obeys all vector space axioms[1] for all T, which is good
by Banana699 4y ago
>An std::vector is a vector in the mathematical sense
No, because you can't prove that std::vector<T> obeys all vector space axioms[1] for all T, which is good because it's impossible, I can trivially define a T that will break any number of axioms and the cpp compiler will happily let me instantiate std::vector on it.
[1] https://www.math.ucla.edu/~tao/resource/general/121.1.00s/vector_axioms.html https://www.math.ucla.edu/~tao/resource/general/121.1.00s/ve...