This is an automated email from the git hooks/post-receive script.
sparks pushed a commit to branch master
in repository defensive-coding-guide.
commit e6ed150d2b97ffeecfdc00fd04c154307486f87d
Author: Florian Weimer <fweimer(a)redhat.com>
Date: Thu Sep 19 15:08:53 2013 +0200
C++: Subscripting to read the NUL character in std::string not supported
---
defensive-coding/en-US/CXX-Std.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/defensive-coding/en-US/CXX-Std.xml b/defensive-coding/en-US/CXX-Std.xml
index b221949..56e1ad0 100644
--- a/defensive-coding/en-US/CXX-Std.xml
+++ b/defensive-coding/en-US/CXX-Std.xml
@@ -115,6 +115,10 @@
Use the <function>at(size_type)</function> member function
instead. See <xref
linkend="sect-Defensive_Coding-CXX-Std-Subscript"/>.
+ Furthermore, accessing the terminating NUL character using
+ <literal>operator[]</literal> is not possible. (In some
+ implementations, the <literal>c_str()</literal> member function
+ writes the NUL character on demand.)
</para>
<para>
Never write to the pointers returned by
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date