Assume this declaration:
#include <vector>
typedef int int2[2]; // pair of integers
typedef std::vector<int2> vi2; // vector of integer pairs
Now, this vi2
is not really usable. You cannot resize or add items to it.
Why is this not allowed?..
(Obviously to fix it int2
would need to be wrapped in a struct or a pair, but this is irrelevant).