Dima T wrote:
It is possible more in detail. It is not strong in modern With ++.
In With ++ is not present , i.e. realloc () it is not used.
the call realloc' did not mean. It is simply convenient term designating certain sequence of actions in implementation std:: vector'. For example, in the dock is used the term "Reallocation". Not an essence, in general.
Dima T wrote:
Magnification of the size of a vector it at least memcpy () if thus to stop calls and designers it is possible to spare on it time.
memcpy looking for what. For POD-types memcpy - quite to itself the decision.
And here for complex types of classes and structures not all so is simple. At least because the object in a vector then at all will not have a possibility though somehow to notify an external world that it appears moved to the new address. Well or at least because in object pointers can be saved internal fields (why not?) that makes them after copying in a new place. Generally, there are no warranties that memcpy'ed the object will work , for it Implementation Defined. Therefore on the classic of old pluses, are caused copy-ctor'y on just selected piece of storage through placement new and then . It is clear that on an idea the designer of copying creates an object copy while move-ctor simply changes possession of internal resources of object. I advise to look this short video from Jayson Turner who on a bright example explains as it works.