diff mbox series

[committed] libstdc++: Document when std::string::shrink_to_fit was added

Message ID 20240514133037.424510-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Document when std::string::shrink_to_fit was added | expand

Commit Message

Jonathan Wakely May 14, 2024, 1:30 p.m. UTC
Pushed to trunk.

-- >8 --

This section can be misread to say that shrink_to_fit is available from
GCC 3.4, but it was added later.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/strings.xml: Clarify that GCC 4.5 added
	std::string::shrink_to_fit.
	* doc/html/manual/strings.html: Regenerate.
---
 libstdc++-v3/doc/html/manual/strings.html | 4 ++--
 libstdc++-v3/doc/xml/manual/strings.xml   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libstdc++-v3/doc/html/manual/strings.html b/libstdc++-v3/doc/html/manual/strings.html
index ceb09f97eac..34a34dfa980 100644
--- a/libstdc++-v3/doc/html/manual/strings.html
+++ b/libstdc++-v3/doc/html/manual/strings.html
@@ -269,8 +269,8 @@  stringtok(Container &container, string const &in,
       (see <a class="link" href="../faq.html#faq.size_equals_capacity" title="7.8.">this FAQ
       entry</a>) but the regular copy constructor cannot be used
       because libstdc++'s <code class="code">string</code> is Copy-On-Write in GCC 3.
-   </p><p>In <a class="link" href="status.html#status.iso.2011" title="C++ 2011">C++11</a> mode you can call
-      <code class="code">s.shrink_to_fit()</code> to achieve the same effect as
+   </p><p>From GCC 4.5 in <a class="link" href="status.html#status.iso.2011" title="C++ 2011">C++11</a> mode you
+      can call <code class="code">s.shrink_to_fit()</code> to achieve the same effect as
       <code class="code">s.reserve(s.size())</code>.
    </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.Cstring"></a>CString (MFC)</h3></div></div></div><p>
     </p><p>A common lament seen in various newsgroups deals with the Standard
diff --git a/libstdc++-v3/doc/xml/manual/strings.xml b/libstdc++-v3/doc/xml/manual/strings.xml
index b0dab645a2d..4a63dd96477 100644
--- a/libstdc++-v3/doc/xml/manual/strings.xml
+++ b/libstdc++-v3/doc/xml/manual/strings.xml
@@ -356,8 +356,8 @@  stringtok(Container &amp;container, string const &amp;in,
       entry</link>) but the regular copy constructor cannot be used
       because libstdc++'s <code>string</code> is Copy-On-Write in GCC 3.
    </para>
-   <para>In <link linkend="status.iso.2011">C++11</link> mode you can call
-      <code>s.shrink_to_fit()</code> to achieve the same effect as
+   <para>From GCC 4.5 in <link linkend="status.iso.2011">C++11</link> mode you
+      can call <code>s.shrink_to_fit()</code> to achieve the same effect as
       <code>s.reserve(s.size())</code>.
    </para>