Technically, operators are syntax sugar for specific functions. So only bonus you will have is better (probably) interface.
and does vector subscription operator overloading require a size for the vector?
I don't get your question. std::vector subscript operator takes integral value representing index of element you want to access.
You are not limited to integers (or single argument) if you want to provide overload for your own class. For example std::map has operator[] overload for key type. That means if you have std::map<std::string int> x, you can do x["hello"] = 5;
But you should know that default constructed vector has 0 elements and does not have valid indexes, so using subscript operator on it is meaningless and illegal. As soon as you add at least one element, you can use index of that element in subscript operator.
What is the v class? why its operator refers to some global vector?
And no, vec does not contain any elements yet, so you cannot access them until you add them.
For maps it does add unexistent elements to it. For vector it is just access to existing element without bouds checking.
It would be a problem if vector creates elements when they are accessed.
For example you have vector with one element and you do v[100] = 42. What should happen to elements 1-99? What state they should be in? How to effectively store all that information?
Because of that, vector do not add or remove values automatically.
In your class, you can make your overload to do those things if you want.