Commit b06a1ea5 by Jonathan Wakely Committed by Phil Edwards

howto.html: Correct nasting of XHTML elements.

2002-10-12  Jonathan Wakely  <jw@kayari.org>
            Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* docs/html/21_strings/howto.html#5:  Correct nasting of XHTML
	elements.  Correct allocator-related text.

Co-Authored-By: Gabriel Dos Reis <gdr@integrable-solutions.net>

From-SVN: r58080
parent c0b80fec
2002-10-12 Jonathan Wakely <jw@kayari.org>
Gabriel Dos Reis <gdr@integrable-solutions.net>
* docs/html/21_strings/howto.html#5: Correct nasting of XHTML
elements. Correct allocator-related text.
2002-10-11 Benjamin Kosnik <bkoz@redhat.com> 2002-10-11 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/22_locale/static_members.cc (test02): Fix. * testsuite/22_locale/static_members.cc (test02): Fix.
......
...@@ -350,26 +350,28 @@ ...@@ -350,26 +350,28 @@
<p>That's the theory. Remember however that basic_string has additional <p>That's the theory. Remember however that basic_string has additional
type parameters, which take default arguments based on the character type parameters, which take default arguments based on the character
type (called CharT here): type (called CharT here):
<pre> </p>
<pre>
template &lt;typename CharT, template &lt;typename CharT,
typename Traits = char_traits&lt;CharT&gt;, typename Traits = char_traits&lt;CharT&gt;,
typename Alloc = allocator&lt;CharT&gt; &gt; typename Alloc = allocator&lt;CharT&gt; &gt;
class basic_string { .... };</pre> class basic_string { .... };</pre>
Now, <code>allocator&lt;CharT&gt;</code> will probably Do The Right <p>Now, <code>allocator&lt;CharT&gt;</code> will probably Do The Right
Thing by default, unless you need to do something very strange with Thing by default, unless you need to implement your own allocator
memory allocation in your characters. for your characters.
</p> </p>
<p>But <code>char_traits</code> takes more work. The char_traits <p>But <code>char_traits</code> takes more work. The char_traits
template is <em>declared</em> but not <em>defined</em>. template is <em>declared</em> but not <em>defined</em>.
That means there is only That means there is only
<pre> </p>
<pre>
template &lt;typename CharT&gt; template &lt;typename CharT&gt;
struct char_traits struct char_traits
{ {
static void foo (type1 x, type2 y); static void foo (type1 x, type2 y);
... ...
};</pre> };</pre>
and functions such as char_traits&lt;CharT&gt;::foo() are not <p>and functions such as char_traits&lt;CharT&gt;::foo() are not
actually defined anywhere for the general case. The C++ standard actually defined anywhere for the general case. The C++ standard
permits this, because writing such a definition to fit all possible permits this, because writing such a definition to fit all possible
CharT's cannot be done. (For a time, in earlier versions of GCC, CharT's cannot be done. (For a time, in earlier versions of GCC,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment