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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment