Reference: The C++ Standard Library: A Tutorial and Reference
Friday, June 4, 2010
data() and c_str() can invalidate iterators
A call to data() or c_str() can invalidate pointers, references, and iterators referring to characters of a string, because these functions may cause copying of the data to another buffer.
Reference: The C++ Standard Library: A Tutorial and Reference
by Nicolai M. Josuttis. Addison-Wesley, 1999, p. 488.
Reference: The C++ Standard Library: A Tutorial and Reference
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment