John L Fjellstad wrote:
> John Harrison wrote:
>
>
>>Yes, except possibly std::string which might use reference counting with
>>copy on write rather than a deep copy. Either way the observable behaviour
>>is the same.
>
>
> Is std::string considered a standard container, though?
>
Sort of. Not really. Stroustrup classifies it as an "almost container".
It has many of the properties of containers, but not all. It can be used
by many of the standard algorithms. I'm not sure off the top of my head
what it is that disqualifies it as a "real" container.
-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
|