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.
(cherry picked from commit
0a99ad5c52caa06c113b1889bbe6634812b89be5)
(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
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>