Copying Value-based Collection Classes
Let us now contrast the results of copying the reference-based collection with the value-based collection. Consider the class:
RWTValOrderedVector<RWCString>
that is, an ordered vector template instantiated for RWCString. In this case, each string is embedded within the collection. When a copy of the collection class is made, not only the collection class itself is copied, but also the objects in it. This results in distinct new copies of the collected objects: