Topic: basic_string& operator=(const basic_string&)
Author: "john (j.d.) hickin" <hickin@bnr.ca>
Date: 1996/02/06 Raw View
The following was taken from a copy of the DWP:
basic_string<charT,traits,Allocator>&
operator=(const basic_string<charT,traits,Allocator>& str);
Effects:
If *this and str are not the same object, modifies *this such that:
Table 7--operator=(str) effects
+-------------------------------------------------+
| Element Value |
+-------------------------------------------------+
|data() points at the first element of an |
| allocated copy of the the array |
| whose first element is pointed at |
| by str.size() |
|size() str.size() |
|capacity() a value at least as large as size() |
+-------------------------------------------------+
If *this and str are the same object, the member has no effect.
Returns:
*this
Aside from a seeming typographical error in the Value column for Element data()
(... by str.data() ?) the wording of this seems to rule out a counted pointer
representation.
Is my interpretation correct?
--
John Hickin Bell-Northern Research, Montreal, Quebec
(514) 765-7924 hickin@bnr.ca
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is
in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]