PR libstdc++/54102, part 2

2012-08-28  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/54102, part 2
	* doc/Makefile.am (XSL_HTML_STYLE): use xhtml, not html.
	* doc/Makefile.in: Regenerate.
	* doc/html/*: Same.

From-SVN: r190771
This commit is contained in:
Benjamin Kosnik 2012-08-29 04:44:10 +00:00 committed by Benjamin Kosnik
parent 6247d6df14
commit 27f36b7837
109 changed files with 3174 additions and 4281 deletions

View File

@ -1,3 +1,10 @@
2012-08-28 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/54102, part 2
* doc/Makefile.am (XSL_HTML_STYLE): use xhtml, not html.
* doc/Makefile.in: Regenerate.
* doc/html/*: Same.
2012-08-28 Benjamin Kosnik <bkoz@redhat.com> 2012-08-28 Benjamin Kosnik <bkoz@redhat.com>
* doc/html/*: Regenerate. * doc/html/*: Regenerate.

View File

@ -465,7 +465,7 @@ XSLT_PARAM = --param toc.section.depth 4
#XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns #XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
#XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets #XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
XSL_HTML_STYLE = $(XSL_STYLE_DIR)/html/chunk.xsl XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl
XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl
XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl

View File

@ -517,7 +517,7 @@ XSLT_PARAM = --param toc.section.depth 4
#XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns #XSL_STYLE_DIR = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
#XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets #XSL_STYLE_DIR = /usr/share/sgml/docbook/xsl-ns-stylesheets
XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl XSL_FO_STYLE = $(XSL_STYLE_DIR)/fo/docbook.xsl
XSL_HTML_STYLE = $(XSL_STYLE_DIR)/html/chunk.xsl XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/html/docbook.xsl
XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl XSL_EPUB_STYLE = $(XSL_STYLE_DIR)/epub3/chunk.xsl
XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl XSL_LOCAL_STYLE = ${glibcxx_builddir}/doc/xsl/customization.xsl

View File

@ -1,20 +1,16 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>The GNU C++ Library API Reference</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The GNU C++ Library API Reference</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="index.html" title="The GNU C++ Library" /><link rel="up" href="bk02.html" title="" /><link rel="prev" href="bk02.html" title="" /><link rel="next" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library API Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr></table><hr /></div><div class="article" title="The GNU C++ Library API Reference"><div class="titlepage"><div><div><h2 class="title"><a id="api"></a>The GNU C++ Library API Reference</h2></div><div><p class="copyright">Copyright ©
runtime
,
library
"><link rel="home" href="index.html" title="The GNU C++ Library"><link rel="up" href="bk02.html" title=""><link rel="prev" href="bk02.html" title=""><link rel="next" href="bk03.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library API Reference</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr></table><hr></div><div class="article" title="The GNU C++ Library API Reference"><div class="titlepage"><div><div><h2 class="title"><a name="api"></a>The GNU C++ Library API Reference</h2></div><div><p class="copyright">Copyright ©
2008 2008
, ,
2010 2010
<a class="link" href="http://www.fsf.org/" target="_top">FSF <a class="link" href="http://www.fsf.org/" target="_top">FSF
</a> </a>
</p></div><div><div class="legalnotice" title="Legal Notice"><a name="id518764"></a><p> </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id502129"></a><p>
<a class="link" href="manual/license.html" title="License">License <a class="link" href="manual/license.html" title="License">License
</a> </a>
</p></div></div></div><hr></div><p> </p></div></div></div><hr /></div><p>
The GNU C++ library sources have been specially formatted so that The GNU C++ library sources have been specially formatted so that
with the proper invocation of another tool (Doxygen), a set of with the proper invocation of another tool (Doxygen), a set of
indexed reference material can generated from the sources files indexed reference material can generated from the sources files
@ -60,4 +56,4 @@
</p><p> </p><p>
In addition, a rendered set of man pages are available in the same In addition, a rendered set of man pages are available in the same
location specified above. Start with C++Intro(3). location specified above. Start with C++Intro(3).
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>

View File

@ -1,7 +1,3 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="index.html" title="The GNU C++ Library" /><link rel="up" href="index.html" title="The GNU C++ Library" /><link rel="prev" href="manual/backwards.html" title="Backwards Compatibility" /><link rel="next" href="api.html" title="The GNU C++ Library API Reference" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="book"><div class="titlepage"><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The GNU C++ Library API Reference</td></tr></table></div></body></html>
runtime
,
library
"><link rel="home" href="index.html" title="The GNU C++ Library"><link rel="up" href="index.html" title="The GNU C++ Library"><link rel="prev" href="manual/backwards.html" title="Backwards Compatibility"><link rel="next" href="api.html" title="The GNU C++ Library API Reference"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="api.html">The GNU C++ Library API Reference</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="manual/backwards.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The GNU C++ Library API Reference</td></tr></table></div></body></html>

View File

@ -1,7 +1,3 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="index.html" title="The GNU C++ Library" /><link rel="up" href="index.html" title="The GNU C++ Library" /><link rel="prev" href="api.html" title="The GNU C++ Library API Reference" /><link rel="next" href="faq.html" title="Frequently Asked Questions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr></table><hr /></div><div class="book"><div class="titlepage"><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library API Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Frequently Asked Questions</td></tr></table></div></body></html>
runtime
,
library
"><link rel="home" href="index.html" title="The GNU C++ Library"><link rel="up" href="index.html" title="The GNU C++ Library"><link rel="prev" href="api.html" title="The GNU C++ Library API Reference"><link rel="next" href="faq.html" title="Frequently Asked Questions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="article"><a href="faq.html">Frequently Asked Questions</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="faq.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The GNU C++ Library API Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Frequently Asked Questions</td></tr></table></div></body></html>

View File

@ -1,14 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Frequently Asked Questions</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Frequently Asked Questions</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="index.html" title="The GNU C++ Library" /><link rel="up" href="bk03.html" title="" /><link rel="prev" href="bk03.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Frequently Asked Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr /></div><div class="article" title="Frequently Asked Questions"><div class="titlepage"><div><div><h1 class="title"><a id="faq"></a>Frequently Asked Questions</h1></div><div><p class="copyright">Copyright ©
runtime
,
library
"><link rel="home" href="index.html" title="The GNU C++ Library"><link rel="up" href="bk03.html" title=""><link rel="prev" href="bk03.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Frequently Asked Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><th width="60%" align="center"></th><td width="20%" align="right"> </td></tr></table><hr></div><div class="article" title="Frequently Asked Questions"><div class="titlepage"><div><div><h1 class="title"><a name="faq"></a>Frequently Asked Questions</h1></div><div><p class="copyright">Copyright ©
2008, 2010 2008, 2010
<a class="link" href="http://www.fsf.org" target="_top">FSF</a> <a class="link" href="http://www.fsf.org" target="_top">FSF</a>
</p></div></div><hr></div><div class="qandaset" title="Frequently Asked Questions"><a name="id570718"></a><dl><dt></dt><dd><dl><dt>1.1. <a href="faq.html#faq.what"> </p></div></div><hr /></div><div class="qandaset" title="Frequently Asked Questions"><a id="id493807"></a><dl><dt></dt><dd><dl><dt>1.1. <a href="faq.html#faq.what">
What is libstdc++? What is libstdc++?
</a></dt><dt>1.2. <a href="faq.html#faq.why"> </a></dt><dt>1.2. <a href="faq.html#faq.why">
Why should I use libstdc++? Why should I use libstdc++?
@ -95,7 +91,7 @@
What's an ABI and why is it so messy? What's an ABI and why is it so messy?
</a></dt><dt>7.8. <a href="faq.html#faq.size_equals_capacity"> </a></dt><dt>7.8. <a href="faq.html#faq.size_equals_capacity">
How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size? How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
</a></dt></dl></dd></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%"><col><tbody><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>1.1. <a href="faq.html#faq.what"> </a></dt></dl></dd></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%" /><col /><tbody><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>1.1. <a href="faq.html#faq.what">
What is libstdc++? What is libstdc++?
</a></dt><dt>1.2. <a href="faq.html#faq.why"> </a></dt><dt>1.2. <a href="faq.html#faq.why">
Why should I use libstdc++? Why should I use libstdc++?
@ -109,9 +105,9 @@
What happened to the older libg++? I need that! What happened to the older libg++? I need that!
</a></dt><dt>1.7. <a href="faq.html#faq.more_questions"> </a></dt><dt>1.7. <a href="faq.html#faq.more_questions">
What if I have more questions? What if I have more questions?
</a></dt></dl></td></tr><tr class="question" title="1.1."><td align="left" valign="top"><a name="faq.what"></a><a name="faq.what.q"></a><p><b>1.1.</b></p></td><td align="left" valign="top"><p> </a></dt></dl></td></tr><tr class="question" title="1.1."><td align="left" valign="top"><a id="faq.what"></a><a id="faq.what.q"></a><p><strong>1.1.</strong></p></td><td align="left" valign="top"><p>
What is libstdc++? What is libstdc++?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="faq.what.a"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="faq.what.a"></a></td><td align="left" valign="top"><p>
The GNU Standard C++ Library v3 is an ongoing project to The GNU Standard C++ Library v3 is an ongoing project to
implement the ISO 14882 Standard C++ library as described in implement the ISO 14882 Standard C++ library as described in
chapters 17 through 27 and annex D. For those who want to see chapters 17 through 27 and annex D. For those who want to see
@ -119,9 +115,9 @@
bleeding-edge code, the up-to-date source is available over bleeding-edge code, the up-to-date source is available over
anonymous SVN, and can even be browsed over anonymous SVN, and can even be browsed over
the <a class="link" href="http://gcc.gnu.org/svn.html" target="_top">web</a>. the <a class="link" href="http://gcc.gnu.org/svn.html" target="_top">web</a>.
</p></td></tr><tr class="question" title="1.2."><td align="left" valign="top"><a name="faq.why"></a><a name="q-why"></a><p><b>1.2.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="1.2."><td align="left" valign="top"><a id="faq.why"></a><a id="q-why"></a><p><strong>1.2.</strong></p></td><td align="left" valign="top"><p>
Why should I use libstdc++? Why should I use libstdc++?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-why"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-why"></a></td><td align="left" valign="top"><p>
The completion of the ISO C++ standardization gave the C++ The completion of the ISO C++ standardization gave the C++
community a powerful set of reuseable tools in the form of the C++ community a powerful set of reuseable tools in the form of the C++
Standard Library. However, all existing C++ implementations are Standard Library. However, all existing C++ implementations are
@ -145,9 +141,9 @@
<code class="classname">vector&lt;&gt;</code>, iostreams, and algorithms.) <code class="classname">vector&lt;&gt;</code>, iostreams, and algorithms.)
Programmers will no longer need to <span class="quote"><span class="quote">roll their own</span></span> Programmers will no longer need to <span class="quote"><span class="quote">roll their own</span></span>
nor be worried about platform-specific incompatibilities. nor be worried about platform-specific incompatibilities.
</p></td></tr><tr class="question" title="1.3."><td align="left" valign="top"><a name="faq.who"></a><a name="q-who"></a><p><b>1.3.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="1.3."><td align="left" valign="top"><a id="faq.who"></a><a id="q-who"></a><p><strong>1.3.</strong></p></td><td align="left" valign="top"><p>
Who's in charge of it? Who's in charge of it?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-who"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-who"></a></td><td align="left" valign="top"><p>
The libstdc++ project is contributed to by several developers The libstdc++ project is contributed to by several developers
all over the world, in the same way as GCC or the Linux kernel. all over the world, in the same way as GCC or the Linux kernel.
Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper, Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper,
@ -159,15 +155,15 @@
archives, is open to everyone. You can read instructions for archives, is open to everyone. You can read instructions for
doing so on the <a class="link" href="http://gcc.gnu.org/libstdc++/" target="_top">homepage</a>. doing so on the <a class="link" href="http://gcc.gnu.org/libstdc++/" target="_top">homepage</a>.
If you have questions, ideas, code, or are just curious, sign up! If you have questions, ideas, code, or are just curious, sign up!
</p></td></tr><tr class="question" title="1.4."><td align="left" valign="top"><a name="faq.when"></a><a name="q-when"></a><p><b>1.4.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="1.4."><td align="left" valign="top"><a id="faq.when"></a><a id="q-when"></a><p><strong>1.4.</strong></p></td><td align="left" valign="top"><p>
When is libstdc++ going to be finished? When is libstdc++ going to be finished?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-when"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-when"></a></td><td align="left" valign="top"><p>
Nathan Myers gave the best of all possible answers, responding to Nathan Myers gave the best of all possible answers, responding to
a Usenet article asking this question: <span class="emphasis"><em>Sooner, if you a Usenet article asking this question: <span class="emphasis"><em>Sooner, if you
help.</em></span> help.</em></span>
</p></td></tr><tr class="question" title="1.5."><td align="left" valign="top"><a name="faq.how"></a><a name="q-how"></a><p><b>1.5.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="1.5."><td align="left" valign="top"><a id="faq.how"></a><a id="q-how"></a><p><strong>1.5.</strong></p></td><td align="left" valign="top"><p>
How do I contribute to the effort? How do I contribute to the effort?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-how"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how"></a></td><td align="left" valign="top"><p>
Here is <a class="link" href="manual/appendix_contributing.html" title="Appendix A.  Contributing">a page devoted to Here is <a class="link" href="manual/appendix_contributing.html" title="Appendix A.  Contributing">a page devoted to
this topic</a>. Subscribing to the mailing list (see above, or this topic</a>. Subscribing to the mailing list (see above, or
the homepage) is a very good idea if you have something to the homepage) is a very good idea if you have something to
@ -176,17 +172,17 @@
anybody who is willing to help write documentation, for example, anybody who is willing to help write documentation, for example,
or has found a bug in code that we all thought was working and is or has found a bug in code that we all thought was working and is
willing to provide details, is more than welcome! willing to provide details, is more than welcome!
</p></td></tr><tr class="question" title="1.6."><td align="left" valign="top"><a name="faq.whereis_old"></a><a name="q-whereis_old"></a><p><b>1.6.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="1.6."><td align="left" valign="top"><a id="faq.whereis_old"></a><a id="q-whereis_old"></a><p><strong>1.6.</strong></p></td><td align="left" valign="top"><p>
What happened to the older libg++? I need that! What happened to the older libg++? I need that!
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-whereis_old"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-whereis_old"></a></td><td align="left" valign="top"><p>
The most recent libg++ README states that libg++ is no longer The most recent libg++ README states that libg++ is no longer
being actively maintained. It should not be used for new being actively maintained. It should not be used for new
projects, and is only being kicked along to support older code. projects, and is only being kicked along to support older code.
</p><p> </p><p>
More information in the <a class="link" href="manual/backwards.html" title="Backwards Compatibility">backwards compatibility documentation</a> More information in the <a class="link" href="manual/backwards.html" title="Backwards Compatibility">backwards compatibility documentation</a>
</p></td></tr><tr class="question" title="1.7."><td align="left" valign="top"><a name="faq.more_questions"></a><a name="q-more_questions"></a><p><b>1.7.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="1.7."><td align="left" valign="top"><a id="faq.more_questions"></a><a id="q-more_questions"></a><p><strong>1.7.</strong></p></td><td align="left" valign="top"><p>
What if I have more questions? What if I have more questions?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-more_questions"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-more_questions"></a></td><td align="left" valign="top"><p>
If you have read the README file, and your question remains If you have read the README file, and your question remains
unanswered, then just ask the mailing list. At present, you do not unanswered, then just ask the mailing list. At present, you do not
need to be subscribed to the list to send a message to it. More need to be subscribed to the list to send a message to it. More
@ -205,19 +201,19 @@
How is that different from the GNU {Lesser,Library} GPL? How is that different from the GNU {Lesser,Library} GPL?
</a></dt><dt>2.4. <a href="faq.html#faq.license.what_restrictions"> </a></dt><dt>2.4. <a href="faq.html#faq.license.what_restrictions">
I see. So, what restrictions are there on programs that use the library? I see. So, what restrictions are there on programs that use the library?
</a></dt></dl></td></tr><tr class="question" title="2.1."><td align="left" valign="top"><a name="faq.license.what"></a><a name="q-license.what"></a><p><b>2.1.</b></p></td><td align="left" valign="top"><p> </a></dt></dl></td></tr><tr class="question" title="2.1."><td align="left" valign="top"><a id="faq.license.what"></a><a id="q-license.what"></a><p><strong>2.1.</strong></p></td><td align="left" valign="top"><p>
What are the license terms for libstdc++? What are the license terms for libstdc++?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-license.what"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.what"></a></td><td align="left" valign="top"><p>
See <a class="link" href="manual/license.html" title="License">our license description</a> See <a class="link" href="manual/license.html" title="License">our license description</a>
for these and related questions. for these and related questions.
</p></td></tr><tr class="question" title="2.2."><td align="left" valign="top"><a name="faq.license.any_program"></a><a name="q-license.any_program"></a><p><b>2.2.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="2.2."><td align="left" valign="top"><a id="faq.license.any_program"></a><a id="q-license.any_program"></a><p><strong>2.2.</strong></p></td><td align="left" valign="top"><p>
So any program which uses libstdc++ falls under the GPL? So any program which uses libstdc++ falls under the GPL?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-license.any_program"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.any_program"></a></td><td align="left" valign="top"><p>
No. The special exception permits use of the library in No. The special exception permits use of the library in
proprietary applications. proprietary applications.
</p></td></tr><tr class="question" title="2.3."><td align="left" valign="top"><a name="faq.license.lgpl"></a><a name="q-license.lgpl"></a><p><b>2.3.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="2.3."><td align="left" valign="top"><a id="faq.license.lgpl"></a><a id="q-license.lgpl"></a><p><strong>2.3.</strong></p></td><td align="left" valign="top"><p>
How is that different from the GNU {Lesser,Library} GPL? How is that different from the GNU {Lesser,Library} GPL?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-license.lgpl"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.lgpl"></a></td><td align="left" valign="top"><p>
The LGPL requires that users be able to replace the LGPL code with a The LGPL requires that users be able to replace the LGPL code with a
modified version; this is trivial if the library in question is a C modified version; this is trivial if the library in question is a C
shared library. But there's no way to make that work with C++, where shared library. But there's no way to make that work with C++, where
@ -225,9 +221,9 @@
are expanded inside the code that uses the library. So to allow people are expanded inside the code that uses the library. So to allow people
to replace the library code, someone using the library would have to to replace the library code, someone using the library would have to
distribute their own source, rendering the LGPL equivalent to the GPL. distribute their own source, rendering the LGPL equivalent to the GPL.
</p></td></tr><tr class="question" title="2.4."><td align="left" valign="top"><a name="faq.license.what_restrictions"></a><a name="q-license.what_restrictions"></a><p><b>2.4.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="2.4."><td align="left" valign="top"><a id="faq.license.what_restrictions"></a><a id="q-license.what_restrictions"></a><p><strong>2.4.</strong></p></td><td align="left" valign="top"><p>
I see. So, what restrictions are there on programs that use the library? I see. So, what restrictions are there on programs that use the library?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-license.what_restrictions"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-license.what_restrictions"></a></td><td align="left" valign="top"><p>
None. We encourage such programs to be released as open source, None. We encourage such programs to be released as open source,
but we won't punish you or sue you if you choose otherwise. but we won't punish you or sue you if you choose otherwise.
</p></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>3.1. <a href="faq.html#faq.how_to_install">How do I install libstdc++? </p></td></tr><tr class="toc"><td align="left" valign="top" colspan="2"><dl><dt>3.1. <a href="faq.html#faq.how_to_install">How do I install libstdc++?
@ -238,8 +234,8 @@
What's libsupc++? What's libsupc++?
</a></dt><dt>3.6. <a href="faq.html#faq.size"> </a></dt><dt>3.6. <a href="faq.html#faq.size">
This library is HUGE! This library is HUGE!
</a></dt></dl></td></tr><tr class="question" title="3.1."><td align="left" valign="top"><a name="faq.how_to_install"></a><a name="q-how_to_install"></a><p><b>3.1.</b></p></td><td align="left" valign="top"><p>How do I install libstdc++? </a></dt></dl></td></tr><tr class="question" title="3.1."><td align="left" valign="top"><a id="faq.how_to_install"></a><a id="q-how_to_install"></a><p><strong>3.1.</strong></p></td><td align="left" valign="top"><p>How do I install libstdc++?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-how_to_install"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_install"></a></td><td align="left" valign="top"><p>
Often libstdc++ comes pre-installed as an integral part of many Often libstdc++ comes pre-installed as an integral part of many
existing GNU/Linux and Unix systems, as well as many embedded existing GNU/Linux and Unix systems, as well as many embedded
development tools. It may be necessary to install extra development tools. It may be necessary to install extra
@ -251,8 +247,8 @@
documentation</a> for detailed documentation</a> for detailed
instructions. You may wish to browse those files ahead instructions. You may wish to browse those files ahead
of time to get a feel for what's required. of time to get a feel for what's required.
</p></td></tr><tr class="question" title="3.2."><td align="left" valign="top"><a name="faq.how_to_get_sources"></a><a name="q-how_to_get_sources"></a><p><b>3.2.</b></p></td><td align="left" valign="top"><p>How does one get current libstdc++ sources? </p></td></tr><tr class="question" title="3.2."><td align="left" valign="top"><a id="faq.how_to_get_sources"></a><a id="q-how_to_get_sources"></a><p><strong>3.2.</strong></p></td><td align="left" valign="top"><p>How does one get current libstdc++ sources?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-how_to_get_sources"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_get_sources"></a></td><td align="left" valign="top"><p>
Libstdc++ sources for all official releases can be obtained as Libstdc++ sources for all official releases can be obtained as
part of the GCC sources, available from various sites and part of the GCC sources, available from various sites and
mirrors. A full <a class="link" href="http://gcc.gnu.org/mirrors.html" target="_top">list of mirrors. A full <a class="link" href="http://gcc.gnu.org/mirrors.html" target="_top">list of
@ -276,8 +272,8 @@
For more information For more information
see <a class="link" href="http://gcc.gnu.org/svn.html" target="_top"><acronym class="acronym">SVN</acronym> see <a class="link" href="http://gcc.gnu.org/svn.html" target="_top"><acronym class="acronym">SVN</acronym>
details</a>. details</a>.
</p></td></tr><tr class="question" title="3.3."><td align="left" valign="top"><a name="faq.how_to_test"></a><a name="q-how_to_test"></a><p><b>3.3.</b></p></td><td align="left" valign="top"><p>How do I know if it works? </p></td></tr><tr class="question" title="3.3."><td align="left" valign="top"><a id="faq.how_to_test"></a><a id="q-how_to_test"></a><p><strong>3.3.</strong></p></td><td align="left" valign="top"><p>How do I know if it works?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-how_to_test"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_test"></a></td><td align="left" valign="top"><p>
Libstdc++ comes with its own validation testsuite, which includes Libstdc++ comes with its own validation testsuite, which includes
conformance testing, regression testing, ABI testing, and conformance testing, regression testing, ABI testing, and
performance testing. Please consult the performance testing. Please consult the
@ -287,8 +283,8 @@
If you find bugs in the testsuite programs themselves, or if you If you find bugs in the testsuite programs themselves, or if you
think of a new test program that should be added to the suite, think of a new test program that should be added to the suite,
<span class="emphasis"><em>please</em></span> write up your idea and send it to the list! <span class="emphasis"><em>please</em></span> write up your idea and send it to the list!
</p></td></tr><tr class="question" title="3.4."><td align="left" valign="top"><a name="faq.how_to_set_paths"></a><a name="q-how_to_set_paths"></a><p><b>3.4.</b></p></td><td align="left" valign="top"><p>How do I insure that the dynamically linked library will be found? </p></td></tr><tr class="question" title="3.4."><td align="left" valign="top"><a id="faq.how_to_set_paths"></a><a id="q-how_to_set_paths"></a><p><strong>3.4.</strong></p></td><td align="left" valign="top"><p>How do I insure that the dynamically linked library will be found?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-how_to_set_paths"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-how_to_set_paths"></a></td><td align="left" valign="top"><p>
Depending on your platform and library version, the error message might Depending on your platform and library version, the error message might
be similar to one of the following: be similar to one of the following:
</p><pre class="screen"> </p><pre class="screen">
@ -321,9 +317,9 @@
</p><p> </p><p>
Using LD_LIBRARY_PATH is not always the best solution, <a class="link" href="manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic" title="Finding Dynamic or Shared Libraries">Finding Dynamic or Shared Using LD_LIBRARY_PATH is not always the best solution, <a class="link" href="manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic" title="Finding Dynamic or Shared Libraries">Finding Dynamic or Shared
Libraries</a> in the manual gives some alternatives. Libraries</a> in the manual gives some alternatives.
</p></td></tr><tr class="question" title="3.5."><td align="left" valign="top"><a name="faq.what_is_libsupcxx"></a><a name="q-what_is_libsupcxx"></a><p><b>3.5.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="3.5."><td align="left" valign="top"><a id="faq.what_is_libsupcxx"></a><a id="q-what_is_libsupcxx"></a><p><strong>3.5.</strong></p></td><td align="left" valign="top"><p>
What's libsupc++? What's libsupc++?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-what_is_libsupcxx"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_is_libsupcxx"></a></td><td align="left" valign="top"><p>
If the only functions from <code class="filename">libstdc++.a</code> If the only functions from <code class="filename">libstdc++.a</code>
which you need are language support functions (those listed in which you need are language support functions (those listed in
<a class="link" href="manual/support.html" title="Chapter 4.  Support">clause 18</a> of the <a class="link" href="manual/support.html" title="Chapter 4.  Support">clause 18</a> of the
@ -338,9 +334,9 @@
using anything from the rest of the library, such as IOStreams using anything from the rest of the library, such as IOStreams
or vectors, then you'll still need pieces from or vectors, then you'll still need pieces from
<code class="filename">libstdc++.a</code>. <code class="filename">libstdc++.a</code>.
</p></td></tr><tr class="question" title="3.6."><td align="left" valign="top"><a name="faq.size"></a><a name="q-size"></a><p><b>3.6.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="3.6."><td align="left" valign="top"><a id="faq.size"></a><a id="q-size"></a><p><strong>3.6.</strong></p></td><td align="left" valign="top"><p>
This library is HUGE! This library is HUGE!
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-size"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-size"></a></td><td align="left" valign="top"><p>
Usually the size of libraries on disk isn't noticeable. When a Usually the size of libraries on disk isn't noticeable. When a
link editor (or simply <span class="quote"><span class="quote">linker</span></span>) pulls things from a link editor (or simply <span class="quote"><span class="quote">linker</span></span>) pulls things from a
static archive library, only the necessary object files are copied static archive library, only the necessary object files are copied
@ -385,9 +381,9 @@
Recent GNU/Linux glibc required? Recent GNU/Linux glibc required?
</a></dt><dt>4.8. <a href="faq.html#faq.freebsd_wchar"> </a></dt><dt>4.8. <a href="faq.html#faq.freebsd_wchar">
Can't use wchar_t/wstring on FreeBSD Can't use wchar_t/wstring on FreeBSD
</a></dt></dl></td></tr><tr class="question" title="4.1."><td align="left" valign="top"><a name="faq.other_compilers"></a><a name="q-other_compilers"></a><p><b>4.1.</b></p></td><td align="left" valign="top"><p> </a></dt></dl></td></tr><tr class="question" title="4.1."><td align="left" valign="top"><a id="faq.other_compilers"></a><a id="q-other_compilers"></a><p><strong>4.1.</strong></p></td><td align="left" valign="top"><p>
Can libstdc++ be used with non-GNU compilers? Can libstdc++ be used with non-GNU compilers?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-other_compilers"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-other_compilers"></a></td><td align="left" valign="top"><p>
Perhaps. Perhaps.
</p><p> </p><p>
Since the goal of ISO Standardization is for all C++ Since the goal of ISO Standardization is for all C++
@ -405,9 +401,9 @@
been known to work with versions of the EDG C++ compiler, and been known to work with versions of the EDG C++ compiler, and
vendor-specific proprietary C++ compilers such as the Intel ICC vendor-specific proprietary C++ compilers such as the Intel ICC
C++ compiler. C++ compiler.
</p></td></tr><tr class="question" title="4.2."><td align="left" valign="top"><a name="faq.solaris_long_long"></a><a name="q-solaris_long_long"></a><p><b>4.2.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.2."><td align="left" valign="top"><a id="faq.solaris_long_long"></a><a id="q-solaris_long_long"></a><p><strong>4.2.</strong></p></td><td align="left" valign="top"><p>
No 'long long' type on Solaris? No 'long long' type on Solaris?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-solaris_long_long"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-solaris_long_long"></a></td><td align="left" valign="top"><p>
By default we try to support the C99 <span class="type">long long</span> type. By default we try to support the C99 <span class="type">long long</span> type.
This requires that certain functions from your C library be present. This requires that certain functions from your C library be present.
</p><p> </p><p>
@ -417,9 +413,9 @@
commonly reported platform affected was Solaris. commonly reported platform affected was Solaris.
</p><p> </p><p>
This has been fixed for libstdc++ releases greater than 3.0.3. This has been fixed for libstdc++ releases greater than 3.0.3.
</p></td></tr><tr class="question" title="4.3."><td align="left" valign="top"><a name="faq.predefined"></a><a name="q-predefined"></a><p><b>4.3.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.3."><td align="left" valign="top"><a id="faq.predefined"></a><a id="q-predefined"></a><p><strong>4.3.</strong></p></td><td align="left" valign="top"><p>
<code class="constant">_XOPEN_SOURCE</code> and <code class="constant">_GNU_SOURCE</code> are always defined? <code class="constant">_XOPEN_SOURCE</code> and <code class="constant">_GNU_SOURCE</code> are always defined?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-predefined"></a></td><td align="left" valign="top"><p>On Solaris, g++ (but not gcc) always defines the preprocessor </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-predefined"></a></td><td align="left" valign="top"><p>On Solaris, g++ (but not gcc) always defines the preprocessor
macro <code class="constant">_XOPEN_SOURCE</code>. On GNU/Linux, the same happens macro <code class="constant">_XOPEN_SOURCE</code>. On GNU/Linux, the same happens
with <code class="constant">_GNU_SOURCE</code>. (This is not an exhaustive list; with <code class="constant">_GNU_SOURCE</code>. (This is not an exhaustive list;
other macros and other platforms are also affected.) other macros and other platforms are also affected.)
@ -446,15 +442,15 @@
<a class="link" href="http://gcc.gnu.org/cgi-bin/htsearch?method=and&amp;format=builtin-long&amp;sort=score&amp;words=_XOPEN_SOURCE+Solaris" target="_top">quite a bit</a>. <a class="link" href="http://gcc.gnu.org/cgi-bin/htsearch?method=and&amp;format=builtin-long&amp;sort=score&amp;words=_XOPEN_SOURCE+Solaris" target="_top">quite a bit</a>.
</p><p>This method is something of a wart. We'd like to find a cleaner </p><p>This method is something of a wart. We'd like to find a cleaner
solution, but nobody yet has contributed the time. solution, but nobody yet has contributed the time.
</p></td></tr><tr class="question" title="4.4."><td align="left" valign="top"><a name="faq.darwin_ctype"></a><a name="q-darwin_ctype"></a><p><b>4.4.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.4."><td align="left" valign="top"><a id="faq.darwin_ctype"></a><a id="q-darwin_ctype"></a><p><strong>4.4.</strong></p></td><td align="left" valign="top"><p>
Mac OS X <code class="filename">ctype.h</code> is broken! How can I fix it? Mac OS X <code class="filename">ctype.h</code> is broken! How can I fix it?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-darwin_ctype"></a></td><td align="left" valign="top"><p>This is a long-standing bug in the OS X support. Fortunately, </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-darwin_ctype"></a></td><td align="left" valign="top"><p>This is a long-standing bug in the OS X support. Fortunately,
the patch is quite simple, and well-known. the patch is quite simple, and well-known.
<a class="link" href="http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html" target="_top"> Here's a <a class="link" href="http://gcc.gnu.org/ml/gcc/2002-03/msg00817.html" target="_top"> Here's a
link to the solution</a>. link to the solution</a>.
</p></td></tr><tr class="question" title="4.5."><td align="left" valign="top"><a name="faq.threads_i386"></a><a name="q-threads_i386"></a><p><b>4.5.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.5."><td align="left" valign="top"><a id="faq.threads_i386"></a><a id="q-threads_i386"></a><p><strong>4.5.</strong></p></td><td align="left" valign="top"><p>
Threading is broken on i386? Threading is broken on i386?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-threads_i386"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-threads_i386"></a></td><td align="left" valign="top"><p>
</p><p>Support for atomic integer operations is/was broken on i386 </p><p>Support for atomic integer operations is/was broken on i386
platforms. The assembly code accidentally used opcodes that are platforms. The assembly code accidentally used opcodes that are
only available on the i486 and later. So if you configured GCC only available on the i486 and later. So if you configured GCC
@ -462,9 +458,9 @@
on an i686, then you would encounter no problems. Only when on an i686, then you would encounter no problems. Only when
actually running the code on a i386 will the problem appear. actually running the code on a i386 will the problem appear.
</p><p>This is fixed in 3.2.2. </p><p>This is fixed in 3.2.2.
</p></td></tr><tr class="question" title="4.6."><td align="left" valign="top"><a name="faq.atomic_mips"></a><a name="q-atomic_mips"></a><p><b>4.6.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.6."><td align="left" valign="top"><a id="faq.atomic_mips"></a><a id="q-atomic_mips"></a><p><strong>4.6.</strong></p></td><td align="left" valign="top"><p>
MIPS atomic operations MIPS atomic operations
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-atomic_mips"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-atomic_mips"></a></td><td align="left" valign="top"><p>
The atomic locking routines for MIPS targets requires MIPS II The atomic locking routines for MIPS targets requires MIPS II
and later. A patch went in just after the 3.3 release to and later. A patch went in just after the 3.3 release to
make mips* use the generic implementation instead. You can also make mips* use the generic implementation instead. You can also
@ -472,9 +468,9 @@
</p><p> </p><p>
The mips*-*-linux* port continues to use the MIPS II routines, and more The mips*-*-linux* port continues to use the MIPS II routines, and more
work in this area is expected. work in this area is expected.
</p></td></tr><tr class="question" title="4.7."><td align="left" valign="top"><a name="faq.linux_glibc"></a><a name="q-linux_glibc"></a><p><b>4.7.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.7."><td align="left" valign="top"><a id="faq.linux_glibc"></a><a id="q-linux_glibc"></a><p><strong>4.7.</strong></p></td><td align="left" valign="top"><p>
Recent GNU/Linux glibc required? Recent GNU/Linux glibc required?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-linux_glibc"></a></td><td align="left" valign="top"><p>When running on GNU/Linux, libstdc++ 3.2.1 (shared library version </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-linux_glibc"></a></td><td align="left" valign="top"><p>When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
5.0.1) and later uses localization and formatting code from the system 5.0.1) and later uses localization and formatting code from the system
C library (glibc) version 2.2.5 which contains necessary bugfixes. C library (glibc) version 2.2.5 which contains necessary bugfixes.
Most GNU/Linux distros make more recent versions available now. Most GNU/Linux distros make more recent versions available now.
@ -483,9 +479,9 @@
</p><p>The guideline is simple: the more recent the C++ library, the </p><p>The guideline is simple: the more recent the C++ library, the
more recent the C library. (This is also documented in the main more recent the C library. (This is also documented in the main
GCC installation instructions.) GCC installation instructions.)
</p></td></tr><tr class="question" title="4.8."><td align="left" valign="top"><a name="faq.freebsd_wchar"></a><a name="q-freebsd_wchar"></a><p><b>4.8.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="4.8."><td align="left" valign="top"><a id="faq.freebsd_wchar"></a><a id="q-freebsd_wchar"></a><p><strong>4.8.</strong></p></td><td align="left" valign="top"><p>
Can't use wchar_t/wstring on FreeBSD Can't use wchar_t/wstring on FreeBSD
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-freebsd_wchar"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-freebsd_wchar"></a></td><td align="left" valign="top"><p>
Older versions of FreeBSD's C library do not have sufficient Older versions of FreeBSD's C library do not have sufficient
support for wide character functions, and as a result the support for wide character functions, and as a result the
libstdc++ configury decides that wchar_t support should be libstdc++ configury decides that wchar_t support should be
@ -502,9 +498,9 @@
Bugs in the ISO C++ language or library specification Bugs in the ISO C++ language or library specification
</a></dt><dt>5.3. <a href="faq.html#faq.compiler_bugs"> </a></dt><dt>5.3. <a href="faq.html#faq.compiler_bugs">
Bugs in the compiler (gcc/g++) and not libstdc++ Bugs in the compiler (gcc/g++) and not libstdc++
</a></dt></dl></td></tr><tr class="question" title="5.1."><td align="left" valign="top"><a name="faq.what_works"></a><a name="q-what_works"></a><p><b>5.1.</b></p></td><td align="left" valign="top"><p> </a></dt></dl></td></tr><tr class="question" title="5.1."><td align="left" valign="top"><a id="faq.what_works"></a><a id="q-what_works"></a><p><strong>5.1.</strong></p></td><td align="left" valign="top"><p>
What works already? What works already?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-what_works"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_works"></a></td><td align="left" valign="top"><p>
Short answer: Pretty much everything <span class="emphasis"><em>works</em></span> Short answer: Pretty much everything <span class="emphasis"><em>works</em></span>
except for some corner cases. Support for localization except for some corner cases. Support for localization
in <code class="classname">locale</code> may be incomplete on non-GNU in <code class="classname">locale</code> may be incomplete on non-GNU
@ -516,9 +512,9 @@
<a class="link" href="manual/status.html#status.iso.1998" title="C++ 1998/2003">C++98</a>, <a class="link" href="manual/status.html#status.iso.1998" title="C++ 1998/2003">C++98</a>,
<a class="link" href="manual/status.html#status.iso.tr1" title="C++ TR1">TR1</a>, and <a class="link" href="manual/status.html#status.iso.tr1" title="C++ TR1">TR1</a>, and
<a class="link" href="manual/status.html#status.iso.2011" title="C++ 2011">C++11</a>. <a class="link" href="manual/status.html#status.iso.2011" title="C++ 2011">C++11</a>.
</p></td></tr><tr class="question" title="5.2."><td align="left" valign="top"><a name="faq.standard_bugs"></a><a name="q-standard_bugs"></a><p><b>5.2.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="5.2."><td align="left" valign="top"><a id="faq.standard_bugs"></a><a id="q-standard_bugs"></a><p><strong>5.2.</strong></p></td><td align="left" valign="top"><p>
Bugs in the ISO C++ language or library specification Bugs in the ISO C++ language or library specification
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-standard_bugs"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-standard_bugs"></a></td><td align="left" valign="top"><p>
Unfortunately, there are some. Unfortunately, there are some.
</p><p> </p><p>
For those people who are not part of the ISO Library Group For those people who are not part of the ISO Library Group
@ -531,9 +527,9 @@
If you think you've discovered a new bug that is not listed, If you think you've discovered a new bug that is not listed,
please post a message describing your problem to the author of please post a message describing your problem to the author of
the library issues list or the Usenet group comp.lang.c++.moderated. the library issues list or the Usenet group comp.lang.c++.moderated.
</p></td></tr><tr class="question" title="5.3."><td align="left" valign="top"><a name="faq.compiler_bugs"></a><a name="q-compiler_bugs"></a><p><b>5.3.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="5.3."><td align="left" valign="top"><a id="faq.compiler_bugs"></a><a id="q-compiler_bugs"></a><p><strong>5.3.</strong></p></td><td align="left" valign="top"><p>
Bugs in the compiler (gcc/g++) and not libstdc++ Bugs in the compiler (gcc/g++) and not libstdc++
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-compiler_bugs"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-compiler_bugs"></a></td><td align="left" valign="top"><p>
On occasion, the compiler is wrong. Please be advised that this On occasion, the compiler is wrong. Please be advised that this
happens much less often than one would think, and avoid jumping to happens much less often than one would think, and avoid jumping to
conclusions. conclusions.
@ -566,19 +562,19 @@
list::size() is O(n)! list::size() is O(n)!
</a></dt><dt>6.9. <a href="faq.html#faq.easy_to_fix"> </a></dt><dt>6.9. <a href="faq.html#faq.easy_to_fix">
Aw, that's easy to fix! Aw, that's easy to fix!
</a></dt></dl></td></tr><tr class="question" title="6.1."><td align="left" valign="top"><a name="faq.stream_reopening_fails"></a><a name="q-stream_reopening_fails"></a><p><b>6.1.</b></p></td><td align="left" valign="top"><p> </a></dt></dl></td></tr><tr class="question" title="6.1."><td align="left" valign="top"><a id="faq.stream_reopening_fails"></a><a id="q-stream_reopening_fails"></a><p><strong>6.1.</strong></p></td><td align="left" valign="top"><p>
Reopening a stream fails Reopening a stream fails
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-stream_reopening_fails"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-stream_reopening_fails"></a></td><td align="left" valign="top"><p>
One of the most-reported non-bug reports. Executing a sequence like: One of the most-reported non-bug reports. Executing a sequence like:
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
    #include &lt;fstream&gt;<br>     #include &lt;fstream&gt;<br />
    ...<br>     ...<br />
    std::fstream  fs(<span class="quote"><span class="quote">a_file</span></span>);<br>     std::fstream  fs(<span class="quote"><span class="quote">a_file</span></span>);<br />
    // .<br>     // .<br />
    // . do things with fs...<br>     // . do things with fs...<br />
    // .<br>     // .<br />
    fs.close();<br>     fs.close();<br />
    fs.open(<span class="quote"><span class="quote">a_new_file</span></span>);<br>     fs.open(<span class="quote"><span class="quote">a_new_file</span></span>);<br />
    </p></div><p>     </p></div><p>
All operations on the re-opened <code class="varname">fs</code> will fail, or at All operations on the re-opened <code class="varname">fs</code> will fail, or at
least act very strangely. Yes, they often will, especially if least act very strangely. Yes, they often will, especially if
@ -593,9 +589,9 @@
<span class="emphasis"><em>Update:</em></span> for GCC 4.0 we implemented the resolution <span class="emphasis"><em>Update:</em></span> for GCC 4.0 we implemented the resolution
of <a class="link" href="manual/bugs.html" title="Bugs">DR #409</a> and open() of <a class="link" href="manual/bugs.html" title="Bugs">DR #409</a> and open()
now calls <code class="function">clear()</code> on success! now calls <code class="function">clear()</code> on success!
</p></td></tr><tr class="question" title="6.2."><td align="left" valign="top"><a name="faq.wefcxx_verbose"></a><a name="q-wefcxx_verbose"></a><p><b>6.2.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.2."><td align="left" valign="top"><a id="faq.wefcxx_verbose"></a><a id="q-wefcxx_verbose"></a><p><strong>6.2.</strong></p></td><td align="left" valign="top"><p>
-Weffc++ complains too much -Weffc++ complains too much
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-wefcxx_verbose"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-wefcxx_verbose"></a></td><td align="left" valign="top"><p>
Many warnings are emitted when <code class="literal">-Weffc++</code> is used. Making Many warnings are emitted when <code class="literal">-Weffc++</code> is used. Making
libstdc++ <code class="literal">-Weffc++</code>-clean is not a goal of the project, libstdc++ <code class="literal">-Weffc++</code>-clean is not a goal of the project,
for a few reasons. Mainly, that option tries to enforce for a few reasons. Mainly, that option tries to enforce
@ -605,9 +601,9 @@
We do, however, try to have libstdc++ sources as clean as possible. If We do, however, try to have libstdc++ sources as clean as possible. If
you see some simple changes that pacify <code class="literal">-Weffc++</code> you see some simple changes that pacify <code class="literal">-Weffc++</code>
without other drawbacks, send us a patch. without other drawbacks, send us a patch.
</p></td></tr><tr class="question" title="6.3."><td align="left" valign="top"><a name="faq.ambiguous_overloads"></a><a name="q-ambiguous_overloads"></a><p><b>6.3.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.3."><td align="left" valign="top"><a id="faq.ambiguous_overloads"></a><a id="q-ambiguous_overloads"></a><p><strong>6.3.</strong></p></td><td align="left" valign="top"><p>
Ambiguous overloads after including an old-style header Ambiguous overloads after including an old-style header
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-ambiguous_overloads"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-ambiguous_overloads"></a></td><td align="left" valign="top"><p>
Another problem is the <code class="literal">rel_ops</code> namespace and the template Another problem is the <code class="literal">rel_ops</code> namespace and the template
comparison operator functions contained therein. If they become comparison operator functions contained therein. If they become
visible in the same namespace as other comparison functions visible in the same namespace as other comparison functions
@ -617,9 +613,9 @@
<a class="link" href="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html" target="_top">sums <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html" target="_top">sums
things up here</a>. The collisions with vector/string iterator things up here</a>. The collisions with vector/string iterator
types have been fixed for 3.1. types have been fixed for 3.1.
</p></td></tr><tr class="question" title="6.4."><td align="left" valign="top"><a name="faq.v2_headers"></a><a name="q-v2_headers"></a><p><b>6.4.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.4."><td align="left" valign="top"><a id="faq.v2_headers"></a><a id="q-v2_headers"></a><p><strong>6.4.</strong></p></td><td align="left" valign="top"><p>
The g++-3 headers are <span class="emphasis"><em>not ours</em></span> The g++-3 headers are <span class="emphasis"><em>not ours</em></span>
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-v2_headers"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-v2_headers"></a></td><td align="left" valign="top"><p>
If you are using headers in If you are using headers in
<code class="filename">${prefix}/include/g++-3</code>, or if the installed <code class="filename">${prefix}/include/g++-3</code>, or if the installed
library's name looks like <code class="filename">libstdc++-2.10.a</code> or library's name looks like <code class="filename">libstdc++-2.10.a</code> or
@ -633,10 +629,10 @@
'v'?). Starting with version 3.2 the headers are installed in 'v'?). Starting with version 3.2 the headers are installed in
<code class="filename">${prefix}/include/c++/${version}</code> as this prevents <code class="filename">${prefix}/include/c++/${version}</code> as this prevents
headers from previous versions being found by mistake. headers from previous versions being found by mistake.
</p></td></tr><tr class="question" title="6.5."><td align="left" valign="top"><a name="faq.boost_concept_checks"></a><a name="q-boost_concept_checks"></a><p><b>6.5.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.5."><td align="left" valign="top"><a id="faq.boost_concept_checks"></a><a id="q-boost_concept_checks"></a><p><strong>6.5.</strong></p></td><td align="left" valign="top"><p>
Errors about <span class="emphasis"><em>*Concept</em></span> and Errors about <span class="emphasis"><em>*Concept</em></span> and
<span class="emphasis"><em>constraints</em></span> in the STL <span class="emphasis"><em>constraints</em></span> in the STL
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-boost_concept_checks"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-boost_concept_checks"></a></td><td align="left" valign="top"><p>
If you see compilation errors containing messages about If you see compilation errors containing messages about
<span class="errortext">foo Concept </span>and something to do with a <span class="errortext">foo Concept </span>and something to do with a
<span class="errortext">constraints</span> member function, then most <span class="errortext">constraints</span> member function, then most
@ -650,28 +646,28 @@
checks, is available in the checks, is available in the
<a class="link" href="manual/bk01pt02ch05s02.html" title="Concept Checking">Diagnostics</a>. <a class="link" href="manual/bk01pt02ch05s02.html" title="Concept Checking">Diagnostics</a>.
chapter of the manual. chapter of the manual.
</p></td></tr><tr class="question" title="6.6."><td align="left" valign="top"><a name="faq.dlopen_crash"></a><a name="q-dlopen_crash"></a><p><b>6.6.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.6."><td align="left" valign="top"><a id="faq.dlopen_crash"></a><a id="q-dlopen_crash"></a><p><strong>6.6.</strong></p></td><td align="left" valign="top"><p>
Program crashes when using library code in a Program crashes when using library code in a
dynamically-loaded library dynamically-loaded library
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-dlopen_crash"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-dlopen_crash"></a></td><td align="left" valign="top"><p>
If you are using the C++ library across dynamically-loaded If you are using the C++ library across dynamically-loaded
objects, make certain that you are passing the correct options objects, make certain that you are passing the correct options
when compiling and linking: when compiling and linking:
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
    // compile your library components<br>     // compile your library components<br />
    g++ -fPIC -c a.cc<br>     g++ -fPIC -c a.cc<br />
    g++ -fPIC -c b.cc<br>     g++ -fPIC -c b.cc<br />
    ...<br>     ...<br />
    g++ -fPIC -c z.cc<br>     g++ -fPIC -c z.cc<br />
<br> <br />
    // create your library<br>     // create your library<br />
    g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o<br>     g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o<br />
<br> <br />
    // link the executable<br>     // link the executable<br />
    g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl<br>     g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl<br />
    </p></div></td></tr><tr class="question" title="6.7."><td align="left" valign="top"><a name="faq.memory_leaks"></a><a name="q-memory_leaks"></a><p><b>6.7.</b></p></td><td align="left" valign="top"><p>     </p></div></td></tr><tr class="question" title="6.7."><td align="left" valign="top"><a id="faq.memory_leaks"></a><a id="q-memory_leaks"></a><p><strong>6.7.</strong></p></td><td align="left" valign="top"><p>
<span class="quote"><span class="quote">Memory leaks</span></span> in containers <span class="quote"><span class="quote">Memory leaks</span></span> in containers
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-memory_leaks"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-memory_leaks"></a></td><td align="left" valign="top"><p>
A few people have reported that the standard containers appear A few people have reported that the standard containers appear
to leak memory when tested with memory checkers such as to leak memory when tested with memory checkers such as
<a class="link" href="http://valgrind.org/" target="_top">valgrind</a>. <a class="link" href="http://valgrind.org/" target="_top">valgrind</a>.
@ -682,15 +678,15 @@
want to test the library for memory leaks please read want to test the library for memory leaks please read
<a class="link" href="manual/debug.html#debug.memory" title="Memory Leak Hunting">Tips for memory leak hunting</a> <a class="link" href="manual/debug.html#debug.memory" title="Memory Leak Hunting">Tips for memory leak hunting</a>
first. first.
</p></td></tr><tr class="question" title="6.8."><td align="left" valign="top"><a name="faq.list_size_on"></a><a name="q-list_size_on"></a><p><b>6.8.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.8."><td align="left" valign="top"><a id="faq.list_size_on"></a><a id="q-list_size_on"></a><p><strong>6.8.</strong></p></td><td align="left" valign="top"><p>
list::size() is O(n)! list::size() is O(n)!
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-list_size_on"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-list_size_on"></a></td><td align="left" valign="top"><p>
See See
the <a class="link" href="manual/containers.html" title="Chapter 9.  Containers">Containers</a> the <a class="link" href="manual/containers.html" title="Chapter 9.  Containers">Containers</a>
chapter. chapter.
</p></td></tr><tr class="question" title="6.9."><td align="left" valign="top"><a name="faq.easy_to_fix"></a><a name="q-easy_to_fix"></a><p><b>6.9.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="6.9."><td align="left" valign="top"><a id="faq.easy_to_fix"></a><a id="q-easy_to_fix"></a><p><strong>6.9.</strong></p></td><td align="left" valign="top"><p>
Aw, that's easy to fix! Aw, that's easy to fix!
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-easy_to_fix"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-easy_to_fix"></a></td><td align="left" valign="top"><p>
If you have found a bug in the library and you think you have If you have found a bug in the library and you think you have
a working fix, then send it in! The main GCC site has a page a working fix, then send it in! The main GCC site has a page
on <a class="link" href="http://gcc.gnu.org/contribute.html" target="_top">submitting on <a class="link" href="http://gcc.gnu.org/contribute.html" target="_top">submitting
@ -721,9 +717,9 @@
What's an ABI and why is it so messy? What's an ABI and why is it so messy?
</a></dt><dt>7.8. <a href="faq.html#faq.size_equals_capacity"> </a></dt><dt>7.8. <a href="faq.html#faq.size_equals_capacity">
How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size? How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
</a></dt></dl></td></tr><tr class="question" title="7.1."><td align="left" valign="top"><a name="faq.iterator_as_pod"></a><a name="faq.iterator_as_pod_q"></a><p><b>7.1.</b></p></td><td align="left" valign="top"><p> </a></dt></dl></td></tr><tr class="question" title="7.1."><td align="left" valign="top"><a id="faq.iterator_as_pod"></a><a id="faq.iterator_as_pod_q"></a><p><strong>7.1.</strong></p></td><td align="left" valign="top"><p>
string::iterator is not char*; vector&lt;T&gt;::iterator is not T* string::iterator is not char*; vector&lt;T&gt;::iterator is not T*
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="faq.iterator_as_pod_a"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="faq.iterator_as_pod_a"></a></td><td align="left" valign="top"><p>
If you have code that depends on container&lt;T&gt; iterators If you have code that depends on container&lt;T&gt; iterators
being implemented as pointer-to-T, your code is broken. It's being implemented as pointer-to-T, your code is broken. It's
considered a feature, not a bug, that libstdc++ points this out. considered a feature, not a bug, that libstdc++ points this out.
@ -740,9 +736,9 @@
certain expressions to <code class="varname">&amp;*i</code>. Future revisions certain expressions to <code class="varname">&amp;*i</code>. Future revisions
of the Standard are expected to bless this usage for of the Standard are expected to bless this usage for
vector&lt;&gt; (but not for basic_string&lt;&gt;). vector&lt;&gt; (but not for basic_string&lt;&gt;).
</p></td></tr><tr class="question" title="7.2."><td align="left" valign="top"><a name="faq.what_is_next"></a><a name="q-what_is_next"></a><p><b>7.2.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="7.2."><td align="left" valign="top"><a id="faq.what_is_next"></a><a id="q-what_is_next"></a><p><strong>7.2.</strong></p></td><td align="left" valign="top"><p>
What's next after libstdc++? What's next after libstdc++?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-what_is_next"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_is_next"></a></td><td align="left" valign="top"><p>
Hopefully, not much. The goal of libstdc++ is to produce a Hopefully, not much. The goal of libstdc++ is to produce a
fully-compliant, fully-portable Standard Library. After that, fully-compliant, fully-portable Standard Library. After that,
we're mostly done: there won't <span class="emphasis"><em>be</em></span> any we're mostly done: there won't <span class="emphasis"><em>be</em></span> any
@ -753,9 +749,9 @@
this effort is described in this effort is described in
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top"> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">
The C++ Library Technical Report 1</a>. The C++ Library Technical Report 1</a>.
</p></td></tr><tr class="question" title="7.3."><td align="left" valign="top"><a name="faq.sgi_stl"></a><a name="q-sgi_stl"></a><p><b>7.3.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="7.3."><td align="left" valign="top"><a id="faq.sgi_stl"></a><a id="q-sgi_stl"></a><p><strong>7.3.</strong></p></td><td align="left" valign="top"><p>
What about the STL from SGI? What about the STL from SGI?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-sgi_stl"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-sgi_stl"></a></td><td align="left" valign="top"><p>
The <a class="link" href="http://www.sgi.com/tech/stl/" target="_top">STL from SGI</a>, The <a class="link" href="http://www.sgi.com/tech/stl/" target="_top">STL from SGI</a>,
version 3.3, was the final merge of the STL codebase. The version 3.3, was the final merge of the STL codebase. The
code in libstdc++ contains many fixes and changes, and code in libstdc++ contains many fixes and changes, and
@ -776,13 +772,13 @@
</p><p> </p><p>
The FAQ for SGI's STL (one jump off of their main page) is The FAQ for SGI's STL (one jump off of their main page) is
still recommended reading. still recommended reading.
</p></td></tr><tr class="question" title="7.4."><td align="left" valign="top"><a name="faq.extensions_and_backwards_compat"></a><a name="q-extensions_and_backwards_compat"></a><p><b>7.4.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="7.4."><td align="left" valign="top"><a id="faq.extensions_and_backwards_compat"></a><a id="q-extensions_and_backwards_compat"></a><p><strong>7.4.</strong></p></td><td align="left" valign="top"><p>
Extensions and Backward Compatibility Extensions and Backward Compatibility
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-extensions_and_backwards_compat"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-extensions_and_backwards_compat"></a></td><td align="left" valign="top"><p>
See the <a class="link" href="manual/backwards.html" title="Backwards Compatibility">link</a> on backwards compatibility and <a class="link" href="manual/api.html" title="API Evolution and Deprecation History">link</a> on evolution. See the <a class="link" href="manual/backwards.html" title="Backwards Compatibility">link</a> on backwards compatibility and <a class="link" href="manual/api.html" title="API Evolution and Deprecation History">link</a> on evolution.
</p></td></tr><tr class="question" title="7.5."><td align="left" valign="top"><a name="faq.tr1_support"></a><a name="q-tr1_support"></a><p><b>7.5.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="7.5."><td align="left" valign="top"><a id="faq.tr1_support"></a><a id="q-tr1_support"></a><p><strong>7.5.</strong></p></td><td align="left" valign="top"><p>
Does libstdc++ support TR1? Does libstdc++ support TR1?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-tr1_support"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-tr1_support"></a></td><td align="left" valign="top"><p>
Yes. Yes.
</p><p> </p><p>
The C++ Standard Library Technical Report adds many new features to The C++ Standard Library Technical Report adds many new features to
@ -792,8 +788,8 @@
</p><p> </p><p>
The implementation status of TR1 in libstdc++ can be tracked <a class="link" href="manual/status.html#status.iso.tr1" title="C++ TR1">on the TR1 status The implementation status of TR1 in libstdc++ can be tracked <a class="link" href="manual/status.html#status.iso.tr1" title="C++ TR1">on the TR1 status
page</a>. page</a>.
</p></td></tr><tr class="question" title="7.6."><td align="left" valign="top"><a name="faq.get_iso_cxx"></a><a name="q-get_iso_cxx"></a><p><b>7.6.</b></p></td><td align="left" valign="top"><p>How do I get a copy of the ISO C++ Standard? </p></td></tr><tr class="question" title="7.6."><td align="left" valign="top"><a id="faq.get_iso_cxx"></a><a id="q-get_iso_cxx"></a><p><strong>7.6.</strong></p></td><td align="left" valign="top"><p>How do I get a copy of the ISO C++ Standard?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-get_iso_cxx"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-get_iso_cxx"></a></td><td align="left" valign="top"><p>
Copies of the full ISO 14882 standard are available on line via Copies of the full ISO 14882 standard are available on line via
the ISO mirror site for committee members. Non-members, or those the ISO mirror site for committee members. Non-members, or those
who have not paid for the privilege of sitting on the committee who have not paid for the privilege of sitting on the committee
@ -811,9 +807,9 @@
</p><p> </p><p>
The 2003 version of the standard (the 1998 version plus TC1) is The 2003 version of the standard (the 1998 version plus TC1) is
available in print, ISBN 0-470-84674-7. available in print, ISBN 0-470-84674-7.
</p></td></tr><tr class="question" title="7.7."><td align="left" valign="top"><a name="faq.what_is_abi"></a><a name="q-what_is_abi"></a><p><b>7.7.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="7.7."><td align="left" valign="top"><a id="faq.what_is_abi"></a><a id="q-what_is_abi"></a><p><strong>7.7.</strong></p></td><td align="left" valign="top"><p>
What's an ABI and why is it so messy? What's an ABI and why is it so messy?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-what_is_abi"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-what_is_abi"></a></td><td align="left" valign="top"><p>
<acronym class="acronym">ABI</acronym> stands for <span class="quote"><span class="quote">Application Binary <acronym class="acronym">ABI</acronym> stands for <span class="quote"><span class="quote">Application Binary
Interface</span></span>. Conventionally, it refers to a great Interface</span></span>. Conventionally, it refers to a great
mass of details about how arguments are arranged on the call mass of details about how arguments are arranged on the call
@ -859,17 +855,17 @@
so they may later be changed. Deciding which, and implementing so they may later be changed. Deciding which, and implementing
the decisions, must happen before you can reasonably document a the decisions, must happen before you can reasonably document a
candidate C++ ABI that encompasses the standard library. candidate C++ ABI that encompasses the standard library.
</p></td></tr><tr class="question" title="7.8."><td align="left" valign="top"><a name="faq.size_equals_capacity"></a><a name="q-size_equals_capacity"></a><p><b>7.8.</b></p></td><td align="left" valign="top"><p> </p></td></tr><tr class="question" title="7.8."><td align="left" valign="top"><a id="faq.size_equals_capacity"></a><a id="q-size_equals_capacity"></a><p><strong>7.8.</strong></p></td><td align="left" valign="top"><p>
How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size? How do I make std::vector&lt;T&gt;::capacity() == std::vector&lt;T&gt;::size?
</p></td></tr><tr class="answer"><td align="left" valign="top"><a name="a-size_equals_capacity"></a></td><td align="left" valign="top"><p> </p></td></tr><tr class="answer"><td align="left" valign="top"><a id="a-size_equals_capacity"></a></td><td align="left" valign="top"><p>
The standard idiom for deallocating a <code class="classname">vector&lt;T&gt;</code>'s The standard idiom for deallocating a <code class="classname">vector&lt;T&gt;</code>'s
unused memory is to create a temporary copy of the vector and swap their unused memory is to create a temporary copy of the vector and swap their
contents, e.g. for <code class="classname">vector&lt;T&gt; v</code> contents, e.g. for <code class="classname">vector&lt;T&gt; v</code>
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
     std::vector&lt;T&gt;(v).swap(v);<br>      std::vector&lt;T&gt;(v).swap(v);<br />
    </p></div><p>     </p></div><p>
The copy will take O(n) time and the swap is constant time. The copy will take O(n) time and the swap is constant time.
</p><p> </p><p>
See <a class="link" href="manual/strings.html#strings.string.shrink" title="Shrink to Fit">Shrink-to-fit See <a class="link" href="manual/strings.html#strings.string.shrink" title="Shrink to Fit">Shrink-to-fit
strings</a> for a similar solution for strings. strings</a> for a similar solution for strings.
</p></td></tr></tbody></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk03.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html> </p></td></tr></tbody></table></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk03.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,30 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>ABI Policy and Guidelines</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ABI Policy and Guidelines</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; ABI&#10; , &#10; version&#10; , &#10; dynamic&#10; , &#10; shared&#10; , &#10; compatibility&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="test.html" title="Test" /><link rel="next" href="api.html" title="API Evolution and Deprecation History" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ABI Policy and Guidelines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
ABI
,
version
,
dynamic
,
shared
,
compatibility
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="prev" href="test.html" title="Test"><link rel="next" href="api.html" title="API Evolution and Deprecation History"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ABI Policy and Guidelines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr></div><div class="section" title="ABI Policy and Guidelines"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="appendix.porting.abi"></a>ABI Policy and Guidelines</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="section" title="ABI Policy and Guidelines"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.abi"></a>ABI Policy and Guidelines</h2></div></div></div><p>
</p><div class="section" title="The C++ Interface"><div class="titlepage"><div><div><h3 class="title"><a name="abi.cxx_interface"></a>The C++ Interface</h3></div></div></div><p> </p><div class="section" title="The C++ Interface"><div class="titlepage"><div><div><h3 class="title"><a id="abi.cxx_interface"></a>The C++ Interface</h3></div></div></div><p>
C++ applications often depend on specific language support C++ applications often depend on specific language support
routines, say for throwing exceptions, or catching exceptions, and routines, say for throwing exceptions, or catching exceptions, and
perhaps also depend on features in the C++ Standard Library. perhaps also depend on features in the C++ Standard Library.
@ -78,10 +58,10 @@ given compiler ABI. In a nutshell:
To use a specific version of the C++ ABI, one must use a To use a specific version of the C++ ABI, one must use a
corresponding GNU C++ toolchain (i.e., g++ and libstdc++) that corresponding GNU C++ toolchain (i.e., g++ and libstdc++) that
implements the C++ ABI in question. implements the C++ ABI in question.
</p></div><div class="section" title="Versioning"><div class="titlepage"><div><div><h3 class="title"><a name="abi.versioning"></a>Versioning</h3></div></div></div><p> The C++ interface has evolved throughout the history of the GNU </p></div><div class="section" title="Versioning"><div class="titlepage"><div><div><h3 class="title"><a id="abi.versioning"></a>Versioning</h3></div></div></div><p> The C++ interface has evolved throughout the history of the GNU
C++ toolchain. With each release, various details have been changed so C++ toolchain. With each release, various details have been changed so
as to give distinct versions to the C++ interface. as to give distinct versions to the C++ interface.
</p><div class="section" title="Goals"><div class="titlepage"><div><div><h4 class="title"><a name="abi.versioning.goals"></a>Goals</h4></div></div></div><p>Extending existing, stable ABIs. Versioning gives subsequent </p><div class="section" title="Goals"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.goals"></a>Goals</h4></div></div></div><p>Extending existing, stable ABIs. Versioning gives subsequent
releases of library binaries the ability to add new symbols and add releases of library binaries the ability to add new symbols and add
functionality, all the while retaining compatibility with the previous functionality, all the while retaining compatibility with the previous
releases in the series. Thus, program binaries linked with the initial releases in the series. Thus, program binaries linked with the initial
@ -95,7 +75,7 @@ binary in a release series (with additional symbols added), substitute
in the initial release of the library binary, and remain link in the initial release of the library binary, and remain link
compatible. compatible.
</p><p>Allows multiple, incompatible ABIs to coexist at the same time. </p><p>Allows multiple, incompatible ABIs to coexist at the same time.
</p></div><div class="section" title="History"><div class="titlepage"><div><div><h4 class="title"><a name="abi.versioning.history"></a>History</h4></div></div></div><p> </p></div><div class="section" title="History"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.history"></a>History</h4></div></div></div><p>
How can this complexity be managed? What does C++ versioning mean? How can this complexity be managed? What does C++ versioning mean?
Because library and compiler changes often make binaries compiled Because library and compiler changes often make binaries compiled
with one version of the GNU tools incompatible with binaries with one version of the GNU tools incompatible with binaries
@ -211,7 +191,7 @@ compatible.
properly, they allow both the GNU C++ tools implementation, and properly, they allow both the GNU C++ tools implementation, and
programs using them, an evolving yet controlled development that programs using them, an evolving yet controlled development that
maintains backward compatibility. maintains backward compatibility.
</p></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a name="abi.versioning.prereq"></a>Prerequisites</h4></div></div></div><p> </p></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.prereq"></a>Prerequisites</h4></div></div></div><p>
Minimum environment that supports a versioned ABI: A supported Minimum environment that supports a versioned ABI: A supported
dynamic linker, a GNU linker of sufficient vintage to understand dynamic linker, a GNU linker of sufficient vintage to understand
demangled C++ name globbing (ld) or the Sun linker, a shared demangled C++ name globbing (ld) or the Sun linker, a shared
@ -226,7 +206,7 @@ compatible.
Most modern GNU/Linux and BSD versions, particularly ones using Most modern GNU/Linux and BSD versions, particularly ones using
GCC 3.1 and later, will meet the GCC 3.1 and later, will meet the
requirements above, as does Solaris 2.5 and up. requirements above, as does Solaris 2.5 and up.
</p></div><div class="section" title="Configuring"><div class="titlepage"><div><div><h4 class="title"><a name="abi.versioning.config"></a>Configuring</h4></div></div></div><p> </p></div><div class="section" title="Configuring"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.config"></a>Configuring</h4></div></div></div><p>
It turns out that most of the configure options that change It turns out that most of the configure options that change
default behavior will impact the mangled names of exported default behavior will impact the mangled names of exported
symbols, and thus impact versioning and compatibility. symbols, and thus impact versioning and compatibility.
@ -244,7 +224,7 @@ compatible.
attempts to make sure that all the requirement for symbol attempts to make sure that all the requirement for symbol
versioning are in place. For more information, please consult versioning are in place. For more information, please consult
acinclude.m4. acinclude.m4.
</p></div><div class="section" title="Checking Active"><div class="titlepage"><div><div><h4 class="title"><a name="abi.versioning.active"></a>Checking Active</h4></div></div></div><p> </p></div><div class="section" title="Checking Active"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.active"></a>Checking Active</h4></div></div></div><p>
When the GNU C++ library is being built with symbol versioning When the GNU C++ library is being built with symbol versioning
on, you should see the following at configure time for on, you should see the following at configure time for
libstdc++: libstdc++:
@ -292,12 +272,12 @@ On Solaris 2, you can use <code class="code">pvs -r</code> instead:
libc.so.1 (SUNWprivate_1.1, SYSVABI_1.3); libc.so.1 (SUNWprivate_1.1, SYSVABI_1.3);
</pre><p> </pre><p>
<code class="code">ldd -v</code> works too, but is very verbose. <code class="code">ldd -v</code> works too, but is very verbose.
</p></div></div><div class="section" title="Allowed Changes"><div class="titlepage"><div><div><h3 class="title"><a name="abi.changes_allowed"></a>Allowed Changes</h3></div></div></div><p> </p></div></div><div class="section" title="Allowed Changes"><div class="titlepage"><div><div><h3 class="title"><a id="abi.changes_allowed"></a>Allowed Changes</h3></div></div></div><p>
The following will cause the library minor version number to The following will cause the library minor version number to
increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5". increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5".
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Adding an exported global or static data member</p></li><li class="listitem"><p>Adding an exported function, static or non-virtual member function</p></li><li class="listitem"><p>Adding an exported symbol or symbols by additional instantiations</p></li></ol></div><p> </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Adding an exported global or static data member</p></li><li class="listitem"><p>Adding an exported function, static or non-virtual member function</p></li><li class="listitem"><p>Adding an exported symbol or symbols by additional instantiations</p></li></ol></div><p>
Other allowed changes are possible. Other allowed changes are possible.
</p></div><div class="section" title="Prohibited Changes"><div class="titlepage"><div><div><h3 class="title"><a name="abi.changes_no"></a>Prohibited Changes</h3></div></div></div><p> </p></div><div class="section" title="Prohibited Changes"><div class="titlepage"><div><div><h3 class="title"><a id="abi.changes_no"></a>Prohibited Changes</h3></div></div></div><p>
The following non-exhaustive list will cause the library major version The following non-exhaustive list will cause the library major version
number to increase, say from "libstdc++.so.3.0.4" to number to increase, say from "libstdc++.so.3.0.4" to
"libstdc++.so.4.0.0". "libstdc++.so.4.0.0".
@ -316,7 +296,7 @@ class in registers, the compiler will be forced to use memory. See the
section on <a class="link" href="http://www.codesourcery.com/public/cxx-abi/abi.html#calls" target="_top">Function section on <a class="link" href="http://www.codesourcery.com/public/cxx-abi/abi.html#calls" target="_top">Function
Calling Conventions and APIs</a> Calling Conventions and APIs</a>
of the C++ ABI documentation for further details. of the C++ ABI documentation for further details.
</p></li></ol></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h3 class="title"><a name="abi.impl"></a>Implementation</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> </p></li></ol></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h3 class="title"><a id="abi.impl"></a>Implementation</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
Separation of interface and implementation Separation of interface and implementation
</p><p> </p><p>
This is accomplished by two techniques that separate the API from This is accomplished by two techniques that separate the API from
@ -364,7 +344,7 @@ exceptional symbols are allowed to be visible.</p></dd><dt><span class="term"><c
<code class="code">CXXABI</code>, select items are allowed to be visible.</p></dd></dl></div><p> <code class="code">CXXABI</code>, select items are allowed to be visible.</p></dd></dl></div><p>
</p></li><li class="listitem"><p>Freezing the API</p><p>Disallowed changes, as above, are not made on a stable release </p></li><li class="listitem"><p>Freezing the API</p><p>Disallowed changes, as above, are not made on a stable release
branch. Enforcement tends to be less strict with GNU extensions that branch. Enforcement tends to be less strict with GNU extensions that
standard includes.</p></li></ol></div></div><div class="section" title="Testing"><div class="titlepage"><div><div><h3 class="title"><a name="abi.testing"></a>Testing</h3></div></div></div><div class="section" title="Single ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a name="abi.testing.single"></a>Single ABI Testing</h4></div></div></div><p> standard includes.</p></li></ol></div></div><div class="section" title="Testing"><div class="titlepage"><div><div><h3 class="title"><a id="abi.testing"></a>Testing</h3></div></div></div><div class="section" title="Single ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.single"></a>Single ABI Testing</h4></div></div></div><p>
Testing for GNU C++ ABI changes is composed of two distinct Testing for GNU C++ ABI changes is composed of two distinct
areas: testing the C++ compiler (g++) for compiler changes, and areas: testing the C++ compiler (g++) for compiler changes, and
testing the C++ library (libstdc++) for library changes. testing the C++ library (libstdc++) for library changes.
@ -430,7 +410,7 @@ and other detailed data is not displayed with this flag.
</p><p> </p><p>
Perhaps there are other C++ ABI checkers. If so, please notify Perhaps there are other C++ ABI checkers. If so, please notify
us. We'd like to know about them! us. We'd like to know about them!
</p></div><div class="section" title="Multiple ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a name="abi.testing.multi"></a>Multiple ABI Testing</h4></div></div></div><p> </p></div><div class="section" title="Multiple ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.multi"></a>Multiple ABI Testing</h4></div></div></div><p>
A "C" application, dynamically linked to two shared libraries, liba, A "C" application, dynamically linked to two shared libraries, liba,
libb. The dependent library liba is a C++ shared library compiled with libb. The dependent library liba is a C++ shared library compiled with
GCC 3.3, and uses io, exceptions, locale, etc. The dependent library GCC 3.3, and uses io, exceptions, locale, etc. The dependent library
@ -493,7 +473,7 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
This resulting binary, when executed, will be able to safely use This resulting binary, when executed, will be able to safely use
code from both liba, and the dependent libstdc++.so.6, and libb, code from both liba, and the dependent libstdc++.so.6, and libb,
with the dependent libstdc++.so.5. with the dependent libstdc++.so.5.
</p></div></div><div class="section" title="Outstanding Issues"><div class="titlepage"><div><div><h3 class="title"><a name="abi.issues"></a>Outstanding Issues</h3></div></div></div><p> </p></div></div><div class="section" title="Outstanding Issues"><div class="titlepage"><div><div><h3 class="title"><a id="abi.issues"></a>Outstanding Issues</h3></div></div></div><p>
Some features in the C++ language make versioning especially Some features in the C++ language make versioning especially
difficult. In particular, compiler generated constructs such as difficult. In particular, compiler generated constructs such as
implicit instantiations for templates, typeinfo information, and implicit instantiations for templates, typeinfo information, and
@ -506,51 +486,51 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
<a class="link" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a> <a class="link" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a>
</p><p> </p><p>
<a class="link" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a> <a class="link" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a>
</p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a name="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry" title="ABIcheck"><a name="biblio.abicheck"></a><p>[biblio.abicheck] <span class="title"><i> </p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry" title="ABIcheck"><a id="biblio.abicheck"></a><p>[biblio.abicheck] <span class="title"><em>
<a class="link" href="http://abicheck.sourceforge.net" target="_top"> <a class="link" href="http://abicheck.sourceforge.net" target="_top">
ABIcheck ABIcheck
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="C++ ABI Summary"><a name="biblio.cxxabi"></a><p>[biblio.cxxabi] <span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="C++ ABI Summary"><a id="biblio.cxxabi"></a><p>[biblio.cxxabi] <span class="title"><em>
<a class="link" href="http://www.codesourcery.com/public/cxx-abi" target="_top"> <a class="link" href="http://www.codesourcery.com/public/cxx-abi" target="_top">
C++ ABI Summary C++ ABI Summary
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="Intel Compilers for Linux Compatibility with the GNU Compilers"><a name="id684275"></a><p><span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="Intel Compilers for Linux Compatibility with the GNU Compilers"><a id="id658347"></a><p><span class="title"><em>
<a class="link" href="http://www.intel.com/cd/software/products/asmo-na/eng/284736.htm" target="_top"> <a class="link" href="http://www.intel.com/cd/software/products/asmo-na/eng/284736.htm" target="_top">
Intel Compilers for Linux Compatibility with the GNU Compilers Intel Compilers for Linux Compatibility with the GNU Compilers
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="Linker and Libraries Guide (document 819-0690)"><a name="id684291"></a><p><span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="Linker and Libraries Guide (document 819-0690)"><a id="id658363"></a><p><span class="title"><em>
<a class="link" href="http://download.oracle.com/docs/cd/E19963-01/html/819-0690/index.html" target="_top"> <a class="link" href="http://download.oracle.com/docs/cd/E19963-01/html/819-0690/index.html" target="_top">
Linker and Libraries Guide (document 819-0690) Linker and Libraries Guide (document 819-0690)
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="Sun Studio 11: C++ Migration Guide (document 819-3689)"><a name="id684306"></a><p><span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="Sun Studio 11: C++ Migration Guide (document 819-3689)"><a id="id658378"></a><p><span class="title"><em>
<a class="link" href="http://download.oracle.com/docs/cd/E19422-01/819-3689/index.html" target="_top"> <a class="link" href="http://download.oracle.com/docs/cd/E19422-01/819-3689/index.html" target="_top">
Sun Studio 11: C++ Migration Guide (document 819-3689) Sun Studio 11: C++ Migration Guide (document 819-3689)
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="How to Write Shared Libraries"><a name="id684322"></a><p><span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="How to Write Shared Libraries"><a id="id658394"></a><p><span class="title"><em>
<a class="link" href="http://www.akkadia.org/drepper/dsohowto.pdf" target="_top"> <a class="link" href="http://www.akkadia.org/drepper/dsohowto.pdf" target="_top">
How to Write Shared Libraries How to Write Shared Libraries
</a> </a>
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry" title="C++ ABI for the ARM Architecture"><a name="id684350"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry" title="C++ ABI for the ARM Architecture"><a id="id658422"></a><p><span class="title"><em>
<a class="link" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top"> <a class="link" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top">
C++ ABI for the ARM Architecture C++ ABI for the ARM Architecture
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="Dynamic Shared Objects: Survey and Issues"><a name="id684365"></a><p><span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="Dynamic Shared Objects: Survey and Issues"><a id="id658437"></a><p><span class="title"><em>
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top"> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top">
Dynamic Shared Objects: Survey and Issues Dynamic Shared Objects: Survey and Issues
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
ISO C++ J16/06-0046 ISO C++ J16/06-0046
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Versioning With Namespaces"><a name="id684393"></a><p><span class="title"><i> . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Versioning With Namespaces"><a id="id658465"></a><p><span class="title"><em>
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html" target="_top"> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html" target="_top">
Versioning With Namespaces Versioning With Namespaces
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
ISO C++ J16/06-0083 ISO C++ J16/06-0083
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems"><a name="id684420"></a><p><span class="title"><i> . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry" title="Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems"><a id="id658492"></a><p><span class="title"><em>
<a class="link" href="http://syrcose.ispras.ru/2009/files/SYRCoSE2009-CfP.pdf" target="_top"> <a class="link" href="http://syrcose.ispras.ru/2009/files/SYRCoSE2009-CfP.pdf" target="_top">
Binary Compatibility of Shared Libraries Implemented in C++ Binary Compatibility of Shared Libraries Implemented in C++
on GNU/Linux Systems on GNU/Linux Systems
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
SYRCoSE 2009 SYRCoSE 2009
. </span><span class="author"><span class="firstname">Pavel</span> <span class="surname">Shved</span>. </span><span class="author"><span class="firstname">Denis</span> <span class="surname">Silakov</span>. </span></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Test </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html> . </span><span class="author"><span class="firstname">Pavel</span> <span class="surname">Shved</span>. </span><span class="author"><span class="firstname">Denis</span> <span class="surname">Silakov</span>. </span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Test </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html>

View File

@ -1,24 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 11.  Algorithms</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 11.  Algorithms</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; algorithm&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="iterators.html" title="Chapter 10.  Iterators" /><link rel="next" href="numerics.html" title="Chapter 12.  Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. 
library
,
algorithm
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="iterators.html" title="Chapter 10.  Iterators"><link rel="next" href="numerics.html" title="Chapter 12.  Numerics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. 
Algorithms Algorithms
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 11.  Algorithms"><div class="titlepage"><div><div><h2 class="title"><a name="std.algorithms"></a>Chapter 11.  </th><td width="20%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 11.  Algorithms"><div class="titlepage"><div><div><h2 class="title"><a id="std.algorithms"></a>Chapter 11. 
Algorithms Algorithms
<a class="indexterm" name="id628522"></a> <a id="id602593" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="algorithms.html#std.algorithms.mutating">Mutating</a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="algorithms.html#std.algorithms.mutating">Mutating</a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></dl></dd></dl></div><p>
The neatest accomplishment of the algorithms section is that all the The neatest accomplishment of the algorithms section is that all the
work is done via iterators, not containers directly. This means two work is done via iterators, not containers directly. This means two
important things: important things:
@ -52,7 +42,7 @@
to cause so much confusion. Once you to cause so much confusion. Once you
get <span class="emphasis"><em>range</em></span> into your head (it's not that hard, get <span class="emphasis"><em>range</em></span> into your head (it's not that hard,
honest!), then the algorithms are a cakewalk. honest!), then the algorithms are a cakewalk.
</p><div class="section" title="Mutating"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.algorithms.mutating"></a>Mutating</h2></div></div></div><div class="section" title="swap"><div class="titlepage"><div><div><h3 class="title"><a name="algorithms.mutating.swap"></a><code class="function">swap</code></h3></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h4 class="title"><a name="algorithms.swap.specializations"></a>Specializations</h4></div></div></div><p>If you call <code class="code"> std::swap(x,y); </code> where x and y are standard </p><div class="section" title="Mutating"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.algorithms.mutating"></a>Mutating</h2></div></div></div><div class="section" title="swap"><div class="titlepage"><div><div><h3 class="title"><a id="algorithms.mutating.swap"></a><code class="function">swap</code></h3></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h4 class="title"><a id="algorithms.swap.specializations"></a>Specializations</h4></div></div></div><p>If you call <code class="code"> std::swap(x,y); </code> where x and y are standard
containers, then the call will automatically be replaced by a call to containers, then the call will automatically be replaced by a call to
<code class="code"> x.swap(y); </code> instead. <code class="code"> x.swap(y); </code> instead.
</p><p>This allows member functions of each container class to take over, and </p><p>This allows member functions of each container class to take over, and
@ -62,7 +52,7 @@
fact use constant-time swaps.) This should not be surprising, since fact use constant-time swaps.) This should not be surprising, since
for two containers of the same type to swap contents, only some for two containers of the same type to swap contents, only some
internal pointers to storage need to be exchanged. internal pointers to storage need to be exchanged.
</p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10.  </p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 10. 
Iterators Iterators
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 12.   </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 12. 

View File

@ -1,19 +1,11 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>API Evolution and Deprecation History</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content="ISO C++, api, evolution, deprecation, history"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>API Evolution and Deprecation History</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="ISO C++, api, evolution, deprecation, history" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="abi.html" title="ABI Policy and Guidelines" /><link rel="next" href="backwards.html" title="Backwards Compatibility" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API Evolution and Deprecation History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="prev" href="abi.html" title="ABI Policy and Guidelines"><link rel="next" href="backwards.html" title="Backwards Compatibility"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API Evolution and Deprecation History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th><td width="20%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr></table><hr></div><div class="section" title="API Evolution and Deprecation History"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="appendix.porting.api"></a>API Evolution and Deprecation History</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr></table><hr /></div><div class="section" title="API Evolution and Deprecation History"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.api"></a>API Evolution and Deprecation History</h2></div></div></div><p>
A list of user-visible changes, in chronological order A list of user-visible changes, in chronological order
</p><div class="section" title="3.0"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_300"></a><code class="constant">3.0</code></h3></div></div></div><p> </p><div class="section" title="3.0"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_300"></a><code class="constant">3.0</code></h3></div></div></div><p>
Extensions moved to <code class="filename">include/ext</code>. Extensions moved to <code class="filename">include/ext</code>.
</p><p> </p><p>
Include files from the SGI/HP sources that pre-date the ISO standard Include files from the SGI/HP sources that pre-date the ISO standard
@ -22,7 +14,7 @@ the <code class="filename">include/backward</code> directory and a deprecated wa
is added that notifies on inclusion (<code class="literal">-Wno-deprecated</code> is added that notifies on inclusion (<code class="literal">-Wno-deprecated</code>
deactivates the warning.) deactivates the warning.)
</p><p>Deprecated include <code class="filename">backward/strstream</code> added.</p><p>Removal of include <code class="filename">builtinbuf.h</code>, <code class="filename">indstream.h</code>, <code class="filename">parsestream.h</code>, <code class="filename">PlotFile.h</code>, <code class="filename">SFile.h</code>, <code class="filename">stdiostream.h</code>, and <code class="filename">stream.h</code>. </p><p>Deprecated include <code class="filename">backward/strstream</code> added.</p><p>Removal of include <code class="filename">builtinbuf.h</code>, <code class="filename">indstream.h</code>, <code class="filename">parsestream.h</code>, <code class="filename">PlotFile.h</code>, <code class="filename">SFile.h</code>, <code class="filename">stdiostream.h</code>, and <code class="filename">stream.h</code>.
</p></div><div class="section" title="3.1"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_310"></a><code class="constant">3.1</code></h3></div></div></div><p> </p></div><div class="section" title="3.1"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_310"></a><code class="constant">3.1</code></h3></div></div></div><p>
</p><p> </p><p>
Extensions from SGI/HP moved from <code class="code">namespace std</code> Extensions from SGI/HP moved from <code class="code">namespace std</code>
to <code class="code">namespace __gnu_cxx</code>. As part of this, the following to <code class="code">namespace __gnu_cxx</code>. As part of this, the following
@ -34,7 +26,7 @@ Extensions to <code class="code">basic_filebuf</code> introduced: <code class="c
Extensions to tree data structures added in <code class="filename">ext/rb_tree</code>. Extensions to tree data structures added in <code class="filename">ext/rb_tree</code>.
</p><p> </p><p>
Removal of <code class="filename">ext/tree</code>, moved to <code class="filename">backward/tree.h</code>. Removal of <code class="filename">ext/tree</code>, moved to <code class="filename">backward/tree.h</code>.
</p></div><div class="section" title="3.2"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_320"></a><code class="constant">3.2</code></h3></div></div></div><p> </p></div><div class="section" title="3.2"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_320"></a><code class="constant">3.2</code></h3></div></div></div><p>
</p><p>Symbol versioning introduced for shared library.</p><p>Removal of include <code class="filename">backward/strstream.h</code>.</p><p>Allocator changes. Change <code class="code">__malloc_alloc</code> to <code class="code">malloc_allocator</code> and <code class="code">__new_alloc</code> to <code class="code">new_allocator</code>. </p><p> For GCC releases from 2.95 through the 3.1 series, defining </p><p>Symbol versioning introduced for shared library.</p><p>Removal of include <code class="filename">backward/strstream.h</code>.</p><p>Allocator changes. Change <code class="code">__malloc_alloc</code> to <code class="code">malloc_allocator</code> and <code class="code">__new_alloc</code> to <code class="code">new_allocator</code>. </p><p> For GCC releases from 2.95 through the 3.1 series, defining
<code class="literal">__USE_MALLOC</code> on the gcc command line would change the <code class="literal">__USE_MALLOC</code> on the gcc command line would change the
default allocation strategy to instead use <code class="code"> malloc</code> and default allocation strategy to instead use <code class="code"> malloc</code> and
@ -44,8 +36,8 @@ Removal of <code class="filename">ext/tree</code>, moved to <code class="filenam
<code class="literal">GLIBCXX_FORCE_NEW</code> in the environment, see <code class="literal">GLIBCXX_FORCE_NEW</code> in the environment, see
<a class="link" href="mt_allocator.html" title="Chapter 20. The mt_allocator">the mt allocator chapter</a> <a class="link" href="mt_allocator.html" title="Chapter 20. The mt_allocator">the mt allocator chapter</a>
for details. for details.
</p><p>Error handling in iostreams cleaned up, made consistent. </p></div><div class="section" title="3.3"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_330"></a><code class="constant">3.3</code></h3></div></div></div><p> </p><p>Error handling in iostreams cleaned up, made consistent. </p></div><div class="section" title="3.3"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_330"></a><code class="constant">3.3</code></h3></div></div></div><p>
</p></div><div class="section" title="3.4"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_340"></a><code class="constant">3.4</code></h3></div></div></div><p> </p></div><div class="section" title="3.4"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_340"></a><code class="constant">3.4</code></h3></div></div></div><p>
</p><p> </p><p>
Large file support. Large file support.
</p><p> Extensions for generic characters and <code class="code">char_traits</code> added in <code class="filename">ext/pod_char_traits.h</code>. </p><p> Extensions for generic characters and <code class="code">char_traits</code> added in <code class="filename">ext/pod_char_traits.h</code>.
@ -86,11 +78,11 @@ _Alloc_traits</code> have been removed.
<span class="type">__alloc</span> to select an underlying allocator that <span class="type">__alloc</span> to select an underlying allocator that
satisfied memory allocation requests. The selection of this satisfied memory allocation requests. The selection of this
underlying allocator was not user-configurable. underlying allocator was not user-configurable.
</p><div class="table"><a name="id684984"></a><p class="title"><b>Table B.6. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"><col align="left" class="c3"><col align="left" class="c4"></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break"><p> Releases after gcc-3.4 have continued to add to the collection </p><div class="table"><a id="id659056"></a><p class="title"><strong>Table B.6. Extension Allocators</strong></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/new_allocator.h</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">ext/mt_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/bitmap_allocator.h</code></td><td align="left"> </td><td align="left"> </td></tr></tbody></table></div></div><br class="table-break" /><p> Releases after gcc-3.4 have continued to add to the collection
of available allocators. All of these new allocators are of available allocators. All of these new allocators are
standard-style. The following table includes details, along with standard-style. The following table includes details, along with
the first released version of GCC that included the extension allocator. the first released version of GCC that included the extension allocator.
</p><div class="table"><a name="id685214"></a><p class="title"><b>Table B.7. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"><col align="left" class="c3"></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break"><p> </p><div class="table"><a id="id659286"></a><p class="title"><strong>Table B.7. Extension Allocators Continued</strong></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/array_allocator.h</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">ext/throw_allocator.h</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
Debug mode first appears. Debug mode first appears.
</p><p> </p><p>
Precompiled header support <acronym class="acronym">PCH</acronym> support. Precompiled header support <acronym class="acronym">PCH</acronym> support.
@ -100,7 +92,7 @@ Macro guard for changed, from <code class="literal">_GLIBCPP_</code> to <code cl
Extension <code class="filename">ext/stdio_sync_filebuf.h</code> added. Extension <code class="filename">ext/stdio_sync_filebuf.h</code> added.
</p><p> </p><p>
Extension <code class="filename">ext/demangle.h</code> added. Extension <code class="filename">ext/demangle.h</code> added.
</p></div><div class="section" title="4.0"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_400"></a><code class="constant">4.0</code></h3></div></div></div><p> </p></div><div class="section" title="4.0"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_400"></a><code class="constant">4.0</code></h3></div></div></div><p>
</p><p> </p><p>
TR1 features first appear. TR1 features first appear.
</p><p> </p><p>
@ -109,14 +101,14 @@ Extension allocator <code class="filename">ext/array_allocator.h</code> added.
Extension <code class="code">codecvt</code> specializations moved to <code class="filename">ext/codecvt_specializations.h</code>. Extension <code class="code">codecvt</code> specializations moved to <code class="filename">ext/codecvt_specializations.h</code>.
</p><p> </p><p>
Removal of <code class="filename">ext/demangle.h</code>. Removal of <code class="filename">ext/demangle.h</code>.
</p></div><div class="section" title="4.1"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_410"></a><code class="constant">4.1</code></h3></div></div></div><p> </p></div><div class="section" title="4.1"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_410"></a><code class="constant">4.1</code></h3></div></div></div><p>
</p><p> </p><p>
Removal of <code class="filename">cassert</code> from all standard headers: now has to be explicitly included for <code class="code">std::assert</code> calls. Removal of <code class="filename">cassert</code> from all standard headers: now has to be explicitly included for <code class="code">std::assert</code> calls.
</p><p> Extensions for policy-based data structures first added. New includes, </p><p> Extensions for policy-based data structures first added. New includes,
types, namespace <code class="code">pb_assoc</code>. types, namespace <code class="code">pb_assoc</code>.
</p><p> Extensions for typelists added in <code class="filename">ext/typelist.h</code>. </p><p> Extensions for typelists added in <code class="filename">ext/typelist.h</code>.
</p><p> Extension for policy-based <code class="code">basic_string</code> first added: <code class="code">__gnu_cxx::__versa_string</code> in <code class="filename">ext/vstring.h</code>. </p><p> Extension for policy-based <code class="code">basic_string</code> first added: <code class="code">__gnu_cxx::__versa_string</code> in <code class="filename">ext/vstring.h</code>.
</p></div><div class="section" title="4.2"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_420"></a><code class="constant">4.2</code></h3></div></div></div><p> </p></div><div class="section" title="4.2"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_420"></a><code class="constant">4.2</code></h3></div></div></div><p>
</p><p> Default visibility attributes applied to <code class="code">namespace std</code>. Support for <code class="code">-fvisibility</code>. </p><p> Default visibility attributes applied to <code class="code">namespace std</code>. Support for <code class="code">-fvisibility</code>.
</p><p>TR1 <code class="filename">random</code>, <code class="filename">complex</code>, and C compatibility headers added.</p><p> Extensions for concurrent programming consolidated </p><p>TR1 <code class="filename">random</code>, <code class="filename">complex</code>, and C compatibility headers added.</p><p> Extensions for concurrent programming consolidated
into <code class="filename">ext/concurrence.h</code> and <code class="filename">ext/atomicity.h</code>, into <code class="filename">ext/concurrence.h</code> and <code class="filename">ext/atomicity.h</code>,
@ -131,7 +123,7 @@ types, namespace moved to <code class="code">__pb_ds</code>.
std::__debug</code> and extensions in <code class="code">namespace std::__debug</code> and extensions in <code class="code">namespace
__gnu_cxx::__debug</code>.</p><p> Extensions added: <code class="filename">ext/typelist.h</code> __gnu_cxx::__debug</code>.</p><p> Extensions added: <code class="filename">ext/typelist.h</code>
and <code class="filename">ext/throw_allocator.h</code>. and <code class="filename">ext/throw_allocator.h</code>.
</p></div><div class="section" title="4.3"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_430"></a><code class="constant">4.3</code></h3></div></div></div><p> </p></div><div class="section" title="4.3"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_430"></a><code class="constant">4.3</code></h3></div></div></div><p>
</p><p> </p><p>
C++0X features first appear. C++0X features first appear.
</p><p>TR1 <code class="filename">regex</code> and <code class="filename">cmath</code>'s mathematical special function added. </p><p>TR1 <code class="filename">regex</code> and <code class="filename">cmath</code>'s mathematical special function added.
@ -163,7 +155,7 @@ Parallel mode first appears.
PCH binary files no longer installed. Instead, the source files are installed. PCH binary files no longer installed. Instead, the source files are installed.
</p><p> </p><p>
Namespace pb_ds moved to __gnu_pb_ds. Namespace pb_ds moved to __gnu_pb_ds.
</p></div><div class="section" title="4.4"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_440"></a><code class="constant">4.4</code></h3></div></div></div><p> </p></div><div class="section" title="4.4"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_440"></a><code class="constant">4.4</code></h3></div></div></div><p>
</p><p> </p><p>
C++0X features. C++0X features.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
@ -218,7 +210,7 @@ and <code class="filename">ext/extptr_allocator.h</code>. Support
for non-standard pointer types has been added for non-standard pointer types has been added
to <code class="classname">vector</code> to <code class="classname">vector</code>
and <code class="classname">forward_list</code>. and <code class="classname">forward_list</code>.
</p></div><div class="section" title="4.5"><div class="titlepage"><div><div><h3 class="title"><a name="api.rel_450"></a><code class="constant">4.5</code></h3></div></div></div><p> </p></div><div class="section" title="4.5"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_450"></a><code class="constant">4.5</code></h3></div></div></div><p>
</p><p> </p><p>
C++0X features. C++0X features.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
@ -248,4 +240,4 @@ The default behavior for comparing typeinfo names changed, so
in <code class="filename">typeinfo</code>, <code class="literal">__GXX_MERGED_TYPEINFO_NAMES</code> in <code class="filename">typeinfo</code>, <code class="literal">__GXX_MERGED_TYPEINFO_NAMES</code>
now defaults to zero. now defaults to zero.
</p><p> Extensions modified: <code class="filename">ext/throw_allocator.h</code>. </p><p> Extensions modified: <code class="filename">ext/throw_allocator.h</code>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ABI Policy and Guidelines </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Backwards Compatibility</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ABI Policy and Guidelines </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Backwards Compatibility</td></tr></table></div></body></html>

View File

@ -1,27 +1,19 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Appendix A.  Contributing</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix A.  Contributing</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices" /><link rel="prev" href="bk01pt04.html" title="Part IV.  Appendices" /><link rel="next" href="source_organization.html" title="Directory Layout and Source Conventions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices"><link rel="prev" href="bk01pt04.html" title="Part IV.  Appendices"><link rel="next" href="source_organization.html" title="Directory Layout and Source Conventions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix A. 
Contributing Contributing
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04.html">Prev</a> </td><th width="60%" align="center">Part IV.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt04.html">Prev</a> </td><th width="60%" align="center">Part IV. 
Appendices Appendices
</th><td width="20%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix A.  Contributing"><div class="titlepage"><div><div><h1 class="title"><a name="appendix.contrib"></a> </th><td width="20%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr /></div><div class="appendix" title="Appendix A.  Contributing"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.contrib"></a>
Contributing Contributing
<a class="indexterm" name="id675873"></a> <a id="id649945" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="section"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="section"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="section"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="section"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="section"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></div><p> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="section"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="section"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="section"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="section"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="section"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></div><p>
The GNU C++ Library follows an open development model. Active The GNU C++ Library follows an open development model. Active
contributors are assigned maintainer-ship responsibility, and given contributors are assigned maintainer-ship responsibility, and given
write access to the source repository. First time contributors write access to the source repository. First time contributors
should follow this procedure: should follow this procedure:
</p><div class="section" title="Contributor Checklist"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="contrib.list"></a>Contributor Checklist</h2></div></div></div><div class="section" title="Reading"><div class="titlepage"><div><div><h3 class="title"><a name="list.reading"></a>Reading</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="section" title="Contributor Checklist"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.list"></a>Contributor Checklist</h2></div></div></div><div class="section" title="Reading"><div class="titlepage"><div><div><h3 class="title"><a id="list.reading"></a>Reading</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Get and read the relevant sections of the C++ language Get and read the relevant sections of the C++ language
specification. Copies of the full ISO 14882 standard are specification. Copies of the full ISO 14882 standard are
available on line via the ISO mirror site for committee available on line via the ISO mirror site for committee
@ -56,7 +48,7 @@
And last but certainly not least, read the And last but certainly not least, read the
library-specific information found in library-specific information found in
<a class="link" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance">Porting and Maintenance</a>. <a class="link" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance">Porting and Maintenance</a>.
</p></li></ul></div></div><div class="section" title="Assignment"><div class="titlepage"><div><div><h3 class="title"><a name="list.copyright"></a>Assignment</h3></div></div></div><p> </p></li></ul></div></div><div class="section" title="Assignment"><div class="titlepage"><div><div><h3 class="title"><a id="list.copyright"></a>Assignment</h3></div></div></div><p>
Small changes can be accepted without a copyright assignment form on Small changes can be accepted without a copyright assignment form on
file. New code and additions to the library need completed copyright file. New code and additions to the library need completed copyright
assignment form on file at the FSF. Note: your employer may be required assignment form on file at the FSF. Note: your employer may be required
@ -83,10 +75,10 @@
requesting an assignment form from requesting an assignment form from
<code class="email">&lt;<a class="email" href="mailto:mailto:assign@gnu.org">mailto:assign@gnu.org</a>&gt;</code>, please cc the libstdc++ <code class="email">&lt;<a class="email" href="mailto:mailto:assign@gnu.org">mailto:assign@gnu.org</a>&gt;</code>, please cc the libstdc++
maintainer above so that progress can be monitored. maintainer above so that progress can be monitored.
</p></div><div class="section" title="Getting Sources"><div class="titlepage"><div><div><h3 class="title"><a name="list.getting"></a>Getting Sources</h3></div></div></div><p> </p></div><div class="section" title="Getting Sources"><div class="titlepage"><div><div><h3 class="title"><a id="list.getting"></a>Getting Sources</h3></div></div></div><p>
<a class="link" href="http://gcc.gnu.org/svnwrite.html" target="_top">Getting write access <a class="link" href="http://gcc.gnu.org/svnwrite.html" target="_top">Getting write access
(look for "Write after approval")</a> (look for "Write after approval")</a>
</p></div><div class="section" title="Submitting Patches"><div class="titlepage"><div><div><h3 class="title"><a name="list.patches"></a>Submitting Patches</h3></div></div></div><p> </p></div><div class="section" title="Submitting Patches"><div class="titlepage"><div><div><h3 class="title"><a id="list.patches"></a>Submitting Patches</h3></div></div></div><p>
Every patch must have several pieces of information before it can be Every patch must have several pieces of information before it can be
properly evaluated. Ideally (and to ensure the fastest possible properly evaluated. Ideally (and to ensure the fastest possible
response from the maintainers) it would have all of these pieces: response from the maintainers) it would have all of these pieces:
@ -119,6 +111,6 @@
mail message and send it to libstdc++@gcc.gnu.org. All mail message and send it to libstdc++@gcc.gnu.org. All
patches and related discussion should be sent to the patches and related discussion should be sent to the
libstdc++ mailing list. libstdc++ mailing list.
</p></li></ul></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part IV.  </p></li></ul></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part IV. 
Appendices Appendices
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Directory Layout and Source Conventions</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Directory Layout and Source Conventions</td></tr></table></div></body></html>

View File

@ -1,21 +1,13 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Appendix C.  Free Software Needs Free Documentation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix C.  Free Software Needs Free Documentation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices" /><link rel="prev" href="backwards.html" title="Backwards Compatibility" /><link rel="next" href="appendix_gpl.html" title="Appendix D.  GNU General Public License version 3" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices"><link rel="prev" href="backwards.html" title="Backwards Compatibility"><link rel="next" href="appendix_gpl.html" title="Appendix D.  GNU General Public License version 3"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix C. 
Free Software Needs Free Documentation Free Software Needs Free Documentation
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><th width="60%" align="center">Part IV.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><th width="60%" align="center">Part IV. 
Appendices Appendices
</th><td width="20%" align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix C.  Free Software Needs Free Documentation"><div class="titlepage"><div><div><h1 class="title"><a name="appendix.free"></a> </th><td width="20%" align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr></table><hr /></div><div class="appendix" title="Appendix C.  Free Software Needs Free Documentation"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.free"></a>
Free Software Needs Free Documentation Free Software Needs Free Documentation
<a class="indexterm" name="id688290"></a> <a id="id662362" class="indexterm"></a>
</h1></div></div></div><p> </h1></div></div></div><p>
The biggest deficiency in free operating systems is not in the The biggest deficiency in free operating systems is not in the
software--it is the lack of good free manuals that we can include in software--it is the lack of good free manuals that we can include in
@ -129,6 +121,6 @@ prefer copylefted manuals to non-copylefted ones.
that lists free books available from other publishers</a>]. that lists free books available from other publishers</a>].
</p><p>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</p><p>Verbatim copying and distribution of this entire article are </p><p>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</p><p>Verbatim copying and distribution of this entire article are
permitted worldwide, without royalty, in any medium, provided this permitted worldwide, without royalty, in any medium, provided this
notice is preserved.</p><p>Report any problems or suggestions to <code class="email">&lt;<a class="email" href="mailto:webmaster@fsf.org">webmaster@fsf.org</a>&gt;</code>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix D.  notice is preserved.</p><p>Report any problems or suggestions to <code class="email">&lt;<a class="email" href="mailto:webmaster@fsf.org">webmaster@fsf.org</a>&gt;</code>.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Backwards Compatibility </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix D. 
<acronym class="acronym">GNU</acronym> General Public License version 3 <acronym class="acronym">GNU</acronym> General Public License version 3
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,18 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Appendix E. GNU Free Documentation License</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix E. GNU Free Documentation License</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices" /><link rel="prev" href="appendix_gpl.html" title="Appendix D.  GNU General Public License version 3" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix E. GNU Free Documentation License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_gpl.html">Prev</a> </td><th width="60%" align="center">Part IV. 
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices"><link rel="prev" href="appendix_gpl.html" title="Appendix D.  GNU General Public License version 3"><link rel="next" href="../bk02.html" title=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix E. GNU Free Documentation License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_gpl.html">Prev</a> </td><th width="60%" align="center">Part IV. 
Appendices Appendices
</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix E. GNU Free Documentation License"><div class="titlepage"><div><div><h1 class="title"><a name="appendix.gfdl-1.3"></a>GNU Free Documentation License</h1></div></div></div><p>Version 1.3, 3 November 2008</p><p> </th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="appendix" title="Appendix E. GNU Free Documentation License"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.gfdl-1.3"></a>GNU Free Documentation License</h1></div></div></div><p>Version 1.3, 3 November 2008</p><p>
Copyright © 2000, 2001, 2002, 2007, 2008 Copyright © 2000, 2001, 2002, 2007, 2008
<a class="link" href="http://www.fsf.org/" target="_top">Free Software Foundation, Inc.</a> <a class="link" href="http://www.fsf.org/" target="_top">Free Software Foundation, Inc.</a>
</p><p> </p><p>
Everyone is permitted to copy and distribute verbatim copies of this Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed. license document, but changing it is not allowed.
</p><h3><a name="fdl-1-section0"></a> </p><h3><a id="fdl-1-section0"></a>
0. PREAMBLE 0. PREAMBLE
</h3><p> </h3><p>
The purpose of this License is to make a manual, textbook, or other The purpose of this License is to make a manual, textbook, or other
@ -35,7 +31,7 @@
for any textual work, regardless of subject matter or whether it is for any textual work, regardless of subject matter or whether it is
published as a printed book. We recommend this License principally for published as a printed book. We recommend this License principally for
works whose purpose is instruction or reference. works whose purpose is instruction or reference.
</p><h3><a name="fdl-1-section1"></a> </p><h3><a id="fdl-1-section1"></a>
1. APPLICABILITY AND DEFINITIONS 1. APPLICABILITY AND DEFINITIONS
</h3><p> </h3><p>
This License applies to any manual or other work, in any medium, that This License applies to any manual or other work, in any medium, that
@ -124,7 +120,7 @@
but only as regards disclaiming warranties: any other implication that but only as regards disclaiming warranties: any other implication that
these Warranty Disclaimers may have is void and has no effect on the these Warranty Disclaimers may have is void and has no effect on the
meaning of this License. meaning of this License.
</p><h3><a name="fdl-1-section2"></a> </p><h3><a id="fdl-1-section2"></a>
2. VERBATIM COPYING 2. VERBATIM COPYING
</h3><p> </h3><p>
You may copy and distribute the Document in any medium, either You may copy and distribute the Document in any medium, either
@ -139,7 +135,7 @@
</p><p> </p><p>
You may also lend copies, under the same conditions stated above, and you You may also lend copies, under the same conditions stated above, and you
may publicly display copies. may publicly display copies.
</p><h3><a name="fdl-1-section3"></a> </p><h3><a id="fdl-1-section3"></a>
3. COPYING IN QUANTITY 3. COPYING IN QUANTITY
</h3><p> </h3><p>
If you publish printed copies (or copies in media that commonly have If you publish printed copies (or copies in media that commonly have
@ -173,7 +169,7 @@
It is requested, but not required, that you contact the authors of the It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document. them a chance to provide you with an updated version of the Document.
</p><h3><a name="fdl-1-section4"></a> </p><h3><a id="fdl-1-section4"></a>
4. MODIFICATIONS 4. MODIFICATIONS
</h3><p> </h3><p>
You may copy and distribute a Modified Version of the Document under the You may copy and distribute a Modified Version of the Document under the
@ -273,7 +269,7 @@
The author(s) and publisher(s) of the Document do not by this License give The author(s) and publisher(s) of the Document do not by this License give
permission to use their names for publicity for or to assert or imply permission to use their names for publicity for or to assert or imply
endorsement of any Modified Version. endorsement of any Modified Version.
</p><h3><a name="fdl-1-section5"></a> </p><h3><a id="fdl-1-section5"></a>
5. COMBINING DOCUMENTS 5. COMBINING DOCUMENTS
</h3><p> </h3><p>
You may combine the Document with other documents released under this You may combine the Document with other documents released under this
@ -298,7 +294,7 @@
Entitled “Acknowledgements”, and any sections Entitled Entitled “Acknowledgements”, and any sections Entitled
“Dedications”. You must delete all sections Entitled “Dedications”. You must delete all sections Entitled
“Endorsements”. “Endorsements”.
</p><h3><a name="fdl-1-section6"></a> </p><h3><a id="fdl-1-section6"></a>
6. COLLECTIONS OF DOCUMENTS 6. COLLECTIONS OF DOCUMENTS
</h3><p> </h3><p>
You may make a collection consisting of the Document and other documents You may make a collection consisting of the Document and other documents
@ -311,7 +307,7 @@
it individually under this License, provided you insert a copy of this it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all other License into the extracted document, and follow this License in all other
respects regarding verbatim copying of that document. respects regarding verbatim copying of that document.
</p><h3><a name="fdl-1-section7"></a> </p><h3><a id="fdl-1-section7"></a>
7. AGGREGATION WITH INDEPENDENT WORKS 7. AGGREGATION WITH INDEPENDENT WORKS
</h3><p> </h3><p>
A compilation of the Document or its derivatives with other separate and A compilation of the Document or its derivatives with other separate and
@ -329,7 +325,7 @@
bracket the Document within the aggregate, or the electronic equivalent of bracket the Document within the aggregate, or the electronic equivalent of
covers if the Document is in electronic form. Otherwise they must appear covers if the Document is in electronic form. Otherwise they must appear
on printed covers that bracket the whole aggregate. on printed covers that bracket the whole aggregate.
</p><h3><a name="fdl-1-section8"></a> </p><h3><a id="fdl-1-section8"></a>
8. TRANSLATION 8. TRANSLATION
</h3><p> </h3><p>
Translation is considered a kind of modification, so you may distribute Translation is considered a kind of modification, so you may distribute
@ -348,7 +344,7 @@
“Dedications”, or “History”, the requirement “Dedications”, or “History”, the requirement
(section 4) to Preserve its Title (section 1) will typically require (section 4) to Preserve its Title (section 1) will typically require
changing the actual title. changing the actual title.
</p><h3><a name="fdl-1-section9"></a> </p><h3><a id="fdl-1-section9"></a>
9. TERMINATION 9. TERMINATION
</h3><p> </h3><p>
You may not copy, modify, sublicense, or distribute the Document except as You may not copy, modify, sublicense, or distribute the Document except as
@ -374,7 +370,7 @@
License. If your rights have been terminated and not permanently License. If your rights have been terminated and not permanently
reinstated, receipt of a copy of some or all of the same material does not reinstated, receipt of a copy of some or all of the same material does not
give you any rights to use it. give you any rights to use it.
</p><h3><a name="fdl-1-section10"></a> </p><h3><a id="fdl-1-section10"></a>
10. FUTURE REVISIONS OF THIS LICENSE 10. FUTURE REVISIONS OF THIS LICENSE
</h3><p> </h3><p>
The Free Software Foundation may publish new, revised versions of the GNU The Free Software Foundation may publish new, revised versions of the GNU
@ -394,7 +390,7 @@
can decide which future versions of this License can be used, that can decide which future versions of this License can be used, that
proxys public statement of acceptance of a version permanently proxys public statement of acceptance of a version permanently
authorizes you to choose that version for the Document. authorizes you to choose that version for the Document.
</p><h3><a name="fdl-1-section11"></a> </p><h3><a id="fdl-1-section11"></a>
11. RELICENSING 11. RELICENSING
</h3><p> </h3><p>
“Massive Multiauthor Collaboration Site” (or “MMC “Massive Multiauthor Collaboration Site” (or “MMC
@ -423,7 +419,7 @@
The operator of an MMC Site may republish an MMC contained in the site The operator of an MMC Site may republish an MMC contained in the site
under CC-BY-SA on the same site at any time before August 1, 2009, under CC-BY-SA on the same site at any time before August 1, 2009,
provided the MMC is eligible for relicensing. provided the MMC is eligible for relicensing.
</p><h3><a name="fdl-1-addendum"></a> </p><h3><a id="fdl-1-addendum"></a>
ADDENDUM: How to use this License for your documents ADDENDUM: How to use this License for your documents
</h3><p> </h3><p>
To use this License in a document you have written, include a copy of the To use this License in a document you have written, include a copy of the
@ -448,6 +444,6 @@ being LIST, and with the Back-Cover Texts being LIST.</pre><p>
recommend releasing these examples in parallel under your choice of free recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit their software license, such as the GNU General Public License, to permit their
use in free software. use in free software.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_gpl.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix D.  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_gpl.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix D. 
<acronym class="acronym">GNU</acronym> General Public License version 3 <acronym class="acronym">GNU</acronym> General Public License version 3
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>

View File

@ -1,14 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Appendix D.  GNU General Public License version 3</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix D.  GNU General Public License version 3</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices" /><link rel="prev" href="appendix_free.html" title="Appendix C.  Free Software Needs Free Documentation" /><link rel="next" href="appendix_gfdl.html" title="Appendix E. GNU Free Documentation License" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. 
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices"><link rel="prev" href="appendix_free.html" title="Appendix C.  Free Software Needs Free Documentation"><link rel="next" href="appendix_gfdl.html" title="Appendix E. GNU Free Documentation License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. 
<acronym class="acronym">GNU</acronym> General Public License version 3 <acronym class="acronym">GNU</acronym> General Public License version 3
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><th width="60%" align="center">Part IV.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><th width="60%" align="center">Part IV. 
Appendices Appendices
</th><td width="20%" align="right"> <a accesskey="n" href="appendix_gfdl.html">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix D.  GNU General Public License version 3"><div class="titlepage"><div><div><h1 class="title"><a name="appendix.gpl-3.0"></a> </th><td width="20%" align="right"> <a accesskey="n" href="appendix_gfdl.html">Next</a></td></tr></table><hr /></div><div class="appendix" title="Appendix D.  GNU General Public License version 3"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.gpl-3.0"></a>
<acronym class="acronym">GNU</acronym> General Public License version 3 <acronym class="acronym">GNU</acronym> General Public License version 3
</h1></div></div></div><p> </h1></div></div></div><p>
Version 3, 29 June 2007 Version 3, 29 June 2007
@ -18,7 +14,7 @@
</p><p> </p><p>
Everyone is permitted to copy and distribute verbatim copies of this license Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed. document, but changing it is not allowed.
</p><h2><a name="gpl-3-preamble"></a> </p><h2><a id="gpl-3-preamble"></a>
Preamble Preamble
</h2><p> </h2><p>
The <acronym class="acronym">GNU</acronym> General Public License is a free, copyleft The <acronym class="acronym">GNU</acronym> General Public License is a free, copyleft
@ -82,9 +78,9 @@
</p><p> </p><p>
The precise terms and conditions for copying, distribution and modification The precise terms and conditions for copying, distribution and modification
follow. follow.
</p><h2><a name="id688629"></a> </p><h2><a id="id662701"></a>
TERMS AND CONDITIONS TERMS AND CONDITIONS
</h2><h2><a name="gpl-3-definitions"></a> </h2><h2><a id="gpl-3-definitions"></a>
0. Definitions. 0. Definitions.
</h2><p> </h2><p>
“This License” refers to version 3 of the <acronym class="acronym">GNU</acronym> “This License” refers to version 3 of the <acronym class="acronym">GNU</acronym>
@ -126,7 +122,7 @@
License, and how to view a copy of this License. If the interface presents License, and how to view a copy of this License. If the interface presents
a list of user commands or options, such as a menu, a prominent item in the a list of user commands or options, such as a menu, a prominent item in the
list meets this criterion. list meets this criterion.
</p><h2><a name="SourceCode"></a> </p><h2><a id="SourceCode"></a>
1. Source Code. 1. Source Code.
</h2><p> </h2><p>
The “source code” for a work means the preferred form of the The “source code” for a work means the preferred form of the
@ -166,7 +162,7 @@
automatically from other parts of the Corresponding Source. automatically from other parts of the Corresponding Source.
</p><p> </p><p>
The Corresponding Source for a work in source code form is that same work. The Corresponding Source for a work in source code form is that same work.
</p><h2><a name="BasicPermissions"></a> </p><h2><a id="BasicPermissions"></a>
2. Basic Permissions. 2. Basic Permissions.
</h2><p> </h2><p>
All rights granted under this License are granted for the term of copyright All rights granted under this License are granted for the term of copyright
@ -191,7 +187,7 @@
Conveying under any other circumstances is permitted solely under the Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10 makes it conditions stated below. Sublicensing is not allowed; section 10 makes it
unnecessary. unnecessary.
</p><h2><a name="Protecting"></a> </p><h2><a id="Protecting"></a>
3. Protecting Users Legal Rights From Anti-Circumvention Law. 3. Protecting Users Legal Rights From Anti-Circumvention Law.
</h2><p> </h2><p>
No covered work shall be deemed part of an effective technological measure No covered work shall be deemed part of an effective technological measure
@ -206,7 +202,7 @@
the work as a means of enforcing, against the works users, your or the work as a means of enforcing, against the works users, your or
third parties legal rights to forbid circumvention of technological third parties legal rights to forbid circumvention of technological
measures. measures.
</p><h2><a name="ConveyingVerbatim"></a> </p><h2><a id="ConveyingVerbatim"></a>
4. Conveying Verbatim Copies. 4. Conveying Verbatim Copies.
</h2><p> </h2><p>
You may convey verbatim copies of the Programs source code as you You may convey verbatim copies of the Programs source code as you
@ -219,7 +215,7 @@
</p><p> </p><p>
You may charge any price or no price for each copy that you convey, and you You may charge any price or no price for each copy that you convey, and you
may offer support or warranty protection for a fee. may offer support or warranty protection for a fee.
</p><h2><a name="ConveyingModified"></a> </p><h2><a id="ConveyingModified"></a>
5. Conveying Modified Source Versions. 5. Conveying Modified Source Versions.
</h2><p> </h2><p>
You may convey a work based on the Program, or the modifications to produce You may convey a work based on the Program, or the modifications to produce
@ -255,7 +251,7 @@
or legal rights of the compilations users beyond what the individual works or legal rights of the compilations users beyond what the individual works
permit. Inclusion of a covered work in an aggregate does not cause permit. Inclusion of a covered work in an aggregate does not cause
this License to apply to the other parts of the aggregate. this License to apply to the other parts of the aggregate.
</p><h2><a name="ConveyingNonSource"></a> </p><h2><a id="ConveyingNonSource"></a>
6. Conveying Non-Source Forms. 6. Conveying Non-Source Forms.
</h2><p> </h2><p>
You may convey a covered work in object code form under the terms of You may convey a covered work in object code form under the terms of
@ -350,7 +346,7 @@
(and with an implementation available to the public in source code form), (and with an implementation available to the public in source code form),
and must require no special password or key for unpacking, reading or and must require no special password or key for unpacking, reading or
copying. copying.
</p><h2><a name="AdditionalTerms"></a> </p><h2><a id="AdditionalTerms"></a>
7. Additional Terms. 7. Additional Terms.
</h2><p> </h2><p>
“Additional permissions” are terms that supplement the terms of “Additional permissions” are terms that supplement the terms of
@ -414,7 +410,7 @@
Additional terms, permissive or non-permissive, may be stated in the form Additional terms, permissive or non-permissive, may be stated in the form
of a separately written license, or stated as exceptions; the above of a separately written license, or stated as exceptions; the above
requirements apply either way. requirements apply either way.
</p><h2><a name="gpl-3-termination"></a> </p><h2><a id="gpl-3-termination"></a>
8. Termination. 8. Termination.
</h2><p> </h2><p>
You may not propagate or modify a covered work except as expressly provided You may not propagate or modify a covered work except as expressly provided
@ -440,7 +436,7 @@
License. If your rights have been terminated and not permanently License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same reinstated, you do not qualify to receive new licenses for the same
material under section 10. material under section 10.
</p><h2><a name="AcceptanceNotRequired"></a> </p><h2><a id="AcceptanceNotRequired"></a>
9. Acceptance Not Required for Having Copies. 9. Acceptance Not Required for Having Copies.
</h2><p> </h2><p>
You are not required to accept this License in order to receive or run a You are not required to accept this License in order to receive or run a
@ -451,7 +447,7 @@
These actions infringe copyright if you do not accept this License. These actions infringe copyright if you do not accept this License.
Therefore, by modifying or propagating a covered work, you indicate your Therefore, by modifying or propagating a covered work, you indicate your
acceptance of this License to do so. acceptance of this License to do so.
</p><h2><a name="AutomaticDownstream"></a> </p><h2><a id="AutomaticDownstream"></a>
10. Automatic Licensing of Downstream Recipients. 10. Automatic Licensing of Downstream Recipients.
</h2><p> </h2><p>
Each time you convey a covered work, the recipient automatically receives a Each time you convey a covered work, the recipient automatically receives a
@ -476,7 +472,7 @@
or counterclaim in a lawsuit) alleging that any patent claim is infringed or counterclaim in a lawsuit) alleging that any patent claim is infringed
by making, using, selling, offering for sale, or importing the Program or by making, using, selling, offering for sale, or importing the Program or
any portion of it. any portion of it.
</p><h2><a name="Patents"></a> </p><h2><a id="Patents"></a>
11. Patents. 11. Patents.
</h2><p> </h2><p>
A “contributor” is a copyright holder who authorizes use under A “contributor” is a copyright holder who authorizes use under
@ -543,7 +539,7 @@
Nothing in this License shall be construed as excluding or limiting any Nothing in this License shall be construed as excluding or limiting any
implied license or other defenses to infringement that may otherwise be implied license or other defenses to infringement that may otherwise be
available to you under applicable patent law. available to you under applicable patent law.
</p><h2><a name="NoSurrender"></a> </p><h2><a id="NoSurrender"></a>
12. No Surrender of Others Freedom. 12. No Surrender of Others Freedom.
</h2><p> </h2><p>
If conditions are imposed on you (whether by court order, agreement or If conditions are imposed on you (whether by court order, agreement or
@ -555,7 +551,7 @@
to collect a royalty for further conveying from those to whom you convey the to collect a royalty for further conveying from those to whom you convey the
Program, the only way you could satisfy both those terms and this License Program, the only way you could satisfy both those terms and this License
would be to refrain entirely from conveying the Program. would be to refrain entirely from conveying the Program.
</p><h2><a name="UsedWithAGPL"></a> </p><h2><a id="UsedWithAGPL"></a>
13. Use with the <acronym class="acronym">GNU</acronym> Affero General Public License. 13. Use with the <acronym class="acronym">GNU</acronym> Affero General Public License.
</h2><p> </h2><p>
Notwithstanding any other provision of this License, you have permission to Notwithstanding any other provision of this License, you have permission to
@ -566,7 +562,7 @@
requirements of the <acronym class="acronym">GNU</acronym> Affero General Public License, requirements of the <acronym class="acronym">GNU</acronym> Affero General Public License,
section 13, concerning interaction through a network will apply to the section 13, concerning interaction through a network will apply to the
combination as such. combination as such.
</p><h2><a name="RevisedVersions"></a> </p><h2><a id="RevisedVersions"></a>
14. Revised Versions of this License. 14. Revised Versions of this License.
</h2><p> </h2><p>
The Free Software Foundation may publish revised and/or new versions of the The Free Software Foundation may publish revised and/or new versions of the
@ -591,7 +587,7 @@
Later license versions may give you additional or different permissions. Later license versions may give you additional or different permissions.
However, no additional obligations are imposed on any author or copyright However, no additional obligations are imposed on any author or copyright
holder as a result of your choosing to follow a later version. holder as a result of your choosing to follow a later version.
</p><h2><a name="WarrantyDisclaimer"></a> </p><h2><a id="WarrantyDisclaimer"></a>
15. Disclaimer of Warranty. 15. Disclaimer of Warranty.
</h2><p> </h2><p>
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
@ -602,7 +598,7 @@
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION. NECESSARY SERVICING, REPAIR OR CORRECTION.
</p><h2><a name="LiabilityLimitation"></a> </p><h2><a id="LiabilityLimitation"></a>
16. Limitation of Liability. 16. Limitation of Liability.
</h2><p> </h2><p>
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
@ -614,7 +610,7 @@
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES. SUCH DAMAGES.
</p><h2><a name="InterpretationSecs1516"></a> </p><h2><a id="InterpretationSecs1516"></a>
17. Interpretation of Sections 15 and 16. 17. Interpretation of Sections 15 and 16.
</h2><p> </h2><p>
If the disclaimer of warranty and limitation of liability provided above If the disclaimer of warranty and limitation of liability provided above
@ -623,9 +619,9 @@
waiver of all civil liability in connection with the Program, unless a waiver of all civil liability in connection with the Program, unless a
warranty or assumption of liability accompanies a copy of the Program in warranty or assumption of liability accompanies a copy of the Program in
return for a fee. return for a fee.
</p><h2><a name="id689453"></a> </p><h2><a id="id663525"></a>
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
</h2><h2><a name="HowToApply"></a> </h2><h2><a id="HowToApply"></a>
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
</h2><p> </h2><p>
If you develop a new program, and you want it to be of the greatest possible If you develop a new program, and you want it to be of the greatest possible
@ -681,7 +677,7 @@ under certain conditions; type <code class="literal">show c</code> for det
proprietary applications with the library. If this is what you want to do, proprietary applications with the library. If this is what you want to do,
use the <acronym class="acronym">GNU</acronym> Lesser General Public License instead of this use the <acronym class="acronym">GNU</acronym> Lesser General Public License instead of this
License. But first, please read <a class="link" href="http://www.gnu.org/philosophy/why-not-lgpl.html" target="_top">http://www.gnu.org/philosophy/why-not-lgpl.html</a>. License. But first, please read <a class="link" href="http://www.gnu.org/philosophy/why-not-lgpl.html" target="_top">http://www.gnu.org/philosophy/why-not-lgpl.html</a>.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_gfdl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C.  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_free.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_gfdl.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. 
Free Software Needs Free Documentation Free Software Needs Free Documentation
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. GNU Free Documentation License</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. GNU Free Documentation License</td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Appendix B.  Porting and Maintenance</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix B.  Porting and Maintenance</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices" /><link rel="prev" href="source_design_notes.html" title="Design Notes" /><link rel="next" href="documentation_hacking.html" title="Writing and Generating Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt04.html" title="Part IV.  Appendices"><link rel="prev" href="source_design_notes.html" title="Design Notes"><link rel="next" href="documentation_hacking.html" title="Writing and Generating Documentation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="source_design_notes.html">Prev</a> </td><th width="60%" align="center">Part IV.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="source_design_notes.html">Prev</a> </td><th width="60%" align="center">Part IV. 
Appendices Appendices
</th><td width="20%" align="right"> <a accesskey="n" href="documentation_hacking.html">Next</a></td></tr></table><hr></div><div class="appendix" title="Appendix B.  Porting and Maintenance"><div class="titlepage"><div><div><h1 class="title"><a name="appendix.porting"></a> </th><td width="20%" align="right"> <a accesskey="n" href="documentation_hacking.html">Next</a></td></tr></table><hr /></div><div class="appendix" title="Appendix B.  Porting and Maintenance"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.porting"></a>
Porting and Maintenance Porting and Maintenance
<a class="indexterm" name="id676991"></a> <a id="id651063" class="indexterm"></a>
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html">Writing and Generating Documentation</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doc.intro">Introduction</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.generation">Generating Documentation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.doxygen">Doxygen</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doxygen.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doxygen.rules">Generating the Doxygen Files</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doxygen.markup">Markup</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html#doc.docbook">Docbook</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#docbook.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.rules">Generating the DocBook Files</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.validation">Editing and Validation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.examples">File Organization and Basics</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.markup">Markup By Example</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="section"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="section"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="section"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="section"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="section"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="section"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization">Organization</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization.layout">Directory Layout</a></span></dt><dt><span class="section"><a href="test.html#test.organization.naming">Naming Conventions</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.run.basic">Basic</a></span></dt><dt><span class="section"><a href="test.html#test.run.variations">Variations</a></span></dt><dt><span class="section"><a href="test.html#test.run.permutations">Permutations</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="section"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.harness.dejagnu">Dejagnu Harness Details</a></span></dt><dt><span class="section"><a href="test.html#test.harness.utils">Utilities</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.special">Special Topics</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.exception.safety"> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html">Writing and Generating Documentation</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doc.intro">Introduction</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.generation">Generating Documentation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.doxygen">Doxygen</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doxygen.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doxygen.rules">Generating the Doxygen Files</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doxygen.markup">Markup</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html#doc.docbook">Docbook</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#docbook.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.rules">Generating the DocBook Files</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.validation">Editing and Validation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.examples">File Organization and Basics</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#docbook.markup">Markup By Example</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="section"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="section"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="section"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="section"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="section"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="section"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization">Organization</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization.layout">Directory Layout</a></span></dt><dt><span class="section"><a href="test.html#test.organization.naming">Naming Conventions</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.run.basic">Basic</a></span></dt><dt><span class="section"><a href="test.html#test.run.variations">Variations</a></span></dt><dt><span class="section"><a href="test.html#test.run.permutations">Permutations</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="section"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.harness.dejagnu">Dejagnu Harness Details</a></span></dt><dt><span class="section"><a href="test.html#test.harness.utils">Utilities</a></span></dt></dl></dd><dt><span class="section"><a href="test.html#test.special">Special Topics</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.exception.safety">
Qualifying Exception Safety Guarantees Qualifying Exception Safety Guarantees
</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.exception.safety.overview">Overview</a></span></dt><dt><span class="section"><a href="test.html#test.exception.safety.status"> </a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.exception.safety.overview">Overview</a></span></dt><dt><span class="section"><a href="test.html#test.exception.safety.status">
@ -38,7 +30,7 @@ Support for C++TR1 dialect.
Support for C++11 dialect. Support for C++11 dialect.
</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.iterator_type"> </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.iterator_type">
<code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code> <code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code>
</a></span></dt></dl></dd></dl></dd></dl></div><div class="section" title="Configure and Build Hacking"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h3 class="title"><a name="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p> </a></span></dt></dl></dd></dl></dd></dl></div><div class="section" title="Configure and Build Hacking"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
As noted <a class="link" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>, As noted <a class="link" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>,
certain other tools are necessary for hacking on files that certain other tools are necessary for hacking on files that
control configure (<code class="code">configure.ac</code>, control configure (<code class="code">configure.ac</code>,
@ -49,7 +41,7 @@ Support for C++11 dialect.
in GCC try to stay in sync with each other in terms of versions of in GCC try to stay in sync with each other in terms of versions of
the auto-tools used, so please try to play nicely with the the auto-tools used, so please try to play nicely with the
neighbors. neighbors.
</p></div><div class="section" title="Overview: What Comes from Where"><div class="titlepage"><div><div><h3 class="title"><a name="build_hacking.map"></a>Overview: What Comes from Where</h3></div></div></div><div class="figure"><a name="id677123"></a><p class="title"><b>Figure B.1. Configure and Build File Dependencies</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/confdeps.png" align="middle" alt="Dependency Graph for Configure and Build Files"></div></div></div><br class="figure-break"><p> </p></div><div class="section" title="Overview: What Comes from Where"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.map"></a>Overview: What Comes from Where</h3></div></div></div><div class="figure"><a id="id651195"></a><p class="title"><strong>Figure B.1. Configure and Build File Dependencies</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/confdeps.png" align="middle" alt="Dependency Graph for Configure and Build Files" /></div></div></div><br class="figure-break" /><p>
Regenerate all generated files by using the command sequence Regenerate all generated files by using the command sequence
<code class="code">"autoreconf"</code> at the top level of the libstdc++ source <code class="code">"autoreconf"</code> at the top level of the libstdc++ source
directory. The following will also work, but is much more complex: directory. The following will also work, but is much more complex:
@ -59,7 +51,7 @@ Support for C++11 dialect.
<a class="link" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">the <a class="link" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">the
current requirements</a> and your vendor's choice of current requirements</a> and your vendor's choice of
installation names. installation names.
</p></div><div class="section" title="Storing Information in non-AC files (like configure.host)"><div class="titlepage"><div><div><h3 class="title"><a name="build_hacking.scripts"></a>Storing Information in non-AC files (like configure.host)</h3></div></div></div><p> </p></div><div class="section" title="Storing Information in non-AC files (like configure.host)"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.scripts"></a>Storing Information in non-AC files (like configure.host)</h3></div></div></div><p>
Until that glorious day when we can use AC_TRY_LINK with a Until that glorious day when we can use AC_TRY_LINK with a
cross-compiler, we have to hardcode the results of what the tests cross-compiler, we have to hardcode the results of what the tests
would have shown if they could be run. So we have an inflexible would have shown if they could be run. So we have an inflexible
@ -81,7 +73,7 @@ Support for C++11 dialect.
for instance, but then we would need arguments to aclocal/autoconf for instance, but then we would need arguments to aclocal/autoconf
to properly find them all when generating configure. I would to properly find them all when generating configure. I would
discourage that. discourage that.
</p></div><div class="section" title="Coding and Commenting Conventions"><div class="titlepage"><div><div><h3 class="title"><a name="build_hacking.conventions"></a>Coding and Commenting Conventions</h3></div></div></div><p> </p></div><div class="section" title="Coding and Commenting Conventions"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.conventions"></a>Coding and Commenting Conventions</h3></div></div></div><p>
Most comments should use {octothorpes, shibboleths, hash marks, Most comments should use {octothorpes, shibboleths, hash marks,
pound signs, whatever} rather than "dnl". Nearly all comments in pound signs, whatever} rather than "dnl". Nearly all comments in
configure.ac should. Comments inside macros written in ancilliary configure.ac should. Comments inside macros written in ancilliary
@ -98,7 +90,7 @@ Support for C++11 dialect.
Do not use any <code class="code">$target*</code> variables, such as Do not use any <code class="code">$target*</code> variables, such as
<code class="code">$target_alias</code>. The single exception is in <code class="code">$target_alias</code>. The single exception is in
configure.ac, for automake+dejagnu's sake. configure.ac, for automake+dejagnu's sake.
</p></div><div class="section" title="The acinclude.m4 layout"><div class="titlepage"><div><div><h3 class="title"><a name="build_hacking.acinclude"></a>The acinclude.m4 layout</h3></div></div></div><p> </p></div><div class="section" title="The acinclude.m4 layout"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.acinclude"></a>The acinclude.m4 layout</h3></div></div></div><p>
The nice thing about acinclude.m4/aclocal.m4 is that macros aren't The nice thing about acinclude.m4/aclocal.m4 is that macros aren't
actually performed/called/expanded/whatever here, just loaded. So actually performed/called/expanded/whatever here, just loaded. So
we can arrange the contents however we like. As of this writing, we can arrange the contents however we like. As of this writing,
@ -169,7 +161,7 @@ Support for C++11 dialect.
</pre><p> </pre><p>
Things which we don't seem to use directly, but just has to be Things which we don't seem to use directly, but just has to be
present otherwise stuff magically goes wonky. present otherwise stuff magically goes wonky.
</p></div><div class="section" title="GLIBCXX_ENABLE, the --enable maker"><div class="titlepage"><div><div><h3 class="title"><a name="build_hacking.enable"></a><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</h3></div></div></div><p> </p></div><div class="section" title="GLIBCXX_ENABLE, the --enable maker"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.enable"></a><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</h3></div></div></div><p>
All the GLIBCXX_ENABLE_FOO macros use a common helper, All the GLIBCXX_ENABLE_FOO macros use a common helper,
GLIBCXX_ENABLE. (You don't have to use it, but it's easy.) The GLIBCXX_ENABLE. (You don't have to use it, but it's easy.) The
helper does two things for us: helper does two things for us:
@ -257,4 +249,4 @@ Support for C++11 dialect.
argument checking at all is done in this signature. See argument checking at all is done in this signature. See
GLIBCXX_ENABLE_CXX_FLAGS for an example of handling, and an error GLIBCXX_ENABLE_CXX_FLAGS for an example of handling, and an error
message. message.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="source_design_notes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="documentation_hacking.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Notes </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Writing and Generating Documentation</td></tr></table></div></body></html> </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="source_design_notes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="documentation_hacking.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Notes </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Writing and Generating Documentation</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Associative</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Associative</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="containers.html" title="Chapter 9.  Containers" /><link rel="prev" href="containers.html" title="Chapter 9.  Containers" /><link rel="next" href="containers_and_c.html" title="Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Associative</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><th width="60%" align="center">Chapter 9. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="containers.html" title="Chapter 9.  Containers"><link rel="prev" href="containers.html" title="Chapter 9.  Containers"><link rel="next" href="containers_and_c.html" title="Interacting with C"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Associative</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><th width="60%" align="center">Chapter 9. 
Containers Containers
</th><td width="20%" align="right"> <a accesskey="n" href="containers_and_c.html">Next</a></td></tr></table><hr></div><div class="section" title="Associative"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.containers.associative"></a>Associative</h2></div></div></div><div class="section" title="Insertion Hints"><div class="titlepage"><div><div><h3 class="title"><a name="containers.associative.insert_hints"></a>Insertion Hints</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="containers_and_c.html">Next</a></td></tr></table><hr /></div><div class="section" title="Associative"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.associative"></a>Associative</h2></div></div></div><div class="section" title="Insertion Hints"><div class="titlepage"><div><div><h3 class="title"><a id="containers.associative.insert_hints"></a>Insertion Hints</h3></div></div></div><p>
Section [23.1.2], Table 69, of the C++ standard lists this Section [23.1.2], Table 69, of the C++ standard lists this
function for all of the associative containers (map, set, etc): function for all of the associative containers (map, set, etc):
</p><pre class="programlisting"> </p><pre class="programlisting">
@ -92,7 +84,7 @@
the new item would in fact belong there. If the hint does not the new item would in fact belong there. If the hint does not
point to the correct place, then no further local searching is point to the correct place, then no further local searching is
done; the search begins from scratch in logarithmic time. done; the search begins from scratch in logarithmic time.
</p></div><div class="section" title="bitset"><div class="titlepage"><div><div><h3 class="title"><a name="containers.associative.bitset"></a>bitset</h3></div></div></div><div class="section" title="Size Variable"><div class="titlepage"><div><div><h4 class="title"><a name="associative.bitset.size_variable"></a>Size Variable</h4></div></div></div><p> </p></div><div class="section" title="bitset"><div class="titlepage"><div><div><h3 class="title"><a id="containers.associative.bitset"></a>bitset</h3></div></div></div><div class="section" title="Size Variable"><div class="titlepage"><div><div><h4 class="title"><a id="associative.bitset.size_variable"></a>Size Variable</h4></div></div></div><p>
No, you cannot write code of the form No, you cannot write code of the form
</p><pre class="programlisting"> </p><pre class="programlisting">
#include &lt;bitset&gt; #include &lt;bitset&gt;
@ -177,7 +169,7 @@
</p><p> </p><p>
Also note that the implementation of bitset used in libstdc++ has Also note that the implementation of bitset used in libstdc++ has
<a class="link" href="ext_containers.html#manual.ext.containers.sgi" title="Backwards Compatibility">some extensions</a>. <a class="link" href="ext_containers.html#manual.ext.containers.sgi" title="Backwards Compatibility">some extensions</a>.
</p></div><div class="section" title="Type String"><div class="titlepage"><div><div><h4 class="title"><a name="associative.bitset.type_string"></a>Type String</h4></div></div></div><p> </p></div><div class="section" title="Type String"><div class="titlepage"><div><div><h4 class="title"><a id="associative.bitset.type_string"></a>Type String</h4></div></div></div><p>
</p><p> </p><p>
Bitmasks do not take char* nor const char* arguments in their Bitmasks do not take char* nor const char* arguments in their
constructors. This is something of an accident, but you can read constructors. This is something of an accident, but you can read
@ -194,7 +186,7 @@
instead of instead of
</p><pre class="programlisting"> </p><pre class="programlisting">
std::bitset&lt;5&gt; b ( <span class="quote"><span class="quote">10110</span></span> ); // invalid std::bitset&lt;5&gt; b ( <span class="quote"><span class="quote">10110</span></span> ); // invalid
</pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="containers_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 9.  </pre></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="containers_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 9. 
Containers Containers
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Interacting with C</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Interacting with C</td></tr></table></div></body></html>

View File

@ -1,26 +1,16 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 14.  Atomics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 14.  Atomics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; atomic&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="io_and_c.html" title="Interacting with C" /><link rel="next" href="concurrency.html" title="Chapter 15.  Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 14. 
library
,
atomic
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="io_and_c.html" title="Interacting with C"><link rel="next" href="concurrency.html" title="Chapter 15.  Concurrency"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 14. 
Atomics Atomics
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 14.  Atomics"><div class="titlepage"><div><div><h2 class="title"><a name="std.atomics"></a>Chapter 14.  </th><td width="20%" align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 14.  Atomics"><div class="titlepage"><div><div><h2 class="title"><a id="std.atomics"></a>Chapter 14. 
Atomics Atomics
<a class="indexterm" name="id630189"></a> <a id="id604261" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="atomics.html#std.atomics.api">API Reference</a></span></dt></dl></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="atomics.html#std.atomics.api">API Reference</a></span></dt></dl></div><p>
Facilities for atomic operations. Facilities for atomic operations.
</p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.atomics.api"></a>API Reference</h2></div></div></div><p> </p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.atomics.api"></a>API Reference</h2></div></div></div><p>
All items are declared in the standard header All items are declared in the standard header
file <code class="filename">atomic</code>. file <code class="filename">atomic</code>.
</p><p> </p><p>
@ -35,7 +25,7 @@
<code class="classname">atomic&lt;int&gt;</code>. <code class="classname">atomic&lt;int&gt;</code>.
</p><p> </p><p>
Full API details. Full API details.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 15.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 15. 
Concurrency Concurrency
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,21 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Backwards Compatibility</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Backwards Compatibility</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; backwards&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="api.html" title="API Evolution and Deprecation History" /><link rel="next" href="appendix_free.html" title="Appendix C.  Free Software Needs Free Documentation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Backwards Compatibility</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
backwards
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="prev" href="api.html" title="API Evolution and Deprecation History"><link rel="next" href="appendix_free.html" title="Appendix C.  Free Software Needs Free Documentation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Backwards Compatibility</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th><td width="20%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr></table><hr></div><div class="section" title="Backwards Compatibility"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.appendix.porting.backwards"></a>Backwards Compatibility</h2></div></div></div><div class="section" title="First"><div class="titlepage"><div><div><h3 class="title"><a name="backwards.first"></a>First</h3></div></div></div><p>The first generation GNU C++ library was called libg++. It was a </th><td width="20%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr></table><hr /></div><div class="section" title="Backwards Compatibility"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.appendix.porting.backwards"></a>Backwards Compatibility</h2></div></div></div><div class="section" title="First"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.first"></a>First</h3></div></div></div><p>The first generation GNU C++ library was called libg++. It was a
separate GNU project, although reliably paired with GCC. Rumors imply separate GNU project, although reliably paired with GCC. Rumors imply
that it had a working relationship with at least two kinds of that it had a working relationship with at least two kinds of
dinosaur. dinosaur.
@ -29,8 +17,8 @@ ISO Standard (e.g., statistical analysis). While there are a lot of
really useful things that are used by a lot of people, the Standards really useful things that are used by a lot of people, the Standards
Committee couldn't include everything, and so a lot of those Committee couldn't include everything, and so a lot of those
<span class="quote"><span class="quote">obvious</span></span> classes didn't get included. <span class="quote"><span class="quote">obvious</span></span> classes didn't get included.
</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="No ios_base"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.first.ios_base"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>. </p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="No ios_base"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.first.ios_base"></a>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>.
</p></div><div class="section" title="No cout in &lt;ostream.h&gt;, no cin in &lt;istream.h&gt;"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.first.cout_cin"></a>No <code class="code">cout</code> in <code class="filename">&lt;ostream.h&gt;</code>, no <code class="code">cin</code> in <code class="filename">&lt;istream.h&gt;</code></h4></div></div></div><p> </p></div><div class="section" title="No cout in &lt;ostream.h&gt;, no cin in &lt;istream.h&gt;"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.first.cout_cin"></a>No <code class="code">cout</code> in <code class="filename">&lt;ostream.h&gt;</code>, no <code class="code">cin</code> in <code class="filename">&lt;istream.h&gt;</code></h4></div></div></div><p>
In earlier versions of the standard, In earlier versions of the standard,
<code class="filename">&lt;fstream.h&gt;</code>, <code class="filename">&lt;fstream.h&gt;</code>,
<code class="filename">&lt;ostream.h&gt;</code> <code class="filename">&lt;ostream.h&gt;</code>
@ -44,7 +32,7 @@ archived. For the desperate,
the <a class="link" href="http://gcc.gnu.org/extensions.html" target="_top">GCC extensions the <a class="link" href="http://gcc.gnu.org/extensions.html" target="_top">GCC extensions
page</a> describes where to find the last libg++ source. The code is page</a> describes where to find the last libg++ source. The code is
considered replaced and rewritten. considered replaced and rewritten.
</p></div></div><div class="section" title="Second"><div class="titlepage"><div><div><h3 class="title"><a name="backwards.second"></a>Second</h3></div></div></div><p> </p></div></div><div class="section" title="Second"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.second"></a>Second</h3></div></div></div><p>
The second generation GNU C++ library was called libstdc++, or The second generation GNU C++ library was called libstdc++, or
libstdc++-v2. It spans the time between libg++ and pre-ISO C++ libstdc++-v2. It spans the time between libg++ and pre-ISO C++
standardization and is usually associated with the following GCC standardization and is usually associated with the following GCC
@ -56,7 +44,7 @@ considered replaced and rewritten.
archived. The code is considered replaced and rewritten. archived. The code is considered replaced and rewritten.
</p><p> </p><p>
Portability notes and known implementation limitations are as follows. Portability notes and known implementation limitations are as follows.
</p><div class="section" title="Namespace std:: not supported"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.std"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p> </p><div class="section" title="Namespace std:: not supported"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.std"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
Some care is required to support C++ compiler and or library Some care is required to support C++ compiler and or library
implementation that do not have the standard library in implementation that do not have the standard library in
<code class="code">namespace std</code>. <code class="code">namespace std</code>.
@ -120,7 +108,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ]) AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
fi fi
]) ])
</pre></div><div class="section" title="Illegal iterator usage"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.iterators"></a>Illegal iterator usage</h4></div></div></div><p> </pre></div><div class="section" title="Illegal iterator usage"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.iterators"></a>Illegal iterator usage</h4></div></div></div><p>
The following illustrate implementation-allowed illegal iterator The following illustrate implementation-allowed illegal iterator
use, and then correct use. use, and then correct use.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
@ -133,7 +121,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
<code class="code">if (iterator)</code> won't work any more =&gt; use <code class="code">if (iterator)</code> won't work any more =&gt; use
<code class="code">if (iterator != iterator_type())</code> <code class="code">if (iterator != iterator_type())</code>
</p></li></ul></div></div><div class="section" title="isspace from &lt;cctype&gt; is a macro"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.isspace"></a><code class="code">isspace</code> from <code class="filename">&lt;cctype&gt;</code> is a macro </p></li></ul></div></div><div class="section" title="isspace from &lt;cctype&gt; is a macro"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.isspace"></a><code class="code">isspace</code> from <code class="filename">&lt;cctype&gt;</code> is a macro
</h4></div></div></div><p> </h4></div></div></div><p>
Glibc 2.0.x and 2.1.x define <code class="filename">&lt;ctype.h&gt;</code> functionality as macros Glibc 2.0.x and 2.1.x define <code class="filename">&lt;ctype.h&gt;</code> functionality as macros
(isspace, isalpha etc.). (isspace, isalpha etc.).
@ -167,7 +155,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] &amp; (unsigned short int) _ISspace ) ;
(<code class="filename">&lt;ctype.h&gt;</code>) and the (<code class="filename">&lt;ctype.h&gt;</code>) and the
definitions in namespace <code class="code">std::</code> definitions in namespace <code class="code">std::</code>
(<code class="code">&lt;cctype&gt;</code>). (<code class="code">&lt;cctype&gt;</code>).
</p></div><div class="section" title="No vector::at, deque::at, string::at"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.at"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p> </p></div><div class="section" title="No vector::at, deque::at, string::at"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.at"></a>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p>
One solution is to add an autoconf-test for this: One solution is to add an autoconf-test for this:
</p><pre class="programlisting"> </p><pre class="programlisting">
AC_MSG_CHECKING(for container::at) AC_MSG_CHECKING(for container::at)
@ -193,7 +181,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
</pre><p> </pre><p>
If you are using other (non-GNU) compilers it might be a good idea If you are using other (non-GNU) compilers it might be a good idea
to check for <code class="code">string::at</code> separately. to check for <code class="code">string::at</code> separately.
</p></div><div class="section" title="No std::char_traits&lt;char&gt;::eof"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.eof"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p> </p></div><div class="section" title="No std::char_traits&lt;char&gt;::eof"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.eof"></a>No <code class="code">std::char_traits&lt;char&gt;::eof</code></h4></div></div></div><p>
Use some kind of autoconf test, plus this: Use some kind of autoconf test, plus this:
</p><pre class="programlisting"> </p><pre class="programlisting">
#ifdef HAVE_CHAR_TRAITS #ifdef HAVE_CHAR_TRAITS
@ -201,7 +189,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
#else #else
#define CPP_EOF EOF #define CPP_EOF EOF
#endif #endif
</pre></div><div class="section" title="No string::clear"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.stringclear"></a>No <code class="code">string::clear</code></h4></div></div></div><p> </pre></div><div class="section" title="No string::clear"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.stringclear"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
There are two functions for deleting the contents of a string: There are two functions for deleting the contents of a string:
<code class="code">clear</code> and <code class="code">erase</code> (the latter returns the <code class="code">clear</code> and <code class="code">erase</code> (the latter returns the
string). string).
@ -219,12 +207,12 @@ erase(size_type __pos = 0, size_type __n = npos)
Unfortunately, <code class="code">clear</code> is not implemented in this Unfortunately, <code class="code">clear</code> is not implemented in this
version, so you should use <code class="code">erase</code> (which is probably version, so you should use <code class="code">erase</code> (which is probably
faster than <code class="code">operator=(charT*)</code>). faster than <code class="code">operator=(charT*)</code>).
</p></div><div class="section" title="Removal of ostream::form and istream::scan extensions"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.ostreamform_istreamscan"></a> </p></div><div class="section" title="Removal of ostream::form and istream::scan extensions"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.ostreamform_istreamscan"></a>
Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code> Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code>
extensions extensions
</h4></div></div></div><p> </h4></div></div></div><p>
These are no longer supported. Please use stringstreams instead. These are no longer supported. Please use stringstreams instead.
</p></div><div class="section" title="No basic_stringbuf, basic_stringstream"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.stringstreams"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p> </p></div><div class="section" title="No basic_stringbuf, basic_stringstream"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.stringstreams"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
Although the ISO standard <code class="code">i/ostringstream</code>-classes are Although the ISO standard <code class="code">i/ostringstream</code>-classes are
provided, (<code class="filename">&lt;sstream&gt;</code>), for provided, (<code class="filename">&lt;sstream&gt;</code>), for
compatibility with older implementations the pre-ISO compatibility with older implementations the pre-ISO
@ -312,14 +300,14 @@ any = temp;
Another example of using stringstreams is in <a class="link" href="strings.html#strings.string.shrink" title="Shrink to Fit">this howto</a>. Another example of using stringstreams is in <a class="link" href="strings.html#strings.string.shrink" title="Shrink to Fit">this howto</a>.
</p><p> There is additional information in the libstdc++-v2 info files, in </p><p> There is additional information in the libstdc++-v2 info files, in
particular <span class="quote"><span class="quote">info iostream</span></span>. particular <span class="quote"><span class="quote">info iostream</span></span>.
</p></div><div class="section" title="Little or no wide character support"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.wchar"></a>Little or no wide character support</h4></div></div></div><p> </p></div><div class="section" title="Little or no wide character support"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.wchar"></a>Little or no wide character support</h4></div></div></div><p>
Classes <code class="classname">wstring</code> and Classes <code class="classname">wstring</code> and
<code class="classname">char_traits&lt;wchar_t&gt;</code> are <code class="classname">char_traits&lt;wchar_t&gt;</code> are
not supported. not supported.
</p></div><div class="section" title="No templatized iostreams"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.iostream_templates"></a>No templatized iostreams</h4></div></div></div><p> </p></div><div class="section" title="No templatized iostreams"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.iostream_templates"></a>No templatized iostreams</h4></div></div></div><p>
Classes <code class="classname">wfilebuf</code> and Classes <code class="classname">wfilebuf</code> and
<code class="classname">wstringstream</code> are not supported. <code class="classname">wstringstream</code> are not supported.
</p></div><div class="section" title="Thread safety issues"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.second.thread_safety"></a>Thread safety issues</h4></div></div></div><p> </p></div><div class="section" title="Thread safety issues"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.second.thread_safety"></a>Thread safety issues</h4></div></div></div><p>
Earlier GCC releases had a somewhat different approach to Earlier GCC releases had a somewhat different approach to
threading configuration and proper compilation. Before GCC 3.0, threading configuration and proper compilation. Before GCC 3.0,
configuration of the threading model was dictated by compiler configuration of the threading model was dictated by compiler
@ -370,14 +358,14 @@ particular <span class="quote">“<span class="quote">info iostream</span>”</s
few people with access to the backup tapes have been too swamped few people with access to the backup tapes have been too swamped
with work to restore them. Many of the points have been with work to restore them. Many of the points have been
superseded anyhow.) superseded anyhow.)
</p></div></div><div class="section" title="Third"><div class="titlepage"><div><div><h3 class="title"><a name="backwards.third"></a>Third</h3></div></div></div><p> The third generation GNU C++ library is called libstdc++, or </p></div></div><div class="section" title="Third"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.third"></a>Third</h3></div></div></div><p> The third generation GNU C++ library is called libstdc++, or
libstdc++-v3. libstdc++-v3.
</p><p>The subset commonly known as the Standard Template Library </p><p>The subset commonly known as the Standard Template Library
(chapters 23 through 25, mostly) is adapted from the final release (chapters 23 through 25, mostly) is adapted from the final release
of the SGI STL (version 3.3), with extensive changes. of the SGI STL (version 3.3), with extensive changes.
</p><p>A more formal description of the V3 goals can be found in the </p><p>A more formal description of the V3 goals can be found in the
official <a class="link" href="source_design_notes.html" title="Design Notes">design document</a>. official <a class="link" href="source_design_notes.html" title="Design Notes">design document</a>.
</p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="Pre-ISO headers moved to backwards or removed"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.headers"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers </p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="Pre-ISO headers moved to backwards or removed"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.headers"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
(<code class="filename">&lt;iostream.h&gt;</code>, (<code class="filename">&lt;iostream.h&gt;</code>,
<code class="filename">&lt;defalloc.h&gt;</code> etc.) are <code class="filename">&lt;defalloc.h&gt;</code> etc.) are
available, unlike previous libstdc++ versions, but inclusion available, unlike previous libstdc++ versions, but inclusion
@ -450,7 +438,7 @@ like <code class="filename">&lt;vector.h&gt;</code> can be replaced with <code c
directive <code class="code">using namespace std;</code> can be put at the global directive <code class="code">using namespace std;</code> can be put at the global
scope. This should be enough to get this code compiling, assuming the scope. This should be enough to get this code compiling, assuming the
other usage is correct. other usage is correct.
</p></div><div class="section" title="Extension headers hash_map, hash_set moved to ext or backwards"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.hash"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been </p></div><div class="section" title="Extension headers hash_map, hash_set moved to ext or backwards"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.hash"></a>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been
replaced by standardized libraries. replaced by standardized libraries.
In particular, the <code class="classname">unordered_map</code> and In particular, the <code class="classname">unordered_map</code> and
<code class="classname">unordered_set</code> containers of TR1 and C++ 2011 <code class="classname">unordered_set</code> containers of TR1 and C++ 2011
@ -524,7 +512,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ]) AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
fi fi
]) ])
</pre></div><div class="section" title="No ios::nocreate/ios::noreplace."><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.nocreate_noreplace"></a>No <code class="code">ios::nocreate/ios::noreplace</code>. </pre></div><div class="section" title="No ios::nocreate/ios::noreplace."><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.nocreate_noreplace"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
</h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for </h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for
input-streams has been confirmed, most probably because the author input-streams has been confirmed, most probably because the author
thought it would be more correct to specify nocreate explicitly. So thought it would be more correct to specify nocreate explicitly. So
@ -535,7 +523,7 @@ open the file for reading, check if it has been opened, and then
decide whether you want to create/replace or not. To my knowledge, decide whether you want to create/replace or not. To my knowledge,
even older implementations support <code class="code">app</code>, <code class="code">ate</code> even older implementations support <code class="code">app</code>, <code class="code">ate</code>
and <code class="code">trunc</code> (except for <code class="code">app</code> ?). and <code class="code">trunc</code> (except for <code class="code">app</code> ?).
</p></div><div class="section" title="No stream::attach(int fd)"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.streamattach"></a> </p></div><div class="section" title="No stream::attach(int fd)"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.streamattach"></a>
No <code class="code">stream::attach(int fd)</code> No <code class="code">stream::attach(int fd)</code>
</h4></div></div></div><p> </h4></div></div></div><p>
Phil Edwards writes: It was considered and rejected for the ISO Phil Edwards writes: It was considered and rejected for the ISO
@ -558,7 +546,7 @@ No <code class="code">stream::attach(int fd)</code>
For another example of this, refer to For another example of this, refer to
<a class="link" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a> <a class="link" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
by Nicolai Josuttis. by Nicolai Josuttis.
</p></div><div class="section" title="Support for C++98 dialect."><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.support_cxx98"></a> </p></div><div class="section" title="Support for C++98 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.support_cxx98"></a>
Support for C++98 dialect. Support for C++98 dialect.
</h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard. </h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard.
</p><pre class="programlisting"> </p><pre class="programlisting">
@ -626,7 +614,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ]) AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
fi fi
]) ])
</pre></div><div class="section" title="Support for C++TR1 dialect."><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.support_tr1"></a> </pre></div><div class="section" title="Support for C++TR1 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.support_tr1"></a>
Support for C++TR1 dialect. Support for C++TR1 dialect.
</h4></div></div></div><p>Check for library coverage of the TR1 standard. </h4></div></div></div><p>Check for library coverage of the TR1 standard.
</p><pre class="programlisting"> </p><pre class="programlisting">
@ -703,7 +691,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ]) AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
fi fi
]) ])
</pre></div><div class="section" title="Support for C++11 dialect."><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.support_cxx11"></a> </pre></div><div class="section" title="Support for C++11 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.support_cxx11"></a>
Support for C++11 dialect. Support for C++11 dialect.
</h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++11 standard. </h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++11 standard.
</p><pre class="programlisting"> </p><pre class="programlisting">
@ -947,25 +935,25 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
but the autoconf checks above could be extended to test for incomplete but the autoconf checks above could be extended to test for incomplete
C++11 support with <code class="option">-std=c++0x</code> and C++11 support with <code class="option">-std=c++0x</code> and
<code class="option">-std=gnu++0x</code>. <code class="option">-std=gnu++0x</code>.
</p></div><div class="section" title="Container::iterator_type is not necessarily Container::value_type*"><div class="titlepage"><div><div><h4 class="title"><a name="backwards.third.iterator_type"></a> </p></div><div class="section" title="Container::iterator_type is not necessarily Container::value_type*"><div class="titlepage"><div><div><h4 class="title"><a id="backwards.third.iterator_type"></a>
<code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code> <code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code>
</h4></div></div></div><p> </h4></div></div></div><p>
This is a change in behavior from older versions. Now, most This is a change in behavior from older versions. Now, most
<span class="type">iterator_type</span> typedefs in container classes are POD <span class="type">iterator_type</span> typedefs in container classes are POD
objects, not <span class="type">value_type</span> pointers. objects, not <span class="type">value_type</span> pointers.
</p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a name="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry" title="Migrating to GCC 4.1"><a name="id688193"></a><p><span class="title"><i> </p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry" title="Migrating to GCC 4.1"><a id="id662265"></a><p><span class="title"><em>
<a class="link" href="http://www.kegel.com/gcc/gcc4.html" target="_top"> <a class="link" href="http://www.kegel.com/gcc/gcc4.html" target="_top">
Migrating to GCC 4.1 Migrating to GCC 4.1
</a> </a>
</i>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry" title="Building the Whole Debian Archive with GCC 4.1: A Summary"><a name="id688216"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry" title="Building the Whole Debian Archive with GCC 4.1: A Summary"><a id="id662288"></a><p><span class="title"><em>
<a class="link" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top"> <a class="link" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top">
Building the Whole Debian Archive with GCC 4.1: A Summary Building the Whole Debian Archive with GCC 4.1: A Summary
</a> </a>
</i>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry" title="Migration guide for GCC-3.2"><a name="id688240"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry" title="Migration guide for GCC-3.2"><a id="id662312"></a><p><span class="title"><em>
<a class="link" href="http://annwm.lbl.gov/~leggett/Atlas/gcc-3.2.html" target="_top"> <a class="link" href="http://annwm.lbl.gov/~leggett/Atlas/gcc-3.2.html" target="_top">
Migration guide for GCC-3.2 Migration guide for GCC-3.2
</a> </a>
</i>. </span></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API Evolution and Deprecation History </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C.  </em>. </span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API Evolution and Deprecation History </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. 
Free Software Needs Free Documentation Free Software Needs Free Documentation
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,22 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 21. The bitmap_allocator</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 21. The bitmap_allocator</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="bk01pt03ch20s05.html" title="Multiple Thread Example" /><link rel="next" href="bk01pt03ch21s02.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. The bitmap_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s05.html">Prev</a> </td><th width="60%" align="center">Part III. 
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="bk01pt03ch20s05.html" title="Multiple Thread Example"><link rel="next" href="bk01pt03ch21s02.html" title="Implementation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 21. The bitmap_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s05.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch21s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 21. The bitmap_allocator"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.allocator.bitmap"></a>Chapter 21. The bitmap_allocator</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.free_list_store">Free List Store</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.super_block">Super Block</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.super_block_data">Super Block Data Layout</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.max_wasted">Maximum Wasted Percentage</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.allocate"><code class="function">allocate</code></a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.deallocate"><code class="function">deallocate</code></a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.questions">Questions</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.1">1</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.2">2</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.3">3</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.locality">Locality</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.grow_policy">Overhead and Grow Policy</a></span></dt></dl></dd></dl></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch21s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 21. The bitmap_allocator"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator.bitmap"></a>Chapter 21. The bitmap_allocator</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.free_list_store">Free List Store</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.super_block">Super Block</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.super_block_data">Super Block Data Layout</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.max_wasted">Maximum Wasted Percentage</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.allocate"><code class="function">allocate</code></a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.deallocate"><code class="function">deallocate</code></a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.questions">Questions</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.1">1</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.2">2</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.question.3">3</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.locality">Locality</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html#bitmap.impl.grow_policy">Overhead and Grow Policy</a></span></dt></dl></dd></dl></div><p>
</p><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.bitmap.design"></a>Design</h2></div></div></div><p> </p><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.bitmap.design"></a>Design</h2></div></div></div><p>
As this name suggests, this allocator uses a bit-map to keep track As this name suggests, this allocator uses a bit-map to keep track
of the used and unused memory locations for its book-keeping of the used and unused memory locations for its book-keeping
purposes. purposes.
@ -42,4 +30,4 @@
Mutex Protection around every allocation/deallocation. The state Mutex Protection around every allocation/deallocation. The state
of the macro is picked up automatically from the gthr abstraction of the macro is picked up automatically from the gthr abstraction
layer. layer.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch21s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Multiple Thread Example </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch21s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Multiple Thread Example </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html>

View File

@ -1,14 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Part II.  Standard Contents</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part II.  Standard Contents</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="index.html" title="The GNU C++ Library Manual" /><link rel="prev" href="debug.html" title="Debugging Support" /><link rel="next" href="support.html" title="Chapter 4.  Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. 
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="index.html" title="The GNU C++ Library Manual"><link rel="prev" href="debug.html" title="Debugging Support"><link rel="next" href="support.html" title="Chapter 4.  Support"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part II. 
Standard Contents Standard Contents
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td width="20%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr></table><hr></div><div class="part" title="Part II.  Standard Contents"><div class="titlepage"><div><div><h1 class="title"><a name="manual.std"></a>Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td width="20%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr></table><hr /></div><div class="part" title="Part II.  Standard Contents"><div class="titlepage"><div><div><h1 class="title"><a id="manual.std"></a>Part II. 
Standard Contents Standard Contents
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="support.html">4. </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="chapter"><a href="support.html">4.
Support Support
</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types">Types</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.numeric_limits">Numeric Properties</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.null">NULL</a></span></dt></dl></dd><dt><span class="section"><a href="dynamic_memory.html">Dynamic Memory</a></span></dt><dt><span class="section"><a href="termination.html">Termination</a></span></dt><dd><dl><dt><span class="section"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="section"><a href="termination.html#support.termination.verbose">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="diagnostics.html">5. </a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types">Types</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.numeric_limits">Numeric Properties</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.null">NULL</a></span></dt></dl></dd><dt><span class="section"><a href="dynamic_memory.html">Dynamic Memory</a></span></dt><dt><span class="section"><a href="termination.html">Termination</a></span></dt><dd><dl><dt><span class="section"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="section"><a href="termination.html#support.termination.verbose">Verbose Terminate Handler</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="diagnostics.html">5.
@ -17,13 +13,13 @@
</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></dd><dt><span class="chapter"><a href="utilities.html">6. </a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></dd><dt><span class="chapter"><a href="utilities.html">6.
Utilities Utilities
</a></span></dt><dd><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id609466">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id609496">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id609607">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id610613">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id610801">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id610862">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id610983">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id623434">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id623464">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="strings.html">7. </a></span></dt><dd><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id583537">Interface Design</a></span></dt><dt><span class="section"><a href="memory.html#id583567">Selecting Default Allocation Policy</a></span></dt><dt><span class="section"><a href="memory.html#id583678">Disabling Memory Caching</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="section"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="section"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="section"><a href="memory.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="memory.html#shared_ptr.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id584684">Class Hierarchy</a></span></dt><dt><span class="section"><a href="memory.html#id584872">Thread Safety</a></span></dt><dt><span class="section"><a href="memory.html#id584932">Selecting Lock Policy</a></span></dt><dt><span class="section"><a href="memory.html#id585054">Related functions and classes</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.using">Use</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#id597505">Examples</a></span></dt><dt><span class="section"><a href="memory.html#id597535">Unresolved Issues</a></span></dt></dl></dd><dt><span class="section"><a href="memory.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></dd><dt><span class="chapter"><a href="strings.html">7.
Strings Strings
</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="localization.html">8. </a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="localization.html">8.
Localization Localization
</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id625164">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9. </a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id599235">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="chapter"><a href="containers.html">9.
Containers Containers
</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10. </a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="iterators.html">10.
@ -44,7 +40,7 @@
</a></span></dt><dd><dl><dt><span class="section"><a href="atomics.html#std.atomics.api">API Reference</a></span></dt></dl></dd><dt><span class="chapter"><a href="concurrency.html">15. </a></span></dt><dd><dl><dt><span class="section"><a href="atomics.html#std.atomics.api">API Reference</a></span></dt></dl></dd><dt><span class="chapter"><a href="concurrency.html">15.
Concurrency Concurrency
</a></span></dt><dd><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4.  </a></span></dt><dd><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="support.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Debugging Support </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 4. 
Support Support
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Concept Checking</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Concept Checking</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="diagnostics.html" title="Chapter 5.  Diagnostics" /><link rel="prev" href="diagnostics.html" title="Chapter 5.  Diagnostics" /><link rel="next" href="utilities.html" title="Chapter 6.  Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><th width="60%" align="center">Chapter 5. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="diagnostics.html" title="Chapter 5.  Diagnostics"><link rel="prev" href="diagnostics.html" title="Chapter 5.  Diagnostics"><link rel="next" href="utilities.html" title="Chapter 6.  Utilities"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><th width="60%" align="center">Chapter 5. 
Diagnostics Diagnostics
</th><td width="20%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr></table><hr></div><div class="section" title="Concept Checking"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.diagnostics.concept_checking"></a>Concept Checking</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr></table><hr /></div><div class="section" title="Concept Checking"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.diagnostics.concept_checking"></a>Concept Checking</h2></div></div></div><p>
In 1999, SGI added <span class="quote"><span class="quote">concept checkers</span></span> to their In 1999, SGI added <span class="quote"><span class="quote">concept checkers</span></span> to their
implementation of the STL: code which checked the template implementation of the STL: code which checked the template
parameters of instantiated pieces of the STL, in order to insure parameters of instantiated pieces of the STL, in order to insure
@ -49,7 +41,7 @@
for example template argument types may need to be complete when used in for example template argument types may need to be complete when used in
a template definition, rather than at the point of instantiation. a template definition, rather than at the point of instantiation.
There are no plans to address these shortcomings. There are no plans to address these shortcomings.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="diagnostics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5.  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="diagnostics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. 
Diagnostics Diagnostics
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6.   </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. 

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Semantics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Semantics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="debug_mode.html" title="Chapter 17. Debug Mode" /><link rel="prev" href="debug_mode.html" title="Chapter 17. Debug Mode" /><link rel="next" href="bk01pt03ch17s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch17s03.html">Next</a></td></tr></table><hr /></div><div class="section" title="Semantics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.semantics"></a>Semantics</h2></div></div></div><p>
library
,
debug
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="debug_mode.html" title="Chapter 17. Debug Mode"><link rel="prev" href="debug_mode.html" title="Chapter 17. Debug Mode"><link rel="next" href="bk01pt03ch17s03.html" title="Using"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch17s03.html">Next</a></td></tr></table><hr></div><div class="section" title="Semantics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.debug_mode.semantics"></a>Semantics</h2></div></div></div><p>
</p><p>A program that uses the C++ standard library correctly </p><p>A program that uses the C++ standard library correctly
will maintain the same semantics under debug mode as it had with will maintain the same semantics under debug mode as it had with
the normal (release) library. All functional and exception-handling the normal (release) library. All functional and exception-handling
@ -66,4 +52,4 @@ with the debug-mode checks included, but this is unsupported and not
guaranteed to work. For full debug-mode support you can use the guaranteed to work. For full debug-mode support you can use the
<code class="code">__gnu_debug::basic_string</code> debugging container directly, <code class="code">__gnu_debug::basic_string</code> debugging container directly,
which always works correctly. which always works correctly.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch17s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 17. Debug Mode </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch17s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 17. Debug Mode </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html>

View File

@ -1,21 +1,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Using</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Using</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="debug_mode.html" title="Chapter 17. Debug Mode" /><link rel="prev" href="bk01pt03ch17s02.html" title="Semantics" /><link rel="next" href="bk01pt03ch17s04.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr></table><hr /></div><div class="section" title="Using"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.using"></a>Using</h2></div></div></div><p>
library </p><div class="section" title="Using the Debug Mode"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.using.mode"></a>Using the Debug Mode</h3></div></div></div><p>To use the libstdc++ debug mode, compile your application with the
,
debug
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="debug_mode.html" title="Chapter 17. Debug Mode"><link rel="prev" href="bk01pt03ch17s02.html" title="Semantics"><link rel="next" href="bk01pt03ch17s04.html" title="Design"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr></table><hr></div><div class="section" title="Using"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.debug_mode.using"></a>Using</h2></div></div></div><p>
</p><div class="section" title="Using the Debug Mode"><div class="titlepage"><div><div><h3 class="title"><a name="debug_mode.using.mode"></a>Using the Debug Mode</h3></div></div></div><p>To use the libstdc++ debug mode, compile your application with the
compiler flag <code class="code">-D_GLIBCXX_DEBUG</code>. Note that this flag compiler flag <code class="code">-D_GLIBCXX_DEBUG</code>. Note that this flag
changes the sizes and behavior of standard class templates such changes the sizes and behavior of standard class templates such
as <code class="code">std::vector</code>, and therefore you can only link code as <code class="code">std::vector</code>, and therefore you can only link code
@ -24,7 +10,7 @@
units.</p><p>By default, error messages are formatted to fit on lines of about units.</p><p>By default, error messages are formatted to fit on lines of about
78 characters. The environment variable 78 characters. The environment variable
<code class="code">GLIBCXX_DEBUG_MESSAGE_LENGTH</code> can be used to request a <code class="code">GLIBCXX_DEBUG_MESSAGE_LENGTH</code> can be used to request a
different length.</p></div><div class="section" title="Using a Specific Debug Container"><div class="titlepage"><div><div><h3 class="title"><a name="debug_mode.using.specific"></a>Using a Specific Debug Container</h3></div></div></div><p>When it is not feasible to recompile your entire application, or different length.</p></div><div class="section" title="Using a Specific Debug Container"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.using.specific"></a>Using a Specific Debug Container</h3></div></div></div><p>When it is not feasible to recompile your entire application, or
only specific containers need checking, debugging containers are only specific containers need checking, debugging containers are
available as GNU extensions. These debugging containers are available as GNU extensions. These debugging containers are
functionally equivalent to the standard drop-in containers used in functionally equivalent to the standard drop-in containers used in
@ -33,6 +19,6 @@
mode or with debug mode. The mode or with debug mode. The
following table provides the names and headers of the debugging following table provides the names and headers of the debugging
containers: containers:
</p><div class="table"><a name="id631025"></a><p class="title"><b>Table 17.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"><col align="left" class="c3"><col align="left" class="c4"></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">&lt;debug/bitset&gt;</code></td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">&lt;debug/deque&gt;</code></td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">&lt;debug/list&gt;</code></td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">&lt;debug/map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">&lt;debug/map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">&lt;debug/set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">&lt;debug/set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">&lt;debug/vector&gt;</code></td></tr></tbody></table></div></div><br class="table-break"><p>In addition, when compiling in C++11 mode, these additional </p><div class="table"><a id="id605097"></a><p class="title"><strong>Table 17.1. Debugging Containers</strong></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::bitset</code></td><td align="left"><code class="filename">bitset</code></td><td align="left"><code class="classname">__gnu_debug::bitset</code></td><td align="left"><code class="filename">&lt;debug/bitset&gt;</code></td></tr><tr><td align="left"><code class="classname">std::deque</code></td><td align="left"><code class="filename">deque</code></td><td align="left"><code class="classname">__gnu_debug::deque</code></td><td align="left"><code class="filename">&lt;debug/deque&gt;</code></td></tr><tr><td align="left"><code class="classname">std::list</code></td><td align="left"><code class="filename">list</code></td><td align="left"><code class="classname">__gnu_debug::list</code></td><td align="left"><code class="filename">&lt;debug/list&gt;</code></td></tr><tr><td align="left"><code class="classname">std::map</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::map</code></td><td align="left"><code class="filename">&lt;debug/map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::multimap</code></td><td align="left"><code class="filename">map</code></td><td align="left"><code class="classname">__gnu_debug::multimap</code></td><td align="left"><code class="filename">&lt;debug/map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::multiset</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::multiset</code></td><td align="left"><code class="filename">&lt;debug/set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::set</code></td><td align="left"><code class="filename">set</code></td><td align="left"><code class="classname">__gnu_debug::set</code></td><td align="left"><code class="filename">&lt;debug/set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::string</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::wstring</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::wstring</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::basic_string</code></td><td align="left"><code class="filename">string</code></td><td align="left"><code class="classname">__gnu_debug::basic_string</code></td><td align="left"><code class="filename">&lt;debug/string&gt;</code></td></tr><tr><td align="left"><code class="classname">std::vector</code></td><td align="left"><code class="filename">vector</code></td><td align="left"><code class="classname">__gnu_debug::vector</code></td><td align="left"><code class="filename">&lt;debug/vector&gt;</code></td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++11 mode, these additional
containers have additional debug capability. containers have additional debug capability.
</p><div class="table"><a name="id631400"></a><p class="title"><b>Table 17.2. Debugging Containers C++11</b></p><div class="table-contents"><table summary="Debugging Containers C++11" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"><col align="left" class="c3"><col align="left" class="c4"></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> </p><div class="table"><a id="id605471"></a><p class="title"><strong>Table 17.2. Debugging Containers C++11</strong></p><div class="table-contents"><table summary="Debugging Containers C++11" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Container</th><th align="left">Header</th><th align="left">Debug container</th><th align="left">Debug header</th></tr></thead><tbody><tr><td align="left"><code class="classname">std::unordered_map</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_map</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multimap</code></td><td align="left"><code class="filename">unordered_map</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td align="left"><code class="filename">&lt;debug/unordered_map&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_set</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_set</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr><tr><td align="left"><code class="classname">std::unordered_multiset</code></td><td align="left"><code class="filename">unordered_set</code></td><td align="left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td align="left"><code class="filename">&lt;debug/unordered_set&gt;</code></td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>

View File

@ -1,21 +1,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="debug_mode.html" title="Chapter 17. Debug Mode" /><link rel="prev" href="bk01pt03ch17s03.html" title="Using" /><link rel="next" href="parallel_mode.html" title="Chapter 18. Parallel Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch17s03.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="parallel_mode.html">Next</a></td></tr></table><hr /></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.design"></a>Design</h2></div></div></div><p>
library </p><div class="section" title="Goals"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.design.goals"></a>Goals</h3></div></div></div><p>
,
debug
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="debug_mode.html" title="Chapter 17. Debug Mode"><link rel="prev" href="bk01pt03ch17s03.html" title="Using"><link rel="next" href="parallel_mode.html" title="Chapter 18. Parallel Mode"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch17s03.html">Prev</a> </td><th width="60%" align="center">Chapter 17. Debug Mode</th><td width="20%" align="right"> <a accesskey="n" href="parallel_mode.html">Next</a></td></tr></table><hr></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.debug_mode.design"></a>Design</h2></div></div></div><p>
</p><div class="section" title="Goals"><div class="titlepage"><div><div><h3 class="title"><a name="debug_mode.design.goals"></a>Goals</h3></div></div></div><p>
</p><p> The libstdc++ debug mode replaces unsafe (but efficient) standard </p><p> The libstdc++ debug mode replaces unsafe (but efficient) standard
containers and iterators with semantically equivalent safe standard containers and iterators with semantically equivalent safe standard
containers and iterators to aid in debugging user programs. The containers and iterators to aid in debugging user programs. The
@ -103,10 +89,10 @@
(performance regression) or allocating extra memory associated (performance regression) or allocating extra memory associated
with each iterator with <code class="code">new</code> (changes the program with each iterator with <code class="code">new</code> (changes the program
semantics).</p></li></ol></div><p> semantics).</p></li></ol></div><p>
</p></li></ul></div></div><div class="section" title="Methods"><div class="titlepage"><div><div><h3 class="title"><a name="debug_mode.design.methods"></a>Methods</h3></div></div></div><p> </p></li></ul></div></div><div class="section" title="Methods"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.design.methods"></a>Methods</h3></div></div></div><p>
</p><p>This section provides an overall view of the design of the </p><p>This section provides an overall view of the design of the
libstdc++ debug mode and details the relationship between design libstdc++ debug mode and details the relationship between design
decisions and the stated design goals.</p><div class="section" title="The Wrapper Model"><div class="titlepage"><div><div><h4 class="title"><a name="debug_mode.design.methods.wrappers"></a>The Wrapper Model</h4></div></div></div><p>The libstdc++ debug mode uses a wrapper model where the decisions and the stated design goals.</p><div class="section" title="The Wrapper Model"><div class="titlepage"><div><div><h4 class="title"><a id="debug_mode.design.methods.wrappers"></a>The Wrapper Model</h4></div></div></div><p>The libstdc++ debug mode uses a wrapper model where the
debugging versions of library components (e.g., iterators and debugging versions of library components (e.g., iterators and
containers) form a layer on top of the release versions of the containers) form a layer on top of the release versions of the
library components. The debugging components first verify that the library components. The debugging components first verify that the
@ -123,7 +109,7 @@
their associated containers, which are necessary to detect certain their associated containers, which are necessary to detect certain
types of standard library usage errors such as dereferencing types of standard library usage errors such as dereferencing
past-the-end iterators or inserting into a container using an past-the-end iterators or inserting into a container using an
iterator from a different container.</p><div class="section" title="Safe Iterators"><div class="titlepage"><div><div><h5 class="title"><a name="debug_mode.design.methods.safe_iter"></a>Safe Iterators</h5></div></div></div><p>Iterator wrappers provide a debugging layer over any iterator that iterator from a different container.</p><div class="section" title="Safe Iterators"><div class="titlepage"><div><div><h5 class="title"><a id="debug_mode.design.methods.safe_iter"></a>Safe Iterators</h5></div></div></div><p>Iterator wrappers provide a debugging layer over any iterator that
is attached to a particular container, and will manage the is attached to a particular container, and will manage the
information detailing the iterator's state (singular, information detailing the iterator's state (singular,
dereferenceable, etc.) and tracking the container to which the dereferenceable, etc.) and tracking the container to which the
@ -135,7 +121,7 @@
typedef from the sequence type this iterator can reference.</p></li><li class="listitem"><p><code class="code">Sequence</code>: The type of sequence that this iterator typedef from the sequence type this iterator can reference.</p></li><li class="listitem"><p><code class="code">Sequence</code>: The type of sequence that this iterator
references. This sequence must be a safe sequence (discussed below) references. This sequence must be a safe sequence (discussed below)
whose <code class="code">iterator</code> or <code class="code">const_iterator</code> typedef whose <code class="code">iterator</code> or <code class="code">const_iterator</code> typedef
is the type of the safe iterator.</p></li></ul></div></div><div class="section" title="Safe Sequences (Containers)"><div class="titlepage"><div><div><h5 class="title"><a name="debug_mode.design.methods.safe_seq"></a>Safe Sequences (Containers)</h5></div></div></div><p>Container wrappers provide a debugging layer over a particular is the type of the safe iterator.</p></li></ul></div></div><div class="section" title="Safe Sequences (Containers)"><div class="titlepage"><div><div><h5 class="title"><a id="debug_mode.design.methods.safe_seq"></a>Safe Sequences (Containers)</h5></div></div></div><p>Container wrappers provide a debugging layer over a particular
container type. Because containers vary greatly in the member container type. Because containers vary greatly in the member
functions they support and the semantics of those member functions functions they support and the semantics of those member functions
(especially in the area of iterator invalidation), container (especially in the area of iterator invalidation), container
@ -171,7 +157,7 @@ template&lt;typename _Tp, typename _Allocator = allocator&lt;_Tp&gt;
// duplicate std::list interface with debugging semantics // duplicate std::list interface with debugging semantics
}; };
</pre></div></div><div class="section" title="Precondition Checking"><div class="titlepage"><div><div><h4 class="title"><a name="debug_mode.design.methods.precond"></a>Precondition Checking</h4></div></div></div><p>The debug mode operates primarily by checking the preconditions of </pre></div></div><div class="section" title="Precondition Checking"><div class="titlepage"><div><div><h4 class="title"><a id="debug_mode.design.methods.precond"></a>Precondition Checking</h4></div></div></div><p>The debug mode operates primarily by checking the preconditions of
all standard library operations that it supports. Preconditions that all standard library operations that it supports. Preconditions that
are always checked (regardless of whether or not we are in debug are always checked (regardless of whether or not we are in debug
mode) are checked via the <code class="code">__check_xxx</code> macros defined mode) are checked via the <code class="code">__check_xxx</code> macros defined
@ -198,7 +184,7 @@ template&lt;typename _Tp, typename _Allocator = allocator&lt;_Tp&gt;
cousin <code class="code">_GLIBCXX_DEBUG_PEDASSERT</code>, or the assertion cousin <code class="code">_GLIBCXX_DEBUG_PEDASSERT</code>, or the assertion
check macro that supports more advance formulation of error check macro that supports more advance formulation of error
messages, <code class="code">_GLIBCXX_DEBUG_VERIFY</code>. These macros are messages, <code class="code">_GLIBCXX_DEBUG_VERIFY</code>. These macros are
documented more thoroughly in the debug mode source code.</p></div><div class="section" title="Release- and debug-mode coexistence"><div class="titlepage"><div><div><h4 class="title"><a name="debug_mode.design.methods.coexistence"></a>Release- and debug-mode coexistence</h4></div></div></div><p>The libstdc++ debug mode is the first debug mode we know of that documented more thoroughly in the debug mode source code.</p></div><div class="section" title="Release- and debug-mode coexistence"><div class="titlepage"><div><div><h4 class="title"><a id="debug_mode.design.methods.coexistence"></a>Release- and debug-mode coexistence</h4></div></div></div><p>The libstdc++ debug mode is the first debug mode we know of that
is able to provide the "Per-use recompilation" (4) guarantee, that is able to provide the "Per-use recompilation" (4) guarantee, that
allows release-compiled and debug-compiled code to be linked and allows release-compiled and debug-compiled code to be linked and
executed together without causing unpredictable behavior. This executed together without causing unpredictable behavior. This
@ -214,7 +200,7 @@ template&lt;typename _Tp, typename _Allocator = allocator&lt;_Tp&gt;
recompilation but have had to give up some checking of the recompilation but have had to give up some checking of the
<code class="code">std::basic_string</code> class template (namely, safe <code class="code">std::basic_string</code> class template (namely, safe
iterators). iterators).
</p><div class="section" title="Compile-time coexistence of release- and debug-mode components"><div class="titlepage"><div><div><h5 class="title"><a name="methods.coexistence.compile"></a>Compile-time coexistence of release- and debug-mode components</h5></div></div></div><p>Both the release-mode components and the debug-mode </p><div class="section" title="Compile-time coexistence of release- and debug-mode components"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.compile"></a>Compile-time coexistence of release- and debug-mode components</h5></div></div></div><p>Both the release-mode components and the debug-mode
components need to exist within a single translation unit so that components need to exist within a single translation unit so that
the debug versions can wrap the release versions. However, only one the debug versions can wrap the release versions. However, only one
of these components should be user-visible at any particular of these components should be user-visible at any particular
@ -268,7 +254,7 @@ namespace std
// namespace __debug __attribute__ ((strong)); // namespace __debug __attribute__ ((strong));
inline namespace __debug { } inline namespace __debug { }
} }
</pre></div><div class="section" title="Link- and run-time coexistence of release- and debug-mode components"><div class="titlepage"><div><div><h5 class="title"><a name="methods.coexistence.link"></a>Link- and run-time coexistence of release- and </pre></div><div class="section" title="Link- and run-time coexistence of release- and debug-mode components"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.link"></a>Link- and run-time coexistence of release- and
debug-mode components</h5></div></div></div><p>Because each component has a distinct and separate release and debug-mode components</h5></div></div></div><p>Because each component has a distinct and separate release and
debug implementation, there is no issue with link-time debug implementation, there is no issue with link-time
coexistence: the separate namespaces result in different mangled coexistence: the separate namespaces result in different mangled
@ -330,7 +316,7 @@ test02()
changes. The effect on users is expected to be minimal, as there are changes. The effect on users is expected to be minimal, as there are
simple alternatives (e.g., <code class="code">__gnu_debug::basic_string</code>), simple alternatives (e.g., <code class="code">__gnu_debug::basic_string</code>),
and the usability benefit we gain from the ability to mix debug- and and the usability benefit we gain from the ability to mix debug- and
release-compiled translation units is enormous.</p></div><div class="section" title="Alternatives for Coexistence"><div class="titlepage"><div><div><h5 class="title"><a name="methods.coexistence.alt"></a>Alternatives for Coexistence</h5></div></div></div><p>The coexistence scheme above was chosen over many alternatives, release-compiled translation units is enormous.</p></div><div class="section" title="Alternatives for Coexistence"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.alt"></a>Alternatives for Coexistence</h5></div></div></div><p>The coexistence scheme above was chosen over many alternatives,
including language-only solutions and solutions that also required including language-only solutions and solutions that also required
extensions to the C++ front end. The following is a partial list of extensions to the C++ front end. The following is a partial list of
solutions, with justifications for our rejection of each.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Completely separate debug/release libraries</em></span>: This is by solutions, with justifications for our rejection of each.</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Completely separate debug/release libraries</em></span>: This is by
@ -402,7 +388,7 @@ test02()
that breaks user specialization), and additional testcases will be that breaks user specialization), and additional testcases will be
added as we are able to identify other typical problem cases. These added as we are able to identify other typical problem cases. These
test cases will serve as a benchmark by which we can compare debug test cases will serve as a benchmark by which we can compare debug
mode implementations.</p></div></div></div><div class="section" title="Other Implementations"><div class="titlepage"><div><div><h3 class="title"><a name="debug_mode.design.other"></a>Other Implementations</h3></div></div></div><p> mode implementations.</p></div></div></div><div class="section" title="Other Implementations"><div class="titlepage"><div><div><h3 class="title"><a id="debug_mode.design.other"></a>Other Implementations</h3></div></div></div><p>
</p><p> There are several existing implementations of debug modes for C++ </p><p> There are several existing implementations of debug modes for C++
standard library implementations, although none of them directly standard library implementations, although none of them directly
supports debugging for programs using libstdc++. The existing supports debugging for programs using libstdc++. The existing
@ -423,4 +409,4 @@ test02()
a full debug-mode implementation (including debugging for a full debug-mode implementation (including debugging for
CodeWarrior extensions) and is easy to use, although it meets only CodeWarrior extensions) and is easy to use, although it meets only
the "Full recompilation" (1) recompilation the "Full recompilation" (1) recompilation
guarantee.</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch17s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="parallel_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 18. Parallel Mode</td></tr></table></div></body></html> guarantee.</p></li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch17s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="parallel_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 18. Parallel Mode</td></tr></table></div></body></html>

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Semantics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Semantics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="parallel_mode.html" title="Chapter 18. Parallel Mode" /><link rel="prev" href="parallel_mode.html" title="Chapter 18. Parallel Mode" /><link rel="next" href="bk01pt03ch18s03.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch18s03.html">Next</a></td></tr></table><hr /></div><div class="section" title="Semantics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.semantics"></a>Semantics</h2></div></div></div><p> The parallel mode STL algorithms are currently not exception-safe,
library
,
parallel
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="parallel_mode.html" title="Chapter 18. Parallel Mode"><link rel="prev" href="parallel_mode.html" title="Chapter 18. Parallel Mode"><link rel="next" href="bk01pt03ch18s03.html" title="Using"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Semantics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch18s03.html">Next</a></td></tr></table><hr></div><div class="section" title="Semantics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.parallel_mode.semantics"></a>Semantics</h2></div></div></div><p> The parallel mode STL algorithms are currently not exception-safe,
i.e. user-defined functors must not throw exceptions. i.e. user-defined functors must not throw exceptions.
Also, the order of execution is not guaranteed for some functions, of course. Also, the order of execution is not guaranteed for some functions, of course.
Therefore, user-defined functors should not have any concurrent side effects. Therefore, user-defined functors should not have any concurrent side effects.
@ -22,4 +8,4 @@ Therefore, user-defined functors should not have any concurrent side effects.
OpenMP parallel regions in concurrent threads, OpenMP parallel regions in concurrent threads,
it is not possible to call parallel STL algorithm in it is not possible to call parallel STL algorithm in
concurrent threads, either. concurrent threads, either.
It might work with other compilers, though.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch18s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 18. Parallel Mode </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html> It might work with other compilers, though.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="parallel_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch18s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 18. Parallel Mode </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,21 +1,7 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="parallel_mode.html" title="Chapter 18. Parallel Mode" /><link rel="prev" href="bk01pt03ch18s03.html" title="Using" /><link rel="next" href="bk01pt03ch18s05.html" title="Testing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch18s03.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch18s05.html">Next</a></td></tr></table><hr /></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.design"></a>Design</h2></div></div></div><p>
library </p><div class="section" title="Interface Basics"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.design.intro"></a>Interface Basics</h3></div></div></div><p>
,
parallel
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="parallel_mode.html" title="Chapter 18. Parallel Mode"><link rel="prev" href="bk01pt03ch18s03.html" title="Using"><link rel="next" href="bk01pt03ch18s05.html" title="Testing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch18s03.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch18s05.html">Next</a></td></tr></table><hr></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.parallel_mode.design"></a>Design</h2></div></div></div><p>
</p><div class="section" title="Interface Basics"><div class="titlepage"><div><div><h3 class="title"><a name="parallel_mode.design.intro"></a>Interface Basics</h3></div></div></div><p>
All parallel algorithms are intended to have signatures that are All parallel algorithms are intended to have signatures that are
equivalent to the ISO C++ algorithms replaced. For instance, the equivalent to the ISO C++ algorithms replaced. For instance, the
<code class="function">std::adjacent_find</code> function is declared as: <code class="function">std::adjacent_find</code> function is declared as:
@ -56,7 +42,7 @@ algorithms/algorithm classes.</p><p> The general view of overloads for the paral
ISO C++ signature to the correct parallel version. Also, some of the ISO C++ signature to the correct parallel version. Also, some of the
algorithms do not have support for run-time conditions, so the last algorithms do not have support for run-time conditions, so the last
overload is therefore missing. overload is therefore missing.
</p></div><div class="section" title="Configuration and Tuning"><div class="titlepage"><div><div><h3 class="title"><a name="parallel_mode.design.tuning"></a>Configuration and Tuning</h3></div></div></div><div class="section" title="Setting up the OpenMP Environment"><div class="titlepage"><div><div><h4 class="title"><a name="parallel_mode.design.tuning.omp"></a>Setting up the OpenMP Environment</h4></div></div></div><p> </p></div><div class="section" title="Configuration and Tuning"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.design.tuning"></a>Configuration and Tuning</h3></div></div></div><div class="section" title="Setting up the OpenMP Environment"><div class="titlepage"><div><div><h4 class="title"><a id="parallel_mode.design.tuning.omp"></a>Setting up the OpenMP Environment</h4></div></div></div><p>
Several aspects of the overall runtime environment can be manipulated Several aspects of the overall runtime environment can be manipulated
by standard OpenMP function calls. by standard OpenMP function calls.
</p><p> </p><p>
@ -86,7 +72,7 @@ Other parts of the runtime environment able to be manipulated include
nested parallelism (<code class="function">omp_set_nested</code>), schedule kind nested parallelism (<code class="function">omp_set_nested</code>), schedule kind
(<code class="function">omp_set_schedule</code>), and others. See the OpenMP (<code class="function">omp_set_schedule</code>), and others. See the OpenMP
documentation for more information. documentation for more information.
</p></div><div class="section" title="Compile Time Switches"><div class="titlepage"><div><div><h4 class="title"><a name="parallel_mode.design.tuning.compile"></a>Compile Time Switches</h4></div></div></div><p> </p></div><div class="section" title="Compile Time Switches"><div class="titlepage"><div><div><h4 class="title"><a id="parallel_mode.design.tuning.compile"></a>Compile Time Switches</h4></div></div></div><p>
To force an algorithm to execute sequentially, even though parallelism To force an algorithm to execute sequentially, even though parallelism
is switched on in general via the macro <code class="constant">_GLIBCXX_PARALLEL</code>, is switched on in general via the macro <code class="constant">_GLIBCXX_PARALLEL</code>,
add <code class="classname">__gnu_parallel::sequential_tag()</code> to the end add <code class="classname">__gnu_parallel::sequential_tag()</code> to the end
@ -140,7 +126,7 @@ several additional choices, namely
<code class="code">__gnu_parallel::balanced_quicksort_tag</code>. <code class="code">__gnu_parallel::balanced_quicksort_tag</code>.
Multiway mergesort comes with the two splitting strategies for multi-way Multiway mergesort comes with the two splitting strategies for multi-way
merging. The quicksort options cannot be used for <code class="code">stable_sort</code>. merging. The quicksort options cannot be used for <code class="code">stable_sort</code>.
</p></div><div class="section" title="Run Time Settings and Defaults"><div class="titlepage"><div><div><h4 class="title"><a name="parallel_mode.design.tuning.settings"></a>Run Time Settings and Defaults</h4></div></div></div><p> </p></div><div class="section" title="Run Time Settings and Defaults"><div class="titlepage"><div><div><h4 class="title"><a id="parallel_mode.design.tuning.settings"></a>Run Time Settings and Defaults</h4></div></div></div><p>
The default parallelization strategy, the choice of specific algorithm The default parallelization strategy, the choice of specific algorithm
strategy, the minimum threshold limits for individual parallel strategy, the minimum threshold limits for individual parallel
algorithms, and aspects of the underlying hardware can be specified as algorithms, and aspects of the underlying hardware can be specified as
@ -208,7 +194,7 @@ int main()
return 0; return 0;
} }
</pre></div></div><div class="section" title="Implementation Namespaces"><div class="titlepage"><div><div><h3 class="title"><a name="parallel_mode.design.impl"></a>Implementation Namespaces</h3></div></div></div><p> One namespace contain versions of code that are always </pre></div></div><div class="section" title="Implementation Namespaces"><div class="titlepage"><div><div><h3 class="title"><a id="parallel_mode.design.impl"></a>Implementation Namespaces</h3></div></div></div><p> One namespace contain versions of code that are always
explicitly sequential: explicitly sequential:
<code class="code">__gnu_serial</code>. <code class="code">__gnu_serial</code>.
</p><p> Two namespaces contain the parallel mode: </p><p> Two namespaces contain the parallel mode:
@ -224,4 +210,4 @@ __gnu_parallel</code>.
</p><p> More information, and an organized index of types and functions </p><p> More information, and an organized index of types and functions
related to the parallel mode on a per-namespace basis, can be found in related to the parallel mode on a per-namespace basis, can be found in
the generated source documentation. the generated source documentation.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch18s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch18s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Testing</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch18s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch18s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Testing</td></tr></table></div></body></html>

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Testing</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Testing</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="parallel_mode.html" title="Chapter 18. Parallel Mode" /><link rel="prev" href="bk01pt03ch18s04.html" title="Design" /><link rel="next" href="profile_mode.html" title="Chapter 19. Profile Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch18s04.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="profile_mode.html">Next</a></td></tr></table><hr /></div><div class="section" title="Testing"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.test"></a>Testing</h2></div></div></div><p>
library
,
parallel
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="parallel_mode.html" title="Chapter 18. Parallel Mode"><link rel="prev" href="bk01pt03ch18s04.html" title="Design"><link rel="next" href="profile_mode.html" title="Chapter 19. Profile Mode"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch18s04.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Parallel Mode</th><td width="20%" align="right"> <a accesskey="n" href="profile_mode.html">Next</a></td></tr></table><hr></div><div class="section" title="Testing"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.parallel_mode.test"></a>Testing</h2></div></div></div><p>
Both the normal conformance and regression tests and the Both the normal conformance and regression tests and the
supplemental performance tests work. supplemental performance tests work.
</p><p> </p><p>
@ -37,4 +23,4 @@
additional software dependencies than the usual bare-boned text additional software dependencies than the usual bare-boned text
file, and can be generated by using the <code class="code">make file, and can be generated by using the <code class="code">make
doc-performance</code> rule in the testsuite's Makefile. doc-performance</code> rule in the testsuite's Makefile.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch18s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="profile_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 19. Profile Mode</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch18s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="profile_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 19. Profile Mode</td></tr></table></div></body></html>

View File

@ -1,24 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="prev" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="next" href="bk01pt03ch19s03.html" title="Extensions for Custom Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s03.html">Next</a></td></tr></table><hr /></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.design"></a>Design</h2></div></div></div><p>
library </p><div class="table"><a id="id609182"></a><p class="title"><strong>Table 19.1. Profile Code Location</strong></p><div class="table-contents"><table summary="Profile Code Location" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /></colgroup><thead><tr><th align="left">Code Location</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left"><code class="code">libstdc++-v3/include/std/*</code></td><td align="left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td align="left"><code class="code">libstdc++-v3/include/profile/*</code></td><td align="left">Profile extension public headers (map, vector, ...).</td></tr><tr><td align="left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td align="left">Profile extension internals. Implementation files are
,
profile
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="prev" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="next" href="bk01pt03ch19s03.html" title="Extensions for Custom Containers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s03.html">Next</a></td></tr></table><hr></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.profile_mode.design"></a>Design</h2></div></div></div><p>
</p><div class="table"><a name="id635111"></a><p class="title"><b>Table 19.1. Profile Code Location</b></p><div class="table-contents"><table summary="Profile Code Location" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"></colgroup><thead><tr><th align="left">Code Location</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left"><code class="code">libstdc++-v3/include/std/*</code></td><td align="left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td align="left"><code class="code">libstdc++-v3/include/profile/*</code></td><td align="left">Profile extension public headers (map, vector, ...).</td></tr><tr><td align="left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td align="left">Profile extension internals. Implementation files are
only included from <code class="code">impl/profiler.h</code>, which is the only only included from <code class="code">impl/profiler.h</code>, which is the only
file included from the public headers.</td></tr></tbody></table></div></div><br class="table-break"><p> file included from the public headers.</td></tr></tbody></table></div></div><br class="table-break" /><p>
</p><div class="section" title="Wrapper Model"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.wrapper"></a>Wrapper Model</h3></div></div></div><p> </p><div class="section" title="Wrapper Model"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.wrapper"></a>Wrapper Model</h3></div></div></div><p>
In order to get our instrumented library version included instead of the In order to get our instrumented library version included instead of the
release one, release one,
we use the same wrapper model as the debug mode. we use the same wrapper model as the debug mode.
@ -39,7 +25,7 @@
Currently, mixing the profile mode with debug and parallel extensions is Currently, mixing the profile mode with debug and parallel extensions is
not allowed. Mixing them at compile time will result in preprocessor errors. not allowed. Mixing them at compile time will result in preprocessor errors.
Mixing them at link time is undefined. Mixing them at link time is undefined.
</p></div><div class="section" title="Instrumentation"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.instrumentation"></a>Instrumentation</h3></div></div></div><p> </p></div><div class="section" title="Instrumentation"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.instrumentation"></a>Instrumentation</h3></div></div></div><p>
Instead of instrumenting every public entry and exit point, Instead of instrumenting every public entry and exit point,
we chose to add instrumentation on demand, as needed we chose to add instrumentation on demand, as needed
by individual diagnostics. by individual diagnostics.
@ -58,7 +44,7 @@
</p><p> </p><p>
All the instrumentation on/off compile time switches live in All the instrumentation on/off compile time switches live in
<code class="code">include/profile/profiler.h</code>. <code class="code">include/profile/profiler.h</code>.
</p></div><div class="section" title="Run Time Behavior"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.rtlib"></a>Run Time Behavior</h3></div></div></div><p> </p></div><div class="section" title="Run Time Behavior"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.rtlib"></a>Run Time Behavior</h3></div></div></div><p>
For practical reasons, the instrumentation library processes the trace For practical reasons, the instrumentation library processes the trace
partially partially
rather than dumping it to disk in raw form. Each event is processed when rather than dumping it to disk in raw form. Each event is processed when
@ -77,14 +63,14 @@
For details, see For details, see
<a class="link" href="http://dx.doi.org/10.1109/CGO.2009.36" target="_top">paper presented at <a class="link" href="http://dx.doi.org/10.1109/CGO.2009.36" target="_top">paper presented at
CGO 2009</a>. CGO 2009</a>.
</p></div><div class="section" title="Analysis and Diagnostics"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.analysis"></a>Analysis and Diagnostics</h3></div></div></div><p> </p></div><div class="section" title="Analysis and Diagnostics"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.analysis"></a>Analysis and Diagnostics</h3></div></div></div><p>
Final analysis takes place offline, and it is based entirely on the Final analysis takes place offline, and it is based entirely on the
generated trace and debugging info in the application binary. generated trace and debugging info in the application binary.
See section Diagnostics for a list of analysis types that we plan to support. See section Diagnostics for a list of analysis types that we plan to support.
</p><p> </p><p>
The input to the analysis is a table indexed by profile type and call stack. The input to the analysis is a table indexed by profile type and call stack.
The data type for each entry depends on the profile type. The data type for each entry depends on the profile type.
</p></div><div class="section" title="Cost Model"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.cost-model"></a>Cost Model</h3></div></div></div><p> </p></div><div class="section" title="Cost Model"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.cost-model"></a>Cost Model</h3></div></div></div><p>
While it is likely that cost models become complex as we get into While it is likely that cost models become complex as we get into
more sophisticated analysis, we will try to follow a simple set of rules more sophisticated analysis, we will try to follow a simple set of rules
at the beginning. at the beginning.
@ -112,7 +98,7 @@
For instance, when considering switching from <code class="code">set</code> to For instance, when considering switching from <code class="code">set</code> to
<code class="code">unordered_set</code>, if we detect use of operator <code class="code">++</code>, <code class="code">unordered_set</code>, if we detect use of operator <code class="code">++</code>,
we will simply not issue the advice, since this could signal that the use we will simply not issue the advice, since this could signal that the use
care require a sorted container.</p></li></ul></div></div><div class="section" title="Reports"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.reports"></a>Reports</h3></div></div></div><p> care require a sorted container.</p></li></ul></div></div><div class="section" title="Reports"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.reports"></a>Reports</h3></div></div></div><p>
There are two types of reports. First, if we recognize a pattern for which There are two types of reports. First, if we recognize a pattern for which
we have a substitute that is likely to give better performance, we print we have a substitute that is likely to give better performance, we print
the advice and estimated performance gain. The advice is usually associated the advice and estimated performance gain. The advice is usually associated
@ -124,7 +110,7 @@ the top 10 <code class="code">multimap</code> locations
which have the worst data locality in actual traversals. which have the worst data locality in actual traversals.
Although this does not offer a solution, Although this does not offer a solution,
it helps the user focus on the key problems and ignore the uninteresting ones. it helps the user focus on the key problems and ignore the uninteresting ones.
</p></div><div class="section" title="Testing"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.design.testing"></a>Testing</h3></div></div></div><p> </p></div><div class="section" title="Testing"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.testing"></a>Testing</h3></div></div></div><p>
First, we want to make sure we preserve the behavior of the release mode. First, we want to make sure we preserve the behavior of the release mode.
You can just type <code class="code">"make check-profile"</code>, which You can just type <code class="code">"make check-profile"</code>, which
builds and runs the whole test suite in profile mode. builds and runs the whole test suite in profile mode.
@ -133,4 +119,4 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
We created a <code class="code">profile</code> directory in the test suite. We created a <code class="code">profile</code> directory in the test suite.
Each diagnostic must come with at least two tests, one for false positives Each diagnostic must come with at least two tests, one for false positives
and one for false negatives. and one for false negatives.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 19. Profile Mode </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Extensions for Custom Containers</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 19. Profile Mode </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Extensions for Custom Containers</td></tr></table></div></body></html>

View File

@ -1,24 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Extensions for Custom Containers</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Extensions for Custom Containers</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="prev" href="bk01pt03ch19s02.html" title="Design" /><link rel="next" href="bk01pt03ch19s04.html" title="Empirical Cost Model" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Extensions for Custom Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s02.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s04.html">Next</a></td></tr></table><hr /></div><div class="section" title="Extensions for Custom Containers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.api"></a>Extensions for Custom Containers</h2></div></div></div><p>
library
,
profile
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="prev" href="bk01pt03ch19s02.html" title="Design"><link rel="next" href="bk01pt03ch19s04.html" title="Empirical Cost Model"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Extensions for Custom Containers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s02.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s04.html">Next</a></td></tr></table><hr></div><div class="section" title="Extensions for Custom Containers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.profile_mode.api"></a>Extensions for Custom Containers</h2></div></div></div><p>
Many large projects use their own data structures instead of the ones in the Many large projects use their own data structures instead of the ones in the
standard library. If these data structures are similar in functionality standard library. If these data structures are similar in functionality
to the standard library, they can be instrumented with the same hooks to the standard library, they can be instrumented with the same hooks
that are used to instrument the standard library. that are used to instrument the standard library.
The instrumentation API is exposed in file The instrumentation API is exposed in file
<code class="code">profiler.h</code> (look for "Instrumentation hooks"). <code class="code">profiler.h</code> (look for "Instrumentation hooks").
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Empirical Cost Model</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Empirical Cost Model</td></tr></table></div></body></html>

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Empirical Cost Model</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Empirical Cost Model</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="prev" href="bk01pt03ch19s03.html" title="Extensions for Custom Containers" /><link rel="next" href="bk01pt03ch19s05.html" title="Implementation Issues" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Empirical Cost Model</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s03.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s05.html">Next</a></td></tr></table><hr /></div><div class="section" title="Empirical Cost Model"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.cost_model"></a>Empirical Cost Model</h2></div></div></div><p>
library
,
profile
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="prev" href="bk01pt03ch19s03.html" title="Extensions for Custom Containers"><link rel="next" href="bk01pt03ch19s05.html" title="Implementation Issues"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Empirical Cost Model</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s03.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s05.html">Next</a></td></tr></table><hr></div><div class="section" title="Empirical Cost Model"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.profile_mode.cost_model"></a>Empirical Cost Model</h2></div></div></div><p>
Currently, the cost model uses formulas with predefined relative weights Currently, the cost model uses formulas with predefined relative weights
for alternative containers or container implementations. For instance, for alternative containers or container implementations. For instance,
iterating through a vector is X times faster than iterating through a list. iterating through a vector is X times faster than iterating through a list.
@ -29,4 +15,4 @@
filled in either by hand or by an automated training mechanism. filled in either by hand or by an automated training mechanism.
The analysis module will then use this database instead of the built in. The analysis module will then use this database instead of the built in.
generic parameters. generic parameters.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Extensions for Custom Containers </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation Issues</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Extensions for Custom Containers </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation Issues</td></tr></table></div></body></html>

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Implementation Issues</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation Issues</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="prev" href="bk01pt03ch19s04.html" title="Empirical Cost Model" /><link rel="next" href="bk01pt03ch19s06.html" title="Developer Information" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s04.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s06.html">Next</a></td></tr></table><hr /></div><div class="section" title="Implementation Issues"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.implementation"></a>Implementation Issues</h2></div></div></div><div class="section" title="Stack Traces"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.stack"></a>Stack Traces</h3></div></div></div><p>
library
,
profile
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="prev" href="bk01pt03ch19s04.html" title="Empirical Cost Model"><link rel="next" href="bk01pt03ch19s06.html" title="Developer Information"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s04.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s06.html">Next</a></td></tr></table><hr></div><div class="section" title="Implementation Issues"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.profile_mode.implementation"></a>Implementation Issues</h2></div></div></div><div class="section" title="Stack Traces"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.implementation.stack"></a>Stack Traces</h3></div></div></div><p>
Accurate stack traces are needed during profiling since we group events by Accurate stack traces are needed during profiling since we group events by
call context and dynamic instance. Without accurate traces, diagnostics call context and dynamic instance. Without accurate traces, diagnostics
may be hard to interpret. For instance, when giving advice to the user may be hard to interpret. For instance, when giving advice to the user
@ -25,24 +11,24 @@
<code class="code">_GLIBCXX_PROFILE_STACK_DEPTH</code> can be set <code class="code">_GLIBCXX_PROFILE_STACK_DEPTH</code> can be set
to 0 if you are willing to give up call context information, or to a small to 0 if you are willing to give up call context information, or to a small
positive value to reduce run time overhead. positive value to reduce run time overhead.
</p></div><div class="section" title="Symbolization of Instruction Addresses"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.implementation.symbols"></a>Symbolization of Instruction Addresses</h3></div></div></div><p> </p></div><div class="section" title="Symbolization of Instruction Addresses"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.symbols"></a>Symbolization of Instruction Addresses</h3></div></div></div><p>
The profiling and analysis phases use only instruction addresses. The profiling and analysis phases use only instruction addresses.
An external utility such as addr2line is needed to postprocess the result. An external utility such as addr2line is needed to postprocess the result.
We do not plan to add symbolization support in the profile extension. We do not plan to add symbolization support in the profile extension.
This would require access to symbol tables, debug information tables, This would require access to symbol tables, debug information tables,
external programs or libraries and other system dependent information. external programs or libraries and other system dependent information.
</p></div><div class="section" title="Concurrency"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.implementation.concurrency"></a>Concurrency</h3></div></div></div><p> </p></div><div class="section" title="Concurrency"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.concurrency"></a>Concurrency</h3></div></div></div><p>
Our current model is simplistic, but precise. Our current model is simplistic, but precise.
We cannot afford to approximate because some of our diagnostics require We cannot afford to approximate because some of our diagnostics require
precise matching of operations to container instance and call context. precise matching of operations to container instance and call context.
During profiling, we keep a single information table per diagnostic. During profiling, we keep a single information table per diagnostic.
There is a single lock per information table. There is a single lock per information table.
</p></div><div class="section" title="Using the Standard Library in the Instrumentation Implementation"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.implementation.stdlib-in-proflib"></a>Using the Standard Library in the Instrumentation Implementation</h3></div></div></div><p> </p></div><div class="section" title="Using the Standard Library in the Instrumentation Implementation"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.stdlib-in-proflib"></a>Using the Standard Library in the Instrumentation Implementation</h3></div></div></div><p>
As much as we would like to avoid uses of libstdc++ within our As much as we would like to avoid uses of libstdc++ within our
instrumentation library, containers such as unordered_map are very instrumentation library, containers such as unordered_map are very
appealing. We plan to use them as long as they are named properly appealing. We plan to use them as long as they are named properly
to avoid ambiguity. to avoid ambiguity.
</p></div><div class="section" title="Malloc Hooks"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.implementation.malloc-hooks"></a>Malloc Hooks</h3></div></div></div><p> </p></div><div class="section" title="Malloc Hooks"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.malloc-hooks"></a>Malloc Hooks</h3></div></div></div><p>
User applications/libraries can provide malloc hooks. User applications/libraries can provide malloc hooks.
When the implementation of the malloc hooks uses stdlibc++, there can When the implementation of the malloc hooks uses stdlibc++, there can
be an infinite cycle between the profile mode instrumentation and the be an infinite cycle between the profile mode instrumentation and the
@ -56,10 +42,10 @@
uses non-recursive locks. uses non-recursive locks.
XXX: A definitive solution to this problem would be for the profile extension XXX: A definitive solution to this problem would be for the profile extension
to use a custom allocator internally, and perhaps not to use libstdc++. to use a custom allocator internally, and perhaps not to use libstdc++.
</p></div><div class="section" title="Construction and Destruction of Global Objects"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.implementation.construction-destruction"></a>Construction and Destruction of Global Objects</h3></div></div></div><p> </p></div><div class="section" title="Construction and Destruction of Global Objects"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.implementation.construction-destruction"></a>Construction and Destruction of Global Objects</h3></div></div></div><p>
The profiling library state is initialized at the first call to a profiling The profiling library state is initialized at the first call to a profiling
method. This allows us to record the construction of all global objects. method. This allows us to record the construction of all global objects.
However, we cannot do the same at destruction time. The trace is written However, we cannot do the same at destruction time. The trace is written
by a function registered by <code class="code">atexit</code>, thus invoked by by a function registered by <code class="code">atexit</code>, thus invoked by
<code class="code">exit</code>. <code class="code">exit</code>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Empirical Cost Model </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Developer Information</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Empirical Cost Model </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Developer Information</td></tr></table></div></body></html>

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Developer Information</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Developer Information</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="prev" href="bk01pt03ch19s05.html" title="Implementation Issues" /><link rel="next" href="bk01pt03ch19s07.html" title="Diagnostics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Developer Information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s05.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s07.html">Next</a></td></tr></table><hr /></div><div class="section" title="Developer Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.developer"></a>Developer Information</h2></div></div></div><div class="section" title="Big Picture"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.developer.bigpic"></a>Big Picture</h3></div></div></div><p>The profile mode headers are included with
library
,
profile
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="prev" href="bk01pt03ch19s05.html" title="Implementation Issues"><link rel="next" href="bk01pt03ch19s07.html" title="Diagnostics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Developer Information</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s05.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch19s07.html">Next</a></td></tr></table><hr></div><div class="section" title="Developer Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.profile_mode.developer"></a>Developer Information</h2></div></div></div><div class="section" title="Big Picture"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.developer.bigpic"></a>Big Picture</h3></div></div></div><p>The profile mode headers are included with
<code class="code">-D_GLIBCXX_PROFILE</code> through preprocessor directives in <code class="code">-D_GLIBCXX_PROFILE</code> through preprocessor directives in
<code class="code">include/std/*</code>. <code class="code">include/std/*</code>.
</p><p>Instrumented implementations are provided in </p><p>Instrumented implementations are provided in
@ -28,7 +14,7 @@
must ensure (1) that the call is guarded against reentrance and must ensure (1) that the call is guarded against reentrance and
(2) that the call can be turned off at compile time using a (2) that the call can be turned off at compile time using a
<code class="code">-D_GLIBCXX_PROFILE_...</code> compiler option. <code class="code">-D_GLIBCXX_PROFILE_...</code> compiler option.
</p></div><div class="section" title="How To Add A Diagnostic"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.developer.howto"></a>How To Add A Diagnostic</h3></div></div></div><p>Let's say the diagnostic name is "magic". </p></div><div class="section" title="How To Add A Diagnostic"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.developer.howto"></a>How To Add A Diagnostic</h3></div></div></div><p>Let's say the diagnostic name is "magic".
</p><p>If you need to instrument a header not already under </p><p>If you need to instrument a header not already under
<code class="code">include/profile/*</code>, first edit the corresponding header <code class="code">include/profile/*</code>, first edit the corresponding header
under <code class="code">include/std/</code> and add a preprocessor directive such under <code class="code">include/std/</code> and add a preprocessor directive such
@ -79,4 +65,4 @@
<code class="code">include/profile/impl/profiler_trace.h</code>. Use <code class="code">include/profile/impl/profiler_trace.h</code>. Use
<code class="code">__trace_vector_to_list</code> as an example. <code class="code">__trace_vector_to_list</code> as an example.
</p><p>Add documentation in file <code class="code">doc/xml/manual/profile_mode.xml</code>. </p><p>Add documentation in file <code class="code">doc/xml/manual/profile_mode.xml</code>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation Issues </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Diagnostics</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch19s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation Issues </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Diagnostics</td></tr></table></div></body></html>

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Diagnostics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Diagnostics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; profile&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode" /><link rel="prev" href="bk01pt03ch19s06.html" title="Developer Information" /><link rel="next" href="mt_allocator.html" title="Chapter 20. The mt_allocator" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Diagnostics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s06.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="mt_allocator.html">Next</a></td></tr></table><hr /></div><div class="section" title="Diagnostics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.profile_mode.diagnostics"></a>Diagnostics</h2></div></div></div><p>
library
,
profile
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"><link rel="prev" href="bk01pt03ch19s06.html" title="Developer Information"><link rel="next" href="mt_allocator.html" title="Chapter 20. The mt_allocator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Diagnostics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s06.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="mt_allocator.html">Next</a></td></tr></table><hr></div><div class="section" title="Diagnostics"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.profile_mode.diagnostics"></a>Diagnostics</h2></div></div></div><p>
The table below presents all the diagnostics we intend to implement. The table below presents all the diagnostics we intend to implement.
Each diagnostic has a corresponding compile time switch Each diagnostic has a corresponding compile time switch
<code class="code">-D_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>. <code class="code">-D_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
@ -32,7 +18,7 @@
A high accuracy means that the diagnostic is unlikely to be wrong. A high accuracy means that the diagnostic is unlikely to be wrong.
These grades are not perfect. They are just meant to guide users with These grades are not perfect. They are just meant to guide users with
specific needs or time budgets. specific needs or time budgets.
</p><div class="table"><a name="id635993"></a><p class="title"><b>Table 19.2. Profile Diagnostics</b></p><div class="table-contents"><table summary="Profile Diagnostics" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"><col align="left" class="c3"><col align="left" class="c4"><col align="left" class="c5"><col align="left" class="c6"><col align="left" class="c7"></colgroup><thead><tr><th align="left">Group</th><th align="left">Flag</th><th align="left">Benefit</th><th align="left">Cost</th><th align="left">Freq.</th><th align="left">Implemented</th><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers" title="Containers"> </p><div class="table"><a id="id610064"></a><p class="title"><strong>Table 19.2. Profile Diagnostics</strong></p><div class="table-contents"><table summary="Profile Diagnostics" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left">Group</th><th align="left">Flag</th><th align="left">Benefit</th><th align="left">Cost</th><th align="left">Freq.</th><th align="left">Implemented</th><td class="auto-generated"> </td></tr></thead><tbody><tr><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers" title="Containers">
CONTAINERS</a></td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_small" title="Hashtable Too Small"> CONTAINERS</a></td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_small" title="Hashtable Too Small">
HASHTABLE_TOO_SMALL</a></td><td align="left">10</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_large" title="Hashtable Too Large"> HASHTABLE_TOO_SMALL</a></td><td align="left">10</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_large" title="Hashtable Too Large">
HASHTABLE_TOO_LARGE</a></td><td align="left">5</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.inefficient_hash" title="Inefficient Hash"> HASHTABLE_TOO_LARGE</a></td><td align="left">5</td><td align="left">1</td><td align="left"> </td><td align="left">10</td><td align="left">yes</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.inefficient_hash" title="Inefficient Hash">
@ -49,7 +35,7 @@
LOCALITY</a></td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality.sw_prefetch" title="Need Software Prefetch"> LOCALITY</a></td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality.sw_prefetch" title="Need Software Prefetch">
SOFTWARE_PREFETCH</a></td><td align="left">8</td><td align="left">8</td><td align="left"> </td><td align="left">5</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality.linked" title="Linked Structure Locality"> SOFTWARE_PREFETCH</a></td><td align="left">8</td><td align="left">8</td><td align="left"> </td><td align="left">5</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality.linked" title="Linked Structure Locality">
RBTREE_LOCALITY</a></td><td align="left">4</td><td align="left">8</td><td align="left"> </td><td align="left">5</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.mthread.false_share" title="False Sharing"> RBTREE_LOCALITY</a></td><td align="left">4</td><td align="left">8</td><td align="left"> </td><td align="left">5</td><td align="left">no</td></tr><tr><td align="left"> </td><td align="left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.mthread.false_share" title="False Sharing">
FALSE_SHARING</a></td><td align="left">8</td><td align="left">10</td><td align="left"> </td><td align="left">10</td><td align="left">no</td></tr></tbody></table></div></div><br class="table-break"><div class="section" title="Diagnostic Template"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.analysis.template"></a>Diagnostic Template</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> FALSE_SHARING</a></td><td align="left">8</td><td align="left">10</td><td align="left"> </td><td align="left">10</td><td align="left">no</td></tr></tbody></table></div></div><br class="table-break" /><div class="section" title="Diagnostic Template"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.template"></a>Diagnostic Template</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>. <code class="code">_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> What problem will it diagnose? </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> What problem will it diagnose?
</p></li><li class="listitem"><p><span class="emphasis"><em>Fundamentals:</em></span>. </p></li><li class="listitem"><p><span class="emphasis"><em>Fundamentals:</em></span>.
@ -66,10 +52,10 @@ program code
... ...
advice sample advice sample
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Containers"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.analysis.containers"></a>Containers</h3></div></div></div><p> </p></li></ul></div></div><div class="section" title="Containers"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.containers"></a>Containers</h3></div></div></div><p>
<span class="emphasis"><em>Switch:</em></span> <span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_CONTAINERS</code>. <code class="code">_GLIBCXX_PROFILE_CONTAINERS</code>.
</p><div class="section" title="Hashtable Too Small"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.hashtable_too_small"></a>Hashtable Too Small</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p><div class="section" title="Hashtable Too Small"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.hashtable_too_small"></a>Hashtable Too Small</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL</code>. <code class="code">_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables with many </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables with many
rehash operations, small construction size and large destruction size. rehash operations, small construction size and large destruction size.
@ -95,7 +81,7 @@ advice sample
foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1025530 rehash operations. foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1025530 rehash operations.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Hashtable Too Large"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.hashtable_too_large"></a>Hashtable Too Large</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Hashtable Too Large"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.hashtable_too_large"></a>Hashtable Too Large</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE</code>. <code class="code">_GLIBCXX_PROFILE_HASHTABLE_TOO_LARGE</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables which are </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables which are
never filled up because fewer elements than reserved are ever never filled up because fewer elements than reserved are ever
@ -124,7 +110,7 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1
foo.cc:1: advice: Changing initial unordered_set size from 100 to 10 saves N foo.cc:1: advice: Changing initial unordered_set size from 100 to 10 saves N
bytes of memory and M iteration steps. bytes of memory and M iteration steps.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Inefficient Hash"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.inefficient_hash"></a>Inefficient Hash</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Inefficient Hash"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.inefficient_hash"></a>Inefficient Hash</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_INEFFICIENT_HASH</code>. <code class="code">_GLIBCXX_PROFILE_INEFFICIENT_HASH</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables with polarized </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect hashtables with polarized
distribution. distribution.
@ -155,7 +141,7 @@ class dumb_hash {
hs.find(i); hs.find(i);
} }
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Vector Too Small"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.vector_too_small"></a>Vector Too Small</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Vector Too Small"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_too_small"></a>Vector Too Small</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_VECTOR_TOO_SMALL</code>. <code class="code">_GLIBCXX_PROFILE_VECTOR_TOO_SMALL</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span>Detect vectors with many </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span>Detect vectors with many
resize operations, small construction size and large destruction size.. resize operations, small construction size and large destruction size..
@ -180,7 +166,7 @@ class dumb_hash {
foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves
copying 4000000 bytes and 20 memory allocations and deallocations. copying 4000000 bytes and 20 memory allocations and deallocations.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Vector Too Large"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.vector_too_large"></a>Vector Too Large</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Vector Too Large"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_too_large"></a>Vector Too Large</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_VECTOR_TOO_LARGE</code> <code class="code">_GLIBCXX_PROFILE_VECTOR_TOO_LARGE</code>
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span>Detect vectors which are </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span>Detect vectors which are
never filled up because fewer elements than reserved are ever never filled up because fewer elements than reserved are ever
@ -206,7 +192,7 @@ copying 4000000 bytes and 20 memory allocations and deallocations.
foo.cc:1: advice: Changing initial vector size from 100 to 10 saves N foo.cc:1: advice: Changing initial vector size from 100 to 10 saves N
bytes of memory and may reduce the number of cache and TLB misses. bytes of memory and may reduce the number of cache and TLB misses.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Vector to Hashtable"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.vector_to_hashtable"></a>Vector to Hashtable</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Vector to Hashtable"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_to_hashtable"></a>Vector to Hashtable</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE</code>. <code class="code">_GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect uses of </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect uses of
<code class="code">vector</code> that can be substituted with <code class="code">unordered_set</code> <code class="code">vector</code> that can be substituted with <code class="code">unordered_set</code>
@ -237,7 +223,7 @@ bytes of memory and may reduce the number of cache and TLB misses.
foo.cc:1: advice: Changing "vector" to "unordered_set" will save about 500,000 foo.cc:1: advice: Changing "vector" to "unordered_set" will save about 500,000
comparisons. comparisons.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Hashtable to Vector"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.hashtable_to_vector"></a>Hashtable to Vector</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Hashtable to Vector"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.hashtable_to_vector"></a>Hashtable to Vector</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR</code>. <code class="code">_GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect uses of </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect uses of
<code class="code">unordered_set</code> that can be substituted with <code class="code">vector</code> <code class="code">unordered_set</code> that can be substituted with <code class="code">vector</code>
@ -266,7 +252,7 @@ comparisons.
foo.cc:1: advice: Changing "unordered_set" to "vector" will save about N foo.cc:1: advice: Changing "unordered_set" to "vector" will save about N
indirections and may achieve better data locality. indirections and may achieve better data locality.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Vector to List"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.vector_to_list"></a>Vector to List</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Vector to List"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.vector_to_list"></a>Vector to List</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_VECTOR_TO_LIST</code>. <code class="code">_GLIBCXX_PROFILE_VECTOR_TO_LIST</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where
<code class="code">vector</code> could be substituted with <code class="code">list</code> for <code class="code">vector</code> could be substituted with <code class="code">list</code> for
@ -296,7 +282,7 @@ indirections and may achieve better data locality.
foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000 foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000
operations. operations.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="List to Vector"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.list_to_vector"></a>List to Vector</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="List to Vector"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.list_to_vector"></a>List to Vector</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_LIST_TO_VECTOR</code>. <code class="code">_GLIBCXX_PROFILE_LIST_TO_VECTOR</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where
<code class="code">list</code> could be substituted with <code class="code">vector</code> for <code class="code">list</code> could be substituted with <code class="code">vector</code> for
@ -323,7 +309,7 @@ operations.
foo.cc:1: advice: Changing "list" to "vector" will save about 1000000 indirect foo.cc:1: advice: Changing "list" to "vector" will save about 1000000 indirect
memory references. memory references.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="List to Forward List (Slist)"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.list_to_slist"></a>List to Forward List (Slist)</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="List to Forward List (Slist)"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.list_to_slist"></a>List to Forward List (Slist)</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_LIST_TO_SLIST</code>. <code class="code">_GLIBCXX_PROFILE_LIST_TO_SLIST</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where
<code class="code">list</code> could be substituted with <code class="code">forward_list</code> for <code class="code">list</code> could be substituted with <code class="code">forward_list</code> for
@ -353,7 +339,7 @@ memory references.
foo.cc:1: advice: Change "list" to "forward_list". foo.cc:1: advice: Change "list" to "forward_list".
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Ordered to Unordered Associative Container"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.assoc_ord_to_unord"></a>Ordered to Unordered Associative Container</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Ordered to Unordered Associative Container"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.assoc_ord_to_unord"></a>Ordered to Unordered Associative Container</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_ORDERED_TO_UNORDERED</code>. <code class="code">_GLIBCXX_PROFILE_ORDERED_TO_UNORDERED</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where ordered </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect cases where ordered
associative containers can be replaced with unordered ones. associative containers can be replaced with unordered ones.
@ -380,9 +366,9 @@ foo.cc:1: advice: Change "list" to "forward_list".
7 sum += *s.find(i); 7 sum += *s.find(i);
8 } 8 }
</pre><p> </pre><p>
</p></li></ul></div></div></div><div class="section" title="Algorithms"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.analysis.algorithms"></a>Algorithms</h3></div></div></div><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div></div><div class="section" title="Algorithms"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.algorithms"></a>Algorithms</h3></div></div></div><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_ALGORITHMS</code>. <code class="code">_GLIBCXX_PROFILE_ALGORITHMS</code>.
</p><div class="section" title="Sort Algorithm Performance"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.algorithms.sort"></a>Sort Algorithm Performance</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p><div class="section" title="Sort Algorithm Performance"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.algorithms.sort"></a>Sort Algorithm Performance</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_SORT</code>. <code class="code">_GLIBCXX_PROFILE_SORT</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Give measure of sort algorithm </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Give measure of sort algorithm
performance based on actual input. For instance, advise Radix Sort over performance based on actual input. For instance, advise Radix Sort over
@ -403,9 +389,9 @@ foo.cc:1: advice: Change "list" to "forward_list".
Runtime(algo) for algo in [radix, quick, merge, ...]</p></li><li class="listitem"><p><span class="emphasis"><em>Example:</em></span> Runtime(algo) for algo in [radix, quick, merge, ...]</p></li><li class="listitem"><p><span class="emphasis"><em>Example:</em></span>
</p><pre class="programlisting"> </p><pre class="programlisting">
</pre><p> </pre><p>
</p></li></ul></div></div></div><div class="section" title="Data Locality"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.analysis.locality"></a>Data Locality</h3></div></div></div><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div></div><div class="section" title="Data Locality"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.locality"></a>Data Locality</h3></div></div></div><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_LOCALITY</code>. <code class="code">_GLIBCXX_PROFILE_LOCALITY</code>.
</p><div class="section" title="Need Software Prefetch"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.locality.sw_prefetch"></a>Need Software Prefetch</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p><div class="section" title="Need Software Prefetch"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.locality.sw_prefetch"></a>Need Software Prefetch</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_SOFTWARE_PREFETCH</code>. <code class="code">_GLIBCXX_PROFILE_SOFTWARE_PREFETCH</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Discover sequences of indirect </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Discover sequences of indirect
memory accesses that are not regular, thus cannot be predicted by memory accesses that are not regular, thus cannot be predicted by
@ -448,7 +434,7 @@ foo.cc:1: advice: Change "list" to "forward_list".
foo.cc:7: advice: Insert prefetch instruction. foo.cc:7: advice: Insert prefetch instruction.
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="Linked Structure Locality"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.locality.linked"></a>Linked Structure Locality</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="Linked Structure Locality"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.locality.linked"></a>Linked Structure Locality</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>. <code class="code">_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Give measure of locality of </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Give measure of locality of
objects stored in linked structures (lists, red-black trees and hashtables) objects stored in linked structures (lists, red-black trees and hashtables)
@ -493,13 +479,13 @@ foo.cc:7: advice: Insert prefetch instruction.
foo.cc:5: advice: High scatter score NNN for set built here. Consider changing foo.cc:5: advice: High scatter score NNN for set built here. Consider changing
the allocation sequence or switching to a structure conscious allocator. the allocation sequence or switching to a structure conscious allocator.
</pre><p> </pre><p>
</p></li></ul></div></div></div><div class="section" title="Multithreaded Data Access"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.analysis.mthread"></a>Multithreaded Data Access</h3></div></div></div><p> </p></li></ul></div></div></div><div class="section" title="Multithreaded Data Access"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.mthread"></a>Multithreaded Data Access</h3></div></div></div><p>
The diagnostics in this group are not meant to be implemented short term. The diagnostics in this group are not meant to be implemented short term.
They require compiler support to know when container elements are written They require compiler support to know when container elements are written
to. Instrumentation can only tell us when elements are referenced. to. Instrumentation can only tell us when elements are referenced.
</p><p><span class="emphasis"><em>Switch:</em></span> </p><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_MULTITHREADED</code>. <code class="code">_GLIBCXX_PROFILE_MULTITHREADED</code>.
</p><div class="section" title="Data Dependence Violations at Container Level"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.mthread.ddtest"></a>Data Dependence Violations at Container Level</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p><div class="section" title="Data Dependence Violations at Container Level"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.mthread.ddtest"></a>Data Dependence Violations at Container Level</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_DDTEST</code>. <code class="code">_GLIBCXX_PROFILE_DDTEST</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect container elements </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect container elements
that are referenced from multiple threads in the parallel region or that are referenced from multiple threads in the parallel region or
@ -523,7 +509,7 @@ the allocation sequence or switching to a structure conscious allocator.
</p></li><li class="listitem"><p><span class="emphasis"><em>Example:</em></span> </p></li><li class="listitem"><p><span class="emphasis"><em>Example:</em></span>
</p><pre class="programlisting"> </p><pre class="programlisting">
</pre><p> </pre><p>
</p></li></ul></div></div><div class="section" title="False Sharing"><div class="titlepage"><div><div><h4 class="title"><a name="manual.ext.profile_mode.analysis.mthread.false_share"></a>False Sharing</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span> </p></li></ul></div></div><div class="section" title="False Sharing"><div class="titlepage"><div><div><h4 class="title"><a id="manual.ext.profile_mode.analysis.mthread.false_share"></a>False Sharing</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_FALSE_SHARING</code>. <code class="code">_GLIBCXX_PROFILE_FALSE_SHARING</code>.
</p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect elements in the </p></li><li class="listitem"><p><span class="emphasis"><em>Goal:</em></span> Detect elements in the
same container which share a cache line, are written by at least one same container which share a cache line, are written by at least one
@ -556,7 +542,7 @@ OMP_NUM_THREADS=2 ./a.out
foo.cc:1: advice: Change container structure or padding to avoid false foo.cc:1: advice: Change container structure or padding to avoid false
sharing in multithreaded access at foo.cc:4. Detected N shared cache lines. sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
</pre><p> </pre><p>
</p></li></ul></div></div></div><div class="section" title="Statistics"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.profile_mode.analysis.statistics"></a>Statistics</h3></div></div></div><p> </p></li></ul></div></div></div><div class="section" title="Statistics"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.analysis.statistics"></a>Statistics</h3></div></div></div><p>
<span class="emphasis"><em>Switch:</em></span> <span class="emphasis"><em>Switch:</em></span>
<code class="code">_GLIBCXX_PROFILE_STATISTICS</code>. <code class="code">_GLIBCXX_PROFILE_STATISTICS</code>.
</p><p> </p><p>
@ -569,4 +555,4 @@ sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
This diagnostic will not issue any advice, but it will print statistics for This diagnostic will not issue any advice, but it will print statistics for
each container construction site. The statistics will contain the cost each container construction site. The statistics will contain the cost
of each operation actually performed on the container. of each operation actually performed on the container.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mt_allocator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Developer Information </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 20. The mt_allocator</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="profile_mode.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mt_allocator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Developer Information </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 20. The mt_allocator</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design Issues</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design Issues</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator" /><link rel="prev" href="mt_allocator.html" title="Chapter 20. The mt_allocator" /><link rel="next" href="bk01pt03ch20s03.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mt_allocator.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s03.html">Next</a></td></tr></table><hr /></div><div class="section" title="Design Issues"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.mt.design_issues"></a>Design Issues</h2></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.overview"></a>Overview</h3></div></div></div><p> There are three general components to the allocator: a datum
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator"><link rel="prev" href="mt_allocator.html" title="Chapter 20. The mt_allocator"><link rel="next" href="bk01pt03ch20s03.html" title="Implementation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design Issues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mt_allocator.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s03.html">Next</a></td></tr></table><hr></div><div class="section" title="Design Issues"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.mt.design_issues"></a>Design Issues</h2></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h3 class="title"><a name="allocator.mt.overview"></a>Overview</h3></div></div></div><p> There are three general components to the allocator: a datum
describing the characteristics of the memory pool, a policy class describing the characteristics of the memory pool, a policy class
containing this pool that links instantiation types to common or containing this pool that links instantiation types to common or
individual pools, and a class inheriting from the policy class that is individual pools, and a class inheriting from the policy class that is
@ -48,4 +36,4 @@ tuning, for instance.
</pre><p> This class has the interface required for standard library allocator </pre><p> This class has the interface required for standard library allocator
classes, namely member functions <code class="code">allocate</code> and classes, namely member functions <code class="code">allocate</code> and
<code class="code">deallocate</code>, plus others. <code class="code">deallocate</code>, plus others.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mt_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. The mt_allocator </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mt_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. The mt_allocator </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator" /><link rel="prev" href="bk01pt03ch20s02.html" title="Design Issues" /><link rel="next" href="bk01pt03ch20s04.html" title="Single Thread Example" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s02.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s04.html">Next</a></td></tr></table><hr /></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.mt.impl"></a>Implementation</h2></div></div></div><div class="section" title="Tunable Parameters"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.tune"></a>Tunable Parameters</h3></div></div></div><p>Certain allocation parameters can be modified, or tuned. There
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator"><link rel="prev" href="bk01pt03ch20s02.html" title="Design Issues"><link rel="next" href="bk01pt03ch20s04.html" title="Single Thread Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s02.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s04.html">Next</a></td></tr></table><hr></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.mt.impl"></a>Implementation</h2></div></div></div><div class="section" title="Tunable Parameters"><div class="titlepage"><div><div><h3 class="title"><a name="allocator.mt.tune"></a>Tunable Parameters</h3></div></div></div><p>Certain allocation parameters can be modified, or tuned. There
exists a nested <code class="code">struct __pool_base::_Tune</code> that contains all exists a nested <code class="code">struct __pool_base::_Tune</code> that contains all
these parameters, which include settings for these parameters, which include settings for
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Alignment</p></li><li class="listitem"><p>Maximum bytes before calling <code class="code">::operator new</code> directly</p></li><li class="listitem"><p>Minimum bytes</p></li><li class="listitem"><p>Size of underlying global allocations</p></li><li class="listitem"><p>Maximum number of supported threads</p></li><li class="listitem"><p>Migration of deallocations to the global free list</p></li><li class="listitem"><p>Shunt for global <code class="code">new</code> and <code class="code">delete</code></p></li></ul></div><p>Adjusting parameters for a given instance of an allocator can only </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Alignment</p></li><li class="listitem"><p>Maximum bytes before calling <code class="code">::operator new</code> directly</p></li><li class="listitem"><p>Minimum bytes</p></li><li class="listitem"><p>Size of underlying global allocations</p></li><li class="listitem"><p>Maximum number of supported threads</p></li><li class="listitem"><p>Migration of deallocations to the global free list</p></li><li class="listitem"><p>Shunt for global <code class="code">new</code> and <code class="code">delete</code></p></li></ul></div><p>Adjusting parameters for a given instance of an allocator can only
@ -51,7 +39,7 @@ int main()
return 0; return 0;
} }
</pre></div><div class="section" title="Initialization"><div class="titlepage"><div><div><h3 class="title"><a name="allocator.mt.init"></a>Initialization</h3></div></div></div><p> </pre></div><div class="section" title="Initialization"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.init"></a>Initialization</h3></div></div></div><p>
The static variables (pointers to freelists, tuning parameters etc) The static variables (pointers to freelists, tuning parameters etc)
are initialized as above, or are set to the global defaults. are initialized as above, or are set to the global defaults.
</p><p> </p><p>
@ -143,7 +131,7 @@ The _S_initialize() function:
for this specific bin. This only occurs when a number of blocks for this specific bin. This only occurs when a number of blocks
are grabbed from the global list to a thread specific list or when are grabbed from the global list to a thread specific list or when
a thread decides to return some blocks to the global freelist. a thread decides to return some blocks to the global freelist.
</p></div><div class="section" title="Deallocation Notes"><div class="titlepage"><div><div><h3 class="title"><a name="allocator.mt.deallocation"></a>Deallocation Notes</h3></div></div></div><p> Notes about deallocation. This allocator does not explicitly </p></div><div class="section" title="Deallocation Notes"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.mt.deallocation"></a>Deallocation Notes</h3></div></div></div><p> Notes about deallocation. This allocator does not explicitly
release memory. Because of this, memory debugging programs like release memory. Because of this, memory debugging programs like
valgrind or purify may notice leaks: sorry about this valgrind or purify may notice leaks: sorry about this
inconvenience. Operating systems will reclaim allocated memory at inconvenience. Operating systems will reclaim allocated memory at
@ -170,4 +158,4 @@ implementation-specific, and subject to change. For an example of a
pool that frees memory, see the following pool that frees memory, see the following
<a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top"> <a class="link" href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-6.cc?view=markup" target="_top">
example.</a> example.</a>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Issues </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Single Thread Example</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design Issues </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Single Thread Example</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Single Thread Example</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Single Thread Example</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator" /><link rel="prev" href="bk01pt03ch20s03.html" title="Implementation" /><link rel="next" href="bk01pt03ch20s05.html" title="Multiple Thread Example" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Single Thread Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s03.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s05.html">Next</a></td></tr></table><hr /></div><div class="section" title="Single Thread Example"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.mt.example_single"></a>Single Thread Example</h2></div></div></div><p>
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator"><link rel="prev" href="bk01pt03ch20s03.html" title="Implementation"><link rel="next" href="bk01pt03ch20s05.html" title="Multiple Thread Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Single Thread Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s03.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s05.html">Next</a></td></tr></table><hr></div><div class="section" title="Single Thread Example"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.mt.example_single"></a>Single Thread Example</h2></div></div></div><p>
Let's start by describing how the data on a freelist is laid out in memory. Let's start by describing how the data on a freelist is laid out in memory.
This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes): This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes):
</p><pre class="programlisting"> </p><pre class="programlisting">
@ -88,4 +76,4 @@ of the global freelist and update the pointer as needed
The decision to add deallocated blocks to the front of the freelist was made The decision to add deallocated blocks to the front of the freelist was made
after a set of performance measurements that showed that this is roughly 10% after a set of performance measurements that showed that this is roughly 10%
faster than maintaining a set of "last pointers" as well. faster than maintaining a set of "last pointers" as well.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Multiple Thread Example</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Multiple Thread Example</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Multiple Thread Example</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Multiple Thread Example</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator" /><link rel="prev" href="bk01pt03ch20s04.html" title="Single Thread Example" /><link rel="next" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Multiple Thread Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s04.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr></table><hr /></div><div class="section" title="Multiple Thread Example"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.mt.example_multi"></a>Multiple Thread Example</h2></div></div></div><p>
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="mt_allocator.html" title="Chapter 20. The mt_allocator"><link rel="prev" href="bk01pt03ch20s04.html" title="Single Thread Example"><link rel="next" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Multiple Thread Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch20s04.html">Prev</a> </td><th width="60%" align="center">Chapter 20. The mt_allocator</th><td width="20%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr></table><hr></div><div class="section" title="Multiple Thread Example"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.mt.example_multi"></a>Multiple Thread Example</h2></div></div></div><p>
In the ST example we never used the thread_id variable present in each block. In the ST example we never used the thread_id variable present in each block.
Let's start by explaining the purpose of this in a MT application. Let's start by explaining the purpose of this in a MT application.
</p><p> </p><p>
@ -116,4 +104,4 @@ mutex to be locked) this operation is also made in chunks of blocks
a threads freelist mentioned above). The "formula" used can probably a threads freelist mentioned above). The "formula" used can probably
be improved to further reduce the risk of blocks being "bounced back be improved to further reduce the risk of blocks being "bounced back
and forth" between freelists. and forth" between freelists.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Single Thread Example </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. The bitmap_allocator</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch20s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mt_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bitmap_allocator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Single Thread Example </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. The bitmap_allocator</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator" /><link rel="prev" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator" /><link rel="next" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><th width="60%" align="center">Chapter 21. The bitmap_allocator</th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures.html">Next</a></td></tr></table><hr /></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.bitmap.impl"></a>Implementation</h2></div></div></div><div class="section" title="Free List Store"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.free_list_store"></a>Free List Store</h3></div></div></div><p>
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator"><link rel="prev" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator"><link rel="next" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><th width="60%" align="center">Chapter 21. The bitmap_allocator</th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures.html">Next</a></td></tr></table><hr></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.bitmap.impl"></a>Implementation</h2></div></div></div><div class="section" title="Free List Store"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.free_list_store"></a>Free List Store</h3></div></div></div><p>
The Free List Store (referred to as FLS for the remaining part of this The Free List Store (referred to as FLS for the remaining part of this
document) is the Global memory pool that is shared by all instances of document) is the Global memory pool that is shared by all instances of
the bitmapped allocator instantiated for any type. This maintains a the bitmapped allocator instantiated for any type. This maintains a
@ -60,7 +48,7 @@ by a percentage of less than some THRESHOLD value, then return true,
else return false.</p></li></ol></div><p> else return false.</p></li></ol></div><p>
Currently, (3) is being used with a value of 36% Maximum wastage per Currently, (3) is being used with a value of 36% Maximum wastage per
Super Block. Super Block.
</p></div><div class="section" title="Super Block"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.super_block"></a>Super Block</h3></div></div></div><p> </p></div><div class="section" title="Super Block"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.super_block"></a>Super Block</h3></div></div></div><p>
A super block is the block of memory acquired from the FLS from A super block is the block of memory acquired from the FLS from
which the bitmap allocator carves out memory for single objects which the bitmap allocator carves out memory for single objects
and satisfies the user's requests. These super blocks come in and satisfies the user's requests. These super blocks come in
@ -75,7 +63,7 @@ else return false.</p></li></ol></div><p>
The super block is contained in the FLS, and the FLS is responsible for The super block is contained in the FLS, and the FLS is responsible for
getting / returning Super Bocks to and from the OS using operator new getting / returning Super Bocks to and from the OS using operator new
as defined by the C++ standard. as defined by the C++ standard.
</p></div><div class="section" title="Super Block Data Layout"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.super_block_data"></a>Super Block Data Layout</h3></div></div></div><p> </p></div><div class="section" title="Super Block Data Layout"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.super_block_data"></a>Super Block Data Layout</h3></div></div></div><p>
Each Super Block will be of some size that is a multiple of the Each Super Block will be of some size that is a multiple of the
number of Bits Per Block. Typically, this value is chosen as number of Bits Per Block. Typically, this value is chosen as
Bits_Per_Byte x sizeof(size_t). On an x86 system, this gives the Bits_Per_Byte x sizeof(size_t). On an x86 system, this gives the
@ -88,7 +76,7 @@ else return false.</p></li></ol></div><p>
</p><p> </p><p>
Consider a block of size 64 ints. In memory, it would look like this: Consider a block of size 64 ints. In memory, it would look like this:
(assume a 32-bit system where, size_t is a 32-bit entity). (assume a 32-bit system where, size_t is a 32-bit entity).
</p><div class="table"><a name="id639423"></a><p class="title"><b>Table 21.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"><col align="left" class="c3"><col align="left" class="c4"><col align="left" class="c5"></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -&gt; Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break"><p> </p><div class="table"><a id="id613494"></a><p class="title"><strong>Table 21.1. Bitmap Allocator Memory Map</strong></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><tbody><tr><td align="left">268</td><td align="left">0</td><td align="left">4294967295</td><td align="left">4294967295</td><td align="left">Data -&gt; Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
The first Column(268) represents the size of the Block in bytes as The first Column(268) represents the size of the Block in bytes as
seen by the Bitmap Allocator. Internally, a global free list is seen by the Bitmap Allocator. Internally, a global free list is
used to keep track of the free blocks used and given back by the used to keep track of the free blocks used and given back by the
@ -115,7 +103,7 @@ else return false.</p></li></ol></div><p>
The 3rd 4x2 is size of the bitmap itself, which is the size of 32-bits The 3rd 4x2 is size of the bitmap itself, which is the size of 32-bits
x 2, x 2,
which is 8-bytes, or 2 x sizeof(size_t). which is 8-bytes, or 2 x sizeof(size_t).
</p></div><div class="section" title="Maximum Wasted Percentage"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.max_wasted"></a>Maximum Wasted Percentage</h3></div></div></div><p> </p></div><div class="section" title="Maximum Wasted Percentage"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.max_wasted"></a>Maximum Wasted Percentage</h3></div></div></div><p>
This has nothing to do with the algorithm per-se, This has nothing to do with the algorithm per-se,
only with some vales that must be chosen correctly to ensure that the only with some vales that must be chosen correctly to ensure that the
allocator performs well in a real word scenario, and maintains a good allocator performs well in a real word scenario, and maintains a good
@ -140,7 +128,7 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
</p><p> </p><p>
Thus, knowing these values, and based on the sizeof(value_type), we may Thus, knowing these values, and based on the sizeof(value_type), we may
create a function that returns the Max_Wastage_Percentage for us to use. create a function that returns the Max_Wastage_Percentage for us to use.
</p></div><div class="section" title="allocate"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.allocate"></a><code class="function">allocate</code></h3></div></div></div><p> </p></div><div class="section" title="allocate"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.allocate"></a><code class="function">allocate</code></h3></div></div></div><p>
The allocate function is specialized for single object allocation The allocate function is specialized for single object allocation
ONLY. Thus, ONLY if n == 1, will the bitmap_allocator's ONLY. Thus, ONLY if n == 1, will the bitmap_allocator's
specialized algorithm be used. Otherwise, the request is satisfied specialized algorithm be used. Otherwise, the request is satisfied
@ -195,7 +183,7 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
Thus, you can clearly see that the allocate function is nothing but a Thus, you can clearly see that the allocate function is nothing but a
combination of the next-fit and first-fit algorithm optimized ONLY for combination of the next-fit and first-fit algorithm optimized ONLY for
single object allocations. single object allocations.
</p></div><div class="section" title="deallocate"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.deallocate"></a><code class="function">deallocate</code></h3></div></div></div><p> </p></div><div class="section" title="deallocate"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.deallocate"></a><code class="function">deallocate</code></h3></div></div></div><p>
The deallocate function again is specialized for single objects ONLY. The deallocate function again is specialized for single objects ONLY.
For all n belonging to &gt; 1, the operator delete is called without For all n belonging to &gt; 1, the operator delete is called without
further ado, and the deallocate function returns. further ado, and the deallocate function returns.
@ -226,7 +214,7 @@ single object allocations.
the vector. While doing this, we also make sure that the basic the vector. While doing this, we also make sure that the basic
invariant is maintained by making sure that _S_last_request and invariant is maintained by making sure that _S_last_request and
_S_last_dealloc_index point to valid locations within the vector. _S_last_dealloc_index point to valid locations within the vector.
</p></div><div class="section" title="Questions"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.questions"></a>Questions</h3></div></div></div><div class="section" title="1"><div class="titlepage"><div><div><h4 class="title"><a name="bitmap.impl.question.1"></a>1</h4></div></div></div><p> </p></div><div class="section" title="Questions"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.questions"></a>Questions</h3></div></div></div><div class="section" title="1"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.question.1"></a>1</h4></div></div></div><p>
Q1) The "Data Layout" section is Q1) The "Data Layout" section is
cryptic. I have no idea of what you are trying to say. Layout of what? cryptic. I have no idea of what you are trying to say. Layout of what?
The free-list? Each bitmap? The Super Block? The free-list? Each bitmap? The Super Block?
@ -236,7 +224,7 @@ size. In the example, a super block of size 32 x 1 is taken. The
general formula for calculating the size of a super block is general formula for calculating the size of a super block is
32 x sizeof(value_type) x 2^n, where n ranges from 0 to 32 for 32-bit 32 x sizeof(value_type) x 2^n, where n ranges from 0 to 32 for 32-bit
systems. systems.
</p></div><div class="section" title="2"><div class="titlepage"><div><div><h4 class="title"><a name="bitmap.impl.question.2"></a>2</h4></div></div></div><p> </p></div><div class="section" title="2"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.question.2"></a>2</h4></div></div></div><p>
And since I just mentioned the And since I just mentioned the
term `each bitmap', what in the world is meant by it? What does each term `each bitmap', what in the world is meant by it? What does each
bitmap manage? How does it relate to the super block? Is the Super bitmap manage? How does it relate to the super block? Is the Super
@ -253,7 +241,7 @@ Block a bitmap as well?
blocks' status. Each bit-map is made up of a number of size_t, blocks' status. Each bit-map is made up of a number of size_t,
whose exact number for a super-block of a given size I have just whose exact number for a super-block of a given size I have just
mentioned. mentioned.
</p></div><div class="section" title="3"><div class="titlepage"><div><div><h4 class="title"><a name="bitmap.impl.question.3"></a>3</h4></div></div></div><p> </p></div><div class="section" title="3"><div class="titlepage"><div><div><h4 class="title"><a id="bitmap.impl.question.3"></a>3</h4></div></div></div><p>
How do the allocate and deallocate functions work in regard to How do the allocate and deallocate functions work in regard to
bitmaps? bitmaps?
</p><p> </p><p>
@ -282,7 +270,7 @@ Block a bitmap as well?
</p><p> </p><p>
The bit-map now looks like this: The bit-map now looks like this:
1111111111111111111111111111111111111111111111111111111111111110 1111111111111111111111111111111111111111111111111111111111111110
</p></div></div><div class="section" title="Locality"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.locality"></a>Locality</h3></div></div></div><p> </p></div></div><div class="section" title="Locality"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.locality"></a>Locality</h3></div></div></div><p>
Another issue would be whether to keep the all bitmaps in a Another issue would be whether to keep the all bitmaps in a
separate area in memory, or to keep them near the actual blocks separate area in memory, or to keep them near the actual blocks
that will be given out or allocated for the client. After some that will be given out or allocated for the client. After some
@ -299,7 +287,7 @@ equivalent.</p></li><li class="listitem"><p>And also this would preserve the cac
new_allocator's book keeping overhead is too much for small objects and new_allocator's book keeping overhead is too much for small objects and
single object allocations, though it preserves the locality of blocks single object allocations, though it preserves the locality of blocks
very well when they are returned back to the allocator. very well when they are returned back to the allocator.
</p></div><div class="section" title="Overhead and Grow Policy"><div class="titlepage"><div><div><h3 class="title"><a name="bitmap.impl.grow_policy"></a>Overhead and Grow Policy</h3></div></div></div><p> </p></div><div class="section" title="Overhead and Grow Policy"><div class="titlepage"><div><div><h3 class="title"><a id="bitmap.impl.grow_policy"></a>Overhead and Grow Policy</h3></div></div></div><p>
Expected overhead per block would be 1 bit in memory. Also, once Expected overhead per block would be 1 bit in memory. Also, once
the address of the free list has been found, the cost for the address of the free list has been found, the cost for
allocation/deallocation would be negligible, and is supposed to be allocation/deallocation would be negligible, and is supposed to be
@ -322,4 +310,4 @@ equivalent.</p></li><li class="listitem"><p>And also this would preserve the cac
sizeof(size_t) x 8 which is the number of bits in an integer, sizeof(size_t) x 8 which is the number of bits in an integer,
which can fit exactly in a CPU register. Hence, the term given is which can fit exactly in a CPU register. Hence, the term given is
exponential growth of the internal pool. exponential growth of the internal pool.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bitmap_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. The bitmap_allocator </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 22. Policy-Based Data Structures</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bitmap_allocator.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bitmap_allocator.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 21. The bitmap_allocator </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 22. Policy-Based Data Structures</td></tr></table></div></body></html>

View File

@ -1,14 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Deprecated</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Deprecated</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="ext_containers.html" title="Chapter 23. HP/SGI Extensions" /><link rel="prev" href="ext_containers.html" title="Chapter 23. HP/SGI Extensions" /><link rel="next" href="ext_utilities.html" title="Chapter 24. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Deprecated</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><th width="60%" align="center">Chapter 23. HP/SGI Extensions</th><td width="20%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr></table><hr /></div><div class="section" title="Deprecated"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.deprecated_sgi"></a>Deprecated</h2></div></div></div><p>
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="ext_containers.html" title="Chapter 23. HP/SGI Extensions"><link rel="prev" href="ext_containers.html" title="Chapter 23. HP/SGI Extensions"><link rel="next" href="ext_utilities.html" title="Chapter 24. Utilities"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Deprecated</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><th width="60%" align="center">Chapter 23. HP/SGI Extensions</th><td width="20%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr></table><hr></div><div class="section" title="Deprecated"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.containers.deprecated_sgi"></a>Deprecated</h2></div></div></div><p>
The SGI hashing classes <code class="classname">hash_set</code> and The SGI hashing classes <code class="classname">hash_set</code> and
<code class="classname">hash_set</code> have been deprecated by the <code class="classname">hash_set</code> have been deprecated by the
unordered_set, unordered_multiset, unordered_map, unordered_set, unordered_multiset, unordered_map,
@ -64,4 +56,4 @@
associative containers defined in the ISO C++ 2011 standard in the associative containers defined in the ISO C++ 2011 standard in the
headers <code class="filename">&lt;unordered_map&gt;</code> headers <code class="filename">&lt;unordered_map&gt;</code>
and <code class="filename">&lt;unordered_set&gt;</code>. and <code class="filename">&lt;unordered_set&gt;</code>.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 23. HP/SGI Extensions </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 24. Utilities</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_containers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_utilities.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 23. HP/SGI Extensions </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 24. Utilities</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="prev" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="next" href="bk01pt03ch30s03.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch30s03.html">Next</a></td></tr></table><hr /></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="section" title="Using Builtin Atomic Functions"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
library
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="ext_concurrency.html" title="Chapter 30. Concurrency"><link rel="prev" href="ext_concurrency.html" title="Chapter 30. Concurrency"><link rel="next" href="bk01pt03ch30s03.html" title="Use"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch30s03.html">Next</a></td></tr></table><hr></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="section" title="Using Builtin Atomic Functions"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
implemented via compiler intrinsics (if the underlying host is implemented via compiler intrinsics (if the underlying host is
capable) or by library fallbacks.</p><p>Compiler intrinsics (builtins) are always preferred. However, as capable) or by library fallbacks.</p><p>Compiler intrinsics (builtins) are always preferred. However, as
the compiler builtins for atomics are not universally implemented, the compiler builtins for atomics are not universally implemented,
@ -41,7 +29,7 @@ hardware, hand-crafted assembly is selected. This is the case for the following
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>cris</p></li><li class="listitem"><p>hppa</p></li><li class="listitem"><p>i386</p></li><li class="listitem"><p>i486</p></li><li class="listitem"><p>m48k</p></li><li class="listitem"><p>mips</p></li><li class="listitem"><p>sparc</p></li></ul></div><p>And for the rest, a simulated atomic lock via pthreads. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>cris</p></li><li class="listitem"><p>hppa</p></li><li class="listitem"><p>i386</p></li><li class="listitem"><p>i486</p></li><li class="listitem"><p>m48k</p></li><li class="listitem"><p>mips</p></li><li class="listitem"><p>sparc</p></li></ul></div><p>And for the rest, a simulated atomic lock via pthreads.
</p><p> Detailed information about compiler intrinsics for atomic operations can be found in the GCC <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" target="_top"> documentation</a>. </p><p> Detailed information about compiler intrinsics for atomic operations can be found in the GCC <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" target="_top"> documentation</a>.
</p><p> More details on the library fallbacks from the porting <a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">section</a>. </p><p> More details on the library fallbacks from the porting <a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">section</a>.
</p></div><div class="section" title="Thread Abstraction"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.concurrency.impl.thread"></a>Thread Abstraction</h3></div></div></div><p>A thin layer above IEEE 1003.1 (i.e. pthreads) is used to abstract </p></div><div class="section" title="Thread Abstraction"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.thread"></a>Thread Abstraction</h3></div></div></div><p>A thin layer above IEEE 1003.1 (i.e. pthreads) is used to abstract
the thread interface for GCC. This layer is called "gthread," and is the thread interface for GCC. This layer is called "gthread," and is
comprised of one header file that wraps the host's default thread layer with comprised of one header file that wraps the host's default thread layer with
a POSIX-like interface. a POSIX-like interface.
@ -54,4 +42,4 @@ use this layer. More detail as to the specific interface can be found in the sou
functions, and usage found in the usual &lt;pthread.h&gt; file, functions, and usage found in the usual &lt;pthread.h&gt; file,
including <code class="code">pthread_t</code>, <code class="code">pthread_once_t</code>, <code class="code">pthread_create</code>, including <code class="code">pthread_t</code>, <code class="code">pthread_once_t</code>, <code class="code">pthread_create</code>,
etc. etc.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch30s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 30. Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Use</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch30s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 30. Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Use</td></tr></table></div></body></html>

View File

@ -1,18 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Use</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="prev" href="bk01pt03ch30s02.html" title="Implementation" /><link rel="next" href="bk01pt04.html" title="Part IV.  Appendices" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch30s02.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04.html">Next</a></td></tr></table><hr /></div><div class="section" title="Use"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.use"></a>Use</h2></div></div></div><p>Typical usage of the last two constructs is demonstrated as follows:
library
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="ext_concurrency.html" title="Chapter 30. Concurrency"><link rel="prev" href="bk01pt03ch30s02.html" title="Implementation"><link rel="next" href="bk01pt04.html" title="Part IV.  Appendices"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Use</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch30s02.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt04.html">Next</a></td></tr></table><hr></div><div class="section" title="Use"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.concurrency.use"></a>Use</h2></div></div></div><p>Typical usage of the last two constructs is demonstrated as follows:
</p><pre class="programlisting"> </p><pre class="programlisting">
#include &lt;ext/concurrence.h&gt; #include &lt;ext/concurrence.h&gt;
@ -43,6 +31,6 @@ the mutex as control moves out of this block.
concurrence-related errors. These classes concurrence-related errors. These classes
are: <code class="code">__concurrence_lock_error</code>, <code class="code">__concurrence_unlock_error</code>, <code class="code">__concurrence_wait_error</code>, are: <code class="code">__concurrence_lock_error</code>, <code class="code">__concurrence_unlock_error</code>, <code class="code">__concurrence_wait_error</code>,
and <code class="code">__concurrence_broadcast_error</code>. and <code class="code">__concurrence_broadcast_error</code>.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part IV.  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch30s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ext_concurrency.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part IV. 
Appendices Appendices
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="extensions.html" title="Part III.  Extensions" /><link rel="next" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="extensions.html" title="Part III.  Extensions"><link rel="next" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a name="id630492"></a></h1></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr /></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id604564"></a></h1></div></div></div><p>
Here we will make an attempt at describing the non-Standard Here we will make an attempt at describing the non-Standard
extensions to the library. Some of these are from older versions of extensions to the library. Some of these are from older versions of
standard library components, namely SGI's STL, and some of these are standard library components, namely SGI's STL, and some of these are
@ -29,7 +21,7 @@ extensions, be aware of two things:
treat them differently, or... treat them differently, or...
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
You should know how to access these headers properly. You should know how to access these headers properly.
</p></li></ol></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part III.  </p></li></ol></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part III. 
Extensions Extensions
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Compile Time Checks</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Compile Time Checks</td></tr></table></div></body></html>

View File

@ -1,14 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Part IV.  Appendices</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part IV.  Appendices</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="index.html" title="The GNU C++ Library Manual" /><link rel="prev" href="bk01pt03ch30s03.html" title="Use" /><link rel="next" href="appendix_contributing.html" title="Appendix A.  Contributing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV. 
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="index.html" title="The GNU C++ Library Manual"><link rel="prev" href="bk01pt03ch30s03.html" title="Use"><link rel="next" href="appendix_contributing.html" title="Appendix A.  Contributing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV. 
Appendices Appendices
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch30s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td width="20%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr></table><hr></div><div class="part" title="Part IV.  Appendices"><div class="titlepage"><div><div><h1 class="title"><a name="appendix"></a>Part IV.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch30s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td width="20%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr></table><hr /></div><div class="part" title="Part IV.  Appendices"><div class="titlepage"><div><div><h1 class="title"><a id="appendix"></a>Part IV. 
Appendices Appendices
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="appendix"><a href="appendix_contributing.html">A. </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="appendix"><a href="appendix_contributing.html">A.
Contributing Contributing
</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="section"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="section"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="section"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="section"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="section"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B. </a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="section"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="section"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="section"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="section"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="section"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></dd><dt><span class="appendix"><a href="appendix_porting.html">B.
@ -41,7 +37,7 @@ Support for C++11 dialect.
</a></span></dt><dt><span class="appendix"><a href="appendix_gpl.html">D. </a></span></dt><dt><span class="appendix"><a href="appendix_gpl.html">D.
<acronym class="acronym">GNU</acronym> General Public License version 3 <acronym class="acronym">GNU</acronym> General Public License version 3
</a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch30s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Use </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A.  </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch30s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="appendix_contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Use </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix A. 
Contributing Contributing
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,18 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Bugs</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Bugs</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="status.html" title="Chapter 1. Status" /><link rel="prev" href="license.html" title="License" /><link rel="next" href="setup.html" title="Chapter 2. Setup" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="license.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr></table><hr /></div><div class="section" title="Bugs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.bugs"></a>Bugs</h2></div></div></div><div class="section" title="Implementation Bugs"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.bugs.impl"></a>Implementation Bugs</h3></div></div></div><p>
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="status.html" title="Chapter 1. Status"><link rel="prev" href="license.html" title="License"><link rel="next" href="setup.html" title="Chapter 2. Setup"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bugs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="license.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr></table><hr></div><div class="section" title="Bugs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.status.bugs"></a>Bugs</h2></div></div></div><div class="section" title="Implementation Bugs"><div class="titlepage"><div><div><h3 class="title"><a name="manual.intro.status.bugs.impl"></a>Implementation Bugs</h3></div></div></div><p>
Information on known bugs, details on efforts to fix them, and Information on known bugs, details on efforts to fix them, and
fixed bugs are all available as part of the <a class="link" href="http://gcc.gnu.org/bugs/" target="_top">GCC bug tracking system</a>, fixed bugs are all available as part of the <a class="link" href="http://gcc.gnu.org/bugs/" target="_top">GCC bug tracking system</a>,
with the category set to <code class="literal">libstdc++</code>. with the category set to <code class="literal">libstdc++</code>.
</p></div><div class="section" title="Standard Bugs"><div class="titlepage"><div><div><h3 class="title"><a name="manual.intro.status.bugs.iso"></a>Standard Bugs</h3></div></div></div><p> </p></div><div class="section" title="Standard Bugs"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.bugs.iso"></a>Standard Bugs</h3></div></div></div><p>
Everybody's got issues. Even the C++ Standard Library. Everybody's got issues. Even the C++ Standard Library.
</p><p> </p><p>
The Library Working Group, or LWG, is the ISO subcommittee responsible The Library Working Group, or LWG, is the ISO subcommittee responsible
@ -357,4 +349,4 @@
<span class="emphasis"><em>More algorithms that throw away information</em></span> <span class="emphasis"><em>More algorithms that throw away information</em></span>
</span></dt><dd><p>The traditional HP / SGI return type and value is blessed </span></dt><dd><p>The traditional HP / SGI return type and value is blessed
by the resolution of the DR. by the resolution of the DR.
</p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="license.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="status.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">License </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Setup</td></tr></table></div></body></html> </p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="license.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="status.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="setup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">License </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Setup</td></tr></table></div></body></html>

View File

@ -1,32 +1,16 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 15.  Concurrency</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15.  Concurrency</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; , &#10; mutex&#10; , &#10; thread&#10; , &#10; future&#10; , &#10; condition_variable&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="atomics.html" title="Chapter 14.  Atomics" /><link rel="next" href="extensions.html" title="Part III.  Extensions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. 
library
,
mutex
,
thread
,
future
,
condition_variable
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="atomics.html" title="Chapter 14.  Atomics"><link rel="next" href="extensions.html" title="Part III.  Extensions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. 
Concurrency Concurrency
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="atomics.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="atomics.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 15.  Concurrency"><div class="titlepage"><div><div><h2 class="title"><a name="std.concurrency"></a>Chapter 15.  </th><td width="20%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 15.  Concurrency"><div class="titlepage"><div><div><h2 class="title"><a id="std.concurrency"></a>Chapter 15. 
Concurrency Concurrency
<a class="indexterm" name="id630309"></a> <a id="id604381" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></div><p>
Facilities for concurrent operation, and control thereof. Facilities for concurrent operation, and control thereof.
</p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.concurrency.api"></a>API Reference</h2></div></div></div><p> </p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.concurrency.api"></a>API Reference</h2></div></div></div><p>
All items are declared in one of four standard header files. All items are declared in one of four standard header files.
</p><p> </p><p>
In header <code class="filename">mutex</code>, class In header <code class="filename">mutex</code>, class
@ -49,7 +33,7 @@
and <code class="classname">packaged_task</code>. and <code class="classname">packaged_task</code>.
</p><p> </p><p>
Full API details. Full API details.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="atomics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 14.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="atomics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 14. 
Atomics Atomics
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part III.   </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part III. 

View File

@ -1,20 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Configure</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Configure</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; configure&#10; , &#10; options&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="setup.html" title="Chapter 2. Setup" /><link rel="prev" href="setup.html" title="Chapter 2. Setup" /><link rel="next" href="make.html" title="Make" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Configure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr></table><hr /></div><div class="section" title="Configure"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.configure"></a>Configure</h2></div></div></div><p>
configure
,
options
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="setup.html" title="Chapter 2. Setup"><link rel="prev" href="setup.html" title="Chapter 2. Setup"><link rel="next" href="make.html" title="Make"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Configure</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr></table><hr></div><div class="section" title="Configure"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.setup.configure"></a>Configure</h2></div></div></div><p>
When configuring libstdc++, you'll have to configure the entire When configuring libstdc++, you'll have to configure the entire
<span class="emphasis"><em>gccsrcdir</em></span> directory. Consider using the <span class="emphasis"><em>gccsrcdir</em></span> directory. Consider using the
toplevel gcc configuration option toplevel gcc configuration option
@ -229,4 +215,4 @@
<span class="emphasis"><em>freestanding</em></span> environment, in which only a <span class="emphasis"><em>freestanding</em></span> environment, in which only a
minimal set of headers are provided. This option builds such an minimal set of headers are provided. This option builds such an
environment. environment.
</p></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html> </p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="make.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Setup </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Make</td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 9.  Containers</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 9.  Containers</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="facets.html" title="Facets" /><link rel="next" href="associative.html" title="Associative" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="facets.html" title="Facets"><link rel="next" href="associative.html" title="Associative"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 9. 
Containers Containers
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 9.  Containers"><div class="titlepage"><div><div><h2 class="title"><a name="std.containers"></a>Chapter 9.  </th><td width="20%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 9.  Containers"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"></a>Chapter 9. 
Containers Containers
<a class="indexterm" name="id627339"></a> <a id="id601411" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section" title="Sequences"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section" title="list"><div class="titlepage"><div><div><h3 class="title"><a name="containers.sequences.list"></a>list</h3></div></div></div><div class="section" title="list::size() is O(n)"><div class="titlepage"><div><div><h4 class="title"><a name="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="section"><a href="associative.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section" title="Sequences"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.sequences"></a>Sequences</h2></div></div></div><div class="section" title="list"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"></a>list</h3></div></div></div><div class="section" title="list::size() is O(n)"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"></a>list::size() is O(n)</h4></div></div></div><p>
Yes it is, and that's okay. This is a decision that we preserved Yes it is, and that's okay. This is a decision that we preserved
when we imported SGI's STL implementation. The following is when we imported SGI's STL implementation. The following is
quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>: quoted from <a class="link" href="http://www.sgi.com/tech/stl/FAQ.html" target="_top">their FAQ</a>:
@ -50,8 +42,8 @@
</p><pre class="programlisting"> </p><pre class="programlisting">
if (L.empty()) if (L.empty())
... ...
</pre></blockquote></div></div></div><div class="section" title="vector"><div class="titlepage"><div><div><h3 class="title"><a name="containers.sequences.vector"></a>vector</h3></div></div></div><p> </pre></blockquote></div></div></div><div class="section" title="vector"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.vector"></a>vector</h3></div></div></div><p>
</p><div class="section" title="Space Overhead Management"><div class="titlepage"><div><div><h4 class="title"><a name="sequences.vector.management"></a>Space Overhead Management</h4></div></div></div><p> </p><div class="section" title="Space Overhead Management"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.vector.management"></a>Space Overhead Management</h4></div></div></div><p>
In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this In <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-04/msg00105.html" target="_top">this
message to the list</a>, Daniel Kostecky announced work on an message to the list</a>, Daniel Kostecky announced work on an
alternate form of <code class="code">std::vector</code> that would support alternate form of <code class="code">std::vector</code> that would support
@ -60,4 +52,4 @@
</p><p> </p><p>
The first two alpha releases were announced <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a> The first two alpha releases were announced <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00048.html" target="_top">here</a>
and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>. and <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html" target="_top">here</a>.
</p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html> </p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="facets.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Facets </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Associative</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Interacting with C</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Interacting with C</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="containers.html" title="Chapter 9.  Containers" /><link rel="prev" href="associative.html" title="Associative" /><link rel="next" href="iterators.html" title="Chapter 10.  Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="associative.html">Prev</a> </td><th width="60%" align="center">Chapter 9. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="containers.html" title="Chapter 9.  Containers"><link rel="prev" href="associative.html" title="Associative"><link rel="next" href="iterators.html" title="Chapter 10.  Iterators"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="associative.html">Prev</a> </td><th width="60%" align="center">Chapter 9. 
Containers Containers
</th><td width="20%" align="right"> <a accesskey="n" href="iterators.html">Next</a></td></tr></table><hr></div><div class="section" title="Interacting with C"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.containers.c"></a>Interacting with C</h2></div></div></div><div class="section" title="Containers vs. Arrays"><div class="titlepage"><div><div><h3 class="title"><a name="containers.c.vs_array"></a>Containers vs. Arrays</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="iterators.html">Next</a></td></tr></table><hr /></div><div class="section" title="Interacting with C"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.containers.c"></a>Interacting with C</h2></div></div></div><div class="section" title="Containers vs. Arrays"><div class="titlepage"><div><div><h3 class="title"><a id="containers.c.vs_array"></a>Containers vs. Arrays</h3></div></div></div><p>
You're writing some code and can't decide whether to use builtin You're writing some code and can't decide whether to use builtin
arrays or some kind of container. There are compelling reasons arrays or some kind of container. There are compelling reasons
to use one of the container classes, but you're afraid that to use one of the container classes, but you're afraid that
@ -92,7 +84,7 @@ template&lt;typename T, unsigned int sz&gt;
inline unsigned int lengthof (T (&amp;)[sz]) { return sz; } inline unsigned int lengthof (T (&amp;)[sz]) { return sz; }
</pre><p> </pre><p>
looks just weird! Hint: unused parameters can be left nameless. looks just weird! Hint: unused parameters can be left nameless.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="associative.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="iterators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Associative </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="associative.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="containers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="iterators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Associative </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. 
Iterators Iterators
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,22 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Debugging Support</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Debugging Support</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using_exceptions.html" title="Exceptions" /><link rel="next" href="bk01pt02.html" title="Part II.  Standard Contents" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Debugging Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using_exceptions.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02.html">Next</a></td></tr></table><hr /></div><div class="section" title="Debugging Support"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.debug"></a>Debugging Support</h2></div></div></div><p>
debug
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="using.html" title="Chapter 3. Using"><link rel="prev" href="using_exceptions.html" title="Exceptions"><link rel="next" href="bk01pt02.html" title="Part II.  Standard Contents"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Debugging Support</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using_exceptions.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02.html">Next</a></td></tr></table><hr></div><div class="section" title="Debugging Support"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.using.debug"></a>Debugging Support</h2></div></div></div><p>
There are numerous things that can be done to improve the ease with There are numerous things that can be done to improve the ease with
which C++ binaries are debugged when using the GNU tool chain. Here which C++ binaries are debugged when using the GNU tool chain. Here
are some of them. are some of them.
</p><div class="section" title="Using g++"><div class="titlepage"><div><div><h3 class="title"><a name="debug.compiler"></a>Using <span class="command"><strong>g++</strong></span></h3></div></div></div><p> </p><div class="section" title="Using g++"><div class="titlepage"><div><div><h3 class="title"><a id="debug.compiler"></a>Using <span class="command"><strong>g++</strong></span></h3></div></div></div><p>
Compiler flags determine how debug information is transmitted Compiler flags determine how debug information is transmitted
between compilation and debug or analysis tools. between compilation and debug or analysis tools.
</p><p> </p><p>
@ -43,7 +31,7 @@
Many other options are available: please see <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging%20Options" target="_top">"Options Many other options are available: please see <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging%20Options" target="_top">"Options
for Debugging Your Program"</a> in Using the GNU Compiler for Debugging Your Program"</a> in Using the GNU Compiler
Collection (GCC) for a complete list. Collection (GCC) for a complete list.
</p></div><div class="section" title="Debug Versions of Library Binary Files"><div class="titlepage"><div><div><h3 class="title"><a name="debug.req"></a>Debug Versions of Library Binary Files</h3></div></div></div><p> </p></div><div class="section" title="Debug Versions of Library Binary Files"><div class="titlepage"><div><div><h3 class="title"><a id="debug.req"></a>Debug Versions of Library Binary Files</h3></div></div></div><p>
If you would like debug symbols in libstdc++, there are two ways to If you would like debug symbols in libstdc++, there are two ways to
build libstdc++ with debug flags. The first is to create a separate build libstdc++ with debug flags. The first is to create a separate
debug build by running make from the top-level of a tree debug build by running make from the top-level of a tree
@ -65,7 +53,7 @@
</pre><p> </pre><p>
This quick and dirty approach is often sufficient for quick This quick and dirty approach is often sufficient for quick
debugging tasks, when you cannot or don't want to recompile your debugging tasks, when you cannot or don't want to recompile your
application to use the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>.</p></div><div class="section" title="Memory Leak Hunting"><div class="titlepage"><div><div><h3 class="title"><a name="debug.memory"></a>Memory Leak Hunting</h3></div></div></div><p> application to use the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>.</p></div><div class="section" title="Memory Leak Hunting"><div class="titlepage"><div><div><h3 class="title"><a id="debug.memory"></a>Memory Leak Hunting</h3></div></div></div><p>
There are various third party memory tracing and debug utilities There are various third party memory tracing and debug utilities
that can be used to provide detailed memory allocation information that can be used to provide detailed memory allocation information
about C++ code. An exhaustive list of tools is not going to be about C++ code. An exhaustive list of tools is not going to be
@ -134,7 +122,7 @@
up the runtime environment, library, and test file, might be: up the runtime environment, library, and test file, might be:
</p><pre class="programlisting"> </p><pre class="programlisting">
valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
</pre></div><div class="section" title="Data Race Hunting"><div class="titlepage"><div><div><h3 class="title"><a name="debug.races"></a>Data Race Hunting</h3></div></div></div><p> </pre></div><div class="section" title="Data Race Hunting"><div class="titlepage"><div><div><h3 class="title"><a id="debug.races"></a>Data Race Hunting</h3></div></div></div><p>
All synchronization primitives used in the library internals need to be All synchronization primitives used in the library internals need to be
understood by race detectors so that they do not produce false reports. understood by race detectors so that they do not produce false reports.
</p><p> </p><p>
@ -184,7 +172,7 @@
#define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) ANNOTATE_HAPPENS_AFTER(A) #define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) ANNOTATE_HAPPENS_AFTER(A)
</pre><p> </pre><p>
Refer to the documentation of each particular tool for details. Refer to the documentation of each particular tool for details.
</p></div><div class="section" title="Using gdb"><div class="titlepage"><div><div><h3 class="title"><a name="debug.gdb"></a>Using <span class="command"><strong>gdb</strong></span></h3></div></div></div><p> </p></div><div class="section" title="Using gdb"><div class="titlepage"><div><div><h3 class="title"><a id="debug.gdb"></a>Using <span class="command"><strong>gdb</strong></span></h3></div></div></div><p>
</p><p> </p><p>
Many options are available for GDB itself: please see <a class="link" href="http://sources.redhat.com/gdb/current/onlinedocs/gdb/" target="_top"> Many options are available for GDB itself: please see <a class="link" href="http://sources.redhat.com/gdb/current/onlinedocs/gdb/" target="_top">
"GDB features for C++" </a> in the GDB documentation. Also "GDB features for C++" </a> in the GDB documentation. Also
@ -237,18 +225,18 @@
on-line versions of the GDB user manual in GDB's homepage, at on-line versions of the GDB user manual in GDB's homepage, at
<a class="link" href="http://sourceware.org/gdb/" target="_top"> "GDB: The GNU Project <a class="link" href="http://sourceware.org/gdb/" target="_top"> "GDB: The GNU Project
Debugger" </a>. Debugger" </a>.
</p></div><div class="section" title="Tracking uncaught exceptions"><div class="titlepage"><div><div><h3 class="title"><a name="debug.exceptions"></a>Tracking uncaught exceptions</h3></div></div></div><p> </p></div><div class="section" title="Tracking uncaught exceptions"><div class="titlepage"><div><div><h3 class="title"><a id="debug.exceptions"></a>Tracking uncaught exceptions</h3></div></div></div><p>
The <a class="link" href="termination.html#support.termination.verbose" title="Verbose Terminate Handler">verbose The <a class="link" href="termination.html#support.termination.verbose" title="Verbose Terminate Handler">verbose
termination handler</a> gives information about uncaught termination handler</a> gives information about uncaught
exceptions which are killing the program. It is described in the exceptions which are killing the program. It is described in the
linked-to page. linked-to page.
</p></div><div class="section" title="Debug Mode"><div class="titlepage"><div><div><h3 class="title"><a name="debug.debug_mode"></a>Debug Mode</h3></div></div></div><p> The <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">Debug Mode</a> </p></div><div class="section" title="Debug Mode"><div class="titlepage"><div><div><h3 class="title"><a id="debug.debug_mode"></a>Debug Mode</h3></div></div></div><p> The <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">Debug Mode</a>
has compile and run-time checks for many containers. has compile and run-time checks for many containers.
</p></div><div class="section" title="Compile Time Checking"><div class="titlepage"><div><div><h3 class="title"><a name="debug.compile_time_checks"></a>Compile Time Checking</h3></div></div></div><p> The <a class="link" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks">Compile-Time </p></div><div class="section" title="Compile Time Checking"><div class="titlepage"><div><div><h3 class="title"><a id="debug.compile_time_checks"></a>Compile Time Checking</h3></div></div></div><p> The <a class="link" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks">Compile-Time
Checks</a> Extension has compile-time checks for many algorithms. Checks</a> Extension has compile-time checks for many algorithms.
</p></div><div class="section" title="Profile-based Performance Analysis"><div class="titlepage"><div><div><h3 class="title"><a name="debug.profile_mode"></a>Profile-based Performance Analysis</h3></div></div></div><p> The <a class="link" href="profile_mode.html" title="Chapter 19. Profile Mode">Profile-based </p></div><div class="section" title="Profile-based Performance Analysis"><div class="titlepage"><div><div><h3 class="title"><a id="debug.profile_mode"></a>Profile-based Performance Analysis</h3></div></div></div><p> The <a class="link" href="profile_mode.html" title="Chapter 19. Profile Mode">Profile-based
Performance Analysis</a> Extension has performance checks for many Performance Analysis</a> Extension has performance checks for many
algorithms. algorithms.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using_exceptions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part II.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using_exceptions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Part II. 
Standard Contents Standard Contents
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,24 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 17. Debug Mode</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 17. Debug Mode</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; debug&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks" /><link rel="next" href="bk01pt03ch17s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. Debug Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_compile_checks.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
,
debug
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks"><link rel="next" href="bk01pt03ch17s02.html" title="Semantics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 17. Debug Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_compile_checks.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch17s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 17. Debug Mode"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.debug_mode"></a>Chapter 17. Debug Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods">Methods</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.wrappers">The Wrapper Model</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.safe_iter">Safe Iterators</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.safe_seq">Safe Sequences (Containers)</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.precond">Precondition Checking</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.coexistence">Release- and debug-mode coexistence</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.compile">Compile-time coexistence of release- and debug-mode components</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.link">Link- and run-time coexistence of release- and </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch17s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 17. Debug Mode"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.debug_mode"></a>Chapter 17. Debug Mode</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods">Methods</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.wrappers">The Wrapper Model</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.safe_iter">Safe Iterators</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.safe_seq">Safe Sequences (Containers)</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.precond">Precondition Checking</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods.coexistence">Release- and debug-mode coexistence</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.compile">Compile-time coexistence of release- and debug-mode components</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.link">Link- and run-time coexistence of release- and
debug-mode components</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.alt">Alternatives for Coexistence</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></div><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.debug_mode.intro"></a>Intro</h2></div></div></div><p> debug-mode components</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#methods.coexistence.alt">Alternatives for Coexistence</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></div><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.debug_mode.intro"></a>Intro</h2></div></div></div><p>
By default, libstdc++ is built with efficiency in mind, and By default, libstdc++ is built with efficiency in mind, and
therefore performs little or no error checking that is not therefore performs little or no error checking that is not
required by the C++ standard. This means that programs that required by the C++ standard. This means that programs that
@ -49,4 +35,4 @@
the same predicate that was passed the same predicate that was passed
to <code class="code">set_intersection</code>; the libstdc++ debug mode will to <code class="code">set_intersection</code>; the libstdc++ debug mode will
detect an error if the sequence is not sorted or was sorted by a detect an error if the sequence is not sorted or was sorted by a
different predicate.</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_compile_checks.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch17s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 16. Compile Time Checks </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Semantics</td></tr></table></div></body></html> different predicate.</p></li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_compile_checks.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch17s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 16. Compile Time Checks </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Semantics</td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 5.  Diagnostics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 5.  Diagnostics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="termination.html" title="Termination" /><link rel="next" href="bk01pt02ch05s02.html" title="Concept Checking" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="termination.html" title="Termination"><link rel="next" href="bk01pt02ch05s02.html" title="Concept Checking"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. 
Diagnostics Diagnostics
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="termination.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="termination.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5.  Diagnostics"><div class="titlepage"><div><div><h2 class="title"><a name="std.diagnostics"></a>Chapter 5.  </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 5.  Diagnostics"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics"></a>Chapter 5. 
Diagnostics Diagnostics
<a class="indexterm" name="id608748"></a> <a id="id582819" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></div><div class="section" title="Exceptions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.diagnostics.exceptions"></a>Exceptions</h2></div></div></div><div class="section" title="API Reference"><div class="titlepage"><div><div><h3 class="title"><a name="std.diagnostics.exceptions.api"></a>API Reference</h3></div></div></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></div><div class="section" title="Exceptions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.diagnostics.exceptions"></a>Exceptions</h2></div></div></div><div class="section" title="API Reference"><div class="titlepage"><div><div><h3 class="title"><a id="std.diagnostics.exceptions.api"></a>API Reference</h3></div></div></div><p>
All exception objects are defined in one of the standard header All exception objects are defined in one of the standard header
files: <code class="filename">exception</code>, files: <code class="filename">exception</code>,
<code class="filename">stdexcept</code>, <code class="filename">new</code>, and <code class="filename">stdexcept</code>, <code class="filename">new</code>, and
@ -31,7 +23,7 @@
found in the source documentation. found in the source documentation.
</p><p> </p><p>
Full API details. Full API details.
</p></div><div class="section" title="Adding Data to exception"><div class="titlepage"><div><div><h3 class="title"><a name="std.diagnostics.exceptions.data"></a>Adding Data to <code class="classname">exception</code></h3></div></div></div><p> </p></div><div class="section" title="Adding Data to exception"><div class="titlepage"><div><div><h3 class="title"><a id="std.diagnostics.exceptions.data"></a>Adding Data to <code class="classname">exception</code></h3></div></div></div><p>
The standard exception classes carry with them a single string as The standard exception classes carry with them a single string as
data (usually describing what went wrong or where the 'throw' took data (usually describing what went wrong or where the 'throw' took
place). It's good to remember that you can add your own data to place). It's good to remember that you can add your own data to
@ -48,4 +40,4 @@
int e; int e;
DBID id; // some user-defined type DBID id; // some user-defined type
}; };
</pre></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="termination.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Termination </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Concept Checking</td></tr></table></div></body></html> </pre></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="termination.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Termination </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Concept Checking</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Writing and Generating Documentation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content="ISO C++, documentation, style, docbook, doxygen"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Writing and Generating Documentation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="ISO C++, documentation, style, docbook, doxygen" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="next" href="internals.html" title="Porting to New Hardware or Operating Systems" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing and Generating Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="prev" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="next" href="internals.html" title="Porting to New Hardware or Operating Systems"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing and Generating Documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="section" title="Writing and Generating Documentation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="appendix.porting.doc"></a>Writing and Generating Documentation</h2></div></div></div><div class="section" title="Introduction"><div class="titlepage"><div><div><h3 class="title"><a name="doc.intro"></a>Introduction</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr /></div><div class="section" title="Writing and Generating Documentation"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.doc"></a>Writing and Generating Documentation</h2></div></div></div><div class="section" title="Introduction"><div class="titlepage"><div><div><h3 class="title"><a id="doc.intro"></a>Introduction</h3></div></div></div><p>
Documentation for the GNU C++ Library is created from three Documentation for the GNU C++ Library is created from three
independent sources: a manual, a FAQ, and an API reference. independent sources: a manual, a FAQ, and an API reference.
</p><p> </p><p>
@ -35,7 +27,7 @@
as per as per
<a class="link" href="http://www.gnu.org/prep/standards/standards.html#Documentation" target="_top"> <a class="link" href="http://www.gnu.org/prep/standards/standards.html#Documentation" target="_top">
GNU Manuals</a>. GNU Manuals</a>.
</p></div><div class="section" title="Generating Documentation"><div class="titlepage"><div><div><h3 class="title"><a name="doc.generation"></a>Generating Documentation</h3></div></div></div><p> </p></div><div class="section" title="Generating Documentation"><div class="titlepage"><div><div><h3 class="title"><a id="doc.generation"></a>Generating Documentation</h3></div></div></div><p>
Certain Makefile rules are required by the GNU Coding Certain Makefile rules are required by the GNU Coding
Standards. These standard rules generate HTML, PDF, XML, or man Standards. These standard rules generate HTML, PDF, XML, or man
files. For each of the generative rules, there is an additional files. For each of the generative rules, there is an additional
@ -125,7 +117,7 @@
supported, and are always aliased to dummy rules. These supported, and are always aliased to dummy rules. These
unsupported formats are: <span class="emphasis"><em>info</em></span>, unsupported formats are: <span class="emphasis"><em>info</em></span>,
<span class="emphasis"><em>ps</em></span>, and <span class="emphasis"><em>dvi</em></span>. <span class="emphasis"><em>ps</em></span>, and <span class="emphasis"><em>dvi</em></span>.
</p></div><div class="section" title="Doxygen"><div class="titlepage"><div><div><h3 class="title"><a name="doc.doxygen"></a>Doxygen</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a name="doxygen.prereq"></a>Prerequisites</h4></div></div></div><div class="table"><a name="id678029"></a><p class="title"><b>Table B.1. Doxygen Prerequisites</b></p><div class="table-contents"><table summary="Doxygen Prerequisites" border="1"><colgroup><col align="center" class="c1"><col align="center" class="c2"><col align="center" class="c3"></colgroup><thead><tr><th align="center">Tool</th><th align="center">Version</th><th align="center">Required By</th></tr></thead><tbody><tr><td align="center">coreutils</td><td align="center">8.5</td><td align="center">all</td></tr><tr><td align="center">bash</td><td align="center">4.1</td><td align="center">all</td></tr><tr><td align="center">doxygen</td><td align="center">1.7.6.1</td><td align="center">all</td></tr><tr><td align="center">graphviz</td><td align="center">2.26</td><td align="center">graphical hierarchies</td></tr><tr><td align="center">pdflatex</td><td align="center">2007-59</td><td align="center">pdf output</td></tr></tbody></table></div></div><br class="table-break"><p> </p></div><div class="section" title="Doxygen"><div class="titlepage"><div><div><h3 class="title"><a id="doc.doxygen"></a>Doxygen</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"></a>Prerequisites</h4></div></div></div><div class="table"><a id="id652101"></a><p class="title"><strong>Table B.1. Doxygen Prerequisites</strong></p><div class="table-contents"><table summary="Doxygen Prerequisites" border="1"><colgroup><col align="center" class="c1" /><col align="center" class="c2" /><col align="center" class="c3" /></colgroup><thead><tr><th align="center">Tool</th><th align="center">Version</th><th align="center">Required By</th></tr></thead><tbody><tr><td align="center">coreutils</td><td align="center">8.5</td><td align="center">all</td></tr><tr><td align="center">bash</td><td align="center">4.1</td><td align="center">all</td></tr><tr><td align="center">doxygen</td><td align="center">1.7.6.1</td><td align="center">all</td></tr><tr><td align="center">graphviz</td><td align="center">2.26</td><td align="center">graphical hierarchies</td></tr><tr><td align="center">pdflatex</td><td align="center">2007-59</td><td align="center">pdf output</td></tr></tbody></table></div></div><br class="table-break" /><p>
Prerequisite tools are Bash 2.0 or later, Prerequisite tools are Bash 2.0 or later,
<a class="link" href="http://www.doxygen.org/" target="_top">Doxygen</a>, and <a class="link" href="http://www.doxygen.org/" target="_top">Doxygen</a>, and
the <a class="link" href="http://www.gnu.org/software/coreutils/" target="_top">GNU the <a class="link" href="http://www.gnu.org/software/coreutils/" target="_top">GNU
@ -147,7 +139,7 @@
capacity. Specifically, the <code class="literal">pool_size</code> capacity. Specifically, the <code class="literal">pool_size</code>
variable in the configuration file <code class="filename">texmf.cnf</code> may variable in the configuration file <code class="filename">texmf.cnf</code> may
need to be increased by a minimum factor of two. need to be increased by a minimum factor of two.
</p></div><div class="section" title="Generating the Doxygen Files"><div class="titlepage"><div><div><h4 class="title"><a name="doxygen.rules"></a>Generating the Doxygen Files</h4></div></div></div><p> </p></div><div class="section" title="Generating the Doxygen Files"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.rules"></a>Generating the Doxygen Files</h4></div></div></div><p>
The following Makefile rules run Doxygen to generate HTML The following Makefile rules run Doxygen to generate HTML
docs, XML docs, XML docs as a single file, PDF docs, and the docs, XML docs, XML docs as a single file, PDF docs, and the
man pages. These rules are not conditional! If the required man pages. These rules are not conditional! If the required
@ -179,7 +171,7 @@
If you wish to tweak the Doxygen settings, do so by editing If you wish to tweak the Doxygen settings, do so by editing
<code class="filename">doc/doxygen/user.cfg.in</code>. Notes to fellow <code class="filename">doc/doxygen/user.cfg.in</code>. Notes to fellow
library hackers are written in triple-# comments. library hackers are written in triple-# comments.
</p></div><div class="section" title="Markup"><div class="titlepage"><div><div><h4 class="title"><a name="doxygen.markup"></a>Markup</h4></div></div></div><p> </p></div><div class="section" title="Markup"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.markup"></a>Markup</h4></div></div></div><p>
In general, libstdc++ files should be formatted according to In general, libstdc++ files should be formatted according to
the rules found in the the rules found in the
<a class="link" href="source_code_style.html" title="Coding Style">Coding Standard</a>. Before <a class="link" href="source_code_style.html" title="Coding Style">Coding Standard</a>. Before
@ -234,14 +226,14 @@
Complicated math functions should use the multi-line Complicated math functions should use the multi-line
format. An example from <code class="filename">random.h</code>: format. An example from <code class="filename">random.h</code>:
</p><p> </p><p>
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
/**<br> /**<br />
 * @brief A model of a linear congruential random number generator.<br>  * @brief A model of a linear congruential random number generator.<br />
 *<br>  *<br />
 * @f[<br>  * @f[<br />
 *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m<br>  *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m<br />
 * @f]<br>  * @f]<br />
 */<br>  */<br />
</p></div><p> </p></div><p>
</p><p> </p><p>
One area of note is the markup required for One area of note is the markup required for
@ -250,10 +242,10 @@
multiple directories, include part of the installed path to multiple directories, include part of the installed path to
disambiguate. For example: disambiguate. For example:
</p><p> </p><p>
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
/** @file debug/vector<br> /** @file debug/vector<br />
 *  This file is a GNU debug extension to the Standard C++ Library.<br>  *  This file is a GNU debug extension to the Standard C++ Library.<br />
 */<br>  */<br />
</p></div><p> </p></div><p>
</p><p> </p><p>
The other relevant detail for header files is the use of a The other relevant detail for header files is the use of a
@ -268,18 +260,18 @@
<code class="literal">headername</code> in the <code class="literal">file</code> <code class="literal">headername</code> in the <code class="literal">file</code>
block. An example: block. An example:
</p><p> </p><p>
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
/** @file bits/basic_string.h<br> /** @file bits/basic_string.h<br />
 *  This is an internal header file, included by other library headers.<br>  *  This is an internal header file, included by other library headers.<br />
 *  Do not attempt to use it directly. @headername{string}<br>  *  Do not attempt to use it directly. @headername{string}<br />
 */<br>  */<br />
</p></div><p> </p></div><p>
</p><p> </p><p>
Be careful about using certain, special characters when Be careful about using certain, special characters when
writing Doxygen comments. Single and double quotes, and writing Doxygen comments. Single and double quotes, and
separators in filenames are two common trouble spots. When in separators in filenames are two common trouble spots. When in
doubt, consult the following table. doubt, consult the following table.
</p><div class="table"><a name="id678546"></a><p class="title"><b>Table B.2. HTML to Doxygen Markup Comparison</b></p><div class="table-contents"><table summary="HTML to Doxygen Markup Comparison" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"></colgroup><thead><tr><th align="left">HTML</th><th align="left">Doxygen</th></tr></thead><tbody><tr><td align="left">\</td><td align="left">\\</td></tr><tr><td align="left">"</td><td align="left">\"</td></tr><tr><td align="left">'</td><td align="left">\'</td></tr><tr><td align="left">&lt;i&gt;</td><td align="left">@a word</td></tr><tr><td align="left">&lt;b&gt;</td><td align="left">@b word</td></tr><tr><td align="left">&lt;code&gt;</td><td align="left">@c word</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">@a word</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">&lt;em&gt;two words or more&lt;/em&gt;</td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="section" title="Docbook"><div class="titlepage"><div><div><h3 class="title"><a name="doc.docbook"></a>Docbook</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a name="docbook.prereq"></a>Prerequisites</h4></div></div></div><div class="table"><a name="id678708"></a><p class="title"><b>Table B.3. Docbook Prerequisites</b></p><div class="table-contents"><table summary="Docbook Prerequisites" border="1"><colgroup><col align="center" class="c1"><col align="center" class="c2"><col align="center" class="c3"></colgroup><thead><tr><th align="center">Tool</th><th align="center">Version</th><th align="center">Required By</th></tr></thead><tbody><tr><td align="center">docbook5-style-xsl</td><td align="center">1.76.1</td><td align="center">all</td></tr><tr><td align="center">xsltproc</td><td align="center">1.1.26</td><td align="center">all</td></tr><tr><td align="center">xmllint</td><td align="center">2.7.7</td><td align="center">validation</td></tr><tr><td align="center">dblatex</td><td align="center">0.3</td><td align="center">pdf output</td></tr><tr><td align="center">pdflatex</td><td align="center">2007-59</td><td align="center">pdf output</td></tr><tr><td align="center">docbook2X</td><td align="center">0.8.8</td><td align="center">info output</td></tr><tr><td align="center">epub3 stylesheets</td><td align="center">b3</td><td align="center">epub output</td></tr></tbody></table></div></div><br class="table-break"><p> </p><div class="table"><a id="id652618"></a><p class="title"><strong>Table B.2. HTML to Doxygen Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Doxygen Markup Comparison" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">Doxygen</th></tr></thead><tbody><tr><td align="left">\</td><td align="left">\\</td></tr><tr><td align="left">"</td><td align="left">\"</td></tr><tr><td align="left">'</td><td align="left">\'</td></tr><tr><td align="left">&lt;i&gt;</td><td align="left">@a word</td></tr><tr><td align="left">&lt;b&gt;</td><td align="left">@b word</td></tr><tr><td align="left">&lt;code&gt;</td><td align="left">@c word</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">@a word</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">&lt;em&gt;two words or more&lt;/em&gt;</td></tr></tbody></table></div></div><br class="table-break" /></div></div><div class="section" title="Docbook"><div class="titlepage"><div><div><h3 class="title"><a id="doc.docbook"></a>Docbook</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.prereq"></a>Prerequisites</h4></div></div></div><div class="table"><a id="id652780"></a><p class="title"><strong>Table B.3. Docbook Prerequisites</strong></p><div class="table-contents"><table summary="Docbook Prerequisites" border="1"><colgroup><col align="center" class="c1" /><col align="center" class="c2" /><col align="center" class="c3" /></colgroup><thead><tr><th align="center">Tool</th><th align="center">Version</th><th align="center">Required By</th></tr></thead><tbody><tr><td align="center">docbook5-style-xsl</td><td align="center">1.76.1</td><td align="center">all</td></tr><tr><td align="center">xsltproc</td><td align="center">1.1.26</td><td align="center">all</td></tr><tr><td align="center">xmllint</td><td align="center">2.7.7</td><td align="center">validation</td></tr><tr><td align="center">dblatex</td><td align="center">0.3</td><td align="center">pdf output</td></tr><tr><td align="center">pdflatex</td><td align="center">2007-59</td><td align="center">pdf output</td></tr><tr><td align="center">docbook2X</td><td align="center">0.8.8</td><td align="center">info output</td></tr><tr><td align="center">epub3 stylesheets</td><td align="center">b3</td><td align="center">epub output</td></tr></tbody></table></div></div><br class="table-break" /><p>
Editing the DocBook sources requires an XML editor. Many Editing the DocBook sources requires an XML editor. Many
exist: some notable options exist: some notable options
include <span class="command"><strong>emacs</strong></span>, <span class="application">Kate</span>, include <span class="command"><strong>emacs</strong></span>, <span class="application">Kate</span>,
@ -326,7 +318,7 @@
XML to Texinfo is required. The default choice is <a class="link" href="http://docbook2x.sourceforge.net/" target="_top">docbook2X</a>. XML to Texinfo is required. The default choice is <a class="link" href="http://docbook2x.sourceforge.net/" target="_top">docbook2X</a>.
</p><p> </p><p>
For epub output, the <a class="link" href="http://sourceforge.net/projects/docbook/files/epub3/" target="_top">stylesheets</a> for EPUB3 are required. These stylesheets are still in development. To validate the created file, <a class="link" href="https://code.google.com/p/epubcheck/" target="_top">epubcheck</a> is necessary. For epub output, the <a class="link" href="http://sourceforge.net/projects/docbook/files/epub3/" target="_top">stylesheets</a> for EPUB3 are required. These stylesheets are still in development. To validate the created file, <a class="link" href="https://code.google.com/p/epubcheck/" target="_top">epubcheck</a> is necessary.
</p></div><div class="section" title="Generating the DocBook Files"><div class="titlepage"><div><div><h4 class="title"><a name="docbook.rules"></a>Generating the DocBook Files</h4></div></div></div><p> </p></div><div class="section" title="Generating the DocBook Files"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.rules"></a>Generating the DocBook Files</h4></div></div></div><p>
The following Makefile rules generate (in order): an HTML The following Makefile rules generate (in order): an HTML
version of all the DocBook documentation, a PDF version of the version of all the DocBook documentation, a PDF version of the
same, and a single XML document. These rules are not same, and a single XML document. These rules are not
@ -351,7 +343,7 @@
<strong class="userinput"><code> <strong class="userinput"><code>
make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwalsh"</code> doc-html-docbook make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwalsh"</code> doc-html-docbook
</code></strong> </code></strong>
</pre></div><div class="section" title="Editing and Validation"><div class="titlepage"><div><div><h4 class="title"><a name="docbook.validation"></a>Editing and Validation</h4></div></div></div><p> </pre></div><div class="section" title="Editing and Validation"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.validation"></a>Editing and Validation</h4></div></div></div><p>
After editing the xml sources, please make sure that the XML After editing the xml sources, please make sure that the XML
documentation and markup is still valid. This can be documentation and markup is still valid. This can be
done easily, with the following validation rule: done easily, with the following validation rule:
@ -371,77 +363,77 @@ make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwal
validation on the entire manual fails. validation on the entire manual fails.
</p><p> </p><p>
All Docbook xml sources should always validate. No excuses! All Docbook xml sources should always validate. No excuses!
</p></div><div class="section" title="File Organization and Basics"><div class="titlepage"><div><div><h4 class="title"><a name="docbook.examples"></a>File Organization and Basics</h4></div></div></div><div class="literallayout"><p><br> </p></div><div class="section" title="File Organization and Basics"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.examples"></a>File Organization and Basics</h4></div></div></div><div class="literallayout"><p><br />
      <span class="emphasis"><em>Which files are important</em></span><br>       <span class="emphasis"><em>Which files are important</em></span><br />
<br> <br />
      All Docbook files are in the directory<br>       All Docbook files are in the directory<br />
      libstdc++-v3/doc/xml<br>       libstdc++-v3/doc/xml<br />
<br> <br />
      Inside this directory, the files of importance:<br>       Inside this directory, the files of importance:<br />
      spine.xml   - index to documentation set<br>       spine.xml   - index to documentation set<br />
      manual/spine.xml  - index to manual<br>       manual/spine.xml  - index to manual<br />
      manual/*.xml   - individual chapters and sections of the manual<br>       manual/*.xml   - individual chapters and sections of the manual<br />
      faq.xml   - index to FAQ<br>       faq.xml   - index to FAQ<br />
      api.xml   - index to source level / API<br>       api.xml   - index to source level / API<br />
<br> <br />
      All *.txml files are template xml files, i.e., otherwise empty files with<br>       All *.txml files are template xml files, i.e., otherwise empty files with<br />
      the correct structure, suitable for filling in with new information.<br>       the correct structure, suitable for filling in with new information.<br />
<br> <br />
      <span class="emphasis"><em>Canonical Writing Style</em></span><br>       <span class="emphasis"><em>Canonical Writing Style</em></span><br />
<br> <br />
      class template<br>       class template<br />
      function template<br>       function template<br />
      member function template<br>       member function template<br />
      (via C++ Templates, Vandevoorde)<br>       (via C++ Templates, Vandevoorde)<br />
<br> <br />
      class in namespace std: allocator, not std::allocator<br>       class in namespace std: allocator, not std::allocator<br />
<br> <br />
      header file: iostream, not &lt;iostream&gt;<br>       header file: iostream, not &lt;iostream&gt;<br />
<br> <br />
<br> <br />
      <span class="emphasis"><em>General structure</em></span><br>       <span class="emphasis"><em>General structure</em></span><br />
<br> <br />
      &lt;set&gt;<br>       &lt;set&gt;<br />
      &lt;book&gt;<br>       &lt;book&gt;<br />
      &lt;/book&gt;<br>       &lt;/book&gt;<br />
<br> <br />
      &lt;book&gt;<br>       &lt;book&gt;<br />
      &lt;chapter&gt;<br>       &lt;chapter&gt;<br />
      &lt;/chapter&gt;<br>       &lt;/chapter&gt;<br />
      &lt;/book&gt;<br>       &lt;/book&gt;<br />
<br> <br />
      &lt;book&gt;<br>       &lt;book&gt;<br />
      &lt;part&gt;<br>       &lt;part&gt;<br />
      &lt;chapter&gt;<br>       &lt;chapter&gt;<br />
      &lt;section&gt;<br>       &lt;section&gt;<br />
      &lt;/section&gt;<br>       &lt;/section&gt;<br />
<br> <br />
      &lt;sect1&gt;<br>       &lt;sect1&gt;<br />
      &lt;/sect1&gt;<br>       &lt;/sect1&gt;<br />
<br> <br />
      &lt;sect1&gt;<br>       &lt;sect1&gt;<br />
      &lt;sect2&gt;<br>       &lt;sect2&gt;<br />
      &lt;/sect2&gt;<br>       &lt;/sect2&gt;<br />
      &lt;/sect1&gt;<br>       &lt;/sect1&gt;<br />
      &lt;/chapter&gt;<br>       &lt;/chapter&gt;<br />
<br> <br />
      &lt;chapter&gt;<br>       &lt;chapter&gt;<br />
      &lt;/chapter&gt;<br>       &lt;/chapter&gt;<br />
      &lt;/part&gt;<br>       &lt;/part&gt;<br />
      &lt;/book&gt;<br>       &lt;/book&gt;<br />
<br> <br />
      &lt;/set&gt;<br>       &lt;/set&gt;<br />
    </p></div></div><div class="section" title="Markup By Example"><div class="titlepage"><div><div><h4 class="title"><a name="docbook.markup"></a>Markup By Example</h4></div></div></div><p>     </p></div></div><div class="section" title="Markup By Example"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.markup"></a>Markup By Example</h4></div></div></div><p>
Complete details on Docbook markup can be found in the DocBook Complete details on Docbook markup can be found in the DocBook
Element Reference, Element Reference,
<a class="link" href="http://www.docbook.org/tdg/en/html/part2.html" target="_top">online</a>. <a class="link" href="http://www.docbook.org/tdg/en/html/part2.html" target="_top">online</a>.
An incomplete reference for HTML to Docbook conversion is An incomplete reference for HTML to Docbook conversion is
detailed in the table below. detailed in the table below.
</p><div class="table"><a name="id679219"></a><p class="title"><b>Table B.4. HTML to Docbook XML Markup Comparison</b></p><div class="table-contents"><table summary="HTML to Docbook XML Markup Comparison" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"></colgroup><thead><tr><th align="left">HTML</th><th align="left">Docbook</th></tr></thead><tbody><tr><td align="left">&lt;p&gt;</td><td align="left">&lt;para&gt;</td></tr><tr><td align="left">&lt;pre&gt;</td><td align="left">&lt;computeroutput&gt;, &lt;programlisting&gt;, </p><div class="table"><a id="id653291"></a><p class="title"><strong>Table B.4. HTML to Docbook XML Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Docbook XML Markup Comparison" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">Docbook</th></tr></thead><tbody><tr><td align="left">&lt;p&gt;</td><td align="left">&lt;para&gt;</td></tr><tr><td align="left">&lt;pre&gt;</td><td align="left">&lt;computeroutput&gt;, &lt;programlisting&gt;,
&lt;literallayout&gt;</td></tr><tr><td align="left">&lt;ul&gt;</td><td align="left">&lt;itemizedlist&gt;</td></tr><tr><td align="left">&lt;ol&gt;</td><td align="left">&lt;orderedlist&gt;</td></tr><tr><td align="left">&lt;il&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;dl&gt;</td><td align="left">&lt;variablelist&gt;</td></tr><tr><td align="left">&lt;dt&gt;</td><td align="left">&lt;term&gt;</td></tr><tr><td align="left">&lt;dd&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;a href=""&gt;</td><td align="left">&lt;ulink url=""&gt;</td></tr><tr><td align="left">&lt;code&gt;</td><td align="left">&lt;literal&gt;, &lt;programlisting&gt;</td></tr><tr><td align="left">&lt;strong&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">"</td><td align="left">&lt;quote&gt;</td></tr></tbody></table></div></div><br class="table-break"><p> &lt;literallayout&gt;</td></tr><tr><td align="left">&lt;ul&gt;</td><td align="left">&lt;itemizedlist&gt;</td></tr><tr><td align="left">&lt;ol&gt;</td><td align="left">&lt;orderedlist&gt;</td></tr><tr><td align="left">&lt;il&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;dl&gt;</td><td align="left">&lt;variablelist&gt;</td></tr><tr><td align="left">&lt;dt&gt;</td><td align="left">&lt;term&gt;</td></tr><tr><td align="left">&lt;dd&gt;</td><td align="left">&lt;listitem&gt;</td></tr><tr><td align="left">&lt;a href=""&gt;</td><td align="left">&lt;ulink url=""&gt;</td></tr><tr><td align="left">&lt;code&gt;</td><td align="left">&lt;literal&gt;, &lt;programlisting&gt;</td></tr><tr><td align="left">&lt;strong&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">&lt;em&gt;</td><td align="left">&lt;emphasis&gt;</td></tr><tr><td align="left">"</td><td align="left">&lt;quote&gt;</td></tr></tbody></table></div></div><br class="table-break" /><p>
And examples of detailed markup for which there are no real HTML And examples of detailed markup for which there are no real HTML
equivalents are listed in the table below. equivalents are listed in the table below.
</p><div class="table"><a name="id679421"></a><p class="title"><b>Table B.5. Docbook XML Element Use</b></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" class="c1"><col align="left" class="c2"></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left">&lt;structname&gt;</td><td align="left">&lt;structname&gt;char_traits&lt;/structname&gt;</td></tr><tr><td align="left">&lt;classname&gt;</td><td align="left">&lt;classname&gt;string&lt;/classname&gt;</td></tr><tr><td align="left">&lt;function&gt;</td><td align="left"> </p><div class="table"><a id="id653493"></a><p class="title"><strong>Table B.5. Docbook XML Element Use</strong></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left">&lt;structname&gt;</td><td align="left">&lt;structname&gt;char_traits&lt;/structname&gt;</td></tr><tr><td align="left">&lt;classname&gt;</td><td align="left">&lt;classname&gt;string&lt;/classname&gt;</td></tr><tr><td align="left">&lt;function&gt;</td><td align="left">
<p>&lt;function&gt;clear()&lt;/function&gt;</p> <p>&lt;function&gt;clear()&lt;/function&gt;</p>
<p>&lt;function&gt;fs.clear()&lt;/function&gt;</p> <p>&lt;function&gt;fs.clear()&lt;/function&gt;</p>
</td></tr><tr><td align="left">&lt;type&gt;</td><td align="left">&lt;type&gt;long long&lt;/type&gt;</td></tr><tr><td align="left">&lt;varname&gt;</td><td align="left">&lt;varname&gt;fs&lt;/varname&gt;</td></tr><tr><td align="left">&lt;literal&gt;</td><td align="left"> </td></tr><tr><td align="left">&lt;type&gt;</td><td align="left">&lt;type&gt;long long&lt;/type&gt;</td></tr><tr><td align="left">&lt;varname&gt;</td><td align="left">&lt;varname&gt;fs&lt;/varname&gt;</td></tr><tr><td align="left">&lt;literal&gt;</td><td align="left">
@ -454,7 +446,7 @@ make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwal
<p>&lt;filename class="headerfile"&gt;ctype.h&lt;/filename&gt;</p> <p>&lt;filename class="headerfile"&gt;ctype.h&lt;/filename&gt;</p>
<p>&lt;filename class="directory"&gt;/home/gcc/build&lt;/filename&gt;</p> <p>&lt;filename class="directory"&gt;/home/gcc/build&lt;/filename&gt;</p>
<p>&lt;filename class="libraryfile"&gt;libstdc++.so&lt;/filename&gt;</p> <p>&lt;filename class="libraryfile"&gt;libstdc++.so&lt;/filename&gt;</p>
</td></tr></tbody></table></div></div><br class="table-break"></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B.  </td></tr></tbody></table></div></div><br class="table-break" /></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_porting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B. 
Porting and Maintenance Porting and Maintenance
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Porting to New Hardware or Operating Systems</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Porting to New Hardware or Operating Systems</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Dynamic Memory</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Dynamic Memory</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="support.html" title="Chapter 4.  Support" /><link rel="prev" href="support.html" title="Chapter 4.  Support" /><link rel="next" href="termination.html" title="Termination" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Dynamic Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="support.html" title="Chapter 4.  Support"><link rel="prev" href="support.html" title="Chapter 4.  Support"><link rel="next" href="termination.html" title="Termination"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Dynamic Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
Support Support
</th><td width="20%" align="right"> <a accesskey="n" href="termination.html">Next</a></td></tr></table><hr></div><div class="section" title="Dynamic Memory"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.support.memory"></a>Dynamic Memory</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="termination.html">Next</a></td></tr></table><hr /></div><div class="section" title="Dynamic Memory"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.support.memory"></a>Dynamic Memory</h2></div></div></div><p>
There are six flavors each of <code class="function">new</code> and There are six flavors each of <code class="function">new</code> and
<code class="function">delete</code>, so make certain that you're using the right <code class="function">delete</code>, so make certain that you're using the right
ones. Here are quickie descriptions of <code class="function">new</code>: ones. Here are quickie descriptions of <code class="function">new</code>:
@ -74,7 +66,7 @@
</pre><p> </pre><p>
<code class="classname">bad_alloc</code> is derived from the base <code class="classname">exception</code> <code class="classname">bad_alloc</code> is derived from the base <code class="classname">exception</code>
class defined in Sect1 19. class defined in Sect1 19.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="termination.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4.  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="support.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="termination.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. 
Support Support
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Termination</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Termination</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 25. Algorithms</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 25. Algorithms</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_utilities.html" title="Chapter 24. Utilities" /><link rel="next" href="ext_numerics.html" title="Chapter 26. Numerics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 25. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_utilities.html" title="Chapter 24. Utilities"><link rel="next" href="ext_numerics.html" title="Chapter 26. Numerics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 25. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 25. Algorithms"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.algorithms"></a>Chapter 25. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count </th><td width="20%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 25. Algorithms"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.algorithms"></a>Chapter 25. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count
and count_if. The standard versions return their results. The and count_if. The standard versions return their results. The
additional signatures return void, but take a final parameter by additional signatures return void, but take a final parameter by
reference to which they assign their results, e.g., reference to which they assign their results, e.g.,
@ -28,4 +20,4 @@
</p><pre class="programlisting"> </p><pre class="programlisting">
lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1, lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
_InputIter2 first2, _InputIter2 last2)</pre><p>which does... what? _InputIter2 first2, _InputIter2 last2)</pre><p>which does... what?
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 24. Utilities </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 26. Numerics</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 24. Utilities </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 26. Numerics</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 16. Compile Time Checks</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 16. Compile Time Checks</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="bk01pt03pr01.html" title="" /><link rel="next" href="debug_mode.html" title="Chapter 17. Debug Mode" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 16. Compile Time Checks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03pr01.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="bk01pt03pr01.html" title=""><link rel="next" href="debug_mode.html" title="Chapter 17. Debug Mode"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 16. Compile Time Checks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03pr01.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="debug_mode.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 16. Compile Time Checks"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.compile_checks"></a>Chapter 16. Compile Time Checks</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="debug_mode.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 16. Compile Time Checks"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.compile_checks"></a>Chapter 16. Compile Time Checks</h2></div></div></div><p>
Also known as concept checking. Also known as concept checking.
</p><p>In 1999, SGI added <span class="emphasis"><em>concept checkers</em></span> to their implementation </p><p>In 1999, SGI added <span class="emphasis"><em>concept checkers</em></span> to their implementation
of the STL: code which checked the template parameters of of the STL: code which checked the template parameters of
@ -45,4 +37,4 @@
support for template parameter constraints based on concepts in the core support for template parameter constraints based on concepts in the core
language. This will obviate the need for the library-simulated concept language. This will obviate the need for the library-simulated concept
checking described above. checking described above.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03pr01.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="debug_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 17. Debug Mode</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03pr01.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="debug_mode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 17. Debug Mode</td></tr></table></div></body></html>

View File

@ -1,21 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 30. Concurrency</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 30. Concurrency</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_demangling.html" title="Chapter 29. Demangling" /><link rel="next" href="bk01pt03ch30s02.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_demangling.html" title="Chapter 29. Demangling"><link rel="next" href="bk01pt03ch30s02.html" title="Implementation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch30s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 30. Concurrency"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.concurrency"></a>Chapter 30. Concurrency</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch30s02.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch30s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="bk01pt03ch30s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch30s03.html">Use</a></span></dt></dl></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="section" title="Interface to Locks and Mutexes"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file <code class="filename">&lt;ext/concurrence.h&gt;</code> </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch30s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 30. Concurrency"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 30. Concurrency</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch30s02.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch30s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="bk01pt03ch30s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch30s03.html">Use</a></span></dt></dl></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="section" title="Interface to Locks and Mutexes"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file <code class="filename">&lt;ext/concurrence.h&gt;</code>
contains all the higher-level contains all the higher-level
constructs for playing with threads. In contrast to the atomics layer, constructs for playing with threads. In contrast to the atomics layer,
the concurrence layer consists largely of types. All types are defined within <code class="code">namespace __gnu_cxx</code>. the concurrence layer consists largely of types. All types are defined within <code class="code">namespace __gnu_cxx</code>.
@ -45,7 +33,7 @@ critical sections, while retaining exception-safety.
These types have been superseded in the ISO C++ 2011 standard by the These types have been superseded in the ISO C++ 2011 standard by the
mutex and lock types defined in the header mutex and lock types defined in the header
<code class="filename">&lt;mutex&gt;</code>. <code class="filename">&lt;mutex&gt;</code>.
</p></div><div class="section" title="Interface to Atomic Functions"><div class="titlepage"><div><div><h3 class="title"><a name="manual.ext.concurrency.design.atomics"></a>Interface to Atomic Functions</h3></div></div></div><p> </p></div><div class="section" title="Interface to Atomic Functions"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.atomics"></a>Interface to Atomic Functions</h3></div></div></div><p>
Two functions and one type form the base of atomic support. Two functions and one type form the base of atomic support.
</p><p>The type <code class="code">_Atomic_word</code> is a signed integral type </p><p>The type <code class="code">_Atomic_word</code> is a signed integral type
supporting atomic operations. supporting atomic operations.
@ -103,4 +91,4 @@ _GLIBCXX_WRITE_MEM_BARRIER
</p><p> </p><p>
Which expand to the appropriate write and read barrier required by the Which expand to the appropriate write and read barrier required by the
host hardware and operating system. host hardware and operating system.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch30s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 29. Demangling </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html> </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch30s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 29. Demangling </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Implementation</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 23. HP/SGI Extensions</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 23. HP/SGI Extensions</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="policy_data_structures_biblio.html" title="Acknowledgments" /><link rel="next" href="bk01pt03ch23s02.html" title="Deprecated" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 23. HP/SGI Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures_biblio.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="policy_data_structures_biblio.html" title="Acknowledgments"><link rel="next" href="bk01pt03ch23s02.html" title="Deprecated"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 23. HP/SGI Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures_biblio.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch23s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 23. HP/SGI Extensions"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.containers"></a>Chapter 23. HP/SGI Extensions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="bk01pt03ch23s02.html">Deprecated</a></span></dt></dl></div><div class="section" title="Backwards Compatibility"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.containers.sgi"></a>Backwards Compatibility</h2></div></div></div><p>A few extensions and nods to backwards-compatibility have </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch23s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 23. HP/SGI Extensions"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.containers"></a>Chapter 23. HP/SGI Extensions</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="bk01pt03ch23s02.html">Deprecated</a></span></dt></dl></div><div class="section" title="Backwards Compatibility"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.containers.sgi"></a>Backwards Compatibility</h2></div></div></div><p>A few extensions and nods to backwards-compatibility have
been made with containers. Those dealing with older SGI-style been made with containers. Those dealing with older SGI-style
allocators are dealt with elsewhere. The remaining ones all deal allocators are dealt with elsewhere. The remaining ones all deal
with bits: with bits:
@ -47,4 +39,4 @@
</p><pre class="programlisting"> </p><pre class="programlisting">
size_t _Find_first() const; size_t _Find_first() const;
size_t _Find_next (size_t prev) const;</pre><p>The same caveat given for the _Unchecked_* functions applies here also. size_t _Find_next (size_t prev) const;</pre><p>The same caveat given for the _Unchecked_* functions applies here also.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures_biblio.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch23s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Acknowledgments </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Deprecated</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures_biblio.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch23s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Acknowledgments </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Deprecated</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 29. Demangling</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 29. Demangling</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_io.html" title="Chapter 28. Input and Output" /><link rel="next" href="ext_concurrency.html" title="Chapter 30. Concurrency" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 29. Demangling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_io.html" title="Chapter 28. Input and Output"><link rel="next" href="ext_concurrency.html" title="Chapter 30. Concurrency"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 29. Demangling</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 29. Demangling"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.demangle"></a>Chapter 29. Demangling</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 29. Demangling"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.demangle"></a>Chapter 29. Demangling</h2></div></div></div><p>
Transforming C++ ABI identifiers (like RTTI symbols) into the Transforming C++ ABI identifiers (like RTTI symbols) into the
original C++ source identifiers is called original C++ source identifiers is called
<span class="quote"><span class="quote">demangling.</span></span> <span class="quote"><span class="quote">demangling.</span></span>
@ -79,4 +71,4 @@ int main()
be writing C++ in order to demangle C++. (That also means we have to be writing C++ in order to demangle C++. (That also means we have to
use crummy memory management facilities, so don't forget to free() use crummy memory management facilities, so don't forget to free()
the returned char array.) the returned char array.)
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 28. Input and Output </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 30. Concurrency</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_concurrency.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 28. Input and Output </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 30. Concurrency</td></tr></table></div></body></html>

View File

@ -1,20 +1,12 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 28. Input and Output</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 28. Input and Output</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_iterators.html" title="Chapter 27. Iterators" /><link rel="next" href="ext_demangling.html" title="Chapter 29. Demangling" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 28. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_iterators.html" title="Chapter 27. Iterators"><link rel="next" href="ext_demangling.html" title="Chapter 29. Demangling"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 28. Input and Output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 28. Input and Output"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.io"></a>Chapter 28. Input and Output</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 28. Input and Output"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.io"></a>Chapter 28. Input and Output</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></div><p>
Extensions allowing <code class="code">filebuf</code>s to be constructed from Extensions allowing <code class="code">filebuf</code>s to be constructed from
"C" types like FILE*s and file descriptors. "C" types like FILE*s and file descriptors.
</p><div class="section" title="Derived filebufs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.io.filebuf_derived"></a>Derived filebufs</h2></div></div></div><p>The v2 library included non-standard extensions to construct </p><div class="section" title="Derived filebufs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.io.filebuf_derived"></a>Derived filebufs</h2></div></div></div><p>The v2 library included non-standard extensions to construct
<code class="code">std::filebuf</code>s from C stdio types such as <code class="code">std::filebuf</code>s from C stdio types such as
<code class="code">FILE*</code>s and POSIX file descriptors. <code class="code">FILE*</code>s and POSIX file descriptors.
Today the recommended way to use stdio types with libstdc++ Today the recommended way to use stdio types with libstdc++
@ -50,4 +42,4 @@
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00074.html" target="_top"><code class="code">__gnu_cxx::stdio_filebuf</code></a>. <a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00074.html" target="_top"><code class="code">__gnu_cxx::stdio_filebuf</code></a>.
This class can be constructed from a C <code class="code">FILE*</code> or a file This class can be constructed from a C <code class="code">FILE*</code> or a file
descriptor, and provides the <code class="code">fd()</code> function. descriptor, and provides the <code class="code">fd()</code> function.
</p></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 27. Iterators </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 29. Demangling</td></tr></table></div></body></html> </p></li></ul></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_iterators.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_demangling.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 27. Iterators </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 29. Demangling</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 27. Iterators</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 27. Iterators</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_numerics.html" title="Chapter 26. Numerics" /><link rel="next" href="ext_io.html" title="Chapter 28. Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 27. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_numerics.html" title="Chapter 26. Numerics"><link rel="next" href="ext_io.html" title="Chapter 28. Input and Output"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 27. Iterators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 27. Iterators"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.iterators"></a>Chapter 27. Iterators</h2></div></div></div><p>24.3.2 describes <code class="code">struct iterator</code>, which didn't exist in the </th><td width="20%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 27. Iterators"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.iterators"></a>Chapter 27. Iterators</h2></div></div></div><p>24.3.2 describes <code class="code">struct iterator</code>, which didn't exist in the
original HP STL implementation (the language wasn't rich enough at the original HP STL implementation (the language wasn't rich enough at the
time). For backwards compatibility, base classes are provided which time). For backwards compatibility, base classes are provided which
declare the same nested typedefs: declare the same nested typedefs:
@ -19,4 +11,4 @@
two iterators and returns a result. It is extended by another signature two iterators and returns a result. It is extended by another signature
which takes two iterators and a reference to a result. The result is which takes two iterators and a reference to a result. The result is
modified, and the function returns nothing. modified, and the function returns nothing.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 26. Numerics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 28. Input and Output</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 26. Numerics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 28. Input and Output</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 26. Numerics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 26. Numerics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="ext_algorithms.html" title="Chapter 25. Algorithms" /><link rel="next" href="ext_iterators.html" title="Chapter 27. Iterators" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 26. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_algorithms.html" title="Chapter 25. Algorithms"><link rel="next" href="ext_iterators.html" title="Chapter 27. Iterators"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 26. Numerics</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 26. Numerics"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.numerics"></a>Chapter 26. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as <code class="code">accumulate</code>, </th><td width="20%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 26. Numerics"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.numerics"></a>Chapter 26. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as <code class="code">accumulate</code>,
are extended with the following functions: are extended with the following functions:
</p><pre class="programlisting"> </p><pre class="programlisting">
power (x, n); power (x, n);
@ -29,4 +21,4 @@
<code class="code">value + 1</code> to<code class="code"> *(first + 1)</code> and so on." <code class="code">value + 1</code> to<code class="code"> *(first + 1)</code> and so on."
</p><pre class="programlisting"> </p><pre class="programlisting">
void iota(_ForwardIter first, _ForwardIter last, _Tp value);</pre><p>The <code class="code">iota</code> function is included in the ISO C++ 2011 standard. void iota(_ForwardIter first, _ForwardIter last, _Tp value);</pre><p>The <code class="code">iota</code> function is included in the ISO C++ 2011 standard.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 25. Algorithms </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 27. Iterators</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 25. Algorithms </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 27. Iterators</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 24. Utilities</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 24. Utilities</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="bk01pt03ch23s02.html" title="Deprecated" /><link rel="next" href="ext_algorithms.html" title="Chapter 25. Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch23s02.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="bk01pt03ch23s02.html" title="Deprecated"><link rel="next" href="ext_algorithms.html" title="Chapter 25. Algorithms"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Utilities</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch23s02.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 24. Utilities"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.util"></a>Chapter 24. Utilities</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 24. Utilities"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.util"></a>Chapter 24. Utilities</h2></div></div></div><p>
The <code class="filename">&lt;functional&gt;</code> header The <code class="filename">&lt;functional&gt;</code> header
contains many additional functors contains many additional functors
and helper functions, extending section 20.3. They are and helper functions, extending section 20.3. They are
@ -47,4 +39,4 @@ get_temporary_buffer(5, (int*)0);
</p><p> </p><p>
The specialized algorithms of section 20.4.4 are extended with The specialized algorithms of section 20.4.4 are extended with
<code class="code">uninitialized_copy_n</code>. <code class="code">uninitialized_copy_n</code>.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch23s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Deprecated </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 25. Algorithms</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch23s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Deprecated </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 25. Algorithms</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Facets</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Facets</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="localization.html" title="Chapter 8.  Localization" /><link rel="prev" href="localization.html" title="Chapter 8.  Localization" /><link rel="next" href="containers.html" title="Chapter 9.  Containers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Facets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Chapter 8. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="localization.html" title="Chapter 8.  Localization"><link rel="prev" href="localization.html" title="Chapter 8.  Localization"><link rel="next" href="containers.html" title="Chapter 9.  Containers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Facets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Chapter 8. 
Localization Localization
</th><td width="20%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr></div><div class="section" title="Facets"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.localization.facet"></a>Facets</h2></div></div></div><div class="section" title="ctype"><div class="titlepage"><div><div><h3 class="title"><a name="std.localization.facet.ctype"></a>ctype</h3></div></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a name="facet.ctype.impl"></a>Implementation</h4></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h5 class="title"><a name="id625164"></a>Specializations</h5></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr /></div><div class="section" title="Facets"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.localization.facet"></a>Facets</h2></div></div></div><div class="section" title="ctype"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.facet.ctype"></a>ctype</h3></div></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.impl"></a>Implementation</h4></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h5 class="title"><a id="id599235"></a>Specializations</h5></div></div></div><p>
For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; , For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; ,
conversions are made between the internal character set (always UCS4 conversions are made between the internal character set (always UCS4
on GNU/Linux) and whatever the currently selected locale for the on GNU/Linux) and whatever the currently selected locale for the
@ -36,7 +28,7 @@ to wchar_t and wcsrtombs for conversions between wchar_t and char.
</p><p> </p><p>
Neither of these two required specializations deals with Unicode Neither of these two required specializations deals with Unicode
characters. characters.
</p></div></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a name="facet.ctype.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></div></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
How to deal with the global locale issue? How to deal with the global locale issue?
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
How to deal with different types than char, wchar_t? </p></li><li class="listitem"><p> How to deal with different types than char, wchar_t? </p></li><li class="listitem"><p>
@ -58,30 +50,30 @@ characters.
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
Rename abstract base class. See if just smash-overriding is a Rename abstract base class. See if just smash-overriding is a
better approach. Clarify, add sanity to naming. better approach. Clarify, add sanity to naming.
</p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a name="facet.ctype.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a name="id625288"></a><p><span class="citetitle"><em class="citetitle"> </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id599360"></a><p><span class="citetitle"><em class="citetitle">
The GNU C Library The GNU C Library
</em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a name="id625328"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id599400"></a><p><span class="citetitle"><em class="citetitle">
Correspondence Correspondence
</em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a name="id625354"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id599426"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 14882:1998 Programming languages - C++ ISO/IEC 14882:1998 Programming languages - C++
</em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a name="id625373"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id599445"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 9899:1999 Programming languages - C ISO/IEC 9899:1999 Programming languages - C
</em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)"><a name="id625392"></a><p><span class="title"><i> </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)"><a id="id599464"></a><p><span class="title"><em>
<a class="link" href="http://www.unix.org/version3/ieee_std.html" target="_top"> <a class="link" href="http://www.unix.org/version3/ieee_std.html" target="_top">
The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)
</a> </a>
</i>. </span><span class="copyright">Copyright © 1999 </em>. </span><span class="copyright">Copyright © 1999
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span></p></div><div class="biblioentry"><a name="id625419"></a><p><span class="citetitle"><em class="citetitle"> The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span></p></div><div class="biblioentry"><a id="id599491"></a><p><span class="citetitle"><em class="citetitle">
The C++ Programming Language, Special Edition The C++ Programming Language, Special Edition
</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley Addison Wesley
. </span></span></p></div><div class="biblioentry"><a name="id625457"></a><p><span class="citetitle"><em class="citetitle"> . </span></span></p></div><div class="biblioentry"><a id="id599529"></a><p><span class="citetitle"><em class="citetitle">
Standard C++ IOStreams and Locales Standard C++ IOStreams and Locales
</em>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman Addison Wesley Longman
. </span></span></p></div></div></div><div class="section" title="codecvt"><div class="titlepage"><div><div><h3 class="title"><a name="std.localization.facet.codecvt"></a>codecvt</h3></div></div></div><p> . </span></span></p></div></div></div><div class="section" title="codecvt"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.facet.codecvt"></a>codecvt</h3></div></div></div><p>
The standard class codecvt attempts to address conversions between The standard class codecvt attempts to address conversions between
different character encoding schemes. In particular, the standard different character encoding schemes. In particular, the standard
attempts to detail conversions between the implementation-defined wide attempts to detail conversions between the implementation-defined wide
@ -95,7 +87,7 @@ including Unicode and UTF8. Design issues and requirements are
addressed, and examples of correct usage for both the required addressed, and examples of correct usage for both the required
specializations for wide and narrow characters and the specializations for wide and narrow characters and the
implementation-provided extended functionality are given. implementation-provided extended functionality are given.
</p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a name="facet.codecvt.req"></a>Requirements</h4></div></div></div><p> </p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.req"></a>Requirements</h4></div></div></div><p>
Around page 425 of the C++ Standard, this charming heading comes into view: Around page 425 of the C++ Standard, this charming heading comes into view:
</p><div class="blockquote"><blockquote class="blockquote"><p> </p><div class="blockquote"><blockquote class="blockquote"><p>
22.2.1.5 - Template class codecvt 22.2.1.5 - Template class codecvt
@ -141,7 +133,7 @@ third template parameter, stateT.</p><p>
Two: The required conversions, by specifying mbstate_t as the third Two: The required conversions, by specifying mbstate_t as the third
template parameter, imply an implementation strategy that is mostly template parameter, imply an implementation strategy that is mostly
(or wholly) based on the underlying C library, and the functions (or wholly) based on the underlying C library, and the functions
mcsrtombs and wcsrtombs in particular.</p></div><div class="section" title="Design"><div class="titlepage"><div><div><h4 class="title"><a name="facet.codecvt.design"></a>Design</h4></div></div></div><div class="section" title="wchar_t Size"><div class="titlepage"><div><div><h5 class="title"><a name="codecvt.design.wchar_t_size"></a><span class="type">wchar_t</span> Size</h5></div></div></div><p> mcsrtombs and wcsrtombs in particular.</p></div><div class="section" title="Design"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.design"></a>Design</h4></div></div></div><div class="section" title="wchar_t Size"><div class="titlepage"><div><div><h5 class="title"><a id="codecvt.design.wchar_t_size"></a><span class="type">wchar_t</span> Size</h5></div></div></div><p>
The simple implementation detail of wchar_t's size seems to The simple implementation detail of wchar_t's size seems to
repeatedly confound people. Many systems use a two byte, repeatedly confound people. Many systems use a two byte,
unsigned integral type to represent wide characters, and use an unsigned integral type to represent wide characters, and use an
@ -153,7 +145,7 @@ mcsrtombs and wcsrtombs in particular.</p></div><div class="section" title="Desi
size for the type wchar_t. size for the type wchar_t.
</p><p> </p><p>
Thus, portable C++ code cannot assume a byte size (or endianness) either. Thus, portable C++ code cannot assume a byte size (or endianness) either.
</p></div><div class="section" title="Support for Unicode"><div class="titlepage"><div><div><h5 class="title"><a name="codecvt.design.unicode"></a>Support for Unicode</h5></div></div></div><p> </p></div><div class="section" title="Support for Unicode"><div class="titlepage"><div><div><h5 class="title"><a id="codecvt.design.unicode"></a>Support for Unicode</h5></div></div></div><p>
Probably the most frequently asked question about code conversion Probably the most frequently asked question about code conversion
is: "So dudes, what's the deal with Unicode strings?" is: "So dudes, what's the deal with Unicode strings?"
The dude part is optional, but apparently the usefulness of The dude part is optional, but apparently the usefulness of
@ -221,7 +213,7 @@ mechanism may be required.
Some way to enforce strict type checking on the internal and Some way to enforce strict type checking on the internal and
external types. As part of this, the size of the internal and external types. As part of this, the size of the internal and
external types will need to be known. external types will need to be known.
</p></li></ul></div></div><div class="section" title="Other Issues"><div class="titlepage"><div><div><h5 class="title"><a name="codecvt.design.issues"></a>Other Issues</h5></div></div></div><p> </p></li></ul></div></div><div class="section" title="Other Issues"><div class="titlepage"><div><div><h5 class="title"><a id="codecvt.design.issues"></a>Other Issues</h5></div></div></div><p>
In addition, multi-threaded and multi-locale environments also impact In addition, multi-threaded and multi-locale environments also impact
the design and requirements for code conversions. In particular, they the design and requirements for code conversions. In particular, they
affect the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; affect the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt;
@ -253,7 +245,7 @@ For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; ,
conversions are made between the internal character set (always UCS4 conversions are made between the internal character set (always UCS4
on GNU/Linux) and whatever the currently selected locale for the on GNU/Linux) and whatever the currently selected locale for the
LC_CTYPE category implements. LC_CTYPE category implements.
</p></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a name="facet.codecvt.impl"></a>Implementation</h4></div></div></div><p> </p></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.impl"></a>Implementation</h4></div></div></div><p>
The two required specializations are implemented as follows: The two required specializations are implemented as follows:
</p><p> </p><p>
<code class="code"> <code class="code">
@ -355,7 +347,7 @@ Definitions for all the required codecvt member functions are provided
for this specialization, and usage of codecvt&lt;internal character type, for this specialization, and usage of codecvt&lt;internal character type,
external character type, encoding_state&gt; is consistent with other external character type, encoding_state&gt; is consistent with other
codecvt usage. codecvt usage.
</p></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a name="facet.codecvt.use"></a>Use</h4></div></div></div><p>A conversions involving string literal.</p><pre class="programlisting"> </p></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.use"></a>Use</h4></div></div></div><p>A conversions involving string literal.</p><pre class="programlisting">
typedef codecvt_base::result result; typedef codecvt_base::result result;
typedef unsigned short unicode_t; typedef unsigned short unicode_t;
typedef unicode_t int_type; typedef unicode_t int_type;
@ -392,7 +384,7 @@ codecvt usage.
VERIFY( !int_traits::compare(i_arr, i_lit, size) ); VERIFY( !int_traits::compare(i_arr, i_lit, size) );
VERIFY( efrom_next == e_lit + size ); VERIFY( efrom_next == e_lit + size );
VERIFY( ito_next == i_arr + size ); VERIFY( ito_next == i_arr + size );
</pre></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a name="facet.codecvt.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </pre></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
a. things that are sketchy, or remain unimplemented: a. things that are sketchy, or remain unimplemented:
do_encoding, max_length and length member functions do_encoding, max_length and length member functions
are only weakly implemented. I have no idea how to do are only weakly implemented. I have no idea how to do
@ -418,50 +410,50 @@ codecvt usage.
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
wchar_t/char internal buffers and conversions between wchar_t/char internal buffers and conversions between
internal/external buffers? internal/external buffers?
</p></li></ul></div></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a name="facet.codecvt.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a name="id626108"></a><p><span class="citetitle"><em class="citetitle"> </p></li></ul></div></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id600179"></a><p><span class="citetitle"><em class="citetitle">
The GNU C Library The GNU C Library
</em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums"> </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">
Chapters 6 Character Set Handling and 7 Locales and Internationalization Chapters 6 Character Set Handling and 7 Locales and Internationalization
. </span></p></div><div class="biblioentry"><a name="id626147"></a><p><span class="citetitle"><em class="citetitle"> . </span></p></div><div class="biblioentry"><a id="id600219"></a><p><span class="citetitle"><em class="citetitle">
Correspondence Correspondence
</em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a name="id626173"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id600245"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 14882:1998 Programming languages - C++ ISO/IEC 14882:1998 Programming languages - C++
</em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a name="id626192"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id600264"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 9899:1999 Programming languages - C ISO/IEC 9899:1999 Programming languages - C
</em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a name="id626211"></a><p><span class="title"><i> </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id600283"></a><p><span class="title"><em>
<a class="link" href="http://www.opengroup.org/austin" target="_top"> <a class="link" href="http://www.opengroup.org/austin" target="_top">
System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)
</a> </a>
</i>. </span><span class="copyright">Copyright © 2008 </em>. </span><span class="copyright">Copyright © 2008
The Open Group/The Institute of Electrical and Electronics The Open Group/The Institute of Electrical and Electronics
Engineers, Inc. Engineers, Inc.
. </span></p></div><div class="biblioentry"><a name="id626238"></a><p><span class="citetitle"><em class="citetitle"> . </span></p></div><div class="biblioentry"><a id="id600310"></a><p><span class="citetitle"><em class="citetitle">
The C++ Programming Language, Special Edition The C++ Programming Language, Special Edition
</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley Addison Wesley
. </span></span></p></div><div class="biblioentry"><a name="id626276"></a><p><span class="citetitle"><em class="citetitle"> . </span></span></p></div><div class="biblioentry"><a id="id600348"></a><p><span class="citetitle"><em class="citetitle">
Standard C++ IOStreams and Locales Standard C++ IOStreams and Locales
</em>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman Addison Wesley Longman
. </span></span></p></div><div class="biblioentry" title="A brief description of Normative Addendum 1"><a name="id626324"></a><p><span class="title"><i> . </span></span></p></div><div class="biblioentry" title="A brief description of Normative Addendum 1"><a id="id600395"></a><p><span class="title"><em>
<a class="link" href="http://www.lysator.liu.se/c/na1.html" target="_top"> <a class="link" href="http://www.lysator.liu.se/c/na1.html" target="_top">
A brief description of Normative Addendum 1 A brief description of Normative Addendum 1
</a> </a>
</i>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span></p></div><div class="biblioentry" title="The Unicode HOWTO"><a name="id626351"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span></p></div><div class="biblioentry" title="The Unicode HOWTO"><a id="id600422"></a><p><span class="title"><em>
<a class="link" href="http://tldp.org/HOWTO/Unicode-HOWTO.html" target="_top"> <a class="link" href="http://tldp.org/HOWTO/Unicode-HOWTO.html" target="_top">
The Unicode HOWTO The Unicode HOWTO
</a> </a>
</i>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span></p></div><div class="biblioentry" title="UTF-8 and Unicode FAQ for Unix/Linux"><a name="id626374"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span></p></div><div class="biblioentry" title="UTF-8 and Unicode FAQ for Unix/Linux"><a id="id600446"></a><p><span class="title"><em>
<a class="link" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top"> <a class="link" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top">
UTF-8 and Unicode FAQ for Unix/Linux UTF-8 and Unicode FAQ for Unix/Linux
</a> </a>
</i>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span></p></div></div></div><div class="section" title="messages"><div class="titlepage"><div><div><h3 class="title"><a name="manual.localization.facet.messages"></a>messages</h3></div></div></div><p> </em>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span></p></div></div></div><div class="section" title="messages"><div class="titlepage"><div><div><h3 class="title"><a id="manual.localization.facet.messages"></a>messages</h3></div></div></div><p>
The std::messages facet implements message retrieval functionality The std::messages facet implements message retrieval functionality
equivalent to Java's java.text.MessageFormat .using either GNU gettext equivalent to Java's java.text.MessageFormat .using either GNU gettext
or IEEE 1003.1-200 functions. or IEEE 1003.1-200 functions.
</p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a name="facet.messages.req"></a>Requirements</h4></div></div></div><p> </p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.req"></a>Requirements</h4></div></div></div><p>
The std::messages facet is probably the most vaguely defined facet in The std::messages facet is probably the most vaguely defined facet in
the standard library. It's assumed that this facility was built into the standard library. It's assumed that this facility was built into
the standard library in order to convert string literals from one the standard library in order to convert string literals from one
@ -510,7 +502,7 @@ be found, returns dfault.
-6- Effects: Releases unspecified resources associated with cat. -6- Effects: Releases unspecified resources associated with cat.
-7- Notes: The limit on such resources, if any, is implementation-defined. -7- Notes: The limit on such resources, if any, is implementation-defined.
</em></span> </em></span>
</p></blockquote></div></div><div class="section" title="Design"><div class="titlepage"><div><div><h4 class="title"><a name="facet.messages.design"></a>Design</h4></div></div></div><p> </p></blockquote></div></div><div class="section" title="Design"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.design"></a>Design</h4></div></div></div><p>
A couple of notes on the standard. A couple of notes on the standard.
</p><p> </p><p>
First, why is <code class="code">messages_base::catalog</code> specified as a typedef First, why is <code class="code">messages_base::catalog</code> specified as a typedef
@ -543,7 +535,7 @@ It is implicitly assumed that the locale for the default message
string in 'get' is in the "C" locale. Thus, all source code is assumed string in 'get' is in the "C" locale. Thus, all source code is assumed
to be written in English, so translations are always from "en_US" to to be written in English, so translations are always from "en_US" to
other, explicitly named locales. other, explicitly named locales.
</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a name="facet.messages.impl"></a>Implementation</h4></div></div></div><div class="section" title="Models"><div class="titlepage"><div><div><h5 class="title"><a name="messages.impl.models"></a>Models</h5></div></div></div><p> </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.impl"></a>Implementation</h4></div></div></div><div class="section" title="Models"><div class="titlepage"><div><div><h5 class="title"><a id="messages.impl.models"></a>Models</h5></div></div></div><p>
This is a relatively simple class, on the face of it. The standard This is a relatively simple class, on the face of it. The standard
specifies very little in concrete terms, so generic specifies very little in concrete terms, so generic
implementations that are conforming yet do very little are the implementations that are conforming yet do very little are the
@ -584,7 +576,7 @@ A new, standards-conformant non-virtual member function signature was
added for 'open' so that a directory could be specified with a given added for 'open' so that a directory could be specified with a given
message catalog. This simplifies calling conventions for the gnu message catalog. This simplifies calling conventions for the gnu
model. model.
</p></div><div class="section" title="The GNU Model"><div class="titlepage"><div><div><h5 class="title"><a name="messages.impl.gnu"></a>The GNU Model</h5></div></div></div><p> </p></div><div class="section" title="The GNU Model"><div class="titlepage"><div><div><h5 class="title"><a id="messages.impl.gnu"></a>The GNU Model</h5></div></div></div><p>
The messages facet, because it is retrieving and converting The messages facet, because it is retrieving and converting
between characters sets, depends on the ctype and perhaps the between characters sets, depends on the ctype and perhaps the
codecvt facet in a given locale. In addition, underlying "C" codecvt facet in a given locale. In addition, underlying "C"
@ -627,7 +619,7 @@ model.
<code class="code"> <code class="code">
use_facet&lt;messages&lt;char&gt; &gt;(loc_de).open("libstdc++", locale(), dir); use_facet&lt;messages&lt;char&gt; &gt;(loc_de).open("libstdc++", locale(), dir);
</code> </code>
</p></li></ul></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a name="facet.messages.use"></a>Use</h4></div></div></div><p> </p></li></ul></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.use"></a>Use</h4></div></div></div><p>
A simple example using the GNU model of message conversion. A simple example using the GNU model of message conversion.
</p><pre class="programlisting"> </p><pre class="programlisting">
#include &lt;iostream&gt; #include &lt;iostream&gt;
@ -649,7 +641,7 @@ void test01()
cout &lt;&lt; "thank you in german:" &lt;&lt; s02 &lt;&lt; '\n'; cout &lt;&lt; "thank you in german:" &lt;&lt; s02 &lt;&lt; '\n';
mssg_de.close(cat_de); mssg_de.close(cat_de);
} }
</pre></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a name="facet.messages.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </pre></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Things that are sketchy, or remain unimplemented: Things that are sketchy, or remain unimplemented:
</p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>
_M_convert_from_char, _M_convert_to_char are in flux, _M_convert_from_char, _M_convert_to_char are in flux,
@ -699,44 +691,44 @@ void test01()
model. As of this writing, it is unknown how to query to see model. As of this writing, it is unknown how to query to see
if a specified message catalog exists using the gettext if a specified message catalog exists using the gettext
package. package.
</p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a name="facet.messages.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a name="id627050"></a><p><span class="citetitle"><em class="citetitle"> </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id601122"></a><p><span class="citetitle"><em class="citetitle">
The GNU C Library The GNU C Library
</em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization
. </span></p></div><div class="biblioentry"><a name="id627090"></a><p><span class="citetitle"><em class="citetitle"> . </span></p></div><div class="biblioentry"><a id="id601161"></a><p><span class="citetitle"><em class="citetitle">
Correspondence Correspondence
</em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a name="id627115"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id601187"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 14882:1998 Programming languages - C++ ISO/IEC 14882:1998 Programming languages - C++
</em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a name="id627134"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id601206"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 9899:1999 Programming languages - C ISO/IEC 9899:1999 Programming languages - C
</em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a name="id627153"></a><p><span class="title"><i> </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id601225"></a><p><span class="title"><em>
<a class="link" href="http://www.opengroup.org/austin" target="_top"> <a class="link" href="http://www.opengroup.org/austin" target="_top">
System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)
</a> </a>
</i>. </span><span class="copyright">Copyright © 2008 </em>. </span><span class="copyright">Copyright © 2008
The Open Group/The Institute of Electrical and Electronics The Open Group/The Institute of Electrical and Electronics
Engineers, Inc. Engineers, Inc.
. </span></p></div><div class="biblioentry"><a name="id627180"></a><p><span class="citetitle"><em class="citetitle"> . </span></p></div><div class="biblioentry"><a id="id601252"></a><p><span class="citetitle"><em class="citetitle">
The C++ Programming Language, Special Edition The C++ Programming Language, Special Edition
</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley Addison Wesley
. </span></span></p></div><div class="biblioentry"><a name="id627219"></a><p><span class="citetitle"><em class="citetitle"> . </span></span></p></div><div class="biblioentry"><a id="id601291"></a><p><span class="citetitle"><em class="citetitle">
Standard C++ IOStreams and Locales Standard C++ IOStreams and Locales
</em>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman Addison Wesley Longman
. </span></span></p></div><div class="biblioentry" title="API Specifications, Java Platform"><a name="id627266"></a><p><span class="title"><i> . </span></span></p></div><div class="biblioentry" title="API Specifications, Java Platform"><a id="id601338"></a><p><span class="title"><em>
<a class="link" href="http://java.sun.com/reference/api/index.html" target="_top"> <a class="link" href="http://java.sun.com/reference/api/index.html" target="_top">
API Specifications, Java Platform API Specifications, Java Platform
</a> </a>
</i>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat, </em>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat,
java.util.Locale, java.util.ResourceBundle java.util.Locale, java.util.ResourceBundle
. </span></p></div><div class="biblioentry" title="GNU gettext tools, version 0.10.38, Native Language Support Library and Tools."><a name="id627286"></a><p><span class="title"><i> . </span></p></div><div class="biblioentry" title="GNU gettext tools, version 0.10.38, Native Language Support Library and Tools."><a id="id601357"></a><p><span class="title"><em>
<a class="link" href="http://www.gnu.org/software/gettext" target="_top"> <a class="link" href="http://www.gnu.org/software/gettext" target="_top">
GNU gettext tools, version 0.10.38, Native Language Support GNU gettext tools, version 0.10.38, Native Language Support
Library and Tools. Library and Tools.
</a> </a>
</i>. </span></p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="localization.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8.  </em>. </span></p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="localization.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="localization.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. 
Localization Localization
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9.   </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. 

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>File Based Streams</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>File Based Streams</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="io.html" title="Chapter 13.  Input and Output" /><link rel="prev" href="stringstreams.html" title="Memory Based Streams" /><link rel="next" href="io_and_c.html" title="Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">File Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="stringstreams.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="io.html" title="Chapter 13.  Input and Output"><link rel="prev" href="stringstreams.html" title="Memory Based Streams"><link rel="next" href="io_and_c.html" title="Interacting with C"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">File Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="stringstreams.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
Input and Output Input and Output
</th><td width="20%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr></table><hr></div><div class="section" title="File Based Streams"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.io.filestreams"></a>File Based Streams</h2></div></div></div><div class="section" title="Copying a File"><div class="titlepage"><div><div><h3 class="title"><a name="std.io.filestreams.copying_a_file"></a>Copying a File</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr></table><hr /></div><div class="section" title="File Based Streams"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.io.filestreams"></a>File Based Streams</h2></div></div></div><div class="section" title="Copying a File"><div class="titlepage"><div><div><h3 class="title"><a id="std.io.filestreams.copying_a_file"></a>Copying a File</h3></div></div></div><p>
</p><p>So you want to copy a file quickly and easily, and most important, </p><p>So you want to copy a file quickly and easily, and most important,
completely portably. And since this is C++, you have an open completely portably. And since this is C++, you have an open
ifstream (call it IN) and an open ofstream (call it OUT): ifstream (call it IN) and an open ofstream (call it OUT):
@ -57,7 +49,7 @@
The operators shown above are all defined in the parent The operators shown above are all defined in the parent
basic_ostream class and are therefore available with all possible basic_ostream class and are therefore available with all possible
descendants. descendants.
</p></div><div class="section" title="Binary Input and Output"><div class="titlepage"><div><div><h3 class="title"><a name="std.io.filestreams.binary"></a>Binary Input and Output</h3></div></div></div><p> </p></div><div class="section" title="Binary Input and Output"><div class="titlepage"><div><div><h3 class="title"><a id="std.io.filestreams.binary"></a>Binary Input and Output</h3></div></div></div><p>
</p><p>The first and most important thing to remember about binary I/O is </p><p>The first and most important thing to remember about binary I/O is
that opening a file with <code class="code">ios::binary</code> is not, repeat that opening a file with <code class="code">ios::binary</code> is not, repeat
<span class="emphasis"><em>not</em></span>, the only thing you have to do. It is not a silver <span class="emphasis"><em>not</em></span>, the only thing you have to do. It is not a silver
@ -155,4 +147,4 @@
between arbitrary programs, or across a network, or from one between arbitrary programs, or across a network, or from one
invocation of a program to another invocation of the same program invocation of a program to another invocation of the same program
on a different platform, etc. on a different platform, etc.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="stringstreams.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Memory Based Streams </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Interacting with C</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="stringstreams.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Memory Based Streams </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Interacting with C</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Generalized Operations</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Generalized Operations</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="numerics.html" title="Chapter 12.  Numerics" /><link rel="prev" href="numerics.html" title="Chapter 12.  Numerics" /><link rel="next" href="numerics_and_c.html" title="Interacting with C" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Generalized Operations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><th width="60%" align="center">Chapter 12. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="numerics.html" title="Chapter 12.  Numerics"><link rel="prev" href="numerics.html" title="Chapter 12.  Numerics"><link rel="next" href="numerics_and_c.html" title="Interacting with C"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Generalized Operations</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><th width="60%" align="center">Chapter 12. 
Numerics Numerics
</th><td width="20%" align="right"> <a accesskey="n" href="numerics_and_c.html">Next</a></td></tr></table><hr></div><div class="section" title="Generalized Operations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.numerics.generalized_ops"></a>Generalized Operations</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="numerics_and_c.html">Next</a></td></tr></table><hr /></div><div class="section" title="Generalized Operations"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.numerics.generalized_ops"></a>Generalized Operations</h2></div></div></div><p>
</p><p>There are four generalized functions in the &lt;numeric&gt; header </p><p>There are four generalized functions in the &lt;numeric&gt; header
that follow the same conventions as those in &lt;algorithm&gt;. Each that follow the same conventions as those in &lt;algorithm&gt;. Each
of them is overloaded: one signature for common default operations, of them is overloaded: one signature for common default operations,
@ -34,7 +26,7 @@
and multiplies all the members of the array; here we must obviously and multiplies all the members of the array; here we must obviously
use 1 as a starting value instead of 0. use 1 as a starting value instead of 0.
</p><p>The other three functions have similar dual-signature forms. </p><p>The other three functions have similar dual-signature forms.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="numerics_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 12.  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="numerics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="numerics_and_c.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 12. 
Numerics Numerics
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Interacting with C</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Interacting with C</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,21 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Porting to New Hardware or Operating Systems</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Porting to New Hardware or Operating Systems</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; internals&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="documentation_hacking.html" title="Writing and Generating Documentation" /><link rel="next" href="test.html" title="Test" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Porting to New Hardware or Operating Systems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="documentation_hacking.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
internals
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="prev" href="documentation_hacking.html" title="Writing and Generating Documentation"><link rel="next" href="test.html" title="Test"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Porting to New Hardware or Operating Systems</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="documentation_hacking.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr></div><div class="section" title="Porting to New Hardware or Operating Systems"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="appendix.porting.internals"></a>Porting to New Hardware or Operating Systems</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr /></div><div class="section" title="Porting to New Hardware or Operating Systems"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.internals"></a>Porting to New Hardware or Operating Systems</h2></div></div></div><p>
</p><p>This document explains how to port libstdc++ (the GNU C++ library) to </p><p>This document explains how to port libstdc++ (the GNU C++ library) to
a new target. a new target.
</p><p>In order to make the GNU C++ library (libstdc++) work with a new </p><p>In order to make the GNU C++ library (libstdc++) work with a new
@ -32,7 +20,7 @@ works. It is difficult to test the C++ compiler without a working
library, but you should at least try some minimal test cases. library, but you should at least try some minimal test cases.
</p><p>(Note that what we think of as a "target," the library refers to as </p><p>(Note that what we think of as a "target," the library refers to as
a "host." The comment at the top of <code class="code">configure.ac</code> explains why.) a "host." The comment at the top of <code class="code">configure.ac</code> explains why.)
</p><div class="section" title="Operating System"><div class="titlepage"><div><div><h3 class="title"><a name="internals.os"></a>Operating System</h3></div></div></div><p>If you are porting to a new operating system (as opposed to a new chip </p><div class="section" title="Operating System"><div class="titlepage"><div><div><h3 class="title"><a id="internals.os"></a>Operating System</h3></div></div></div><p>If you are porting to a new operating system (as opposed to a new chip
using an existing operating system), you will need to create a new using an existing operating system), you will need to create a new
directory in the <code class="code">config/os</code> hierarchy. For example, the IRIX directory in the <code class="code">config/os</code> hierarchy. For example, the IRIX
configuration files are all in <code class="code">config/os/irix</code>. There is no set configuration files are all in <code class="code">config/os/irix</code>. There is no set
@ -111,7 +99,7 @@ this:
#endif #endif
</pre><p>We recommend copying an existing <code class="code">os_defines.h</code> to use as a </pre><p>We recommend copying an existing <code class="code">os_defines.h</code> to use as a
starting point. starting point.
</p></div><div class="section" title="CPU"><div class="titlepage"><div><div><h3 class="title"><a name="internals.cpu"></a>CPU</h3></div></div></div><p>If you are porting to a new chip (as opposed to a new operating system </p></div><div class="section" title="CPU"><div class="titlepage"><div><div><h3 class="title"><a id="internals.cpu"></a>CPU</h3></div></div></div><p>If you are porting to a new chip (as opposed to a new operating system
running on an existing chip), you will need to create a new directory in the running on an existing chip), you will need to create a new directory in the
<code class="code">config/cpu</code> hierarchy. Much like the <a class="link" href="internals.html#internals.os" title="Operating System">Operating system</a> setup, <code class="code">config/cpu</code> hierarchy. Much like the <a class="link" href="internals.html#internals.os" title="Operating System">Operating system</a> setup,
there are no strict rules on how to organize the CPU configuration there are no strict rules on how to organize the CPU configuration
@ -129,7 +117,7 @@ example, <code class="code">alpha</code>, <code class="code">alphaev5</code>, an
</p><p>The <code class="code">cpu_include_dir</code> sets default locations for the files controlling </p><p>The <code class="code">cpu_include_dir</code> sets default locations for the files controlling
<a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">Thread safety</a> and <a class="link" href="internals.html#internals.numeric_limits" title="Numeric Limits">Numeric limits</a>, if the defaults are not <a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">Thread safety</a> and <a class="link" href="internals.html#internals.numeric_limits" title="Numeric Limits">Numeric limits</a>, if the defaults are not
appropriate for your chip. appropriate for your chip.
</p></div><div class="section" title="Character Types"><div class="titlepage"><div><div><h3 class="title"><a name="internals.char_types"></a>Character Types</h3></div></div></div><p>The library requires that you provide three header files to implement </p></div><div class="section" title="Character Types"><div class="titlepage"><div><div><h3 class="title"><a id="internals.char_types"></a>Character Types</h3></div></div></div><p>The library requires that you provide three header files to implement
character classification, analogous to that provided by the C libraries character classification, analogous to that provided by the C libraries
<code class="code">&lt;ctype.h&gt;</code> header. You can model these on the files provided in <code class="code">&lt;ctype.h&gt;</code> header. You can model these on the files provided in
<code class="code">config/os/generic</code>. However, these files will almost <code class="code">config/os/generic</code>. However, these files will almost
@ -288,7 +276,7 @@ from <code class="code">__low</code> up until <code class="code">__high</code> i
++__low; ++__low;
return __low; return __low;
} }
</pre></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h3 class="title"><a name="internals.thread_safety"></a>Thread Safety</h3></div></div></div><p>The C++ library string functionality requires a couple of atomic </pre></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h3 class="title"><a id="internals.thread_safety"></a>Thread Safety</h3></div></div></div><p>The C++ library string functionality requires a couple of atomic
operations to provide thread-safety. If you don't take any special operations to provide thread-safety. If you don't take any special
action, the library will use stub versions of these functions that are action, the library will use stub versions of these functions that are
not thread-safe. They will work fine, unless your applications are not thread-safe. They will work fine, unless your applications are
@ -343,7 +331,7 @@ must be equivalent to those provided here, but using atomic operations:
{ {
*__mem += __val; *__mem += __val;
} }
</pre></div><div class="section" title="Numeric Limits"><div class="titlepage"><div><div><h3 class="title"><a name="internals.numeric_limits"></a>Numeric Limits</h3></div></div></div><p>The C++ library requires information about the fundamental data types, </pre></div><div class="section" title="Numeric Limits"><div class="titlepage"><div><div><h3 class="title"><a id="internals.numeric_limits"></a>Numeric Limits</h3></div></div></div><p>The C++ library requires information about the fundamental data types,
such as the minimum and maximum representable values of each type. such as the minimum and maximum representable values of each type.
You can define each of these values individually, but it is usually You can define each of these values individually, but it is usually
easiest just to indicate how many bits are used in each of the data easiest just to indicate how many bits are used in each of the data
@ -355,7 +343,7 @@ same values, you can provide a CPU-specific file instead so that you
do not have to provide the same definitions for each operating system. do not have to provide the same definitions for each operating system.
To take that approach, create a new file called <code class="code">cpu_limits.h</code> in To take that approach, create a new file called <code class="code">cpu_limits.h</code> in
your CPU configuration directory (see <a class="link" href="internals.html#internals.cpu" title="CPU">CPU</a>). your CPU configuration directory (see <a class="link" href="internals.html#internals.cpu" title="CPU">CPU</a>).
</p></div><div class="section" title="Libtool"><div class="titlepage"><div><div><h3 class="title"><a name="internals.libtool"></a>Libtool</h3></div></div></div><p>The C++ library is compiled, archived and linked with libtool. </p></div><div class="section" title="Libtool"><div class="titlepage"><div><div><h3 class="title"><a id="internals.libtool"></a>Libtool</h3></div></div></div><p>The C++ library is compiled, archived and linked with libtool.
Explaining the full workings of libtool is beyond the scope of this Explaining the full workings of libtool is beyond the scope of this
document, but there are a few, particular bits that are necessary for document, but there are a few, particular bits that are necessary for
porting. porting.
@ -377,4 +365,4 @@ do this is to build the library using <code class="code">gcc -shared</code>.
<code class="code">ltcf-c.sh</code> in the top-level directory. Find the switch statement <code class="code">ltcf-c.sh</code> in the top-level directory. Find the switch statement
that sets <code class="code">archive_cmds</code>. Here, adjust the setting for your that sets <code class="code">archive_cmds</code>. Here, adjust the setting for your
operating system. operating system.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="documentation_hacking.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Writing and Generating Documentation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Test</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="documentation_hacking.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Writing and Generating Documentation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Test</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 13.  Input and Output</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 13.  Input and Output</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="numerics_and_c.html" title="Interacting with C" /><link rel="next" href="streambufs.html" title="Stream Buffers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 13. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="numerics_and_c.html" title="Interacting with C"><link rel="next" href="streambufs.html" title="Stream Buffers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 13. 
Input and Output Input and Output
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics_and_c.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="numerics_and_c.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="streambufs.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 13.  Input and Output"><div class="titlepage"><div><div><h2 class="title"><a name="std.io"></a>Chapter 13.  </th><td width="20%" align="right"> <a accesskey="n" href="streambufs.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 13.  Input and Output"><div class="titlepage"><div><div><h2 class="title"><a id="std.io"></a>Chapter 13. 
Input and Output Input and Output
<a class="indexterm" name="id629077"></a> <a id="id603149" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="io.html#std.io.objects">Iostream Objects</a></span></dt><dt><span class="section"><a href="streambufs.html">Stream Buffers</a></span></dt><dd><dl><dt><span class="section"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="section"><a href="streambufs.html#io.streambuf.buffering">Buffering</a></span></dt></dl></dd><dt><span class="section"><a href="stringstreams.html">Memory Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="stringstreams.html#std.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="section"><a href="fstreams.html">File Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="fstreams.html#std.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="section"><a href="fstreams.html#std.io.filestreams.binary">Binary Input and Output</a></span></dt></dl></dd><dt><span class="section"><a href="io_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="io_and_c.html#std.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="section"><a href="io_and_c.html#std.io.c.sync">Performance</a></span></dt></dl></dd></dl></div><div class="section" title="Iostream Objects"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.io.objects"></a>Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="io.html#std.io.objects">Iostream Objects</a></span></dt><dt><span class="section"><a href="streambufs.html">Stream Buffers</a></span></dt><dd><dl><dt><span class="section"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="section"><a href="streambufs.html#io.streambuf.buffering">Buffering</a></span></dt></dl></dd><dt><span class="section"><a href="stringstreams.html">Memory Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="stringstreams.html#std.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="section"><a href="fstreams.html">File Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="fstreams.html#std.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="section"><a href="fstreams.html#std.io.filestreams.binary">Binary Input and Output</a></span></dt></dl></dd><dt><span class="section"><a href="io_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="io_and_c.html#std.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="section"><a href="io_and_c.html#std.io.c.sync">Performance</a></span></dt></dl></dd></dl></div><div class="section" title="Iostream Objects"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.io.objects"></a>Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to
only include the headers you really need. Many people simply include only include the headers you really need. Many people simply include
&lt;iostream&gt; when they don't need to -- and that can <span class="emphasis"><em>penalize &lt;iostream&gt; when they don't need to -- and that can <span class="emphasis"><em>penalize
your runtime as well.</em></span> Here are some tips on which header to use your runtime as well.</em></span> Here are some tips on which header to use
@ -126,4 +118,4 @@
the standard objects in that source file; you'll pay less startup the standard objects in that source file; you'll pay less startup
time. Only include the header files you need to in general; your time. Only include the header files you need to in general; your
compile times will go down when there's less parsing work to do. compile times will go down when there's less parsing work to do.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="numerics_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="streambufs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Stream Buffers</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="numerics_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="streambufs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Stream Buffers</td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Interacting with C</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Interacting with C</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="io.html" title="Chapter 13.  Input and Output" /><link rel="prev" href="fstreams.html" title="File Based Streams" /><link rel="next" href="atomics.html" title="Chapter 14.  Atomics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="fstreams.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="io.html" title="Chapter 13.  Input and Output"><link rel="prev" href="fstreams.html" title="File Based Streams"><link rel="next" href="atomics.html" title="Chapter 14.  Atomics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="fstreams.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
Input and Output Input and Output
</th><td width="20%" align="right"> <a accesskey="n" href="atomics.html">Next</a></td></tr></table><hr></div><div class="section" title="Interacting with C"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.io.c"></a>Interacting with C</h2></div></div></div><div class="section" title="Using FILE* and file descriptors"><div class="titlepage"><div><div><h3 class="title"><a name="std.io.c.FILE"></a>Using FILE* and file descriptors</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="atomics.html">Next</a></td></tr></table><hr /></div><div class="section" title="Interacting with C"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.io.c"></a>Interacting with C</h2></div></div></div><div class="section" title="Using FILE* and file descriptors"><div class="titlepage"><div><div><h3 class="title"><a id="std.io.c.FILE"></a>Using FILE* and file descriptors</h3></div></div></div><p>
See the <a class="link" href="ext_io.html" title="Chapter 28. Input and Output">extensions</a> for using See the <a class="link" href="ext_io.html" title="Chapter 28. Input and Output">extensions</a> for using
<span class="type">FILE</span> and <span class="type">file descriptors</span> with <span class="type">FILE</span> and <span class="type">file descriptors</span> with
<code class="classname">ofstream</code> and <code class="classname">ofstream</code> and
<code class="classname">ifstream</code>. <code class="classname">ifstream</code>.
</p></div><div class="section" title="Performance"><div class="titlepage"><div><div><h3 class="title"><a name="std.io.c.sync"></a>Performance</h3></div></div></div><p> </p></div><div class="section" title="Performance"><div class="titlepage"><div><div><h3 class="title"><a id="std.io.c.sync"></a>Performance</h3></div></div></div><p>
Pathetic Performance? Ditch C. Pathetic Performance? Ditch C.
</p><p>It sounds like a flame on C, but it isn't. Really. Calm down. </p><p>It sounds like a flame on C, but it isn't. Really. Calm down.
I'm just saying it to get your attention. I'm just saying it to get your attention.
@ -59,7 +51,7 @@
<code class="code">clog</code>, and their wide-character counterchapters). File stream <code class="code">clog</code>, and their wide-character counterchapters). File stream
objects that you declare yourself have no such requirement and are fully objects that you declare yourself have no such requirement and are fully
buffered. buffered.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="fstreams.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="atomics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">File Based Streams </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="fstreams.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="atomics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">File Based Streams </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. 
Atomics Atomics
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 10.  Iterators</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 10.  Iterators</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="containers_and_c.html" title="Interacting with C" /><link rel="next" href="algorithms.html" title="Chapter 11.  Algorithms" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="containers_and_c.html" title="Interacting with C"><link rel="next" href="algorithms.html" title="Chapter 11.  Algorithms"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 10. 
Iterators Iterators
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers_and_c.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="containers_and_c.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 10.  Iterators"><div class="titlepage"><div><div><h2 class="title"><a name="std.iterators"></a>Chapter 10.  </th><td width="20%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 10.  Iterators"><div class="titlepage"><div><div><h2 class="title"><a id="std.iterators"></a>Chapter 10. 
Iterators Iterators
<a class="indexterm" name="id628227"></a> <a id="id602298" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></div><div class="section" title="Predefined"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.iterators.predefined"></a>Predefined</h2></div></div></div><div class="section" title="Iterators vs. Pointers"><div class="titlepage"><div><div><h3 class="title"><a name="iterators.predefined.vs_pointers"></a>Iterators vs. Pointers</h3></div></div></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></div><div class="section" title="Predefined"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.iterators.predefined"></a>Predefined</h2></div></div></div><div class="section" title="Iterators vs. Pointers"><div class="titlepage"><div><div><h3 class="title"><a id="iterators.predefined.vs_pointers"></a>Iterators vs. Pointers</h3></div></div></div><p>
The following The following
FAQ <a class="link" href="../faq.html#faq.iterator_as_pod" title="7.1.">entry</a> points out that FAQ <a class="link" href="../faq.html#faq.iterator_as_pod" title="7.1.">entry</a> points out that
iterators are not implemented as pointers. They are a generalization iterators are not implemented as pointers. They are a generalization
@ -52,7 +44,7 @@ classes.
down through inheritance, so while the compiler has to do work down through inheritance, so while the compiler has to do work
looking up all the names, your runtime code does not. (This has looking up all the names, your runtime code does not. (This has
been a prime concern from the beginning.) been a prime concern from the beginning.)
</p></div><div class="section" title="One Past the End"><div class="titlepage"><div><div><h3 class="title"><a name="iterators.predefined.end"></a>One Past the End</h3></div></div></div><p>This starts off sounding complicated, but is actually very easy, </p></div><div class="section" title="One Past the End"><div class="titlepage"><div><div><h3 class="title"><a id="iterators.predefined.end"></a>One Past the End</h3></div></div></div><p>This starts off sounding complicated, but is actually very easy,
especially towards the end. Trust me. especially towards the end. Trust me.
</p><p>Beginners usually have a little trouble understand the whole </p><p>Beginners usually have a little trouble understand the whole
'past-the-end' thing, until they remember their early algebra classes 'past-the-end' thing, until they remember their early algebra classes
@ -132,7 +124,7 @@ classes.
sequences very simple to recognize: if the two endpoints compare sequences very simple to recognize: if the two endpoints compare
equal, then the {array, sequence, container, whatever} is empty. equal, then the {array, sequence, container, whatever} is empty.
</p><p>Just don't dereference <code class="code">end()</code>. </p><p>Just don't dereference <code class="code">end()</code>.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="containers_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 11.  </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="containers_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 11. 
Algorithms Algorithms
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,101 +1,93 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>License</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>License</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="status.html" title="Chapter 1. Status" /><link rel="prev" href="status.html" title="Chapter 1. Status" /><link rel="next" href="bugs.html" title="Bugs" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="status.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bugs.html">Next</a></td></tr></table><hr /></div><div class="section" title="License"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.status.license"></a>License</h2></div></div></div><p>
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="status.html" title="Chapter 1. Status"><link rel="prev" href="status.html" title="Chapter 1. Status"><link rel="next" href="bugs.html" title="Bugs"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">License</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="status.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Status</th><td width="20%" align="right"> <a accesskey="n" href="bugs.html">Next</a></td></tr></table><hr></div><div class="section" title="License"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.status.license"></a>License</h2></div></div></div><p>
There are two licenses affecting GNU libstdc++: one for the code, There are two licenses affecting GNU libstdc++: one for the code,
and one for the documentation. and one for the documentation.
</p><p> </p><p>
There is a license section in the FAQ regarding common <a class="link" href="../faq.html#faq.license">questions</a>. If you have more There is a license section in the FAQ regarding common <a class="link" href="../faq.html#faq.license">questions</a>. If you have more
questions, ask the FSF or the <a class="link" href="http://gcc.gnu.org/lists.html" target="_top">gcc mailing list</a>. questions, ask the FSF or the <a class="link" href="http://gcc.gnu.org/lists.html" target="_top">gcc mailing list</a>.
</p><div class="section" title="The Code: GPL"><div class="titlepage"><div><div><h3 class="title"><a name="manual.intro.status.license.gpl"></a>The Code: GPL</h3></div></div></div><p> </p><div class="section" title="The Code: GPL"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.license.gpl"></a>The Code: GPL</h3></div></div></div><p>
The source code is distributed under the <a class="link" href="appendix_gpl.html" title="Appendix D.  GNU General Public License version 3">GNU General Public License version 3</a>, The source code is distributed under the <a class="link" href="appendix_gpl.html" title="Appendix D.  GNU General Public License version 3">GNU General Public License version 3</a>,
with the addition under section 7 of an exception described in with the addition under section 7 of an exception described in
the <span class="quote"><span class="quote">GCC Runtime Library Exception, version 3.1</span></span> the <span class="quote"><span class="quote">GCC Runtime Library Exception, version 3.1</span></span>
as follows (or see the file COPYING.RUNTIME): as follows (or see the file COPYING.RUNTIME):
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
GCC RUNTIME LIBRARY EXCEPTION<br> GCC RUNTIME LIBRARY EXCEPTION<br />
<br> <br />
Version 3.1, 31 March 2009<br> Version 3.1, 31 March 2009<br />
<br> <br />
Copyright (C) 2009 <a class="link" href="http://www.fsf.org" target="_top">Free Software Foundation, Inc.</a><br> Copyright (C) 2009 <a class="link" href="http://www.fsf.org" target="_top">Free Software Foundation, Inc.</a><br />
<br> <br />
Everyone is permitted to copy and distribute verbatim copies of this<br> Everyone is permitted to copy and distribute verbatim copies of this<br />
license document, but changing it is not allowed.<br> license document, but changing it is not allowed.<br />
<br> <br />
This GCC Runtime Library Exception ("Exception") is an additional<br> This GCC Runtime Library Exception ("Exception") is an additional<br />
permission under section 7 of the GNU General Public License, version<br> permission under section 7 of the GNU General Public License, version<br />
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that<br> 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that<br />
bears a notice placed by the copyright holder of the file stating that<br> bears a notice placed by the copyright holder of the file stating that<br />
the file is governed by GPLv3 along with this Exception.<br> the file is governed by GPLv3 along with this Exception.<br />
<br> <br />
When you use GCC to compile a program, GCC may combine portions of<br> When you use GCC to compile a program, GCC may combine portions of<br />
certain GCC header files and runtime libraries with the compiled<br> certain GCC header files and runtime libraries with the compiled<br />
program. The purpose of this Exception is to allow compilation of<br> program. The purpose of this Exception is to allow compilation of<br />
non-GPL (including proprietary) programs to use, in this way, the<br> non-GPL (including proprietary) programs to use, in this way, the<br />
header files and runtime libraries covered by this Exception.<br> header files and runtime libraries covered by this Exception.<br />
<br> <br />
0. Definitions.<br> 0. Definitions.<br />
<br> <br />
A file is an "Independent Module" if it either requires the Runtime<br> A file is an "Independent Module" if it either requires the Runtime<br />
Library for execution after a Compilation Process, or makes use of an<br> Library for execution after a Compilation Process, or makes use of an<br />
interface provided by the Runtime Library, but is not otherwise based<br> interface provided by the Runtime Library, but is not otherwise based<br />
on the Runtime Library.<br> on the Runtime Library.<br />
<br> <br />
"GCC" means a version of the GNU Compiler Collection, with or without<br> "GCC" means a version of the GNU Compiler Collection, with or without<br />
modifications, governed by version 3 (or a specified later version) of<br> modifications, governed by version 3 (or a specified later version) of<br />
the GNU General Public License (GPL) with the option of using any<br> the GNU General Public License (GPL) with the option of using any<br />
subsequent versions published by the FSF.<br> subsequent versions published by the FSF.<br />
<br> <br />
"GPL-compatible Software" is software whose conditions of propagation,<br> "GPL-compatible Software" is software whose conditions of propagation,<br />
modification and use would permit combination with GCC in accord with<br> modification and use would permit combination with GCC in accord with<br />
the license of GCC.<br> the license of GCC.<br />
<br> <br />
"Target Code" refers to output from any compiler for a real or virtual<br> "Target Code" refers to output from any compiler for a real or virtual<br />
target processor architecture, in executable form or suitable for<br> target processor architecture, in executable form or suitable for<br />
input to an assembler, loader, linker and/or execution<br> input to an assembler, loader, linker and/or execution<br />
phase. Notwithstanding that, Target Code does not include data in any<br> phase. Notwithstanding that, Target Code does not include data in any<br />
format that is used as a compiler intermediate representation, or used<br> format that is used as a compiler intermediate representation, or used<br />
for producing a compiler intermediate representation.<br> for producing a compiler intermediate representation.<br />
<br> <br />
The "Compilation Process" transforms code entirely represented in<br> The "Compilation Process" transforms code entirely represented in<br />
non-intermediate languages designed for human-written code, and/or in<br> non-intermediate languages designed for human-written code, and/or in<br />
Java Virtual Machine byte code, into Target Code. Thus, for example,<br> Java Virtual Machine byte code, into Target Code. Thus, for example,<br />
use of source code generators and preprocessors need not be considered<br> use of source code generators and preprocessors need not be considered<br />
part of the Compilation Process, since the Compilation Process can be<br> part of the Compilation Process, since the Compilation Process can be<br />
understood as starting with the output of the generators or<br> understood as starting with the output of the generators or<br />
preprocessors.<br> preprocessors.<br />
<br> <br />
A Compilation Process is "Eligible" if it is done using GCC, alone or<br> A Compilation Process is "Eligible" if it is done using GCC, alone or<br />
with other GPL-compatible software, or if it is done without using any<br> with other GPL-compatible software, or if it is done without using any<br />
work based on GCC. For example, using non-GPL-compatible Software to<br> work based on GCC. For example, using non-GPL-compatible Software to<br />
optimize any GCC intermediate representations would not qualify as an<br> optimize any GCC intermediate representations would not qualify as an<br />
Eligible Compilation Process.<br> Eligible Compilation Process.<br />
<br> <br />
1. Grant of Additional Permission.<br> 1. Grant of Additional Permission.<br />
<br> <br />
You have permission to propagate a work of Target Code formed by<br> You have permission to propagate a work of Target Code formed by<br />
combining the Runtime Library with Independent Modules, even if such<br> combining the Runtime Library with Independent Modules, even if such<br />
propagation would otherwise violate the terms of GPLv3, provided that<br> propagation would otherwise violate the terms of GPLv3, provided that<br />
all Target Code was generated by Eligible Compilation Processes. You<br> all Target Code was generated by Eligible Compilation Processes. You<br />
may then convey such a combination under terms of your choice,<br> may then convey such a combination under terms of your choice,<br />
consistent with the licensing of the Independent Modules.<br> consistent with the licensing of the Independent Modules.<br />
<br> <br />
2. No Weakening of GCC Copyleft.<br> 2. No Weakening of GCC Copyleft.<br />
<br> <br />
The availability of this Exception does not imply any general<br> The availability of this Exception does not imply any general<br />
presumption that third-party software is unaffected by the copyleft<br> presumption that third-party software is unaffected by the copyleft<br />
requirements of the license of GCC.<br> requirements of the license of GCC.<br />
    </p></div><p>     </p></div><p>
Hopefully that text is self-explanatory. If it isn't, you need to speak Hopefully that text is self-explanatory. If it isn't, you need to speak
to your lawyer, or the Free Software Foundation. to your lawyer, or the Free Software Foundation.
</p></div><div class="section" title="The Documentation: GPL, FDL"><div class="titlepage"><div><div><h3 class="title"><a name="manual.intro.status.license.fdl"></a>The Documentation: GPL, FDL</h3></div></div></div><p> </p></div><div class="section" title="The Documentation: GPL, FDL"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.status.license.fdl"></a>The Documentation: GPL, FDL</h3></div></div></div><p>
The documentation shipped with the library and made available over The documentation shipped with the library and made available over
the web, excluding the pages generated from source comments, are the web, excluding the pages generated from source comments, are
copyrighted by the Free Software Foundation, and placed under the copyrighted by the Free Software Foundation, and placed under the
@ -110,4 +102,4 @@ requirements of the license of GCC.<br>
</p><p> </p><p>
If you plan on making copies of the documentation, please let us know. If you plan on making copies of the documentation, please let us know.
We can probably offer suggestions. We can probably offer suggestions.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="status.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="status.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bugs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Status </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Bugs</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="status.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="status.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bugs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Status </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Bugs</td></tr></table></div></body></html>

View File

@ -1,26 +1,18 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 8.  Localization</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 8.  Localization</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="strings.html" title="Chapter 7.  Strings" /><link rel="next" href="facets.html" title="Facets" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="strings.html" title="Chapter 7.  Strings"><link rel="next" href="facets.html" title="Facets"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. 
Localization Localization
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="facets.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 8.  Localization"><div class="titlepage"><div><div><h2 class="title"><a name="std.localization"></a>Chapter 8.  </th><td width="20%" align="right"> <a accesskey="n" href="facets.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 8.  Localization"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization"></a>Chapter 8. 
Localization Localization
<a class="indexterm" name="id624511"></a> <a id="id598583" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id625164">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div><div class="section" title="Locales"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.localization.locales"></a>Locales</h2></div></div></div><div class="section" title="locale"><div class="titlepage"><div><div><h3 class="title"><a name="std.localization.locales.locale"></a>locale</h3></div></div></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locales.locale.req">Requirements</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.design">Design</a></span></dt><dt><span class="section"><a href="localization.html#locales.locale.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#locale.impl.c">Interacting with "C" locales</a></span></dt></dl></dd><dt><span class="section"><a href="localization.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#id599235">Specializations</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#codecvt.design.wchar_t_size"><span class="type">wchar_t</span> Size</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.unicode">Support for Unicode</a></span></dt><dt><span class="section"><a href="facets.html#codecvt.design.issues">Other Issues</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#facet.messages.req">Requirements</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.design">Design</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.impl">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#messages.impl.models">Models</a></span></dt><dt><span class="section"><a href="facets.html#messages.impl.gnu">The GNU Model</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html#facet.messages.use">Use</a></span></dt><dt><span class="section"><a href="facets.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></dd></dl></div><div class="section" title="Locales"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.localization.locales"></a>Locales</h2></div></div></div><div class="section" title="locale"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.locales.locale"></a>locale</h3></div></div></div><p>
Describes the basic locale object, including nested Describes the basic locale object, including nested
classes id, facet, and the reference-counted implementation object, classes id, facet, and the reference-counted implementation object,
class _Impl. class _Impl.
</p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a name="locales.locale.req"></a>Requirements</h4></div></div></div><p> </p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.req"></a>Requirements</h4></div></div></div><p>
Class locale is non-templatized and has two distinct types nested Class locale is non-templatized and has two distinct types nested
inside of it: inside of it:
</p><div class="blockquote"><blockquote class="blockquote"><p> </p><div class="blockquote"><blockquote class="blockquote"><p>
@ -56,14 +48,14 @@ class id
</em></span> </em></span>
</p></blockquote></div><p> </p></blockquote></div><p>
Provides an index for looking up specific facets. Provides an index for looking up specific facets.
</p></div><div class="section" title="Design"><div class="titlepage"><div><div><h4 class="title"><a name="locales.locale.design"></a>Design</h4></div></div></div><p> </p></div><div class="section" title="Design"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.design"></a>Design</h4></div></div></div><p>
The major design challenge is fitting an object-orientated and The major design challenge is fitting an object-orientated and
non-global locale design on top of POSIX and other relevant standards, non-global locale design on top of POSIX and other relevant standards,
which include the Single Unix (nee X/Open.) which include the Single Unix (nee X/Open.)
</p><p> </p><p>
Because C and earlier versions of POSIX fall down so completely, Because C and earlier versions of POSIX fall down so completely,
portability is an issue. portability is an issue.
</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a name="locales.locale.impl"></a>Implementation</h4></div></div></div><div class="section" title='Interacting with "C" locales'><div class="titlepage"><div><div><h5 class="title"><a name="locale.impl.c"></a>Interacting with "C" locales</h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.impl"></a>Implementation</h4></div></div></div><div class="section" title="Interacting with &quot;C&quot; locales"><div class="titlepage"><div><div><h5 class="title"><a id="locale.impl.c"></a>Interacting with "C" locales</h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="code">`locale -a`</code> displays available locales. <code class="code">`locale -a`</code> displays available locales.
</p><div class="blockquote"><blockquote class="blockquote"><pre class="programlisting"> </p><div class="blockquote"><blockquote class="blockquote"><pre class="programlisting">
af_ZA af_ZA
@ -393,7 +385,7 @@ global locale" (emphasis Paolo), that is:
particular on the working of locale(""), which constructs the locale particular on the working of locale(""), which constructs the locale
object from the environment of the running program, that is, in object from the environment of the running program, that is, in
practice, the set of LC_ALL, LANG, etc. variable of the shell. practice, the set of LC_ALL, LANG, etc. variable of the shell.
</p></div></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a name="locales.locale.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></div></div><div class="section" title="Future"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.future"></a>Future</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Locale initialization: at what point does _S_classic, _S_global Locale initialization: at what point does _S_classic, _S_global
get initialized? Can named locales assume this initialization get initialized? Can named locales assume this initialization
has already taken place? has already taken place?
@ -411,35 +403,35 @@ global locale" (emphasis Paolo), that is:
What should non-required facet instantiations do? If the What should non-required facet instantiations do? If the
generic implementation is provided, then how to end-users generic implementation is provided, then how to end-users
provide specializations? provide specializations?
</p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a name="locales.locale.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a name="id624874"></a><p><span class="citetitle"><em class="citetitle"> </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id598946"></a><p><span class="citetitle"><em class="citetitle">
The GNU C Library The GNU C Library
</em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums"> </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">
Chapters 6 Character Set Handling and 7 Locales and Chapters 6 Character Set Handling and 7 Locales and
Internationalization Internationalization
. </span></p></div><div class="biblioentry"><a name="id624914"></a><p><span class="citetitle"><em class="citetitle"> . </span></p></div><div class="biblioentry"><a id="id598985"></a><p><span class="citetitle"><em class="citetitle">
Correspondence Correspondence
</em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a name="id624939"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id599011"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 14882:1998 Programming languages - C++ ISO/IEC 14882:1998 Programming languages - C++
</em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a name="id624958"></a><p><span class="citetitle"><em class="citetitle"> </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id599030"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 9899:1999 Programming languages - C ISO/IEC 9899:1999 Programming languages - C
</em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a name="id624977"></a><p><span class="title"><i> </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry" title="System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)"><a id="id599049"></a><p><span class="title"><em>
<a class="link" href="http://www.opengroup.org/austin/" target="_top"> <a class="link" href="http://www.opengroup.org/austin/" target="_top">
System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)
</a> </a>
</i>. </span><span class="copyright">Copyright © 2008 </em>. </span><span class="copyright">Copyright © 2008
The Open Group/The Institute of Electrical and Electronics The Open Group/The Institute of Electrical and Electronics
Engineers, Inc. Engineers, Inc.
. </span></p></div><div class="biblioentry"><a name="id625004"></a><p><span class="citetitle"><em class="citetitle"> . </span></p></div><div class="biblioentry"><a id="id599076"></a><p><span class="citetitle"><em class="citetitle">
The C++ Programming Language, Special Edition The C++ Programming Language, Special Edition
</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername">
Addison Wesley Addison Wesley
. </span></span></p></div><div class="biblioentry"><a name="id625043"></a><p><span class="citetitle"><em class="citetitle"> . </span></span></p></div><div class="biblioentry"><a id="id599115"></a><p><span class="citetitle"><em class="citetitle">
Standard C++ IOStreams and Locales Standard C++ IOStreams and Locales
</em>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
Advanced Programmer's Guide and Reference Advanced Programmer's Guide and Reference
. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername">
Addison Wesley Longman Addison Wesley Longman
. </span></span></p></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="facets.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7.  . </span></span></p></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="strings.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="facets.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. 
Strings Strings
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Facets</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Facets</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Make</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Make</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="setup.html" title="Chapter 2. Setup" /><link rel="prev" href="configure.html" title="Configure" /><link rel="next" href="using.html" title="Chapter 3. Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Make</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr></table><hr /></div><div class="section" title="Make"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.make"></a>Make</h2></div></div></div><p>If you have never done this before, you should read the basic
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="setup.html" title="Chapter 2. Setup"><link rel="prev" href="configure.html" title="Configure"><link rel="next" href="using.html" title="Chapter 3. Using"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Make</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Setup</th><td width="20%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr></table><hr></div><div class="section" title="Make"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.setup.make"></a>Make</h2></div></div></div><p>If you have never done this before, you should read the basic
<a class="link" href="http://gcc.gnu.org/install/" target="_top">GCC Installation <a class="link" href="http://gcc.gnu.org/install/" target="_top">GCC Installation
Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>. Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>.
<span class="emphasis"><em>Twice.</em></span> <span class="emphasis"><em>Twice.</em></span>
</p><p>Then type: <span class="command"><strong>make</strong></span>, and congratulations, you've </p><p>Then type: <span class="command"><strong>make</strong></span>, and congratulations, you've
started to build. started to build.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Configure </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html> </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="configure.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="setup.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Configure </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html>

View File

@ -1,23 +1,15 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Memory</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Memory</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="utilities.html" title="Chapter 6.  Utilities" /><link rel="prev" href="pairs.html" title="Pairs" /><link rel="next" href="traits.html" title="Traits" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pairs.html">Prev</a> </td><th width="60%" align="center">Chapter 6. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="utilities.html" title="Chapter 6.  Utilities"><link rel="prev" href="pairs.html" title="Pairs"><link rel="next" href="traits.html" title="Traits"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Memory</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pairs.html">Prev</a> </td><th width="60%" align="center">Chapter 6. 
Utilities Utilities
</th><td width="20%" align="right"> <a accesskey="n" href="traits.html">Next</a></td></tr></table><hr></div><div class="section" title="Memory"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.util.memory"></a>Memory</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="traits.html">Next</a></td></tr></table><hr /></div><div class="section" title="Memory"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.util.memory"></a>Memory</h2></div></div></div><p>
Memory contains three general areas. First, function and operator Memory contains three general areas. First, function and operator
calls via <code class="function">new</code> and <code class="function">delete</code> calls via <code class="function">new</code> and <code class="function">delete</code>
operator or member function calls. Second, allocation via operator or member function calls. Second, allocation via
<code class="classname">allocator</code>. And finally, smart pointer and <code class="classname">allocator</code>. And finally, smart pointer and
intelligent pointer abstractions. intelligent pointer abstractions.
</p><div class="section" title="Allocators"><div class="titlepage"><div><div><h3 class="title"><a name="std.util.memory.allocator"></a>Allocators</h3></div></div></div><p> </p><div class="section" title="Allocators"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.allocator"></a>Allocators</h3></div></div></div><p>
Memory management for Standard Library entities is encapsulated in a Memory management for Standard Library entities is encapsulated in a
class template called <code class="classname">allocator</code>. The class template called <code class="classname">allocator</code>. The
<code class="classname">allocator</code> abstraction is used throughout the <code class="classname">allocator</code> abstraction is used throughout the
@ -25,7 +17,7 @@
algorithms, and parts of iostreams. This class, and base classes of algorithms, and parts of iostreams. This class, and base classes of
it, are the superset of available free store (<span class="quote"><span class="quote">heap</span></span>) it, are the superset of available free store (<span class="quote"><span class="quote">heap</span></span>)
management classes. management classes.
</p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.req"></a>Requirements</h4></div></div></div><p> </p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.req"></a>Requirements</h4></div></div></div><p>
The C++ standard only gives a few directives in this area: The C++ standard only gives a few directives in this area:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
When you add elements to a container, and the container must When you add elements to a container, and the container must
@ -62,7 +54,7 @@
</p></li></ul></div><p> </p></li></ul></div><p>
Complete details can be found in the C++ standard, look in Complete details can be found in the C++ standard, look in
<code class="constant">[20.4 Memory]</code>. <code class="constant">[20.4 Memory]</code>.
</p></div><div class="section" title="Design Issues"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.design_issues"></a>Design Issues</h4></div></div></div><p> </p></div><div class="section" title="Design Issues"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.design_issues"></a>Design Issues</h4></div></div></div><p>
The easiest way of fulfilling the requirements is to call The easiest way of fulfilling the requirements is to call
<code class="function">operator new</code> each time a container needs <code class="function">operator new</code> each time a container needs
memory, and to call <code class="function">operator delete</code> each time memory, and to call <code class="function">operator delete</code> each time
@ -101,7 +93,7 @@
or loading and unloading shared objects in memory. As such, using or loading and unloading shared objects in memory. As such, using
caching allocators on systems that do not support caching allocators on systems that do not support
<code class="function">abi::__cxa_atexit</code> is not recommended. <code class="function">abi::__cxa_atexit</code> is not recommended.
</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.impl"></a>Implementation</h4></div></div></div><div class="section" title="Interface Design"><div class="titlepage"><div><div><h5 class="title"><a name="id609466"></a>Interface Design</h5></div></div></div><p> </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"></a>Implementation</h4></div></div></div><div class="section" title="Interface Design"><div class="titlepage"><div><div><h5 class="title"><a id="id583537"></a>Interface Design</h5></div></div></div><p>
The only allocator interface that The only allocator interface that
is supported is the standard C++ interface. As such, all STL is supported is the standard C++ interface. As such, all STL
containers have been adjusted, and all external allocators have containers have been adjusted, and all external allocators have
@ -114,7 +106,7 @@
</p><p> </p><p>
The base class that <code class="classname">allocator</code> is derived from The base class that <code class="classname">allocator</code> is derived from
may not be user-configurable. may not be user-configurable.
</p></div><div class="section" title="Selecting Default Allocation Policy"><div class="titlepage"><div><div><h5 class="title"><a name="id609496"></a>Selecting Default Allocation Policy</h5></div></div></div><p> </p></div><div class="section" title="Selecting Default Allocation Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id583567"></a>Selecting Default Allocation Policy</h5></div></div></div><p>
It's difficult to pick an allocation strategy that will provide It's difficult to pick an allocation strategy that will provide
maximum utility, without excessively penalizing some behavior. In maximum utility, without excessively penalizing some behavior. In
fact, it's difficult just deciding which typical actions to measure fact, it's difficult just deciding which typical actions to measure
@ -151,7 +143,7 @@
The current default choice for The current default choice for
<code class="classname">allocator</code> is <code class="classname">allocator</code> is
<code class="classname">__gnu_cxx::new_allocator</code>. <code class="classname">__gnu_cxx::new_allocator</code>.
</p></div><div class="section" title="Disabling Memory Caching"><div class="titlepage"><div><div><h5 class="title"><a name="id609607"></a>Disabling Memory Caching</h5></div></div></div><p> </p></div><div class="section" title="Disabling Memory Caching"><div class="titlepage"><div><div><h5 class="title"><a id="id583678"></a>Disabling Memory Caching</h5></div></div></div><p>
In use, <code class="classname">allocator</code> may allocate and In use, <code class="classname">allocator</code> may allocate and
deallocate using implementation-specific strategies and deallocate using implementation-specific strategies and
heuristics. Because of this, a given call to an allocator object's heuristics. Because of this, a given call to an allocator object's
@ -187,7 +179,7 @@
environment, it likely means that you linked against objects environment, it likely means that you linked against objects
built against the older library (objects which might still using the built against the older library (objects which might still using the
cached allocations...). cached allocations...).
</p></div></div><div class="section" title="Using a Specific Allocator"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.using"></a>Using a Specific Allocator</h4></div></div></div><p> </p></div></div><div class="section" title="Using a Specific Allocator"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.using"></a>Using a Specific Allocator</h4></div></div></div><p>
You can specify different memory management schemes on a You can specify different memory management schemes on a
per-container basis, by overriding the default per-container basis, by overriding the default
<span class="type">Allocator</span> template parameter. For example, an easy <span class="type">Allocator</span> template parameter. For example, an easy
@ -198,7 +190,7 @@
Likewise, a debugging form of whichever allocator is currently in use: Likewise, a debugging form of whichever allocator is currently in use:
</p><pre class="programlisting"> </p><pre class="programlisting">
std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque; std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque;
</pre></div><div class="section" title="Custom Allocators"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.custom"></a>Custom Allocators</h4></div></div></div><p> </pre></div><div class="section" title="Custom Allocators"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.custom"></a>Custom Allocators</h4></div></div></div><p>
Writing a portable C++ allocator would dictate that the interface Writing a portable C++ allocator would dictate that the interface
would look much like the one specified for would look much like the one specified for
<code class="classname">allocator</code>. Additional member functions, but <code class="classname">allocator</code>. Additional member functions, but
@ -207,7 +199,7 @@
Probably the best place to start would be to copy one of the Probably the best place to start would be to copy one of the
extension allocators: say a simple one like extension allocators: say a simple one like
<code class="classname">new_allocator</code>. <code class="classname">new_allocator</code>.
</p></div><div class="section" title="Extension Allocators"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.ext"></a>Extension Allocators</h4></div></div></div><p> </p></div><div class="section" title="Extension Allocators"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.ext"></a>Extension Allocators</h4></div></div></div><p>
Several other allocators are provided as part of this Several other allocators are provided as part of this
implementation. The location of the extension allocators and their implementation. The location of the extension allocators and their
names have changed, but in all cases, functionality is names have changed, but in all cases, functionality is
@ -318,33 +310,33 @@
of the used and unused memory locations. It has its own of the used and unused memory locations. It has its own
<a class="link" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator">chapter</a> <a class="link" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator">chapter</a>
in the documentation. in the documentation.
</p></li></ol></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a name="allocator.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a name="id610065"></a><p><span class="citetitle"><em class="citetitle"> </p></li></ol></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id584136"></a><p><span class="citetitle"><em class="citetitle">
ISO/IEC 14882:1998 Programming languages - C++ ISO/IEC 14882:1998 Programming languages - C++
</em>. </span> </em>. </span>
isoc++_1998 isoc++_1998
<span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry" title="The Standard Librarian: What Are Allocators Good For?"><a name="id610080"></a><p><span class="title"><i> <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry" title="The Standard Librarian: What Are Allocators Good For?"><a id="id584151"></a><p><span class="title"><em>
<a class="link" href="http://www.drdobbs.com/cpp/184403759" target="_top"> <a class="link" href="http://www.drdobbs.com/cpp/184403759" target="_top">
The Standard Librarian: What Are Allocators Good For? The Standard Librarian: What Are Allocators Good For?
</a> </a>
</i>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Journal C/C++ Users Journal
. </span></span></p></div><div class="biblioentry" title="The Hoard Memory Allocator"><a name="id610111"></a><p><span class="title"><i> . </span></span></p></div><div class="biblioentry" title="The Hoard Memory Allocator"><a id="id584182"></a><p><span class="title"><em>
<a class="link" href="http://www.cs.umass.edu/~emery/hoard" target="_top"> <a class="link" href="http://www.cs.umass.edu/~emery/hoard" target="_top">
The Hoard Memory Allocator The Hoard Memory Allocator
</a> </a>
</i>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry" title="Reconsidering Custom Memory Allocation"><a name="id610134"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry" title="Reconsidering Custom Memory Allocation"><a id="id584205"></a><p><span class="title"><em>
<a class="link" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top"> <a class="link" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top">
Reconsidering Custom Memory Allocation Reconsidering Custom Memory Allocation
</a> </a>
</i>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry" title="Allocator Types"><a name="id610186"></a><p><span class="title"><i> </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry" title="Allocator Types"><a id="id584256"></a><p><span class="title"><em>
<a class="link" href="http://www.angelikalanger.com/Articles/C++Report/Allocators/Allocators.html" target="_top"> <a class="link" href="http://www.angelikalanger.com/Articles/C++Report/Allocators/Allocators.html" target="_top">
Allocator Types Allocator Types
</a> </a>
</i>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Journal C/C++ Users Journal
. </span></span></p></div><div class="biblioentry"><a name="id610225"></a><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> . </span></span></p></div><div class="biblioentry"><a id="id584296"></a><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername">
Addison Wesley Addison Wesley
. </span></span></p></div><div class="biblioentry"><a name="id610262"></a><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section" title="auto_ptr"><div class="titlepage"><div><div><h3 class="title"><a name="std.util.memory.auto_ptr"></a>auto_ptr</h3></div></div></div><div class="section" title="Limitations"><div class="titlepage"><div><div><h4 class="title"><a name="auto_ptr.limitations"></a>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can . </span></span></p></div><div class="biblioentry"><a id="id584333"></a><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section" title="auto_ptr"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"></a>auto_ptr</h3></div></div></div><div class="section" title="Limitations"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"></a>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can
happen with misuse of the <code class="classname">auto_ptr</code> class happen with misuse of the <code class="classname">auto_ptr</code> class
template (called <acronym class="acronym">AP</acronym> here) would take some template (called <acronym class="acronym">AP</acronym> here) would take some
time. Suffice it to say that the use of <acronym class="acronym">AP</acronym> time. Suffice it to say that the use of <acronym class="acronym">AP</acronym>
@ -395,7 +387,7 @@
to die. AP is trivial to write, however, so you could write your to die. AP is trivial to write, however, so you could write your
own <code class="code">auto_array_ptr</code> for that situation (in fact, this has own <code class="code">auto_array_ptr</code> for that situation (in fact, this has
been done many times; check the mailing lists, Usenet, Boost, etc). been done many times; check the mailing lists, Usenet, Boost, etc).
</p></div><div class="section" title="Use in Containers"><div class="titlepage"><div><div><h4 class="title"><a name="auto_ptr.using"></a>Use in Containers</h4></div></div></div><p> </p></div><div class="section" title="Use in Containers"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.using"></a>Use in Containers</h4></div></div></div><p>
</p><p>All of the <a class="link" href="containers.html" title="Chapter 9.  Containers">containers</a> </p><p>All of the <a class="link" href="containers.html" title="Chapter 9.  Containers">containers</a>
described in the standard library require their contained types described in the standard library require their contained types
to have, among other things, a copy constructor like this: to have, among other things, a copy constructor like this:
@ -431,16 +423,16 @@
} }
</pre><p> </pre><p>
Should you try this with the checks enabled, you will see an error. Should you try this with the checks enabled, you will see an error.
</p></div></div><div class="section" title="shared_ptr"><div class="titlepage"><div><div><h3 class="title"><a name="std.util.memory.shared_ptr"></a>shared_ptr</h3></div></div></div><p> </p></div></div><div class="section" title="shared_ptr"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.shared_ptr"></a>shared_ptr</h3></div></div></div><p>
The shared_ptr class template stores a pointer, usually obtained via new, The shared_ptr class template stores a pointer, usually obtained via new,
and implements shared ownership semantics. and implements shared ownership semantics.
</p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a name="shared_ptr.req"></a>Requirements</h4></div></div></div><p> </p><div class="section" title="Requirements"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.req"></a>Requirements</h4></div></div></div><p>
</p><p> </p><p>
The standard deliberately doesn't require a reference-counted The standard deliberately doesn't require a reference-counted
implementation, allowing other techniques such as a implementation, allowing other techniques such as a
circular-linked-list. circular-linked-list.
</p><p> </p><p>
</p></div><div class="section" title="Design Issues"><div class="titlepage"><div><div><h4 class="title"><a name="shared_ptr.design_issues"></a>Design Issues</h4></div></div></div><p> </p></div><div class="section" title="Design Issues"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.design_issues"></a>Design Issues</h4></div></div></div><p>
The <code class="classname">shared_ptr</code> code is kindly donated to GCC by the Boost The <code class="classname">shared_ptr</code> code is kindly donated to GCC by the Boost
project and the original authors of the code. The basic design and project and the original authors of the code. The basic design and
algorithms are from Boost, the notes below describe details specific to algorithms are from Boost, the notes below describe details specific to
@ -454,7 +446,7 @@ drops to zero.
Derived classes override those functions to destroy resources in a context Derived classes override those functions to destroy resources in a context
where the correct dynamic type is known. This is an application of the where the correct dynamic type is known. This is an application of the
technique known as type erasure. technique known as type erasure.
</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a name="shared_ptr.impl"></a>Implementation</h4></div></div></div><div class="section" title="Class Hierarchy"><div class="titlepage"><div><div><h5 class="title"><a name="id610613"></a>Class Hierarchy</h5></div></div></div><p> </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"></a>Implementation</h4></div></div></div><div class="section" title="Class Hierarchy"><div class="titlepage"><div><div><h5 class="title"><a id="id584684"></a>Class Hierarchy</h5></div></div></div><p>
A <code class="classname">shared_ptr&lt;T&gt;</code> contains a pointer of A <code class="classname">shared_ptr&lt;T&gt;</code> contains a pointer of
type <span class="type">T*</span> and an object of type type <span class="type">T*</span> and an object of type
<code class="classname">__shared_count</code>. The shared_count contains a <code class="classname">__shared_count</code>. The shared_count contains a
@ -501,7 +493,7 @@ C++11-only features are: rvalue-ref/move support, allocator support,
aliasing constructor, make_shared &amp; allocate_shared. Additionally, aliasing constructor, make_shared &amp; allocate_shared. Additionally,
the constructors taking <code class="classname">auto_ptr</code> parameters are the constructors taking <code class="classname">auto_ptr</code> parameters are
deprecated in C++11 mode. deprecated in C++11 mode.
</p></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h5 class="title"><a name="id610801"></a>Thread Safety</h5></div></div></div><p> </p></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h5 class="title"><a id="id584872"></a>Thread Safety</h5></div></div></div><p>
The The
<a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety" target="_top">Thread <a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety" target="_top">Thread
Safety</a> section of the Boost shared_ptr documentation says "shared_ptr Safety</a> section of the Boost shared_ptr documentation says "shared_ptr
@ -546,7 +538,7 @@ compiler, standard library, platform etc. For the version of
shared_ptr in libstdc++ the compiler and library are fixed, which shared_ptr in libstdc++ the compiler and library are fixed, which
makes things much simpler: we have an atomic CAS or we don't, see Lock makes things much simpler: we have an atomic CAS or we don't, see Lock
Policy below for details. Policy below for details.
</p></div><div class="section" title="Selecting Lock Policy"><div class="titlepage"><div><div><h5 class="title"><a name="id610862"></a>Selecting Lock Policy</h5></div></div></div><p> </p></div><div class="section" title="Selecting Lock Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id584932"></a>Selecting Lock Policy</h5></div></div></div><p>
</p><p> </p><p>
There is a single <code class="classname">_Sp_counted_base</code> class, There is a single <code class="classname">_Sp_counted_base</code> class,
which is a template parameterized on the enum which is a template parameterized on the enum
@ -587,7 +579,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod
<code class="filename">ext/atomicity.h</code>, which detect if the program <code class="filename">ext/atomicity.h</code>, which detect if the program
is multi-threaded. If only one thread of execution exists in is multi-threaded. If only one thread of execution exists in
the program then less expensive non-atomic operations are used. the program then less expensive non-atomic operations are used.
</p></div><div class="section" title="Related functions and classes"><div class="titlepage"><div><div><h5 class="title"><a name="id610983"></a>Related functions and classes</h5></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, </p></div><div class="section" title="Related functions and classes"><div class="titlepage"><div><div><h5 class="title"><a id="id585054"></a>Related functions and classes</h5></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>,
<code class="code">const_pointer_cast</code></span></dt><dd><p> <code class="code">const_pointer_cast</code></span></dt><dd><p>
As noted in N2351, these functions can be implemented non-intrusively using As noted in N2351, these functions can be implemented non-intrusively using
the alias constructor. However the aliasing constructor is only available the alias constructor. However the aliasing constructor is only available
@ -620,13 +612,13 @@ is called. Users should not try to use this.
As well as the extra constructors, this implementation also needs some As well as the extra constructors, this implementation also needs some
members of _Sp_counted_deleter to be protected where they could otherwise members of _Sp_counted_deleter to be protected where they could otherwise
be private. be private.
</p></dd></dl></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a name="shared_ptr.using"></a>Use</h4></div></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h5 class="title"><a name="id623434"></a>Examples</h5></div></div></div><p> </p></dd></dl></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"></a>Use</h4></div></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h5 class="title"><a id="id597505"></a>Examples</h5></div></div></div><p>
Examples of use can be found in the testsuite, under Examples of use can be found in the testsuite, under
<code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>, <code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>,
<code class="filename">testsuite/20_util/shared_ptr</code> <code class="filename">testsuite/20_util/shared_ptr</code>
and and
<code class="filename">testsuite/20_util/weak_ptr</code>. <code class="filename">testsuite/20_util/weak_ptr</code>.
</p></div><div class="section" title="Unresolved Issues"><div class="titlepage"><div><div><h5 class="title"><a name="id623464"></a>Unresolved Issues</h5></div></div></div><p> </p></div><div class="section" title="Unresolved Issues"><div class="titlepage"><div><div><h5 class="title"><a id="id597535"></a>Unresolved Issues</h5></div></div></div><p>
The <span class="emphasis"><em><code class="classname">shared_ptr</code> atomic access</em></span> The <span class="emphasis"><em><code class="classname">shared_ptr</code> atomic access</em></span>
clause in the C++11 standard is not implemented in GCC. clause in the C++11 standard is not implemented in GCC.
</p><p> </p><p>
@ -662,33 +654,33 @@ be private.
</p><p> </p><p>
tr1::_Sp_deleter could be a private member of tr1::__shared_count but it tr1::_Sp_deleter could be a private member of tr1::__shared_count but it
would alter the ABI. would alter the ABI.
</p></div></div><div class="section" title="Acknowledgments"><div class="titlepage"><div><div><h4 class="title"><a name="shared_ptr.ack"></a>Acknowledgments</h4></div></div></div><p> </p></div></div><div class="section" title="Acknowledgments"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.ack"></a>Acknowledgments</h4></div></div></div><p>
The original authors of the Boost shared_ptr, which is really nice The original authors of the Boost shared_ptr, which is really nice
code to work with, Peter Dimov in particular for his help and code to work with, Peter Dimov in particular for his help and
invaluable advice on thread safety. Phillip Jordan and Paolo invaluable advice on thread safety. Phillip Jordan and Paolo
Carlini for the lock policy implementation. Carlini for the lock policy implementation.
</p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a name="shared_ptr.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry" title="Improving shared_ptr for C++0x, Revision 2"><a name="id623557"></a><p><span class="title"><i> </p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry" title="Improving shared_ptr for C++0x, Revision 2"><a id="id597629"></a><p><span class="title"><em>
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top"> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">
Improving shared_ptr for C++0x, Revision 2 Improving shared_ptr for C++0x, Revision 2
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
N2351 N2351
. </span></p></div><div class="biblioentry" title="C++ Standard Library Active Issues List"><a name="id623576"></a><p><span class="title"><i> . </span></p></div><div class="biblioentry" title="C++ Standard Library Active Issues List"><a id="id597648"></a><p><span class="title"><em>
<a class="link" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top"> <a class="link" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top">
C++ Standard Library Active Issues List C++ Standard Library Active Issues List
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
N2456 N2456
. </span></p></div><div class="biblioentry" title="Working Draft, Standard for Programming Language C++"><a name="id623595"></a><p><span class="title"><i> . </span></p></div><div class="biblioentry" title="Working Draft, Standard for Programming Language C++"><a id="id597667"></a><p><span class="title"><em>
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top"> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top">
Working Draft, Standard for Programming Language C++ Working Draft, Standard for Programming Language C++
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
N2461 N2461
. </span></p></div><div class="biblioentry" title="Boost C++ Libraries documentation, shared_ptr"><a name="id623614"></a><p><span class="title"><i> . </span></p></div><div class="biblioentry" title="Boost C++ Libraries documentation, shared_ptr"><a id="id597686"></a><p><span class="title"><em>
<a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm" target="_top"> <a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">
Boost C++ Libraries documentation, shared_ptr Boost C++ Libraries documentation, shared_ptr
</a> </a>
</i>. </span><span class="subtitle"> </em>. </span><span class="subtitle">
N2461 N2461
. </span></p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pairs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="traits.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Pairs </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Traits</td></tr></table></div></body></html> . </span></p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pairs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="traits.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Pairs </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Traits</td></tr></table></div></body></html>

View File

@ -1,22 +1,10 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 20. The mt_allocator</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 20. The mt_allocator</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; allocator&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="bk01pt03ch19s07.html" title="Diagnostics" /><link rel="next" href="bk01pt03ch20s02.html" title="Design Issues" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 20. The mt_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s07.html">Prev</a> </td><th width="60%" align="center">Part III. 
allocator
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="bk01pt03ch19s07.html" title="Diagnostics"><link rel="next" href="bk01pt03ch20s02.html" title="Design Issues"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 20. The mt_allocator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch19s07.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 20. The mt_allocator"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.allocator.mt"></a>Chapter 20. The mt_allocator</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="mt_allocator.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s02.html">Design Issues</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch20s02.html#allocator.mt.overview">Overview</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch20s03.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.tune">Tunable Parameters</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.init">Initialization</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.deallocation">Deallocation Notes</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch20s04.html">Single Thread Example</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s05.html">Multiple Thread Example</a></span></dt></dl></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch20s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 20. The mt_allocator"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator.mt"></a>Chapter 20. The mt_allocator</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="mt_allocator.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s02.html">Design Issues</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch20s02.html#allocator.mt.overview">Overview</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch20s03.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.tune">Tunable Parameters</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.init">Initialization</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s03.html#allocator.mt.deallocation">Deallocation Notes</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch20s04.html">Single Thread Example</a></span></dt><dt><span class="section"><a href="bk01pt03ch20s05.html">Multiple Thread Example</a></span></dt></dl></div><p>
</p><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="allocator.mt.intro"></a>Intro</h2></div></div></div><p> </p><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="allocator.mt.intro"></a>Intro</h2></div></div></div><p>
The mt allocator [hereinafter referred to simply as "the allocator"] The mt allocator [hereinafter referred to simply as "the allocator"]
is a fixed size (power of two) allocator that was initially is a fixed size (power of two) allocator that was initially
developed specifically to suit the needs of multi threaded developed specifically to suit the needs of multi threaded
@ -32,4 +20,4 @@
</p><p> </p><p>
The aim of this document is to describe - from an application point of The aim of this document is to describe - from an application point of
view - the "inner workings" of the allocator. view - the "inner workings" of the allocator.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s07.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Diagnostics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design Issues</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch19s07.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch20s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Diagnostics </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design Issues</td></tr></table></div></body></html>

View File

@ -1,23 +1,15 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 12.  Numerics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 12.  Numerics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="algorithms.html" title="Chapter 11.  Algorithms" /><link rel="next" href="generalized_numeric_operations.html" title="Generalized Operations" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 12. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="algorithms.html" title="Chapter 11.  Algorithms"><link rel="next" href="generalized_numeric_operations.html" title="Generalized Operations"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 12. 
Numerics Numerics
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="generalized_numeric_operations.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 12.  Numerics"><div class="titlepage"><div><div><h2 class="title"><a name="std.numerics"></a>Chapter 12.  </th><td width="20%" align="right"> <a accesskey="n" href="generalized_numeric_operations.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 12.  Numerics"><div class="titlepage"><div><div><h2 class="title"><a id="std.numerics"></a>Chapter 12. 
Numerics Numerics
<a class="indexterm" name="id628715"></a> <a id="id602787" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="numerics.html#std.numerics.complex">Complex</a></span></dt><dd><dl><dt><span class="section"><a href="numerics.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="section"><a href="generalized_numeric_operations.html">Generalized Operations</a></span></dt><dt><span class="section"><a href="numerics_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="numerics_and_c.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="section"><a href="numerics_and_c.html#numerics.c.c99">C99</a></span></dt></dl></dd></dl></div><div class="section" title="Complex"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.numerics.complex"></a>Complex</h2></div></div></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="numerics.html#std.numerics.complex">Complex</a></span></dt><dd><dl><dt><span class="section"><a href="numerics.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="section"><a href="generalized_numeric_operations.html">Generalized Operations</a></span></dt><dt><span class="section"><a href="numerics_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="numerics_and_c.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="section"><a href="numerics_and_c.html#numerics.c.c99">C99</a></span></dt></dl></dd></dl></div><div class="section" title="Complex"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.numerics.complex"></a>Complex</h2></div></div></div><p>
</p><div class="section" title="complex Processing"><div class="titlepage"><div><div><h3 class="title"><a name="numerics.complex.processing"></a>complex Processing</h3></div></div></div><p> </p><div class="section" title="complex Processing"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.complex.processing"></a>complex Processing</h3></div></div></div><p>
</p><p>Using <code class="code">complex&lt;&gt;</code> becomes even more comple- er, sorry, </p><p>Using <code class="code">complex&lt;&gt;</code> becomes even more comple- er, sorry,
<span class="emphasis"><em>complicated</em></span>, with the not-quite-gratuitously-incompatible <span class="emphasis"><em>complicated</em></span>, with the not-quite-gratuitously-incompatible
addition of complex types to the C language. David Tribble has addition of complex types to the C language. David Tribble has
@ -36,7 +28,7 @@
<code class="code">&lt;complex.h&gt;</code> includes both <code class="code">&lt;complex&gt;</code> <code class="code">&lt;complex.h&gt;</code> includes both <code class="code">&lt;complex&gt;</code>
and the C99 <code class="code">&lt;complex.h&gt;</code> (if the C library provides and the C99 <code class="code">&lt;complex.h&gt;</code> (if the C library provides
it). it).
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="generalized_numeric_operations.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11.  </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="algorithms.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="generalized_numeric_operations.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11. 
Algorithms Algorithms
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Generalized Operations</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Generalized Operations</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Interacting with C</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Interacting with C</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="numerics.html" title="Chapter 12.  Numerics" /><link rel="prev" href="generalized_numeric_operations.html" title="Generalized Operations" /><link rel="next" href="io.html" title="Chapter 13.  Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="generalized_numeric_operations.html">Prev</a> </td><th width="60%" align="center">Chapter 12. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="numerics.html" title="Chapter 12.  Numerics"><link rel="prev" href="generalized_numeric_operations.html" title="Generalized Operations"><link rel="next" href="io.html" title="Chapter 13.  Input and Output"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="generalized_numeric_operations.html">Prev</a> </td><th width="60%" align="center">Chapter 12. 
Numerics Numerics
</th><td width="20%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr></table><hr></div><div class="section" title="Interacting with C"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.numerics.c"></a>Interacting with C</h2></div></div></div><div class="section" title="Numerics vs. Arrays"><div class="titlepage"><div><div><h3 class="title"><a name="numerics.c.array"></a>Numerics vs. Arrays</h3></div></div></div><p>One of the major reasons why FORTRAN can chew through numbers so well </th><td width="20%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr></table><hr /></div><div class="section" title="Interacting with C"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.numerics.c"></a>Interacting with C</h2></div></div></div><div class="section" title="Numerics vs. Arrays"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.c.array"></a>Numerics vs. Arrays</h3></div></div></div><p>One of the major reasons why FORTRAN can chew through numbers so well
is that it is defined to be free of pointer aliasing, an assumption is that it is defined to be free of pointer aliasing, an assumption
that C89 is not allowed to make, and neither is C++98. C99 adds a new that C89 is not allowed to make, and neither is C++98. C99 adds a new
keyword, <code class="code">restrict</code>, to apply to individual pointers. The keyword, <code class="code">restrict</code>, to apply to individual pointers. The
@ -26,7 +18,7 @@
speaking this is only one of the five template classes, and they are speaking this is only one of the five template classes, and they are
designed to be familiar to people who have worked with the BLAS designed to be familiar to people who have worked with the BLAS
libraries before. libraries before.
</p></div><div class="section" title="C99"><div class="titlepage"><div><div><h3 class="title"><a name="numerics.c.c99"></a>C99</h3></div></div></div><p>In addition to the other topics on this page, we'll note here some </p></div><div class="section" title="C99"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.c.c99"></a>C99</h3></div></div></div><p>In addition to the other topics on this page, we'll note here some
of the C99 features that appear in libstdc++. of the C99 features that appear in libstdc++.
</p><p>The C99 features depend on the <code class="code">--enable-c99</code> configure flag. </p><p>The C99 features depend on the <code class="code">--enable-c99</code> configure flag.
This flag is already on by default, but it can be disabled by the This flag is already on by default, but it can be disabled by the
@ -39,7 +31,7 @@
are supported, as is the <code class="code">lldiv_t</code> typedef. Also supported are supported, as is the <code class="code">lldiv_t</code> typedef. Also supported
are the wide character functions using 'long long', like are the wide character functions using 'long long', like
<code class="code">wcstoll</code>. <code class="code">wcstoll</code>.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="generalized_numeric_operations.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Generalized Operations </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="generalized_numeric_operations.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Generalized Operations </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. 
Input and Output Input and Output
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Pairs</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Pairs</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="utilities.html" title="Chapter 6.  Utilities" /><link rel="prev" href="utilities.html" title="Chapter 6.  Utilities" /><link rel="next" href="memory.html" title="Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Pairs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><th width="60%" align="center">Chapter 6. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="utilities.html" title="Chapter 6.  Utilities"><link rel="prev" href="utilities.html" title="Chapter 6.  Utilities"><link rel="next" href="memory.html" title="Memory"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Pairs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><th width="60%" align="center">Chapter 6. 
Utilities Utilities
</th><td width="20%" align="right"> <a accesskey="n" href="memory.html">Next</a></td></tr></table><hr></div><div class="section" title="Pairs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.util.pairs"></a>Pairs</h2></div></div></div><p>The <code class="code">pair&lt;T1,T2&gt;</code> is a simple and handy way to </th><td width="20%" align="right"> <a accesskey="n" href="memory.html">Next</a></td></tr></table><hr /></div><div class="section" title="Pairs"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.util.pairs"></a>Pairs</h2></div></div></div><p>The <code class="code">pair&lt;T1,T2&gt;</code> is a simple and handy way to
carry around a pair of objects. One is of type T1, and another of carry around a pair of objects. One is of type T1, and another of
type T2; they may be the same type, but you don't get anything type T2; they may be the same type, but you don't get anything
extra if they are. The two members can be accessed directly, as extra if they are. The two members can be accessed directly, as
@ -46,7 +38,7 @@
instance of a pair instantiated on their respective types: instance of a pair instantiated on their respective types:
</p><pre class="programlisting"> </p><pre class="programlisting">
pair&lt;int,MyClass&gt; p = make_pair(4,myobject); pair&lt;int,MyClass&gt; p = make_pair(4,myobject);
</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="memory.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6.  </pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="memory.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. 
Utilities Utilities
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Memory</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Memory</td></tr></table></div></body></html>

View File

@ -1,23 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 18. Parallel Mode</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 18. Parallel Mode</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; C++&#10; , &#10; library&#10; , &#10; parallel&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="bk01pt03ch17s04.html" title="Design" /><link rel="next" href="bk01pt03ch18s02.html" title="Semantics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 18. Parallel Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch17s04.html">Prev</a> </td><th width="60%" align="center">Part III. 
library
,
parallel
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="bk01pt03ch17s04.html" title="Design"><link rel="next" href="bk01pt03ch18s02.html" title="Semantics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 18. Parallel Mode</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch17s04.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch18s02.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 18. Parallel Mode"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.parallel_mode"></a>Chapter 18. Parallel Mode</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.omp">Setting up the OpenMP Environment</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.compile">Compile Time Switches</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.settings">Run Time Settings and Defaults</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></div><p> The libstdc++ parallel mode is an experimental parallel </th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch18s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 18. Parallel Mode"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.parallel_mode"></a>Chapter 18. Parallel Mode</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.omp">Setting up the OpenMP Environment</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.compile">Compile Time Switches</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning.settings">Run Time Settings and Defaults</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></div><p> The libstdc++ parallel mode is an experimental parallel
implementation of many algorithms the C++ Standard Library. implementation of many algorithms the C++ Standard Library.
</p><p> </p><p>
Several of the standard algorithms, for instance Several of the standard algorithms, for instance
@ -25,14 +11,14 @@ Several of the standard algorithms, for instance
annotations. These parallel mode constructs and can be invoked by annotations. These parallel mode constructs and can be invoked by
explicit source declaration or by compiling existing sources with a explicit source declaration or by compiling existing sources with a
specific compiler flag. specific compiler flag.
</p><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.ext.parallel_mode.intro"></a>Intro</h2></div></div></div><p>The following library components in the include </p><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.parallel_mode.intro"></a>Intro</h2></div></div></div><p>The following library components in the include
<code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="function">std::accumulate</code></p></li><li class="listitem"><p><code class="function">std::adjacent_difference</code></p></li><li class="listitem"><p><code class="function">std::inner_product</code></p></li><li class="listitem"><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include <code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="function">std::accumulate</code></p></li><li class="listitem"><p><code class="function">std::adjacent_difference</code></p></li><li class="listitem"><p><code class="function">std::inner_product</code></p></li><li class="listitem"><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include
<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="function">std::adjacent_find</code></p></li><li class="listitem"><p><code class="function">std::count</code></p></li><li class="listitem"><p><code class="function">std::count_if</code></p></li><li class="listitem"><p><code class="function">std::equal</code></p></li><li class="listitem"><p><code class="function">std::find</code></p></li><li class="listitem"><p><code class="function">std::find_if</code></p></li><li class="listitem"><p><code class="function">std::find_first_of</code></p></li><li class="listitem"><p><code class="function">std::for_each</code></p></li><li class="listitem"><p><code class="function">std::generate</code></p></li><li class="listitem"><p><code class="function">std::generate_n</code></p></li><li class="listitem"><p><code class="function">std::lexicographical_compare</code></p></li><li class="listitem"><p><code class="function">std::mismatch</code></p></li><li class="listitem"><p><code class="function">std::search</code></p></li><li class="listitem"><p><code class="function">std::search_n</code></p></li><li class="listitem"><p><code class="function">std::transform</code></p></li><li class="listitem"><p><code class="function">std::replace</code></p></li><li class="listitem"><p><code class="function">std::replace_if</code></p></li><li class="listitem"><p><code class="function">std::max_element</code></p></li><li class="listitem"><p><code class="function">std::merge</code></p></li><li class="listitem"><p><code class="function">std::min_element</code></p></li><li class="listitem"><p><code class="function">std::nth_element</code></p></li><li class="listitem"><p><code class="function">std::partial_sort</code></p></li><li class="listitem"><p><code class="function">std::partition</code></p></li><li class="listitem"><p><code class="function">std::random_shuffle</code></p></li><li class="listitem"><p><code class="function">std::set_union</code></p></li><li class="listitem"><p><code class="function">std::set_intersection</code></p></li><li class="listitem"><p><code class="function">std::set_symmetric_difference</code></p></li><li class="listitem"><p><code class="function">std::set_difference</code></p></li><li class="listitem"><p><code class="function">std::sort</code></p></li><li class="listitem"><p><code class="function">std::stable_sort</code></p></li><li class="listitem"><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a name="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a name="id634656"></a><p><span class="citetitle"><em class="citetitle"> <code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="function">std::adjacent_find</code></p></li><li class="listitem"><p><code class="function">std::count</code></p></li><li class="listitem"><p><code class="function">std::count_if</code></p></li><li class="listitem"><p><code class="function">std::equal</code></p></li><li class="listitem"><p><code class="function">std::find</code></p></li><li class="listitem"><p><code class="function">std::find_if</code></p></li><li class="listitem"><p><code class="function">std::find_first_of</code></p></li><li class="listitem"><p><code class="function">std::for_each</code></p></li><li class="listitem"><p><code class="function">std::generate</code></p></li><li class="listitem"><p><code class="function">std::generate_n</code></p></li><li class="listitem"><p><code class="function">std::lexicographical_compare</code></p></li><li class="listitem"><p><code class="function">std::mismatch</code></p></li><li class="listitem"><p><code class="function">std::search</code></p></li><li class="listitem"><p><code class="function">std::search_n</code></p></li><li class="listitem"><p><code class="function">std::transform</code></p></li><li class="listitem"><p><code class="function">std::replace</code></p></li><li class="listitem"><p><code class="function">std::replace_if</code></p></li><li class="listitem"><p><code class="function">std::max_element</code></p></li><li class="listitem"><p><code class="function">std::merge</code></p></li><li class="listitem"><p><code class="function">std::min_element</code></p></li><li class="listitem"><p><code class="function">std::nth_element</code></p></li><li class="listitem"><p><code class="function">std::partial_sort</code></p></li><li class="listitem"><p><code class="function">std::partition</code></p></li><li class="listitem"><p><code class="function">std::random_shuffle</code></p></li><li class="listitem"><p><code class="function">std::set_union</code></p></li><li class="listitem"><p><code class="function">std::set_intersection</code></p></li><li class="listitem"><p><code class="function">std::set_symmetric_difference</code></p></li><li class="listitem"><p><code class="function">std::set_difference</code></p></li><li class="listitem"><p><code class="function">std::sort</code></p></li><li class="listitem"><p><code class="function">std::stable_sort</code></p></li><li class="listitem"><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id608727"></a><p><span class="citetitle"><em class="citetitle">
Parallelization of Bulk Operations for STL Dictionaries Parallelization of Bulk Operations for STL Dictionaries
</em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
. </span></span></p></div><div class="biblioentry"><a name="id634698"></a><p><span class="citetitle"><em class="citetitle"> . </span></span></p></div><div class="biblioentry"><a id="id608770"></a><p><span class="citetitle"><em class="citetitle">
The Multi-Core Standard Template Library The Multi-Core Standard Template Library
</em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> </em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername">
Euro-Par 2007: Parallel Processing. (LNCS 4641) Euro-Par 2007: Parallel Processing. (LNCS 4641)
. </span></span></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch17s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch18s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Semantics</td></tr></table></div></body></html> . </span></span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch17s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch18s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Semantics</td></tr></table></div></body></html>

View File

@ -1,37 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 22. Policy-Based Data Structures</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 22. Policy-Based Data Structures</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10;&#9;ISO C++&#10; , &#10;&#9;policy&#10; , &#10;&#9;container&#10; , &#10;&#9;data&#10; , &#10;&#9;structure&#10; , &#10;&#9;associated&#10; , &#10;&#9;tree&#10; , &#10;&#9;trie&#10; , &#10;&#9;hash&#10; , &#10;&#9;metaprogramming&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III.  Extensions" /><link rel="prev" href="bk01pt03ch21s02.html" title="Implementation" /><link rel="next" href="policy_data_structures_using.html" title="Using" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. Policy-Based Data Structures</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch21s02.html">Prev</a> </td><th width="60%" align="center">Part III. 
policy
,
container
,
data
,
structure
,
associated
,
tree
,
trie
,
hash
,
metaprogramming
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="bk01pt03ch21s02.html" title="Implementation"><link rel="next" href="policy_data_structures_using.html" title="Using"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 22. Policy-Based Data Structures</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch21s02.html">Prev</a> </td><th width="60%" align="center">Part III. 
Extensions Extensions
</th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures_using.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 22. Policy-Based Data Structures"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.containers.pbds"></a>Chapter 22. Policy-Based Data Structures</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro">Intro</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues">Performance Issues</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues.priority_queue">Priority Que</a></span></dt></dl></dd><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation">Goals</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation.associative">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.policy">Policy Choices</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.underlying">Underlying Data Structures</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.iterators">Iterators</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.functions">Functional</a></span></dt></dl></dd><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation.priority_queue">Priority Queues</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.policy">Policy Choices</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.underlying">Underlying Data Structures</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.binary_heap">Binary Heaps</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_using.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.organization">Organization</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial">Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.basic">Basic Use</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.configuring"> </th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures_using.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 22. Policy-Based Data Structures"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.containers.pbds"></a>Chapter 22. Policy-Based Data Structures</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro">Intro</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues">Performance Issues</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.issues.priority_queue">Priority Que</a></span></dt></dl></dd><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation">Goals</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation.associative">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.policy">Policy Choices</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.underlying">Underlying Data Structures</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.iterators">Iterators</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.associative.functions">Functional</a></span></dt></dl></dd><dt><span class="section"><a href="policy_data_structures.html#pbds.intro.motivation.priority_queue">Priority Queues</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.policy">Policy Choices</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.underlying">Underlying Data Structures</a></span></dt><dt><span class="section"><a href="policy_data_structures.html#motivation.priority_queue.binary_heap">Binary Heaps</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_using.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.organization">Organization</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial">Tutorial</a></span></dt><dd><dl><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.basic">Basic Use</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.configuring">
Configuring via Template Parameters Configuring via Template Parameters
</a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.traits"> </a></span></dt><dt><span class="section"><a href="policy_data_structures_using.html#pbds.using.tutorial.traits">
Querying Container Attributes Querying Container Attributes
@ -95,7 +67,7 @@
Text <code class="function">modify</code> Down Text <code class="function">modify</code> Down
</a></span></dt></dl></dd><dt><span class="section"><a href="policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_biblio.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="policy_data_structures.html#pbds.biblio"> </a></span></dt></dl></dd><dt><span class="section"><a href="policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_biblio.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="policy_data_structures.html#pbds.biblio">
Bibliography Bibliography
</a></span></dt></dl></div><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pbds.intro"></a>Intro</h2></div></div></div><p> </a></span></dt></dl></div><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pbds.intro"></a>Intro</h2></div></div></div><p>
This is a library of policy-based elementary data structures: This is a library of policy-based elementary data structures:
associative containers and priority queues. It is designed for associative containers and priority queues. It is designed for
high-performance, flexibility, semantic safety, and conformance to high-performance, flexibility, semantic safety, and conformance to
@ -103,7 +75,7 @@
<code class="literal">std::tr1</code> (except for some points where it differs <code class="literal">std::tr1</code> (except for some points where it differs
by design). by design).
</p><p> </p><p>
</p><div class="section" title="Performance Issues"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.intro.issues"></a>Performance Issues</h3></div></div></div><p> </p><div class="section" title="Performance Issues"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.intro.issues"></a>Performance Issues</h3></div></div></div><p>
</p><p> </p><p>
An attempt is made to categorize the wide variety of possible An attempt is made to categorize the wide variety of possible
container designs in terms of performance-impacting factors. These container designs in terms of performance-impacting factors. These
@ -123,7 +95,7 @@
</p><p> </p><p>
Specific issues found while unraveling performance factors in the Specific issues found while unraveling performance factors in the
design of associative containers and priority queues follow. design of associative containers and priority queues follow.
</p><div class="section" title="Associative"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.intro.issues.associative"></a>Associative</h4></div></div></div><p> </p><div class="section" title="Associative"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.intro.issues.associative"></a>Associative</h4></div></div></div><p>
Associative containers depend on their composite policies to a very Associative containers depend on their composite policies to a very
large extent. Implicitly hard-wiring policies can hamper their large extent. Implicitly hard-wiring policies can hamper their
performance and limit their functionality. An efficient hash-based performance and limit their functionality. An efficient hash-based
@ -164,7 +136,7 @@
is a red-black tree, then splitting a reference to the container is is a red-black tree, then splitting a reference to the container is
exception-free; if it is an ordered-vector tree, exceptions can be exception-free; if it is an ordered-vector tree, exceptions can be
thrown. thrown.
</p></div><div class="section" title="Priority Que"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.intro.issues.priority_queue"></a>Priority Que</h4></div></div></div><p> </p></div><div class="section" title="Priority Que"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.intro.issues.priority_queue"></a>Priority Que</h4></div></div></div><p>
Priority queues are useful when one needs to efficiently access a Priority queues are useful when one needs to efficiently access a
minimum (or maximum) value as the set of values changes. minimum (or maximum) value as the set of values changes.
</p><p> </p><p>
@ -206,7 +178,7 @@
expense of more difference in the the kinds of operations that the expense of more difference in the the kinds of operations that the
underlying data structure can support. These differences pose a underlying data structure can support. These differences pose a
challenge when creating a uniform interface for priority queues. challenge when creating a uniform interface for priority queues.
</p></div></div><div class="section" title="Goals"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.intro.motivation"></a>Goals</h3></div></div></div><p> </p></div></div><div class="section" title="Goals"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.intro.motivation"></a>Goals</h3></div></div></div><p>
Many fine associative-container libraries were already written, Many fine associative-container libraries were already written,
most notably, the C++ standard's associative containers. Why most notably, the C++ standard's associative containers. Why
then write another library? This section shows some possible then write another library? This section shows some possible
@ -217,8 +189,8 @@
only then adding hash-based containers, which are fundamentally only then adding hash-based containers, which are fundamentally
different), did not standardize priority queues as containers, different), did not standardize priority queues as containers,
and (in our opinion) overloads the iterator concept. and (in our opinion) overloads the iterator concept.
</p><div class="section" title="Associative"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.intro.motivation.associative"></a>Associative</h4></div></div></div><p> </p><div class="section" title="Associative"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.intro.motivation.associative"></a>Associative</h4></div></div></div><p>
</p><div class="section" title="Policy Choices"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.associative.policy"></a>Policy Choices</h5></div></div></div><p> </p><div class="section" title="Policy Choices"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.associative.policy"></a>Policy Choices</h5></div></div></div><p>
Associative containers require a relatively large number of Associative containers require a relatively large number of
policies to function efficiently in various settings. In some policies to function efficiently in various settings. In some
cases this is needed for making their common operations more cases this is needed for making their common operations more
@ -279,7 +251,7 @@
these invariants, one must supply some policy that is aware these invariants, one must supply some policy that is aware
of these changes. Without this, it would be better to use a of these changes. Without this, it would be better to use a
linked list (in itself very efficient for these purposes). linked list (in itself very efficient for these purposes).
</p></li></ol></div><div class="figure"><a name="id640366"></a><p class="title"><b>Figure 22.1. Node Invariants</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_node_invariants.png" align="middle" alt="Node Invariants"></div></div></div><br class="figure-break"></div><div class="section" title="Underlying Data Structures"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.associative.underlying"></a>Underlying Data Structures</h5></div></div></div><p> </p></li></ol></div><div class="figure"><a id="id614437"></a><p class="title"><strong>Figure 22.1. Node Invariants</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_node_invariants.png" align="middle" alt="Node Invariants" /></div></div></div><br class="figure-break" /></div><div class="section" title="Underlying Data Structures"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.associative.underlying"></a>Underlying Data Structures</h5></div></div></div><p>
The standard C++ library contains associative containers based on The standard C++ library contains associative containers based on
red-black trees and collision-chaining hash tables. These are red-black trees and collision-chaining hash tables. These are
very useful, but they are not ideal for all types of very useful, but they are not ideal for all types of
@ -287,7 +259,7 @@
</p><p> </p><p>
The figure below shows the different underlying data structures The figure below shows the different underlying data structures
currently supported in this library. currently supported in this library.
</p><div class="figure"><a name="id640422"></a><p class="title"><b>Figure 22.2. Underlying Associative Data Structures</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_different_underlying_dss_1.png" align="middle" alt="Underlying Associative Data Structures"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id614493"></a><p class="title"><strong>Figure 22.2. Underlying Associative Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_different_underlying_dss_1.png" align="middle" alt="Underlying Associative Data Structures" /></div></div></div><br class="figure-break" /><p>
A shows a collision-chaining hash-table, B shows a probing A shows a collision-chaining hash-table, B shows a probing
hash-table, C shows a red-black tree, D shows a splay tree, E shows hash-table, C shows a red-black tree, D shows a splay tree, E shows
a tree based on an ordered vector(implicit in the order of the a tree based on an ordered vector(implicit in the order of the
@ -364,7 +336,7 @@
library iterators, for example) can ease generic manipulation of library iterators, for example) can ease generic manipulation of
associative containers based on different underlying data associative containers based on different underlying data
structures. structures.
</p></div><div class="section" title="Iterators"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.associative.iterators"></a>Iterators</h5></div></div></div><p> </p></div><div class="section" title="Iterators"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.associative.iterators"></a>Iterators</h5></div></div></div><p>
Iterators are centric to the design of the standard library Iterators are centric to the design of the standard library
containers, because of the container/algorithm/iterator containers, because of the container/algorithm/iterator
decomposition that allows an algorithm to operate on a range decomposition that allows an algorithm to operate on a range
@ -389,7 +361,7 @@
"ds_gen.html#find_range"&gt;Design::Associative "ds_gen.html#find_range"&gt;Design::Associative
Containers::Data-Structure Genericity::Point-Type and Range-Type Containers::Data-Structure Genericity::Point-Type and Range-Type
Methods</span></em>. Methods</span></em>.
</p><div class="section" title="Using Point Iterators for Range Operations"><div class="titlepage"><div><div><h6 class="title"><a name="associative.iterators.using"></a>Using Point Iterators for Range Operations</h6></div></div></div><p> </p><div class="section" title="Using Point Iterators for Range Operations"><div class="titlepage"><div><div><h6 class="title"><a id="associative.iterators.using"></a>Using Point Iterators for Range Operations</h6></div></div></div><p>
Suppose <code class="classname">cntnr</code> is some associative Suppose <code class="classname">cntnr</code> is some associative
container, and say <code class="varname">c</code> is an object of container, and say <code class="varname">c</code> is an object of
type <code class="classname">cntnr</code>. Then what will be the outcome type <code class="classname">cntnr</code>. Then what will be the outcome
@ -406,7 +378,7 @@
no guarantee that the elements traversed will coincide with the no guarantee that the elements traversed will coincide with the
<span class="emphasis"><em>logical</em></span> elements between 1 and 5, as in <span class="emphasis"><em>logical</em></span> elements between 1 and 5, as in
label B. label B.
</p><div class="figure"><a name="id640685"></a><p class="title"><b>Figure 22.3. Range Iteration in Different Data Structures</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_point_iterators_range_ops_1.png" align="middle" alt="Node Invariants"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id614756"></a><p class="title"><strong>Figure 22.3. Range Iteration in Different Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_point_iterators_range_ops_1.png" align="middle" alt="Node Invariants" /></div></div></div><br class="figure-break" /><p>
In our opinion, this problem is not caused just because In our opinion, this problem is not caused just because
red-black trees are order preserving while red-black trees are order preserving while
collision-chaining hash tables are (generally) not - it collision-chaining hash tables are (generally) not - it
@ -427,7 +399,7 @@
Consequently, applying an algorithm to a sequence obtained from most Consequently, applying an algorithm to a sequence obtained from most
containers may or may not make sense, but applying it to a containers may or may not make sense, but applying it to a
sub-sequence of a self-organizing container does not. sub-sequence of a self-organizing container does not.
</p></div><div class="section" title="Cost to Point Iterators to Enable Range Operations"><div class="titlepage"><div><div><h6 class="title"><a name="associative.iterators.cost"></a>Cost to Point Iterators to Enable Range Operations</h6></div></div></div><p> </p></div><div class="section" title="Cost to Point Iterators to Enable Range Operations"><div class="titlepage"><div><div><h6 class="title"><a id="associative.iterators.cost"></a>Cost to Point Iterators to Enable Range Operations</h6></div></div></div><p>
Suppose <code class="varname">c</code> is some collision-chaining Suppose <code class="varname">c</code> is some collision-chaining
hash-based container object, and one calls hash-based container object, and one calls
</p><pre class="programlisting">c.find(3)</pre><p> </p><pre class="programlisting">c.find(3)</pre><p>
@ -457,11 +429,11 @@
list, as in the graphic below, label B. Here the iterators are as list, as in the graphic below, label B. Here the iterators are as
light as can be, but the hash-table's operations are more light as can be, but the hash-table's operations are more
complicated. complicated.
</p><div class="figure"><a name="id640809"></a><p class="title"><b>Figure 22.4. Point Iteration in Hash Data Structures</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_point_iterators_range_ops_2.png" align="middle" alt="Point Iteration in Hash Data Structures"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id614881"></a><p class="title"><strong>Figure 22.4. Point Iteration in Hash Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_point_iterators_range_ops_2.png" align="middle" alt="Point Iteration in Hash Data Structures" /></div></div></div><br class="figure-break" /><p>
It should be noted that containers based on collision-chaining It should be noted that containers based on collision-chaining
hash-tables are not the only ones with this type of behavior; hash-tables are not the only ones with this type of behavior;
many other self-organizing data structures display it as well. many other self-organizing data structures display it as well.
</p></div><div class="section" title="Invalidation Guarantees"><div class="titlepage"><div><div><h6 class="title"><a name="associative.iterators.invalidation"></a>Invalidation Guarantees</h6></div></div></div><p>Consider the following snippet:</p><pre class="programlisting"> </p></div><div class="section" title="Invalidation Guarantees"><div class="titlepage"><div><div><h6 class="title"><a id="associative.iterators.invalidation"></a>Invalidation Guarantees</h6></div></div></div><p>Consider the following snippet:</p><pre class="programlisting">
it = c.find(3); it = c.find(3);
c.erase(5); c.erase(5);
</pre><p> </pre><p>
@ -473,7 +445,7 @@
container. The graphic below shows three cases: A1 and A2 show container. The graphic below shows three cases: A1 and A2 show
a red-black tree; B1 and B2 show a probing hash-table; C1 and C2 a red-black tree; B1 and B2 show a probing hash-table; C1 and C2
show a collision-chaining hash table. show a collision-chaining hash table.
</p><div class="figure"><a name="id640886"></a><p class="title"><b>Figure 22.5. Effect of erase in different underlying data structures</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_invalidation_guarantee_erase.png" align="middle" alt="Effect of erase in different underlying data structures"></div></div></div><br class="figure-break"><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> </p><div class="figure"><a id="id614958"></a><p class="title"><strong>Figure 22.5. Effect of erase in different underlying data structures</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_invalidation_guarantee_erase.png" align="middle" alt="Effect of erase in different underlying data structures" /></div></div></div><br class="figure-break" /><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
Erasing 5 from A1 yields A2. Clearly, an iterator to 3 can Erasing 5 from A1 yields A2. Clearly, an iterator to 3 can
be de-referenced and incremented. The sequence of iterators be de-referenced and incremented. The sequence of iterators
changed, but in a way that is well-defined by the interface. changed, but in a way that is well-defined by the interface.
@ -495,7 +467,7 @@
to express whether <code class="varname">it</code> is valid or not. This to express whether <code class="varname">it</code> is valid or not. This
is true also for <code class="function">insert</code>. Again, the is true also for <code class="function">insert</code>. Again, the
iterator concept seems overloaded. iterator concept seems overloaded.
</p></div></div><div class="section" title="Functional"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.associative.functions"></a>Functional</h5></div></div></div><p> </p></div></div><div class="section" title="Functional"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.associative.functions"></a>Functional</h5></div></div></div><p>
</p><p> </p><p>
The design of the functional overlay to the underlying data The design of the functional overlay to the underlying data
structures differs slightly from some of the conventions used in structures differs slightly from some of the conventions used in
@ -506,7 +478,7 @@
rubric, the standard associative containers lack some useful rubric, the standard associative containers lack some useful
methods, and provide other methods which would be better methods, and provide other methods which would be better
removed. removed.
</p><div class="section" title="erase"><div class="titlepage"><div><div><h6 class="title"><a name="motivation.associative.functions.erase"></a><code class="function">erase</code></h6></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> </p><div class="section" title="erase"><div class="titlepage"><div><div><h6 class="title"><a id="motivation.associative.functions.erase"></a><code class="function">erase</code></h6></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
Order-preserving standard associative containers provide the Order-preserving standard associative containers provide the
method method
</p><pre class="programlisting"> </p><pre class="programlisting">
@ -578,7 +550,7 @@
is almost certain to do something is almost certain to do something
different than erasing all elements whose keys are between 2 different than erasing all elements whose keys are between 2
and 5, and is likely to produce other undefined behavior. and 5, and is likely to produce other undefined behavior.
</p></li></ol></div></div><div class="section" title="split and join"><div class="titlepage"><div><div><h6 class="title"><a name="motivation.associative.functions.split"></a> </p></li></ol></div></div><div class="section" title="split and join"><div class="titlepage"><div><div><h6 class="title"><a id="motivation.associative.functions.split"></a>
<code class="function">split</code> and <code class="function">join</code> <code class="function">split</code> and <code class="function">join</code>
</h6></div></div></div><p> </h6></div></div></div><p>
It is well-known that tree-based and trie-based container It is well-known that tree-based and trie-based container
@ -589,7 +561,7 @@
choices for tree-based container methods, especially, since as choices for tree-based container methods, especially, since as
noted just before, they are efficient replacements for erasing noted just before, they are efficient replacements for erasing
sub-sequences. sub-sequences.
</p></div><div class="section" title="insert"><div class="titlepage"><div><div><h6 class="title"><a name="motivation.associative.functions.insert"></a> </p></div><div class="section" title="insert"><div class="titlepage"><div><div><h6 class="title"><a id="motivation.associative.functions.insert"></a>
<code class="function">insert</code> <code class="function">insert</code>
</h6></div></div></div><p> </h6></div></div></div><p>
The standard associative containers provide methods of the form The standard associative containers provide methods of the form
@ -605,7 +577,7 @@
similar to constructors taking a range given by a pair of similar to constructors taking a range given by a pair of
iterators; the constructors, however, are transactional, whereas iterators; the constructors, however, are transactional, whereas
the insert methods are not; this is possibly confusing. the insert methods are not; this is possibly confusing.
</p></div><div class="section" title="operator== and operator&lt;="><div class="titlepage"><div><div><h6 class="title"><a name="motivation.associative.functions.compare"></a> </p></div><div class="section" title="operator== and operator&lt;="><div class="titlepage"><div><div><h6 class="title"><a id="motivation.associative.functions.compare"></a>
<code class="function">operator==</code> and <code class="function">operator&lt;=</code> <code class="function">operator==</code> and <code class="function">operator&lt;=</code>
</h6></div></div></div><p> </h6></div></div></div><p>
Associative containers are parametrized by policies allowing to Associative containers are parametrized by policies allowing to
@ -625,7 +597,7 @@
equivalence; also, are two containers considered equivalent if equivalence; also, are two containers considered equivalent if
they store the same values in different order? this is an they store the same values in different order? this is an
arbitrary decision. arbitrary decision.
</p></div></div></div><div class="section" title="Priority Queues"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.intro.motivation.priority_queue"></a>Priority Queues</h4></div></div></div><div class="section" title="Policy Choices"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.priority_queue.policy"></a>Policy Choices</h5></div></div></div><p> </p></div></div></div><div class="section" title="Priority Queues"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.intro.motivation.priority_queue"></a>Priority Queues</h4></div></div></div><div class="section" title="Policy Choices"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.priority_queue.policy"></a>Policy Choices</h5></div></div></div><p>
Priority queues are containers that allow efficiently inserting Priority queues are containers that allow efficiently inserting
values and accessing the maximal value (in the sense of the values and accessing the maximal value (in the sense of the
container's comparison functor). Their interface container's comparison functor). Their interface
@ -702,14 +674,14 @@
comparing the iterator returned by <code class="function">find</code> to the comparing the iterator returned by <code class="function">find</code> to the
iterator returned by <code class="function">end</code>, and not by comparing a iterator returned by <code class="function">end</code>, and not by comparing a
pointer returned by <code class="function">find</code> to <span class="type">NULL</span>. pointer returned by <code class="function">find</code> to <span class="type">NULL</span>.
</p></li></ol></div></li></ol></div></div><div class="section" title="Underlying Data Structures"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.priority_queue.underlying"></a>Underlying Data Structures</h5></div></div></div><p> </p></li></ol></div></li></ol></div></div><div class="section" title="Underlying Data Structures"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.priority_queue.underlying"></a>Underlying Data Structures</h5></div></div></div><p>
There are three main implementations of priority queues: the There are three main implementations of priority queues: the
first employs a binary heap, typically one which uses a first employs a binary heap, typically one which uses a
sequence; the second uses a tree (or forest of trees), which is sequence; the second uses a tree (or forest of trees), which is
typically less structured than an associative container's tree; typically less structured than an associative container's tree;
the third simply uses an associative container. These are the third simply uses an associative container. These are
shown in the figure below with labels A1 and A2, B, and C. shown in the figure below with labels A1 and A2, B, and C.
</p><div class="figure"><a name="id641449"></a><p class="title"><b>Figure 22.6. Underlying Priority Queue Data Structures</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_different_underlying_dss_2.png" align="middle" alt="Underlying Priority Queue Data Structures"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id615521"></a><p class="title"><strong>Figure 22.6. Underlying Priority Queue Data Structures</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_different_underlying_dss_2.png" align="middle" alt="Underlying Priority Queue Data Structures" /></div></div></div><br class="figure-break" /><p>
No single implementation can completely replace any of the No single implementation can completely replace any of the
others. Some have better <code class="function">push</code> others. Some have better <code class="function">push</code>
and <code class="function">pop</code> amortized performance, some have and <code class="function">pop</code> amortized performance, some have
@ -724,7 +696,7 @@
important for priority queues, since the invalidation guarantees important for priority queues, since the invalidation guarantees
of one of the most useful data structures - binary heaps - is of one of the most useful data structures - binary heaps - is
markedly different than those of most of the others. markedly different than those of most of the others.
</p></div><div class="section" title="Binary Heaps"><div class="titlepage"><div><div><h5 class="title"><a name="motivation.priority_queue.binary_heap"></a>Binary Heaps</h5></div></div></div><p> </p></div><div class="section" title="Binary Heaps"><div class="titlepage"><div><div><h5 class="title"><a id="motivation.priority_queue.binary_heap"></a>Binary Heaps</h5></div></div></div><p>
Binary heaps are one of the most useful underlying Binary heaps are one of the most useful underlying
data structures for priority queues. They are very efficient in data structures for priority queues. They are very efficient in
terms of memory (since they don't require per-value structure terms of memory (since they don't require per-value structure
@ -801,21 +773,21 @@
<code class="classname">std::priority_queue</code>, however, this will generally <code class="classname">std::priority_queue</code>, however, this will generally
change the order of growth of the entire sequence of change the order of growth of the entire sequence of
operations. operations.
</p></li></ol></div></div></div></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a name="pbds.biblio"></a> </p></li></ol></div></div></div></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="pbds.biblio"></a>
Bibliography Bibliography
</h2></div></div></div><div class="biblioentry" title="STL Exception Handling Contract"><a name="biblio.abrahams97exception"></a><p>[biblio.abrahams97exception] <span class="title"><i> </h2></div></div></div><div class="biblioentry" title="STL Exception Handling Contract"><a id="biblio.abrahams97exception"></a><p>[biblio.abrahams97exception] <span class="title"><em>
<a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1997/N1075.pdf" target="_top"> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1997/N1075.pdf" target="_top">
STL Exception Handling Contract STL Exception Handling Contract
</a> </a>
</i>. </span><span class="date">1997. </span><span class="author"><span class="firstname"> </em>. </span><span class="date">1997. </span><span class="author"><span class="firstname">
Dave Dave
</span> <span class="surname"> </span> <span class="surname">
Abrahams Abrahams
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
ISO SC22/WG21 ISO SC22/WG21
. </span></span></p></div><div class="biblioentry" title="Modern C++ Design: Generic Programming and Design Patterns Applied"><a name="biblio.alexandrescu01modern"></a><p>[biblio.alexandrescu01modern] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Modern C++ Design: Generic Programming and Design Patterns Applied"><a id="biblio.alexandrescu01modern"></a><p>[biblio.alexandrescu01modern] <span class="title"><em>
Modern C++ Design: Generic Programming and Design Patterns Applied Modern C++ Design: Generic Programming and Design Patterns Applied
</i>. </span><span class="date"> </em>. </span><span class="date">
2001 2001
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Andrei Andrei
@ -823,10 +795,10 @@
Alexandrescu Alexandrescu
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem"><a name="biblio.andrew04mtf"></a><p>[biblio.andrew04mtf] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem"><a id="biblio.andrew04mtf"></a><p>[biblio.andrew04mtf] <span class="title"><em>
MTF, Bit, and COMB: A Guide to Deterministic and Randomized MTF, Bit, and COMB: A Guide to Deterministic and Randomized
Algorithms for the List Update Problem Algorithms for the List Update Problem
</i>. </span><span class="authorgroup"><span class="firstname"> </em>. </span><span class="authorgroup"><span class="firstname">
K. K.
</span> <span class="surname"> </span> <span class="surname">
Andrew Andrew
@ -834,9 +806,9 @@
D. D.
</span> <span class="surname"> </span> <span class="surname">
Gleich Gleich
</span>. </span></p></div><div class="biblioentry" title="Why You Shouldn't Use set - and What You Should Use Instead"><a name="biblio.austern00noset"></a><p>[biblio.austern00noset] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="Why You Shouldn't Use set - and What You Should Use Instead"><a id="biblio.austern00noset"></a><p>[biblio.austern00noset] <span class="title"><em>
Why You Shouldn't Use set - and What You Should Use Instead Why You Shouldn't Use set - and What You Should Use Instead
</i>. </span><span class="date"> </em>. </span><span class="date">
April, 2000 April, 2000
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Matthew Matthew
@ -844,11 +816,11 @@
Austern Austern
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
C++ Report C++ Report
. </span></span></p></div><div class="biblioentry" title="A Proposal to Add Hashtables to the Standard Library"><a name="biblio.austern01htprop"></a><p>[biblio.austern01htprop] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="A Proposal to Add Hashtables to the Standard Library"><a id="biblio.austern01htprop"></a><p>[biblio.austern01htprop] <span class="title"><em>
<a class="link" href="http://www.open-std.org/JTC1/sc22/wg21/docs/papers/2001/n1326.html" target="_top"> <a class="link" href="http://www.open-std.org/JTC1/sc22/wg21/docs/papers/2001/n1326.html" target="_top">
A Proposal to Add Hashtables to the Standard Library A Proposal to Add Hashtables to the Standard Library
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
2001 2001
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Matthew Matthew
@ -856,9 +828,9 @@
Austern Austern
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
ISO SC22/WG21 ISO SC22/WG21
. </span></span></p></div><div class="biblioentry" title="Segmented iterators and hierarchical algorithms"><a name="biblio.austern98segmentedit"></a><p>[biblio.austern98segmentedit] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Segmented iterators and hierarchical algorithms"><a id="biblio.austern98segmentedit"></a><p>[biblio.austern98segmentedit] <span class="title"><em>
Segmented iterators and hierarchical algorithms Segmented iterators and hierarchical algorithms
</i>. </span><span class="date"> </em>. </span><span class="date">
April, 1998 April, 1998
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Matthew Matthew
@ -866,31 +838,31 @@
Austern Austern
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Generic Programming Generic Programming
. </span></span></p></div><div class="biblioentry" title="Boost Timer Library"><a name="biblio.dawestimer"></a><p>[biblio.dawestimer] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Boost Timer Library"><a id="biblio.dawestimer"></a><p>[biblio.dawestimer] <span class="title"><em>
<a class="link" href="www.boost.org/doc/libs/release/libs/timer/" target="_top"> <a class="link" href="www.boost.org/doc/libs/release/libs/timer/" target="_top">
Boost Timer Library Boost Timer Library
</a> </a>
</i>. </span><span class="author"><span class="firstname"> </em>. </span><span class="author"><span class="firstname">
Beeman Beeman
</span> <span class="surname"> </span> <span class="surname">
Dawes Dawes
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Boost Boost
. </span></span></p></div><div class="biblioentry" title="Boost Pool Library"><a name="biblio.clearypool"></a><p>[biblio.clearypool] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Boost Pool Library"><a id="biblio.clearypool"></a><p>[biblio.clearypool] <span class="title"><em>
<a class="link" href="www.boost.org/doc/libs/release/libs/pool/" target="_top"> <a class="link" href="www.boost.org/doc/libs/release/libs/pool/" target="_top">
Boost Pool Library Boost Pool Library
</a> </a>
</i>. </span><span class="author"><span class="firstname"> </em>. </span><span class="author"><span class="firstname">
Stephen Stephen
</span> <span class="surname"> </span> <span class="surname">
Cleary Cleary
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Boost Boost
. </span></span></p></div><div class="biblioentry" title="Boost Type Traits Library"><a name="biblio.maddocktraits"></a><p>[biblio.maddocktraits] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Boost Type Traits Library"><a id="biblio.maddocktraits"></a><p>[biblio.maddocktraits] <span class="title"><em>
<a class="link" href="www.boost.org/doc/libs/release/libs/type_traits/" target="_top"> <a class="link" href="www.boost.org/doc/libs/release/libs/type_traits/" target="_top">
Boost Type Traits Library Boost Type Traits Library
</a> </a>
</i>. </span><span class="authorgroup"><span class="firstname"> </em>. </span><span class="authorgroup"><span class="firstname">
Maddock Maddock
</span> <span class="surname"> </span> <span class="surname">
John John
@ -900,17 +872,17 @@
Cleary Cleary
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Boost Boost
. </span></span></p></div><div class="biblioentry" title="Worst-case efficient priority queues"><a name="biblio.brodal96priority"></a><p>[biblio.brodal96priority] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Worst-case efficient priority queues"><a id="biblio.brodal96priority"></a><p>[biblio.brodal96priority] <span class="title"><em>
<a class="link" href="http://portal.acm.org/citation.cfm?id=313883" target="_top"> <a class="link" href="http://portal.acm.org/citation.cfm?id=313883" target="_top">
Worst-case efficient priority queues Worst-case efficient priority queues
</a> </a>
</i>. </span><span class="author"><span class="firstname"> </em>. </span><span class="author"><span class="firstname">
Gerth Gerth
</span> <span class="surname"> </span> <span class="surname">
Stolting Brodal Stolting Brodal
</span>. </span></p></div><div class="biblioentry" title="Efficient C++ Programming Techniques"><a name="biblio.bulkamayheweff"></a><p>[biblio.bulkamayheweff] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="Efficient C++ Programming Techniques"><a id="biblio.bulkamayheweff"></a><p>[biblio.bulkamayheweff] <span class="title"><em>
Efficient C++ Programming Techniques Efficient C++ Programming Techniques
</i>. </span><span class="date"> </em>. </span><span class="date">
1997 1997
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
D. D.
@ -922,9 +894,9 @@
Mayhew Mayhew
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="Introduction to Algorithms, 2nd edition"><a name="biblio.clrs2001"></a><p>[biblio.clrs2001] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Introduction to Algorithms, 2nd edition"><a id="biblio.clrs2001"></a><p>[biblio.clrs2001] <span class="title"><em>
Introduction to Algorithms, 2nd edition Introduction to Algorithms, 2nd edition
</i>. </span><span class="date"> </em>. </span><span class="date">
2001 2001
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
T. H. T. H.
@ -944,9 +916,9 @@
Stein Stein
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
MIT Press MIT Press
. </span></span></p></div><div class="biblioentry" title="Balls and bins: A study in negative dependence"><a name="biblio.dubhashi98neg"></a><p>[biblio.dubhashi98neg] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Balls and bins: A study in negative dependence"><a id="biblio.dubhashi98neg"></a><p>[biblio.dubhashi98neg] <span class="title"><em>
Balls and bins: A study in negative dependence Balls and bins: A study in negative dependence
</i>. </span><span class="date"> </em>. </span><span class="date">
1998 1998
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
D. D.
@ -958,9 +930,9 @@
Ranjan Ranjan
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Random Structures and Algorithms 13 Random Structures and Algorithms 13
. </span></span></p></div><div class="biblioentry" title="Extendible hashing - a fast access method for dynamic files"><a name="biblio.fagin79extendible"></a><p>[biblio.fagin79extendible] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Extendible hashing - a fast access method for dynamic files"><a id="biblio.fagin79extendible"></a><p>[biblio.fagin79extendible] <span class="title"><em>
Extendible hashing - a fast access method for dynamic files Extendible hashing - a fast access method for dynamic files
</i>. </span><span class="date"> </em>. </span><span class="date">
1979 1979
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
R. R.
@ -980,21 +952,21 @@
Strong Strong
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
ACM Trans. Database Syst. 4 ACM Trans. Database Syst. 4
. </span></span></p></div><div class="biblioentry" title="Ptset: Sets of integers implemented as Patricia trees"><a name="biblio.filliatre2000ptset"></a><p>[biblio.filliatre2000ptset] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Ptset: Sets of integers implemented as Patricia trees"><a id="biblio.filliatre2000ptset"></a><p>[biblio.filliatre2000ptset] <span class="title"><em>
<a class="link" href="http://cristal.inria.fr/~frisch/icfp06_contest/advtr/applyOmatic/ptset.ml" target="_top"> <a class="link" href="http://cristal.inria.fr/~frisch/icfp06_contest/advtr/applyOmatic/ptset.ml" target="_top">
Ptset: Sets of integers implemented as Patricia trees Ptset: Sets of integers implemented as Patricia trees
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
2000 2000
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Jean-Christophe Jean-Christophe
</span> <span class="surname"> </span> <span class="surname">
Filliatre Filliatre
</span>. </span></p></div><div class="biblioentry" title="The pairing heap: a new form of self-adjusting heap"><a name="biblio.fredman86pairing"></a><p>[biblio.fredman86pairing] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="The pairing heap: a new form of self-adjusting heap"><a id="biblio.fredman86pairing"></a><p>[biblio.fredman86pairing] <span class="title"><em>
<a class="link" href="http://www.cs.cmu.edu/~sleator/papers/pairing-heaps.pdf" target="_top"> <a class="link" href="http://www.cs.cmu.edu/~sleator/papers/pairing-heaps.pdf" target="_top">
The pairing heap: a new form of self-adjusting heap The pairing heap: a new form of self-adjusting heap
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
1986 1986
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
M. L. M. L.
@ -1012,9 +984,9 @@
R. E. R. E.
</span> <span class="surname"> </span> <span class="surname">
Tarjan Tarjan
</span>. </span></p></div><div class="biblioentry" title="Design Patterns - Elements of Reusable Object-Oriented Software"><a name="biblio.gof"></a><p>[biblio.gof] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="Design Patterns - Elements of Reusable Object-Oriented Software"><a id="biblio.gof"></a><p>[biblio.gof] <span class="title"><em>
Design Patterns - Elements of Reusable Object-Oriented Software Design Patterns - Elements of Reusable Object-Oriented Software
</i>. </span><span class="date"> </em>. </span><span class="date">
1995 1995
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
E. E.
@ -1034,9 +1006,9 @@
Vlissides Vlissides
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="Order-preserving key transformations"><a name="biblio.garg86order"></a><p>[biblio.garg86order] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Order-preserving key transformations"><a id="biblio.garg86order"></a><p>[biblio.garg86order] <span class="title"><em>
Order-preserving key transformations Order-preserving key transformations
</i>. </span><span class="date"> </em>. </span><span class="date">
1986 1986
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
A. K. A. K.
@ -1048,9 +1020,9 @@
Gotlieb Gotlieb
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Trans. Database Syst. 11 Trans. Database Syst. 11
. </span></span></p></div><div class="biblioentry" title="Making a real hash of things"><a name="biblio.hyslop02making"></a><p>[biblio.hyslop02making] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Making a real hash of things"><a id="biblio.hyslop02making"></a><p>[biblio.hyslop02making] <span class="title"><em>
Making a real hash of things Making a real hash of things
</i>. </span><span class="date"> </em>. </span><span class="date">
May 2002 May 2002
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
J. J.
@ -1062,9 +1034,9 @@
Sutter Sutter
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
C++ Report C++ Report
. </span></span></p></div><div class="biblioentry" title="The C++ Standard Library - A Tutorial and Reference"><a name="biblio.jossutis01stl"></a><p>[biblio.jossutis01stl] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="The C++ Standard Library - A Tutorial and Reference"><a id="biblio.jossutis01stl"></a><p>[biblio.jossutis01stl] <span class="title"><em>
The C++ Standard Library - A Tutorial and Reference The C++ Standard Library - A Tutorial and Reference
</i>. </span><span class="date"> </em>. </span><span class="date">
2001 2001
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
N. M. N. M.
@ -1072,11 +1044,11 @@
Jossutis Jossutis
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="New Heap Data Structures"><a name="biblio.kt99fat_heaps"></a><p>[biblio.kt99fat_heaps] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="New Heap Data Structures"><a id="biblio.kt99fat_heaps"></a><p>[biblio.kt99fat_heaps] <span class="title"><em>
<a class="link" href="http://www.cs.princeton.edu/research/techreps/TR-597-99" target="_top"> <a class="link" href="http://www.cs.princeton.edu/research/techreps/TR-597-99" target="_top">
New Heap Data Structures New Heap Data Structures
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
1999 1999
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
Haim Haim
@ -1086,9 +1058,9 @@
Robert E. Robert E.
</span> <span class="surname"> </span> <span class="surname">
Tarjan Tarjan
</span>. </span></p></div><div class="biblioentry" title="Are Set Iterators Mutable or Immutable?"><a name="biblio.kleft00sets"></a><p>[biblio.kleft00sets] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="Are Set Iterators Mutable or Immutable?"><a id="biblio.kleft00sets"></a><p>[biblio.kleft00sets] <span class="title"><em>
Are Set Iterators Mutable or Immutable? Are Set Iterators Mutable or Immutable?
</i>. </span><span class="date"> </em>. </span><span class="date">
October 2000 October 2000
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
Angelika Angelika
@ -1100,9 +1072,9 @@
Kleft Kleft
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Jornal C/C++ Users Jornal
. </span></span></p></div><div class="biblioentry" title="The Art of Computer Programming - Sorting and Searching"><a name="biblio.knuth98sorting"></a><p>[biblio.knuth98sorting] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="The Art of Computer Programming - Sorting and Searching"><a id="biblio.knuth98sorting"></a><p>[biblio.knuth98sorting] <span class="title"><em>
The Art of Computer Programming - Sorting and Searching The Art of Computer Programming - Sorting and Searching
</i>. </span><span class="date"> </em>. </span><span class="date">
1998 1998
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
D. E. D. E.
@ -1110,9 +1082,9 @@
Knuth Knuth
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="Data abstraction and hierarchy"><a name="biblio.liskov98data"></a><p>[biblio.liskov98data] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Data abstraction and hierarchy"><a id="biblio.liskov98data"></a><p>[biblio.liskov98data] <span class="title"><em>
Data abstraction and hierarchy Data abstraction and hierarchy
</i>. </span><span class="date"> </em>. </span><span class="date">
May 1998 May 1998
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
B. B.
@ -1120,9 +1092,9 @@
Liskov Liskov
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
SIGPLAN Notices 23 SIGPLAN Notices 23
. </span></span></p></div><div class="biblioentry" title="Linear hashing: A new tool for file and table addressing"><a name="biblio.litwin80lh"></a><p>[biblio.litwin80lh] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Linear hashing: A new tool for file and table addressing"><a id="biblio.litwin80lh"></a><p>[biblio.litwin80lh] <span class="title"><em>
Linear hashing: A new tool for file and table addressing Linear hashing: A new tool for file and table addressing
</i>. </span><span class="date"> </em>. </span><span class="date">
June 1980 June 1980
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
W. W.
@ -1130,19 +1102,19 @@
Litwin Litwin
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Proceedings of International Conference on Very Large Data Bases Proceedings of International Conference on Very Large Data Bases
. </span></span></p></div><div class="biblioentry" title="Deamortization - Part 2: Binomial Heaps"><a name="biblio.maverik_lowerbounds"></a><p>[biblio.maverik_lowerbounds] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Deamortization - Part 2: Binomial Heaps"><a id="biblio.maverik_lowerbounds"></a><p>[biblio.maverik_lowerbounds] <span class="title"><em>
<a class="link" href="http://magic.aladdin.cs.cmu.edu/2005/08/01/deamortization-part-2-binomial-heaps" target="_top"> <a class="link" href="http://magic.aladdin.cs.cmu.edu/2005/08/01/deamortization-part-2-binomial-heaps" target="_top">
Deamortization - Part 2: Binomial Heaps Deamortization - Part 2: Binomial Heaps
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
2005 2005
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Maverik Maverik
</span> <span class="surname"> </span> <span class="surname">
Woo Woo
</span>. </span></p></div><div class="biblioentry" title="More Effective C++: 35 New Ways to Improve Your Programs and Designs"><a name="biblio.meyers96more"></a><p>[biblio.meyers96more] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="More Effective C++: 35 New Ways to Improve Your Programs and Designs"><a id="biblio.meyers96more"></a><p>[biblio.meyers96more] <span class="title"><em>
More Effective C++: 35 New Ways to Improve Your Programs and Designs More Effective C++: 35 New Ways to Improve Your Programs and Designs
</i>. </span><span class="date"> </em>. </span><span class="date">
1996 1996
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Scott Scott
@ -1150,9 +1122,9 @@
Meyers Meyers
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="How Non-Member Functions Improve Encapsulation"><a name="biblio.meyers00nonmember"></a><p>[biblio.meyers00nonmember] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="How Non-Member Functions Improve Encapsulation"><a id="biblio.meyers00nonmember"></a><p>[biblio.meyers00nonmember] <span class="title"><em>
How Non-Member Functions Improve Encapsulation How Non-Member Functions Improve Encapsulation
</i>. </span><span class="date"> </em>. </span><span class="date">
2000 2000
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Scott Scott
@ -1160,9 +1132,9 @@
Meyers Meyers
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Journal C/C++ Users Journal
. </span></span></p></div><div class="biblioentry" title="Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library"><a name="biblio.meyers01stl"></a><p>[biblio.meyers01stl] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library"><a id="biblio.meyers01stl"></a><p>[biblio.meyers01stl] <span class="title"><em>
Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library
</i>. </span><span class="date"> </em>. </span><span class="date">
2001 2001
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Scott Scott
@ -1170,9 +1142,9 @@
Meyers Meyers
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="Class Template, Member Template - or Both?"><a name="biblio.meyers02both"></a><p>[biblio.meyers02both] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Class Template, Member Template - or Both?"><a id="biblio.meyers02both"></a><p>[biblio.meyers02both] <span class="title"><em>
Class Template, Member Template - or Both? Class Template, Member Template - or Both?
</i>. </span><span class="date"> </em>. </span><span class="date">
2003 2003
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Scott Scott
@ -1180,9 +1152,9 @@
Meyers Meyers
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
C/C++ Users Journal C/C++ Users Journal
. </span></span></p></div><div class="biblioentry" title="Randomized Algorithms"><a name="biblio.motwani95random"></a><p>[biblio.motwani95random] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Randomized Algorithms"><a id="biblio.motwani95random"></a><p>[biblio.motwani95random] <span class="title"><em>
Randomized Algorithms Randomized Algorithms
</i>. </span><span class="date"> </em>. </span><span class="date">
2003 2003
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
R. R.
@ -1194,23 +1166,23 @@
Raghavan Raghavan
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Cambridge University Press Cambridge University Press
. </span></span></p></div><div class="biblioentry" title="COM: Component Model Object Technologies"><a name="biblio.mscom"></a><p>[biblio.mscom] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="COM: Component Model Object Technologies"><a id="biblio.mscom"></a><p>[biblio.mscom] <span class="title"><em>
<a class="link" href="http://www.microsoft.com/com" target="_top"> <a class="link" href="http://www.microsoft.com/com" target="_top">
COM: Component Model Object Technologies COM: Component Model Object Technologies
</a> </a>
</i>. </span><span class="publisher"><span class="publishername"> </em>. </span><span class="publisher"><span class="publishername">
Microsoft Microsoft
. </span></span></p></div><div class="biblioentry" title="Rationale for Adding Hash Tables to the C++ Standard Template Library"><a name="biblio.musser95rationale"></a><p>[biblio.musser95rationale] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Rationale for Adding Hash Tables to the C++ Standard Template Library"><a id="biblio.musser95rationale"></a><p>[biblio.musser95rationale] <span class="title"><em>
Rationale for Adding Hash Tables to the C++ Standard Template Library Rationale for Adding Hash Tables to the C++ Standard Template Library
</i>. </span><span class="date"> </em>. </span><span class="date">
1995 1995
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
David R. David R.
</span> <span class="surname"> </span> <span class="surname">
Musser Musser
</span>. </span></p></div><div class="biblioentry" title="STL Tutorial and Reference Guide"><a name="biblio.musser96stltutorial"></a><p>[biblio.musser96stltutorial] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="STL Tutorial and Reference Guide"><a id="biblio.musser96stltutorial"></a><p>[biblio.musser96stltutorial] <span class="title"><em>
STL Tutorial and Reference Guide STL Tutorial and Reference Guide
</i>. </span><span class="date"> </em>. </span><span class="date">
1996 1996
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
David R. David R.
@ -1222,10 +1194,10 @@
Saini Saini
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="Priority Queues and the STL"><a name="biblio.nelson96stlpq"></a><p>[biblio.nelson96stlpq] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Priority Queues and the STL"><a id="biblio.nelson96stlpq"></a><p>[biblio.nelson96stlpq] <span class="title"><em>
<a class="link" href="http://www.dogma.net/markn/articles/pq_stl/priority.htm" target="_top">Priority Queues and the STL <a class="link" href="http://www.dogma.net/markn/articles/pq_stl/priority.htm" target="_top">Priority Queues and the STL
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
January 1996 January 1996
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Mark Mark
@ -1233,9 +1205,9 @@
Nelson Nelson
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Dr. Dobbs Journal Dr. Dobbs Journal
. </span></span></p></div><div class="biblioentry" title="Fast mergeable integer maps"><a name="biblio.okasaki98mereable"></a><p>[biblio.okasaki98mereable] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Fast mergeable integer maps"><a id="biblio.okasaki98mereable"></a><p>[biblio.okasaki98mereable] <span class="title"><em>
Fast mergeable integer maps Fast mergeable integer maps
</i>. </span><span class="date"> </em>. </span><span class="date">
September 1998 September 1998
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
C. C.
@ -1247,23 +1219,23 @@
Gill Gill
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
In Workshop on ML In Workshop on ML
. </span></span></p></div><div class="biblioentry" title="Standard Template Library Programmer's Guide"><a name="biblio.sgi_stl"></a><p>[biblio.sgi_stl] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Standard Template Library Programmer's Guide"><a id="biblio.sgi_stl"></a><p>[biblio.sgi_stl] <span class="title"><em>
<a class="link" href="http://www.sgi.com/tech/stl" target="_top"> <a class="link" href="http://www.sgi.com/tech/stl" target="_top">
Standard Template Library Programmer's Guide Standard Template Library Programmer's Guide
</a> </a>
</i>. </span><span class="author"><span class="firstname"> </em>. </span><span class="author"><span class="firstname">
Matt Matt
</span> <span class="surname"> </span> <span class="surname">
Austern Austern
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
SGI SGI
. </span></span></p></div><div class="biblioentry" title="select"><a name="biblio.select_man"></a><p>[biblio.select_man] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="select"><a id="biblio.select_man"></a><p>[biblio.select_man] <span class="title"><em>
<a class="link" href="http://www.scit.wlv.ac.uk/cgi-bin/mansec?3C+select" target="_top"> <a class="link" href="http://www.scit.wlv.ac.uk/cgi-bin/mansec?3C+select" target="_top">
select select
</a> </a>
</i>. </span></p></div><div class="biblioentry" title="Amortized Efficiency of List Update Problems"><a name="biblio.sleator84amortized"></a><p>[biblio.sleator84amortized] <span class="title"><i> </em>. </span></p></div><div class="biblioentry" title="Amortized Efficiency of List Update Problems"><a id="biblio.sleator84amortized"></a><p>[biblio.sleator84amortized] <span class="title"><em>
Amortized Efficiency of List Update Problems Amortized Efficiency of List Update Problems
</i>. </span><span class="date"> </em>. </span><span class="date">
1984 1984
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
D. D. D. D.
@ -1275,9 +1247,9 @@
Tarjan Tarjan
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
ACM Symposium on Theory of Computing ACM Symposium on Theory of Computing
. </span></span></p></div><div class="biblioentry" title="Self-Adjusting Binary Search Trees"><a name="biblio.sleator85self"></a><p>[biblio.sleator85self] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Self-Adjusting Binary Search Trees"><a id="biblio.sleator85self"></a><p>[biblio.sleator85self] <span class="title"><em>
Self-Adjusting Binary Search Trees Self-Adjusting Binary Search Trees
</i>. </span><span class="date"> </em>. </span><span class="date">
1985 1985
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
D. D. D. D.
@ -1289,9 +1261,9 @@
Tarjan Tarjan
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
ACM Symposium on Theory of Computing ACM Symposium on Theory of Computing
. </span></span></p></div><div class="biblioentry" title="The Standard Template Library"><a name="biblio.stepanov94standard"></a><p>[biblio.stepanov94standard] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="The Standard Template Library"><a id="biblio.stepanov94standard"></a><p>[biblio.stepanov94standard] <span class="title"><em>
The Standard Template Library The Standard Template Library
</i>. </span><span class="date"> </em>. </span><span class="date">
1984 1984
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
A. A. A. A.
@ -1301,9 +1273,9 @@
M. M.
</span> <span class="surname"> </span> <span class="surname">
Lee Lee
</span>. </span></p></div><div class="biblioentry" title="The C++ Programming Langugage"><a name="biblio.stroustrup97cpp"></a><p>[biblio.stroustrup97cpp] <span class="title"><i> </span>. </span></p></div><div class="biblioentry" title="The C++ Programming Langugage"><a id="biblio.stroustrup97cpp"></a><p>[biblio.stroustrup97cpp] <span class="title"><em>
The C++ Programming Langugage The C++ Programming Langugage
</i>. </span><span class="date"> </em>. </span><span class="date">
1997 1997
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
Bjarne Bjarne
@ -1311,9 +1283,9 @@
Stroustrup Stroustrup
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="C++ Templates: The Complete Guide"><a name="biblio.vandevoorde2002cpptemplates"></a><p>[biblio.vandevoorde2002cpptemplates] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="C++ Templates: The Complete Guide"><a id="biblio.vandevoorde2002cpptemplates"></a><p>[biblio.vandevoorde2002cpptemplates] <span class="title"><em>
C++ Templates: The Complete Guide C++ Templates: The Complete Guide
</i>. </span><span class="date"> </em>. </span><span class="date">
2002 2002
. </span><span class="authorgroup"><span class="firstname"> . </span><span class="authorgroup"><span class="firstname">
D. D.
@ -1325,11 +1297,11 @@
Josuttis Josuttis
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
Addison-Wesley Publishing Company Addison-Wesley Publishing Company
. </span></span></p></div><div class="biblioentry" title="Thirty Years Among the Dead"><a name="biblio.wickland96thirty"></a><p>[biblio.wickland96thirty] <span class="title"><i> . </span></span></p></div><div class="biblioentry" title="Thirty Years Among the Dead"><a id="biblio.wickland96thirty"></a><p>[biblio.wickland96thirty] <span class="title"><em>
<a class="link" href="http://myweb.wvnet.edu/~gsa00121/books/amongdead30.zip" target="_top"> <a class="link" href="http://myweb.wvnet.edu/~gsa00121/books/amongdead30.zip" target="_top">
Thirty Years Among the Dead Thirty Years Among the Dead
</a> </a>
</i>. </span><span class="date"> </em>. </span><span class="date">
1996 1996
. </span><span class="author"><span class="firstname"> . </span><span class="author"><span class="firstname">
C. A. C. A.
@ -1337,4 +1309,4 @@
Wickland Wickland
</span>. </span><span class="publisher"><span class="publishername"> </span>. </span><span class="publisher"><span class="publishername">
National Psychological Institute National Psychological Institute
. </span></span></p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch21s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures_using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html> . </span></span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt03ch21s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures_using.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Implementation </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Using</td></tr></table></div></body></html>

View File

@ -1,34 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Acknowledgments</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Acknowledgments</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10;&#9;ISO C++&#10; , &#10;&#9;policy&#10; , &#10;&#9;container&#10; , &#10;&#9;data&#10; , &#10;&#9;structure&#10; , &#10;&#9;associated&#10; , &#10;&#9;tree&#10; , &#10;&#9;trie&#10; , &#10;&#9;hash&#10; , &#10;&#9;metaprogramming&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures" /><link rel="prev" href="policy_based_data_structures_test.html" title="Testing" /><link rel="next" href="ext_containers.html" title="Chapter 23. HP/SGI Extensions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Acknowledgments</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_based_data_structures_test.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr></table><hr /></div><div class="section" title="Acknowledgments"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pbds.ack"></a>Acknowledgments</h2></div></div></div><p>
policy
,
container
,
data
,
structure
,
associated
,
tree
,
trie
,
hash
,
metaprogramming
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures"><link rel="prev" href="policy_based_data_structures_test.html" title="Testing"><link rel="next" href="ext_containers.html" title="Chapter 23. HP/SGI Extensions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Acknowledgments</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_based_data_structures_test.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr></table><hr></div><div class="section" title="Acknowledgments"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pbds.ack"></a>Acknowledgments</h2></div></div></div><p>
Written by Ami Tavory and Vladimir Dreizin (IBM Haifa Research Written by Ami Tavory and Vladimir Dreizin (IBM Haifa Research
Laboratories), and Benjamin Kosnik (Red Hat). Laboratories), and Benjamin Kosnik (Red Hat).
</p><p> </p><p>
@ -54,4 +26,4 @@
attributing to him any flaws in the design or implementation of the attributing to him any flaws in the design or implementation of the
library). library).
</p><p>We would like to thank Matt Austern for the suggestion to </p><p>We would like to thank Matt Austern for the suggestion to
include tries.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_based_data_structures_test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Testing </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. HP/SGI Extensions</td></tr></table></div></body></html> include tries.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_based_data_structures_test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Testing </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 23. HP/SGI Extensions</td></tr></table></div></body></html>

View File

@ -1,34 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10;&#9;ISO C++&#10; , &#10;&#9;policy&#10; , &#10;&#9;container&#10; , &#10;&#9;data&#10; , &#10;&#9;structure&#10; , &#10;&#9;associated&#10; , &#10;&#9;tree&#10; , &#10;&#9;trie&#10; , &#10;&#9;hash&#10; , &#10;&#9;metaprogramming&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures" /><link rel="prev" href="policy_data_structures_using.html" title="Using" /><link rel="next" href="policy_based_data_structures_test.html" title="Testing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures_using.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="policy_based_data_structures_test.html">Next</a></td></tr></table><hr /></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.pbds.design"></a>Design</h2></div></div></div><p></p><div class="section" title="Concepts"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.design.concepts"></a>Concepts</h3></div></div></div><div class="section" title="Null Policy Classes"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.concepts.null_type"></a>Null Policy Classes</h4></div></div></div><p>
policy
,
container
,
data
,
structure
,
associated
,
tree
,
trie
,
hash
,
metaprogramming
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures"><link rel="prev" href="policy_data_structures_using.html" title="Using"><link rel="next" href="policy_based_data_structures_test.html" title="Testing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures_using.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="policy_based_data_structures_test.html">Next</a></td></tr></table><hr></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="containers.pbds.design"></a>Design</h2></div></div></div><p></p><div class="section" title="Concepts"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.design.concepts"></a>Concepts</h3></div></div></div><div class="section" title="Null Policy Classes"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.concepts.null_type"></a>Null Policy Classes</h4></div></div></div><p>
Associative containers are typically parametrized by various Associative containers are typically parametrized by various
policies. For example, a hash-based associative container is policies. For example, a hash-based associative container is
parametrized by a hash-functor, transforming each key into an parametrized by a hash-functor, transforming each key into an
@ -55,7 +27,7 @@
places simplifications are made possible with this technique places simplifications are made possible with this technique
include node updates in tree and trie data structures, and hash include node updates in tree and trie data structures, and hash
and probe functions for hash data structures. and probe functions for hash data structures.
</p></div><div class="section" title="Map and Set Semantics"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.concepts.associative_semantics"></a>Map and Set Semantics</h4></div></div></div><div class="section" title="Distinguishing Between Maps and Sets"><div class="titlepage"><div><div><h5 class="title"><a name="concepts.associative_semantics.set_vs_map"></a> </p></div><div class="section" title="Map and Set Semantics"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.concepts.associative_semantics"></a>Map and Set Semantics</h4></div></div></div><div class="section" title="Distinguishing Between Maps and Sets"><div class="titlepage"><div><div><h5 class="title"><a id="concepts.associative_semantics.set_vs_map"></a>
Distinguishing Between Maps and Sets Distinguishing Between Maps and Sets
</h5></div></div></div><p> </h5></div></div></div><p>
Anyone familiar with the standard knows that there are four kinds Anyone familiar with the standard knows that there are four kinds
@ -121,7 +93,7 @@
</p><p> </p><p>
When one uses a "multimap," one should choose with care the When one uses a "multimap," one should choose with care the
type of container used for secondary keys. type of container used for secondary keys.
</p></div><div class="section" title="Alternatives to std::multiset and std::multimap"><div class="titlepage"><div><div><h5 class="title"><a name="concepts.associative_semantics.multi"></a>Alternatives to <code class="classname">std::multiset</code> and <code class="classname">std::multimap</code></h5></div></div></div><p> </p></div><div class="section" title="Alternatives to std::multiset and std::multimap"><div class="titlepage"><div><div><h5 class="title"><a id="concepts.associative_semantics.multi"></a>Alternatives to <code class="classname">std::multiset</code> and <code class="classname">std::multimap</code></h5></div></div></div><p>
Brace onself: this library does not contain containers like Brace onself: this library does not contain containers like
<code class="classname">std::multimap</code> or <code class="classname">std::multimap</code> or
<code class="classname">std::multiset</code>. Instead, these data <code class="classname">std::multiset</code>. Instead, these data
@ -199,7 +171,7 @@
naturally; collision-chaining hash tables (label B) store naturally; collision-chaining hash tables (label B) store
equivalent-key values in the same bucket, the bucket can be equivalent-key values in the same bucket, the bucket can be
arranged so that equivalent-key values are consecutive. arranged so that equivalent-key values are consecutive.
</p><div class="figure"><a name="id643593"></a><p class="title"><b>Figure 22.8. Non-unique Mapping Standard Containers</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_embedded_lists_1.png" align="middle" alt="Non-unique Mapping Standard Containers"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id617664"></a><p class="title"><strong>Figure 22.8. Non-unique Mapping Standard Containers</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_embedded_lists_1.png" align="middle" alt="Non-unique Mapping Standard Containers" /></div></div></div><br class="figure-break" /><p>
Put differently, the standards' non-unique mapping Put differently, the standards' non-unique mapping
associative-containers are associative containers that map associative-containers are associative containers that map
primary keys to linked lists that are embedded into the primary keys to linked lists that are embedded into the
@ -207,10 +179,10 @@
containers from the first graphic above, this time with containers from the first graphic above, this time with
the embedded linked lists of the grayed nodes marked the embedded linked lists of the grayed nodes marked
explicitly. explicitly.
</p><div class="figure"><a name="fig.pbds_embedded_lists_2"></a><p class="title"><b>Figure 22.9.  </p><div class="figure"><a id="fig.pbds_embedded_lists_2"></a><p class="title"><strong>Figure 22.9. 
Effect of embedded lists in Effect of embedded lists in
<code class="classname">std::multimap</code> <code class="classname">std::multimap</code>
</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_embedded_lists_2.png" align="middle" alt="Effect of embedded lists in std::multimap"></div></div></div><br class="figure-break"><p> </strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_embedded_lists_2.png" align="middle" alt="Effect of embedded lists in std::multimap" /></div></div></div><br class="figure-break" /><p>
These embedded linked lists have several disadvantages. These embedded linked lists have several disadvantages.
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
The underlying data structure embeds the linked lists The underlying data structure embeds the linked lists
@ -281,7 +253,7 @@
first graphic above. Labels A and B, respectively. Each shaded first graphic above. Labels A and B, respectively. Each shaded
box represents some size-type or secondary box represents some size-type or secondary
associative-container. associative-container.
</p><div class="figure"><a name="id643789"></a><p class="title"><b>Figure 22.10. Non-unique Mapping Containers</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_embedded_lists_3.png" align="middle" alt="Non-unique Mapping Containers"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id617860"></a><p class="title"><strong>Figure 22.10. Non-unique Mapping Containers</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_embedded_lists_3.png" align="middle" alt="Non-unique Mapping Containers" /></div></div></div><br class="figure-break" /><p>
In the first example above, then, one would use an associative In the first example above, then, one would use an associative
container mapping each user to an associative container which container mapping each user to an associative container which
maps each application id to a start time (see maps each application id to a start time (see
@ -293,7 +265,7 @@
</p><p> </p><p>
See the discussion in list-based container types for containers See the discussion in list-based container types for containers
especially suited as secondary associative-containers. especially suited as secondary associative-containers.
</p></div></div><div class="section" title="Iterator Semantics"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.concepts.iterator_semantics"></a>Iterator Semantics</h4></div></div></div><div class="section" title="Point and Range Iterators"><div class="titlepage"><div><div><h5 class="title"><a name="concepts.iterator_semantics.point_and_range"></a>Point and Range Iterators</h5></div></div></div><p> </p></div></div><div class="section" title="Iterator Semantics"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.concepts.iterator_semantics"></a>Iterator Semantics</h4></div></div></div><div class="section" title="Point and Range Iterators"><div class="titlepage"><div><div><h5 class="title"><a id="concepts.iterator_semantics.point_and_range"></a>Point and Range Iterators</h5></div></div></div><p>
Iterator concepts are bifurcated in this design, and are Iterator concepts are bifurcated in this design, and are
comprised of point-type and range-type iteration. comprised of point-type and range-type iteration.
</p><p> </p><p>
@ -314,7 +286,7 @@
implementation, including that of C++ standard library implementation, including that of C++ standard library
components), but in this design, it is made explicit. They are components), but in this design, it is made explicit. They are
distinct types. distinct types.
</p></div><div class="section" title="Distinguishing Point and Range Iterators"><div class="titlepage"><div><div><h5 class="title"><a name="concepts.iterator_semantics.both"></a>Distinguishing Point and Range Iterators</h5></div></div></div><p>When using this library, is necessary to differentiate </p></div><div class="section" title="Distinguishing Point and Range Iterators"><div class="titlepage"><div><div><h5 class="title"><a id="concepts.iterator_semantics.both"></a>Distinguishing Point and Range Iterators</h5></div></div></div><p>When using this library, is necessary to differentiate
between two types of methods and iterators: point-type methods and between two types of methods and iterators: point-type methods and
iterators, and range-type methods and iterators. Each associative iterators, and range-type methods and iterators. Each associative
container's interface includes the methods:</p><pre class="programlisting"> container's interface includes the methods:</p><pre class="programlisting">
@ -334,7 +306,7 @@
shows invariants for order-preserving containers: point-type shows invariants for order-preserving containers: point-type
iterators are synonymous with range-type iterators. iterators are synonymous with range-type iterators.
Orthogonally, <span class="emphasis"><em>C</em></span>shows invariants for "set" Orthogonally, <span class="emphasis"><em>C</em></span>shows invariants for "set"
containers: iterators are synonymous with const iterators.</p><div class="figure"><a name="id643954"></a><p class="title"><b>Figure 22.11. Point Iterator Hierarchy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_point_iterator_hierarchy.png" align="middle" alt="Point Iterator Hierarchy"></div></div></div><br class="figure-break"><p>Note that point-type iterators in self-organizing containers containers: iterators are synonymous with const iterators.</p><div class="figure"><a id="id618026"></a><p class="title"><strong>Figure 22.11. Point Iterator Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_point_iterator_hierarchy.png" align="middle" alt="Point Iterator Hierarchy" /></div></div></div><br class="figure-break" /><p>Note that point-type iterators in self-organizing containers
(hash-based associative containers) lack movement (hash-based associative containers) lack movement
operators, such as <code class="literal">operator++</code> - in fact, this operators, such as <code class="literal">operator++</code> - in fact, this
is the reason why this library differentiates from the standard C++ librarys is the reason why this library differentiates from the standard C++ librarys
@ -350,7 +322,7 @@
a concept in C++ standardese, which is the category of iterators a concept in C++ standardese, which is the category of iterators
with no movement capabilities.) All other standard C++ library with no movement capabilities.) All other standard C++ library
tags, such as <code class="literal">forward_iterator_tag</code> retain their tags, such as <code class="literal">forward_iterator_tag</code> retain their
common use.</p></div><div class="section" title="Invalidation Guarantees"><div class="titlepage"><div><div><h5 class="title"><a name="pbds.design.concepts.invalidation"></a>Invalidation Guarantees</h5></div></div></div><p> common use.</p></div><div class="section" title="Invalidation Guarantees"><div class="titlepage"><div><div><h5 class="title"><a id="pbds.design.concepts.invalidation"></a>Invalidation Guarantees</h5></div></div></div><p>
If one manipulates a container object, then iterators previously If one manipulates a container object, then iterators previously
obtained from it can be invalidated. In some cases a obtained from it can be invalidated. In some cases a
previously-obtained iterator cannot be de-referenced; in other cases, previously-obtained iterator cannot be de-referenced; in other cases,
@ -373,7 +345,7 @@
to the question of whether point-type iterators and range-type to the question of whether point-type iterators and range-type
iterators are valid. The graphic below shows tags corresponding to iterators are valid. The graphic below shows tags corresponding to
different types of invalidation guarantees. different types of invalidation guarantees.
</p><div class="figure"><a name="id644065"></a><p class="title"><b>Figure 22.12. Invalidation Guarantee Tags Hierarchy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_invalidation_tag_hierarchy.png" align="middle" alt="Invalidation Guarantee Tags Hierarchy"></div></div></div><br class="figure-break"><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="figure"><a id="id618137"></a><p class="title"><strong>Figure 22.12. Invalidation Guarantee Tags Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_invalidation_tag_hierarchy.png" align="middle" alt="Invalidation Guarantee Tags Hierarchy" /></div></div></div><br class="figure-break" /><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<code class="classname">basic_invalidation_guarantee</code> <code class="classname">basic_invalidation_guarantee</code>
corresponds to a basic guarantee that a point-type iterator, corresponds to a basic guarantee that a point-type iterator,
a found pointer, or a found reference, remains valid as long a found pointer, or a found reference, remains valid as long
@ -404,7 +376,7 @@
our opinion, an invalidation-guarantee hierarchy would solve our opinion, an invalidation-guarantee hierarchy would solve
these problems in all container types - not just associative these problems in all container types - not just associative
containers. containers.
</p></div></div><div class="section" title="Genericity"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.concepts.genericity"></a>Genericity</h4></div></div></div><p> </p></div></div><div class="section" title="Genericity"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.concepts.genericity"></a>Genericity</h4></div></div></div><p>
The design attempts to address the following problem of The design attempts to address the following problem of
data-structure genericity. When writing a function manipulating data-structure genericity. When writing a function manipulating
a generic container object, what is the behavior of the object? a generic container object, what is the behavior of the object?
@ -446,7 +418,7 @@
capabilities? What is the relationship between two different capabilities? What is the relationship between two different
data structures, if anything? data structures, if anything?
</p></li></ul></div><p>The remainder of this section explains these issues in </p></li></ul></div><p>The remainder of this section explains these issues in
detail.</p><div class="section" title="Tag"><div class="titlepage"><div><div><h5 class="title"><a name="concepts.genericity.tag"></a>Tag</h5></div></div></div><p> detail.</p><div class="section" title="Tag"><div class="titlepage"><div><div><h5 class="title"><a id="concepts.genericity.tag"></a>Tag</h5></div></div></div><p>
Tags are very useful for manipulating generic types. For example, if Tags are very useful for manipulating generic types. For example, if
<code class="literal">It</code> is an iterator class, then <code class="literal">typename <code class="literal">It</code> is an iterator class, then <code class="literal">typename
It::iterator_category</code> or <code class="literal">typename It::iterator_category</code> or <code class="literal">typename
@ -457,11 +429,11 @@
</p><p> </p><p>
This library contains a container tag hierarchy corresponding to the This library contains a container tag hierarchy corresponding to the
diagram below. diagram below.
</p><div class="figure"><a name="id644317"></a><p class="title"><b>Figure 22.13. Container Tag Hierarchy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_container_tag_hierarchy.png" align="middle" alt="Container Tag Hierarchy"></div></div></div><br class="figure-break"><p> </p><div class="figure"><a id="id618389"></a><p class="title"><strong>Figure 22.13. Container Tag Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_container_tag_hierarchy.png" align="middle" alt="Container Tag Hierarchy" /></div></div></div><br class="figure-break" /><p>
Given any container <span class="type">Cntnr</span>, the tag of Given any container <span class="type">Cntnr</span>, the tag of
the underlying data structure can be found via <code class="literal">typename the underlying data structure can be found via <code class="literal">typename
Cntnr::container_category</code>. Cntnr::container_category</code>.
</p></div><div class="section" title="Traits"><div class="titlepage"><div><div><h5 class="title"><a name="concepts.genericity.traits"></a>Traits</h5></div></div></div><p></p><p>Additionally, a traits mechanism can be used to query a </p></div><div class="section" title="Traits"><div class="titlepage"><div><div><h5 class="title"><a id="concepts.genericity.traits"></a>Traits</h5></div></div></div><p></p><p>Additionally, a traits mechanism can be used to query a
container type for its attributes. Given any container container type for its attributes. Given any container
<code class="literal">Cntnr</code>, then <code class="literal">&lt;Cntnr&gt;</code> <code class="literal">Cntnr</code>, then <code class="literal">&lt;Cntnr&gt;</code>
is a traits class identifying the properties of the is a traits class identifying the properties of the
@ -481,7 +453,7 @@
otherwise <code class="classname">container_traits&lt;Cntnr&gt;::split_join_can_throw</code> otherwise <code class="classname">container_traits&lt;Cntnr&gt;::split_join_can_throw</code>
will yield a compilation error. (This is somewhat similar to a will yield a compilation error. (This is somewhat similar to a
compile-time version of the COM model). compile-time version of the COM model).
</p></div></div></div><div class="section" title="By Container"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.design.container"></a>By Container</h3></div></div></div><div class="section" title="hash"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.container.hash"></a>hash</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a name="container.hash.interface"></a>Interface</h5></div></div></div><p> </p></div></div></div><div class="section" title="By Container"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.design.container"></a>By Container</h3></div></div></div><div class="section" title="hash"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.container.hash"></a>hash</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a id="container.hash.interface"></a>Interface</h5></div></div></div><p>
The collision-chaining hash-based container has the The collision-chaining hash-based container has the
following declaration.</p><pre class="programlisting"> following declaration.</p><pre class="programlisting">
template&lt; template&lt;
@ -515,9 +487,9 @@
</pre><p>The parameters are identical to those of the </pre><p>The parameters are identical to those of the
collision-chaining container, except for the following.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="classname">Comb_Probe_Fn</code> describes how to transform a probe collision-chaining container, except for the following.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="classname">Comb_Probe_Fn</code> describes how to transform a probe
sequence into a sequence of positions within the table.</p></li><li class="listitem"><p><code class="classname">Probe_Fn</code> describes a probe sequence policy.</p></li></ol></div><p>Some of the default template values depend on the values of sequence into a sequence of positions within the table.</p></li><li class="listitem"><p><code class="classname">Probe_Fn</code> describes a probe sequence policy.</p></li></ol></div><p>Some of the default template values depend on the values of
other parameters, and are explained below.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a name="container.hash.details"></a>Details</h5></div></div></div><div class="section" title="Hash Policies"><div class="titlepage"><div><div><h6 class="title"><a name="container.hash.details.hash_policies"></a>Hash Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a name="details.hash_policies.general"></a>General</h6></div></div></div><p>Following is an explanation of some functions which hashing other parameters, and are explained below.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a id="container.hash.details"></a>Details</h5></div></div></div><div class="section" title="Hash Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.hash.details.hash_policies"></a>Hash Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a id="details.hash_policies.general"></a>General</h6></div></div></div><p>Following is an explanation of some functions which hashing
involves. The graphic below illustrates the discussion.</p><div class="figure"><a name="id644650"></a><p class="title"><b>Figure 22.14. Hash functions, ranged-hash functions, and involves. The graphic below illustrates the discussion.</p><div class="figure"><a id="id618721"></a><p class="title"><strong>Figure 22.14. Hash functions, ranged-hash functions, and
range-hashing functions</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_ranged_hash_range_hashing_fns.png" align="middle" alt="Hash functions, ranged-hash functions, and range-hashing functions"></div></div></div><br class="figure-break"><p>Let U be a domain (e.g., the integers, or the range-hashing functions</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_ranged_hash_range_hashing_fns.png" align="middle" alt="Hash functions, ranged-hash functions, and range-hashing functions" /></div></div></div><br class="figure-break" /><p>Let U be a domain (e.g., the integers, or the
strings of 3 characters). A hash-table algorithm needs to map strings of 3 characters). A hash-table algorithm needs to map
elements of U "uniformly" into the range [0,..., m - elements of U "uniformly" into the range [0,..., m -
1] (where m is a non-negative integral value, and 1] (where m is a non-negative integral value, and
@ -533,9 +505,9 @@
Z<sub>+</sub>,</p><p>which maps a non-negative hash value, and a non-negative Z<sub>+</sub>,</p><p>which maps a non-negative hash value, and a non-negative
range upper-bound into a non-negative integral in the range range upper-bound into a non-negative integral in the range
between 0 (inclusive) and the range upper bound (exclusive), between 0 (inclusive) and the range upper bound (exclusive),
i.e., for any r in Z<sub>+</sub>,</p><p>0 ≤ g(r, m) ≤ m - 1</p><p>The resulting ranged-hash function, is</p><div class="equation"><a name="id644765"></a><p class="title"><b>Equation 22.1. Ranged Hash Function</b></p><div class="equation-contents"><span class="mathphrase"> i.e., for any r in Z<sub>+</sub>,</p><p>0 ≤ g(r, m) ≤ m - 1</p><p>The resulting ranged-hash function, is</p><div class="equation"><a id="id618836"></a><p class="title"><strong>Equation 22.1. Ranged Hash Function</strong></p><div class="equation-contents"><span class="mathphrase">
f(u , m) = g(h(u), m) f(u , m) = g(h(u), m)
</span></div></div><br class="equation-break"><p>From the above, it is obvious that given g and </span></div></div><br class="equation-break" /><p>From the above, it is obvious that given g and
h, f can always be composed (however the converse h, f can always be composed (however the converse
is not true). The standard's hash-based containers allow specifying is not true). The standard's hash-based containers allow specifying
a hash function, and use a hard-wired range-hashing function; a hash function, and use a hard-wired range-hashing function;
@ -551,11 +523,11 @@
probe function transforming the hash value into a probe function transforming the hash value into a
sequence of hash values, and a range-hashing function sequence of hash values, and a range-hashing function
transforming the sequence of hash values into a sequence of transforming the sequence of hash values into a sequence of
positions.</p></div><div class="section" title="Range Hashing"><div class="titlepage"><div><div><h6 class="title"><a name="details.hash_policies.range"></a>Range Hashing</h6></div></div></div><p>Some common choices for range-hashing functions are the positions.</p></div><div class="section" title="Range Hashing"><div class="titlepage"><div><div><h6 class="title"><a id="details.hash_policies.range"></a>Range Hashing</h6></div></div></div><p>Some common choices for range-hashing functions are the
division, multiplication, and middle-square methods (<a class="xref" href="policy_data_structures.html#biblio.knuth98sorting" title="The Art of Computer Programming - Sorting and Searching">[biblio.knuth98sorting]</a>), defined division, multiplication, and middle-square methods (<a class="xref" href="policy_data_structures.html#biblio.knuth98sorting" title="The Art of Computer Programming - Sorting and Searching">[biblio.knuth98sorting]</a>), defined
as</p><div class="equation"><a name="id644814"></a><p class="title"><b>Equation 22.2. Range-Hashing, Division Method</b></p><div class="equation-contents"><span class="mathphrase"> as</p><div class="equation"><a id="id618886"></a><p class="title"><strong>Equation 22.2. Range-Hashing, Division Method</strong></p><div class="equation-contents"><span class="mathphrase">
g(r, m) = r mod m g(r, m) = r mod m
</span></div></div><br class="equation-break"><p>g(r, m) = ⌈ u/v ( a r mod v ) ⌉</p><p>and</p><p>g(r, m) = ⌈ u/v ( r<sup>2</sup> mod v ) ⌉</p><p>respectively, for some positive integrals u and </span></div></div><br class="equation-break" /><p>g(r, m) = ⌈ u/v ( a r mod v ) ⌉</p><p>and</p><p>g(r, m) = ⌈ u/v ( r<sup>2</sup> mod v ) ⌉</p><p>respectively, for some positive integrals u and
v (typically powers of 2), and some a. Each of v (typically powers of 2), and some a. Each of
these range-hashing functions works best for some different these range-hashing functions works best for some different
setting.</p><p>The division method (see above) is a setting.</p><p>The division method (see above) is a
@ -564,12 +536,12 @@
implement using the low implement using the low
level % (modulo) operation (for any m), or the level % (modulo) operation (for any m), or the
low level &amp; (bit-mask) operation (for the case where low level &amp; (bit-mask) operation (for the case where
m is a power of 2), i.e.,</p><div class="equation"><a name="id644851"></a><p class="title"><b>Equation 22.3. Division via Prime Modulo</b></p><div class="equation-contents"><span class="mathphrase"> m is a power of 2), i.e.,</p><div class="equation"><a id="id618923"></a><p class="title"><strong>Equation 22.3. Division via Prime Modulo</strong></p><div class="equation-contents"><span class="mathphrase">
g(r, m) = r % m g(r, m) = r % m
</span></div></div><br class="equation-break"><p>and</p><div class="equation"><a name="id644867"></a><p class="title"><b>Equation 22.4. Division via Bit Mask</b></p><div class="equation-contents"><span class="mathphrase"> </span></div></div><br class="equation-break" /><p>and</p><div class="equation"><a id="id618938"></a><p class="title"><strong>Equation 22.4. Division via Bit Mask</strong></p><div class="equation-contents"><span class="mathphrase">
g(r, m) = r &amp; m - 1, (with m = g(r, m) = r &amp; m - 1, (with m =
2<sup>k</sup> for some k) 2<sup>k</sup> for some k)
</span></div></div><br class="equation-break"><p>respectively.</p><p>The % (modulo) implementation has the advantage that for </span></div></div><br class="equation-break" /><p>respectively.</p><p>The % (modulo) implementation has the advantage that for
m a prime far from a power of 2, g(r, m) is m a prime far from a power of 2, g(r, m) is
affected by all the bits of r (minimizing the chance of affected by all the bits of r (minimizing the chance of
collision). It has the disadvantage of using the costly modulo collision). It has the disadvantage of using the costly modulo
@ -578,7 +550,7 @@
relying on the fast bit-wise and operation. It has the relying on the fast bit-wise and operation. It has the
disadvantage that for g(r, m) is affected only by the disadvantage that for g(r, m) is affected only by the
low order bits of r. This method is hard-wired into low order bits of r. This method is hard-wired into
Dinkumware's implementation.</p></div><div class="section" title="Ranged Hash"><div class="titlepage"><div><div><h6 class="title"><a name="details.hash_policies.ranged"></a>Ranged Hash</h6></div></div></div><p>In cases it is beneficial to allow the Dinkumware's implementation.</p></div><div class="section" title="Ranged Hash"><div class="titlepage"><div><div><h6 class="title"><a id="details.hash_policies.ranged"></a>Ranged Hash</h6></div></div></div><p>In cases it is beneficial to allow the
client to directly specify a ranged-hash hash function. It is client to directly specify a ranged-hash hash function. It is
true, that the writer of the ranged-hash function cannot rely true, that the writer of the ranged-hash function cannot rely
on the values of m having specific numerical properties on the values of m having specific numerical properties
@ -592,24 +564,24 @@
s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>] s = [ s<sub>0</sub>,..., s<sub>t - 1</sub>]
</p><p>be a string of t characters, each of which is from </p><p>be a string of t characters, each of which is from
domain S. Consider the following ranged-hash domain S. Consider the following ranged-hash
function:</p><div class="equation"><a name="id644947"></a><p class="title"><b>Equation 22.5.  function:</p><div class="equation"><a id="id619019"></a><p class="title"><strong>Equation 22.5. 
A Standard String Hash Function A Standard String Hash Function
</b></p><div class="equation-contents"><span class="mathphrase"> </strong></p><div class="equation-contents"><span class="mathphrase">
f<sub>1</sub>(s, m) = ∑ <sub>i = f<sub>1</sub>(s, m) = ∑ <sub>i =
0</sub><sup>t - 1</sup> s<sub>i</sub> a<sup>i</sup> mod m 0</sub><sup>t - 1</sup> s<sub>i</sub> a<sup>i</sup> mod m
</span></div></div><br class="equation-break"><p>where a is some non-negative integral value. This is </span></div></div><br class="equation-break" /><p>where a is some non-negative integral value. This is
the standard string-hashing function used in SGI's the standard string-hashing function used in SGI's
implementation (with a = 5). Its advantage is that implementation (with a = 5). Its advantage is that
it takes into account all of the characters of the string.</p><p>Now assume that s is the string representation of a it takes into account all of the characters of the string.</p><p>Now assume that s is the string representation of a
of a long DNA sequence (and so S = {'A', 'C', 'G', of a long DNA sequence (and so S = {'A', 'C', 'G',
'T'}). In this case, scanning the entire string might be 'T'}). In this case, scanning the entire string might be
prohibitively expensive. A possible alternative might be to use prohibitively expensive. A possible alternative might be to use
only the first k characters of the string, where</p><p>|S|<sup>k</sup> ≥ m ,</p><p>i.e., using the hash function</p><div class="equation"><a name="id644998"></a><p class="title"><b>Equation 22.6.  only the first k characters of the string, where</p><p>|S|<sup>k</sup> ≥ m ,</p><p>i.e., using the hash function</p><div class="equation"><a id="id619070"></a><p class="title"><strong>Equation 22.6. 
Only k String DNA Hash Only k String DNA Hash
</b></p><div class="equation-contents"><span class="mathphrase"> </strong></p><div class="equation-contents"><span class="mathphrase">
f<sub>2</sub>(s, m) = ∑ <sub>i f<sub>2</sub>(s, m) = ∑ <sub>i
= 0</sub><sup>k - 1</sup> s<sub>i</sub> a<sup>i</sup> mod m = 0</sub><sup>k - 1</sup> s<sub>i</sub> a<sup>i</sup> mod m
</span></div></div><br class="equation-break"><p>requiring scanning over only</p><p>k = log<sub>4</sub>( m )</p><p>characters.</p><p>Other more elaborate hash-functions might scan k </span></div></div><br class="equation-break" /><p>requiring scanning over only</p><p>k = log<sub>4</sub>( m )</p><p>characters.</p><p>Other more elaborate hash-functions might scan k
characters starting at a random position (determined at each characters starting at a random position (determined at each
resize), or scanning k random positions (determined at resize), or scanning k random positions (determined at
each resize), i.e., using</p><p>f<sub>3</sub>(s, m) = ∑ <sub>i = each resize), i.e., using</p><p>f<sub>3</sub>(s, m) = ∑ <sub>i =
@ -618,12 +590,12 @@
1</sup> s<sub>r</sub>i a<sup>r<sub>i</sub></sup> mod 1</sup> s<sub>r</sub>i a<sup>r<sub>i</sub></sup> mod
m ,</p><p>respectively, for r<sub>0</sub>,..., r<sub>k-1</sub> m ,</p><p>respectively, for r<sub>0</sub>,..., r<sub>k-1</sub>
each in the (inclusive) range [0,...,t-1].</p><p>It should be noted that the above functions cannot be each in the (inclusive) range [0,...,t-1].</p><p>It should be noted that the above functions cannot be
decomposed as per a ranged hash composed of hash and range hashing.</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h6 class="title"><a name="details.hash_policies.implementation"></a>Implementation</h6></div></div></div><p>This sub-subsection describes the implementation of decomposed as per a ranged hash composed of hash and range hashing.</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h6 class="title"><a id="details.hash_policies.implementation"></a>Implementation</h6></div></div></div><p>This sub-subsection describes the implementation of
the above in this library. It first explains range-hashing the above in this library. It first explains range-hashing
functions in collision-chaining tables, then ranged-hash functions in collision-chaining tables, then ranged-hash
functions in collision-chaining tables, then probing-based functions in collision-chaining tables, then probing-based
tables, and finally lists the relevant classes in this tables, and finally lists the relevant classes in this
library.</p><div class="section" title="Range-Hashing and Ranged-Hashes in Collision-Chaining Tables"><div class="titlepage"><div><div><h6 class="title"><a name="hash_policies.implementation.collision-chaining"></a> library.</p><div class="section" title="Range-Hashing and Ranged-Hashes in Collision-Chaining Tables"><div class="titlepage"><div><div><h6 class="title"><a id="hash_policies.implementation.collision-chaining"></a>
Range-Hashing and Ranged-Hashes in Collision-Chaining Tables Range-Hashing and Ranged-Hashes in Collision-Chaining Tables
</h6></div></div></div><p><code class="classname">cc_hash_table</code> is </h6></div></div></div><p><code class="classname">cc_hash_table</code> is
parametrized by <code class="classname">Hash_Fn</code> and <code class="classname">Comb_Hash_Fn</code>, a parametrized by <code class="classname">Hash_Fn</code> and <code class="classname">Comb_Hash_Fn</code>, a
@ -635,12 +607,12 @@
the container transforms the key into a non-negative integral the container transforms the key into a non-negative integral
using the hash functor (points B and C), and transforms the using the hash functor (points B and C), and transforms the
result into a position using the combining functor (points D result into a position using the combining functor (points D
and E).</p><div class="figure"><a name="id645187"></a><p class="title"><b>Figure 22.15. Insert hash sequence diagram</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_range_hashing_seq_diagram.png" align="middle" alt="Insert hash sequence diagram"></div></div></div><br class="figure-break"><p>If <code class="classname">cc_hash_table</code>'s and E).</p><div class="figure"><a id="id619258"></a><p class="title"><strong>Figure 22.15. Insert hash sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_range_hashing_seq_diagram.png" align="middle" alt="Insert hash sequence diagram" /></div></div></div><br class="figure-break" /><p>If <code class="classname">cc_hash_table</code>'s
hash-functor, <code class="classname">Hash_Fn</code> is instantiated by <code class="classname">null_type</code> , then <code class="classname">Comb_Hash_Fn</code> is taken to be hash-functor, <code class="classname">Hash_Fn</code> is instantiated by <code class="classname">null_type</code> , then <code class="classname">Comb_Hash_Fn</code> is taken to be
a ranged-hash function. The graphic below shows an <code class="function">insert</code> sequence a ranged-hash function. The graphic below shows an <code class="function">insert</code> sequence
diagram. The user inserts an element (point A), the container diagram. The user inserts an element (point A), the container
transforms the key into a position using the combining functor transforms the key into a position using the combining functor
(points B and C).</p><div class="figure"><a name="id645245"></a><p class="title"><b>Figure 22.16. Insert hash sequence diagram with a null policy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_range_hashing_seq_diagram2.png" align="middle" alt="Insert hash sequence diagram with a null policy"></div></div></div><br class="figure-break"></div><div class="section" title="Probing tables"><div class="titlepage"><div><div><h6 class="title"><a name="hash_policies.implementation.probe"></a> (points B and C).</p><div class="figure"><a id="id619317"></a><p class="title"><strong>Figure 22.16. Insert hash sequence diagram with a null policy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_range_hashing_seq_diagram2.png" align="middle" alt="Insert hash sequence diagram with a null policy" /></div></div></div><br class="figure-break" /></div><div class="section" title="Probing tables"><div class="titlepage"><div><div><h6 class="title"><a id="hash_policies.implementation.probe"></a>
Probing tables Probing tables
</h6></div></div></div><p><code class="classname">gp_hash_table</code> is parametrized by </h6></div></div></div><p><code class="classname">gp_hash_table</code> is parametrized by
<code class="classname">Hash_Fn</code>, <code class="classname">Probe_Fn</code>, <code class="classname">Hash_Fn</code>, <code class="classname">Probe_Fn</code>,
@ -652,7 +624,7 @@
functor, <code class="classname">Probe_Fn</code> is a functor for offsets functor, <code class="classname">Probe_Fn</code> is a functor for offsets
from a hash value, and <code class="classname">Comb_Probe_Fn</code> from a hash value, and <code class="classname">Comb_Probe_Fn</code>
transforms a probe sequence into a sequence of positions within transforms a probe sequence into a sequence of positions within
the table.</p></div><div class="section" title="Pre-Defined Policies"><div class="titlepage"><div><div><h6 class="title"><a name="hash_policies.implementation.predefined"></a> the table.</p></div><div class="section" title="Pre-Defined Policies"><div class="titlepage"><div><div><h6 class="title"><a id="hash_policies.implementation.predefined"></a>
Pre-Defined Policies Pre-Defined Policies
</h6></div></div></div><p>This library contains some pre-defined classes </h6></div></div></div><p>This library contains some pre-defined classes
implementing range-hashing and probing functions:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="classname">direct_mask_range_hashing</code> implementing range-hashing and probing functions:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="classname">direct_mask_range_hashing</code>
@ -663,14 +635,14 @@
a linear probe and a quadratic probe function, a linear probe and a quadratic probe function,
respectively.</p></li></ol></div><p> respectively.</p></li></ol></div><p>
The graphic below shows the relationships. The graphic below shows the relationships.
</p><div class="figure"><a name="id645385"></a><p class="title"><b>Figure 22.17. Hash policy class diagram</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_policy_cd.png" align="middle" alt="Hash policy class diagram"></div></div></div><br class="figure-break"></div></div></div><div class="section" title="Resize Policies"><div class="titlepage"><div><div><h6 class="title"><a name="container.hash.details.resize_policies"></a>Resize Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.general"></a>General</h6></div></div></div><p>Hash-tables, as opposed to trees, do not naturally grow or </p><div class="figure"><a id="id619457"></a><p class="title"><strong>Figure 22.17. Hash policy class diagram</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_hash_policy_cd.png" align="middle" alt="Hash policy class diagram" /></div></div></div><br class="figure-break" /></div></div></div><div class="section" title="Resize Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.hash.details.resize_policies"></a>Resize Policies</h6></div></div></div><div class="section" title="General"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.general"></a>General</h6></div></div></div><p>Hash-tables, as opposed to trees, do not naturally grow or
shrink. It is necessary to specify policies to determine how shrink. It is necessary to specify policies to determine how
and when a hash table should change its size. Usually, resize and when a hash table should change its size. Usually, resize
policies can be decomposed into orthogonal policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A size policy indicating how a hash table policies can be decomposed into orthogonal policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A size policy indicating how a hash table
should grow (e.g., it should multiply by powers of should grow (e.g., it should multiply by powers of
2).</p></li><li class="listitem"><p>A trigger policy indicating when a hash 2).</p></li><li class="listitem"><p>A trigger policy indicating when a hash
table should grow (e.g., a load factor is table should grow (e.g., a load factor is
exceeded).</p></li></ol></div></div><div class="section" title="Size Policies"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.size"></a>Size Policies</h6></div></div></div><p>Size policies determine how a hash table changes size. These exceeded).</p></li></ol></div></div><div class="section" title="Size Policies"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.size"></a>Size Policies</h6></div></div></div><p>Size policies determine how a hash table changes size. These
policies are simple, and there are relatively few sensible policies are simple, and there are relatively few sensible
options. An exponential-size policy (with the initial size and options. An exponential-size policy (with the initial size and
growth factors both powers of 2) works well with a mask-based growth factors both powers of 2) works well with a mask-based
@ -678,7 +650,7 @@
hard-wired policy used by Dinkumware. A hard-wired policy used by Dinkumware. A
prime-list based policy works well with a modulo-prime range prime-list based policy works well with a modulo-prime range
hashing function and is the hard-wired policy used by SGI's hashing function and is the hard-wired policy used by SGI's
implementation.</p></div><div class="section" title="Trigger Policies"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.trigger"></a>Trigger Policies</h6></div></div></div><p>Trigger policies determine when a hash table changes size. implementation.</p></div><div class="section" title="Trigger Policies"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.trigger"></a>Trigger Policies</h6></div></div></div><p>Trigger policies determine when a hash table changes size.
Following is a description of two policies: load-check Following is a description of two policies: load-check
policies, and collision-check policies.</p><p>Load-check policies are straightforward. The user specifies policies, and collision-check policies.</p><p>Load-check policies are straightforward. The user specifies
two factors, Α<sub>min</sub> and two factors, Α<sub>min</sub> and
@ -696,14 +668,14 @@
and some load factor be denoted by Α. We would like to and some load factor be denoted by Α. We would like to
calculate the minimal length of k, such that if there were Α calculate the minimal length of k, such that if there were Α
m elements in the hash table, a probe sequence of length k would m elements in the hash table, a probe sequence of length k would
be found with probability at most 1/m.</p><div class="figure"><a name="id645544"></a><p class="title"><b>Figure 22.18. Balls and bins</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_balls_and_bins.png" align="middle" alt="Balls and bins"></div></div></div><br class="figure-break"><p>Denote the probability that a probe sequence of length be found with probability at most 1/m.</p><div class="figure"><a id="id619615"></a><p class="title"><strong>Figure 22.18. Balls and bins</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_balls_and_bins.png" align="middle" alt="Balls and bins" /></div></div></div><br class="figure-break" /><p>Denote the probability that a probe sequence of length
k appears in bin i by p<sub>i</sub>, the k appears in bin i by p<sub>i</sub>, the
length of the probe sequence of bin i by length of the probe sequence of bin i by
l<sub>i</sub>, and assume uniform distribution. Then</p><div class="equation"><a name="id645590"></a><p class="title"><b>Equation 22.7.  l<sub>i</sub>, and assume uniform distribution. Then</p><div class="equation"><a id="id619661"></a><p class="title"><strong>Equation 22.7. 
Probability of Probe Sequence of Length k Probability of Probe Sequence of Length k
</b></p><div class="equation-contents"><span class="mathphrase"> </strong></p><div class="equation-contents"><span class="mathphrase">
p<sub>1</sub> = p<sub>1</sub> =
</span></div></div><br class="equation-break"><p>P(l<sub>1</sub> ≥ k) =</p><p> </span></div></div><br class="equation-break" /><p>P(l<sub>1</sub> ≥ k) =</p><p>
P(l<sub>1</sub>α ( 1 + k / α - 1) ≤ (a) P(l<sub>1</sub>α ( 1 + k / α - 1) ≤ (a)
</p><p> </p><p>
e ^ ( - ( α ( k / α - 1 )<sup>2</sup> ) /2) e ^ ( - ( α ( k / α - 1 )<sup>2</sup> ) /2)
@ -713,11 +685,11 @@
l<sub>i</sub> are negatively-dependent l<sub>i</sub> are negatively-dependent
(<a class="xref" href="policy_data_structures.html#biblio.dubhashi98neg" title="Balls and bins: A study in negative dependence">[biblio.dubhashi98neg]</a>) (<a class="xref" href="policy_data_structures.html#biblio.dubhashi98neg" title="Balls and bins: A study in negative dependence">[biblio.dubhashi98neg]</a>)
. Let . Let
I(.) denote the indicator function. Then</p><div class="equation"><a name="id645646"></a><p class="title"><b>Equation 22.8.  I(.) denote the indicator function. Then</p><div class="equation"><a id="id619718"></a><p class="title"><strong>Equation 22.8. 
Probability Probe Sequence in Some Bin Probability Probe Sequence in Some Bin
</b></p><div class="equation-contents"><span class="mathphrase"> </strong></p><div class="equation-contents"><span class="mathphrase">
P( exists<sub>i</sub> l<sub>i</sub> ≥ k ) = P( exists<sub>i</sub> l<sub>i</sub> ≥ k ) =
</span></div></div><br class="equation-break"><p>P ( ∑ <sub>i = 1</sub><sup>m</sup> </span></div></div><br class="equation-break" /><p>P ( ∑ <sub>i = 1</sub><sup>m</sup>
I(l<sub>i</sub> ≥ k) ≥ 1 ) =</p><p>P ( ∑ <sub>i = 1</sub><sup>m</sup> I ( I(l<sub>i</sub> ≥ k) ≥ 1 ) =</p><p>P ( ∑ <sub>i = 1</sub><sup>m</sup> I (
l<sub>i</sub> ≥ k ) ≥ m p<sub>1</sub> ( 1 + 1 / (m l<sub>i</sub> ≥ k ) ≥ m p<sub>1</sub> ( 1 + 1 / (m
p<sub>1</sub>) - 1 ) ) ≤ (a)</p><p>e ^ ( ( - m p<sub>1</sub> ( 1 / (m p<sub>1</sub>) p<sub>1</sub>) - 1 ) ) ≤ (a)</p><p>e ^ ( ( - m p<sub>1</sub> ( 1 / (m p<sub>1</sub>)
@ -725,11 +697,11 @@
be applied to negatively-dependent variables (<a class="xref" href="policy_data_structures.html#biblio.dubhashi98neg" title="Balls and bins: A study in negative dependence">[biblio.dubhashi98neg]</a>). Inserting the first probability be applied to negatively-dependent variables (<a class="xref" href="policy_data_structures.html#biblio.dubhashi98neg" title="Balls and bins: A study in negative dependence">[biblio.dubhashi98neg]</a>). Inserting the first probability
equation into the second one, and equating with 1/m, we equation into the second one, and equating with 1/m, we
obtain</p><p>k ~ √ ( 2 α ln 2 m ln(m) ) obtain</p><p>k ~ √ ( 2 α ln 2 m ln(m) )
) .</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.impl"></a>Implementation</h6></div></div></div><p>This sub-subsection describes the implementation of the ) .</p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.impl"></a>Implementation</h6></div></div></div><p>This sub-subsection describes the implementation of the
above in this library. It first describes resize policies and above in this library. It first describes resize policies and
their decomposition into trigger and size policies, then their decomposition into trigger and size policies, then
describes pre-defined classes, and finally discusses controlled describes pre-defined classes, and finally discusses controlled
access the policies' internals.</p><div class="section" title="Decomposition"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.impl.decomposition"></a>Decomposition</h6></div></div></div><p>Each hash-based container is parametrized by a access the policies' internals.</p><div class="section" title="Decomposition"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.impl.decomposition"></a>Decomposition</h6></div></div></div><p>Each hash-based container is parametrized by a
<code class="classname">Resize_Policy</code> parameter; the container derives <code class="classname">Resize_Policy</code> parameter; the container derives
<code class="classname">public</code>ly from <code class="classname">Resize_Policy</code>. For <code class="classname">public</code>ly from <code class="classname">Resize_Policy</code>. For
example:</p><pre class="programlisting"> example:</p><pre class="programlisting">
@ -752,7 +724,7 @@
a resize is needed, and if so, what is the new size (points D a resize is needed, and if so, what is the new size (points D
to G); following the resize, it notifies the policy that a to G); following the resize, it notifies the policy that a
resize has completed (point H); finally, the element is resize has completed (point H); finally, the element is
inserted, and the policy notified (point I).</p><div class="figure"><a name="id645800"></a><p class="title"><b>Figure 22.19. Insert resize sequence diagram</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_insert_resize_sequence_diagram1.png" align="middle" alt="Insert resize sequence diagram"></div></div></div><br class="figure-break"><p>In practice, a resize policy can be usually orthogonally inserted, and the policy notified (point I).</p><div class="figure"><a id="id619872"></a><p class="title"><strong>Figure 22.19. Insert resize sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_insert_resize_sequence_diagram1.png" align="middle" alt="Insert resize sequence diagram" /></div></div></div><br class="figure-break" /><p>In practice, a resize policy can be usually orthogonally
decomposed to a size policy and a trigger policy. Consequently, decomposed to a size policy and a trigger policy. Consequently,
the library contains a single class for instantiating a resize the library contains a single class for instantiating a resize
policy: <code class="classname">hash_standard_resize_policy</code> policy: <code class="classname">hash_standard_resize_policy</code>
@ -761,9 +733,9 @@
both, and acts as a standard delegate (<a class="xref" href="policy_data_structures.html#biblio.gof" title="Design Patterns - Elements of Reusable Object-Oriented Software">[biblio.gof]</a>) both, and acts as a standard delegate (<a class="xref" href="policy_data_structures.html#biblio.gof" title="Design Patterns - Elements of Reusable Object-Oriented Software">[biblio.gof]</a>)
to these policies.</p><p>The two graphics immediately below show sequence diagrams to these policies.</p><p>The two graphics immediately below show sequence diagrams
illustrating the interaction between the standard resize policy illustrating the interaction between the standard resize policy
and its trigger and size policies, respectively.</p><div class="figure"><a name="id645865"></a><p class="title"><b>Figure 22.20. Standard resize policy trigger sequence and its trigger and size policies, respectively.</p><div class="figure"><a id="id619937"></a><p class="title"><strong>Figure 22.20. Standard resize policy trigger sequence
diagram</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_insert_resize_sequence_diagram2.png" align="middle" alt="Standard resize policy trigger sequence diagram"></div></div></div><br class="figure-break"><div class="figure"><a name="id645900"></a><p class="title"><b>Figure 22.21. Standard resize policy size sequence diagram</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_insert_resize_sequence_diagram2.png" align="middle" alt="Standard resize policy trigger sequence diagram" /></div></div></div><br class="figure-break" /><div class="figure"><a id="id619971"></a><p class="title"><strong>Figure 22.21. Standard resize policy size sequence
diagram</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_insert_resize_sequence_diagram3.png" align="middle" alt="Standard resize policy size sequence diagram"></div></div></div><br class="figure-break"></div><div class="section" title="Predefined Policies"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.impl.predefined"></a>Predefined Policies</h6></div></div></div><p>The library includes the following diagram</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_insert_resize_sequence_diagram3.png" align="middle" alt="Standard resize policy size sequence diagram" /></div></div></div><br class="figure-break" /></div><div class="section" title="Predefined Policies"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.impl.predefined"></a>Predefined Policies</h6></div></div></div><p>The library includes the following
instantiations of size and trigger policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="classname">hash_load_check_resize_trigger</code> instantiations of size and trigger policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><code class="classname">hash_load_check_resize_trigger</code>
implements a load check trigger policy.</p></li><li class="listitem"><p><code class="classname">cc_hash_max_collision_check_resize_trigger</code> implements a load check trigger policy.</p></li><li class="listitem"><p><code class="classname">cc_hash_max_collision_check_resize_trigger</code>
implements a collision check trigger policy.</p></li><li class="listitem"><p><code class="classname">hash_exponential_size_policy</code> implements a collision check trigger policy.</p></li><li class="listitem"><p><code class="classname">hash_exponential_size_policy</code>
@ -781,7 +753,7 @@
instantiated by <code class="classname">hash_load_check_resize_trigger</code>, instantiated by <code class="classname">hash_load_check_resize_trigger</code>,
or <code class="classname">cc_hash_max_collision_check_resize_trigger</code>; or <code class="classname">cc_hash_max_collision_check_resize_trigger</code>;
<code class="classname">Size_Policy</code> is instantiated by <code class="classname">hash_exponential_size_policy</code>, <code class="classname">Size_Policy</code> is instantiated by <code class="classname">hash_exponential_size_policy</code>,
or <code class="classname">hash_prime_size_policy</code>.</p></div><div class="section" title="Controling Access to Internals"><div class="titlepage"><div><div><h6 class="title"><a name="resize_policies.impl.internals"></a>Controling Access to Internals</h6></div></div></div><p>There are cases where (controlled) access to resize or <code class="classname">hash_prime_size_policy</code>.</p></div><div class="section" title="Controling Access to Internals"><div class="titlepage"><div><div><h6 class="title"><a id="resize_policies.impl.internals"></a>Controling Access to Internals</h6></div></div></div><p>There are cases where (controlled) access to resize
policies' internals is beneficial. E.g., it is sometimes policies' internals is beneficial. E.g., it is sometimes
useful to query a hash-table for the table's actual size (as useful to query a hash-table for the table's actual size (as
opposed to its <code class="function">size()</code> - the number of values it opposed to its <code class="function">size()</code> - the number of values it
@ -826,11 +798,11 @@
</pre><p>which resizes the container. Implementations of </pre><p>which resizes the container. Implementations of
<code class="classname">Resize_Policy</code> can export public methods for resizing <code class="classname">Resize_Policy</code> can export public methods for resizing
the container externally; these methods internally call the container externally; these methods internally call
<code class="classname">do_resize</code> to resize the table.</p></div></div></div><div class="section" title="Policy Interactions"><div class="titlepage"><div><div><h6 class="title"><a name="container.hash.details.policy_interaction"></a>Policy Interactions</h6></div></div></div><p> <code class="classname">do_resize</code> to resize the table.</p></div></div></div><div class="section" title="Policy Interactions"><div class="titlepage"><div><div><h6 class="title"><a id="container.hash.details.policy_interaction"></a>Policy Interactions</h6></div></div></div><p>
</p><p>Hash-tables are unfortunately especially susceptible to </p><p>Hash-tables are unfortunately especially susceptible to
choice of policies. One of the more complicated aspects of this choice of policies. One of the more complicated aspects of this
is that poor combinations of good policies can form a poor is that poor combinations of good policies can form a poor
container. Following are some considerations.</p><div class="section" title="probe/size/trigger"><div class="titlepage"><div><div><h6 class="title"><a name="policy_interaction.probesizetrigger"></a>probe/size/trigger</h6></div></div></div><p>Some combinations do not work well for probing containers. container. Following are some considerations.</p><div class="section" title="probe/size/trigger"><div class="titlepage"><div><div><h6 class="title"><a id="policy_interaction.probesizetrigger"></a>probe/size/trigger</h6></div></div></div><p>Some combinations do not work well for probing containers.
For example, combining a quadratic probe policy with an For example, combining a quadratic probe policy with an
exponential size policy can yield a poor container: when an exponential size policy can yield a poor container: when an
element is inserted, a trigger policy might decide that there element is inserted, a trigger policy might decide that there
@ -839,13 +811,13 @@
the unused entries.</p><p>Unfortunately, this library cannot detect such problems at the unused entries.</p><p>Unfortunately, this library cannot detect such problems at
compilation (they are halting reducible). It therefore defines compilation (they are halting reducible). It therefore defines
an exception class <code class="classname">insert_error</code> to throw an an exception class <code class="classname">insert_error</code> to throw an
exception in this case.</p></div><div class="section" title="hash/trigger"><div class="titlepage"><div><div><h6 class="title"><a name="policy_interaction.hashtrigger"></a>hash/trigger</h6></div></div></div><p>Some trigger policies are especially susceptible to poor exception in this case.</p></div><div class="section" title="hash/trigger"><div class="titlepage"><div><div><h6 class="title"><a id="policy_interaction.hashtrigger"></a>hash/trigger</h6></div></div></div><p>Some trigger policies are especially susceptible to poor
hash functions. Suppose, as an extreme case, that the hash hash functions. Suppose, as an extreme case, that the hash
function transforms each key to the same hash value. After some function transforms each key to the same hash value. After some
inserts, a collision detecting policy will always indicate that inserts, a collision detecting policy will always indicate that
the container needs to grow.</p><p>The library, therefore, by design, limits each operation to the container needs to grow.</p><p>The library, therefore, by design, limits each operation to
one resize. For each <code class="classname">insert</code>, for example, it queries one resize. For each <code class="classname">insert</code>, for example, it queries
only once whether a resize is needed.</p></div><div class="section" title="equivalence functors/storing hash values/hash"><div class="titlepage"><div><div><h6 class="title"><a name="policy_interaction.eqstorehash"></a>equivalence functors/storing hash values/hash</h6></div></div></div><p><code class="classname">cc_hash_table</code> and only once whether a resize is needed.</p></div><div class="section" title="equivalence functors/storing hash values/hash"><div class="titlepage"><div><div><h6 class="title"><a id="policy_interaction.eqstorehash"></a>equivalence functors/storing hash values/hash</h6></div></div></div><p><code class="classname">cc_hash_table</code> and
<code class="classname">gp_hash_table</code> are <code class="classname">gp_hash_table</code> are
parametrized by an equivalence functor and by a parametrized by an equivalence functor and by a
<code class="classname">Store_Hash</code> parameter. If the latter parameter is <code class="classname">Store_Hash</code> parameter. If the latter parameter is
@ -856,7 +828,7 @@
collisions for other types.</p><p>If a ranged-hash function or ranged probe function is collisions for other types.</p><p>If a ranged-hash function or ranged probe function is
directly supplied, however, then it makes no sense to store the directly supplied, however, then it makes no sense to store the
hash value with each entry. This library's container will hash value with each entry. This library's container will
fail at compilation, by design, if this is attempted.</p></div><div class="section" title="size/load-check trigger"><div class="titlepage"><div><div><h6 class="title"><a name="policy_interaction.sizeloadtrigger"></a>size/load-check trigger</h6></div></div></div><p>Assume a size policy issues an increasing sequence of sizes fail at compilation, by design, if this is attempted.</p></div><div class="section" title="size/load-check trigger"><div class="titlepage"><div><div><h6 class="title"><a id="policy_interaction.sizeloadtrigger"></a>size/load-check trigger</h6></div></div></div><p>Assume a size policy issues an increasing sequence of sizes
a, a q, a q<sup>1</sup>, a q<sup>2</sup>, ... For a, a q, a q<sup>1</sup>, a q<sup>2</sup>, ... For
example, an exponential size policy might issue the sequence of example, an exponential size policy might issue the sequence of
sizes 8, 16, 32, 64, ...</p><p>If a load-check trigger policy is used, with loads sizes 8, 16, 32, 64, ...</p><p>If a load-check trigger policy is used, with loads
@ -864,7 +836,7 @@
respectively, then it is a good idea to have:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>α<sub>max</sub> ~ 1 / q</p></li><li class="listitem"><p>α<sub>min</sub> &lt; 1 / (2 q)</p></li></ol></div><p>This will ensure that the amortized hash cost of each respectively, then it is a good idea to have:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>α<sub>max</sub> ~ 1 / q</p></li><li class="listitem"><p>α<sub>min</sub> &lt; 1 / (2 q)</p></li></ol></div><p>This will ensure that the amortized hash cost of each
modifying operation is at most approximately 3.</p><p>α<sub>min</sub> ~ α<sub>max</sub> is, in modifying operation is at most approximately 3.</p><p>α<sub>min</sub> ~ α<sub>max</sub> is, in
any case, a bad choice, and α<sub>min</sub> &gt; any case, a bad choice, and α<sub>min</sub> &gt;
α <sub>max</sub> is horrendous.</p></div></div></div></div><div class="section" title="tree"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.container.tree"></a>tree</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a name="container.tree.interface"></a>Interface</h5></div></div></div><p>The tree-based container has the following declaration:</p><pre class="programlisting"> α <sub>max</sub> is horrendous.</p></div></div></div></div><div class="section" title="tree"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.container.tree"></a>tree</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a id="container.tree.interface"></a>Interface</h5></div></div></div><p>The tree-based container has the following declaration:</p><pre class="programlisting">
template&lt; template&lt;
typename Key, typename Key,
typename Mapped, typename Mapped,
@ -889,7 +861,7 @@
Note that containers based on the former two contain more types Note that containers based on the former two contain more types
and methods than the latter (e.g., and methods than the latter (e.g.,
<code class="classname">reverse_iterator</code> and <code class="classname">rbegin</code>), and different <code class="classname">reverse_iterator</code> and <code class="classname">rbegin</code>), and different
exception and invalidation guarantees.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a name="container.tree.details"></a>Details</h5></div></div></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a name="container.tree.node"></a>Node Invariants</h6></div></div></div><p>Consider the two trees in the graphic below, labels A and B. The first exception and invalidation guarantees.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a id="container.tree.details"></a>Details</h5></div></div></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a id="container.tree.node"></a>Node Invariants</h6></div></div></div><p>Consider the two trees in the graphic below, labels A and B. The first
is a tree of floats; the second is a tree of pairs, each is a tree of floats; the second is a tree of pairs, each
signifying a geometric line interval. Each element in a tree is refered to as a node of the tree. Of course, each of signifying a geometric line interval. Each element in a tree is refered to as a node of the tree. Of course, each of
these trees can support the usual queries: the first can easily these trees can support the usual queries: the first can easily
@ -905,7 +877,7 @@
each node, and maintains node invariants (see <a class="xref" href="policy_data_structures.html#biblio.clrs2001" title="Introduction to Algorithms, 2nd edition">[biblio.clrs2001]</a>.) The first stores in each node, and maintains node invariants (see <a class="xref" href="policy_data_structures.html#biblio.clrs2001" title="Introduction to Algorithms, 2nd edition">[biblio.clrs2001]</a>.) The first stores in
each node the size of the sub-tree rooted at the node; the each node the size of the sub-tree rooted at the node; the
second stores at each node the maximal endpoint of the second stores at each node the maximal endpoint of the
intervals at the sub-tree rooted at the node.</p><div class="figure"><a name="id646549"></a><p class="title"><b>Figure 22.22. Tree node invariants</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_tree_node_invariants.png" align="middle" alt="Tree node invariants"></div></div></div><br class="figure-break"><p>Supporting such trees is difficult for a number of intervals at the sub-tree rooted at the node.</p><div class="figure"><a id="id620621"></a><p class="title"><strong>Figure 22.22. Tree node invariants</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_tree_node_invariants.png" align="middle" alt="Tree node invariants" /></div></div></div><br class="figure-break" /><p>Supporting such trees is difficult for a number of
reasons:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>There must be a way to specify what a node's metadata reasons:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>There must be a way to specify what a node's metadata
should be (if any).</p></li><li class="listitem"><p>Various operations can invalidate node should be (if any).</p></li><li class="listitem"><p>Various operations can invalidate node
invariants. The graphic below shows how a right rotation, invariants. The graphic below shows how a right rotation,
@ -919,9 +891,9 @@
metadata.</p></li><li class="listitem"><p>It is not feasible to know in advance which methods trees metadata.</p></li><li class="listitem"><p>It is not feasible to know in advance which methods trees
can support. Besides the usual <code class="classname">find</code> method, the can support. Besides the usual <code class="classname">find</code> method, the
first tree can support a <code class="classname">find_by_order</code> method, while first tree can support a <code class="classname">find_by_order</code> method, while
the second can support an <code class="classname">overlaps</code> method.</p></li></ol></div><div class="figure"><a name="id646628"></a><p class="title"><b>Figure 22.23. Tree node invalidation</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_tree_node_invalidations.png" align="middle" alt="Tree node invalidation"></div></div></div><br class="figure-break"><p>These problems are solved by a combination of two means: the second can support an <code class="classname">overlaps</code> method.</p></li></ol></div><div class="figure"><a id="id620700"></a><p class="title"><strong>Figure 22.23. Tree node invalidation</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_tree_node_invalidations.png" align="middle" alt="Tree node invalidation" /></div></div></div><br class="figure-break" /><p>These problems are solved by a combination of two means:
node iterators, and template-template node updater node iterators, and template-template node updater
parameters.</p><div class="section" title="Node Iterators"><div class="titlepage"><div><div><h6 class="title"><a name="container.tree.node.iterators"></a>Node Iterators</h6></div></div></div><p>Each tree-based container defines two additional iterator parameters.</p><div class="section" title="Node Iterators"><div class="titlepage"><div><div><h6 class="title"><a id="container.tree.node.iterators"></a>Node Iterators</h6></div></div></div><p>Each tree-based container defines two additional iterator
types, <code class="classname">const_node_iterator</code> types, <code class="classname">const_node_iterator</code>
and <code class="classname">node_iterator</code>. and <code class="classname">node_iterator</code>.
These iterators allow descending from a node to one of its These iterators allow descending from a node to one of its
@ -941,14 +913,14 @@
node_end(); node_end();
</pre><p>The first pairs return node iterators corresponding to the </pre><p>The first pairs return node iterators corresponding to the
root node of the tree; the latter pair returns node iterators root node of the tree; the latter pair returns node iterators
corresponding to a just-after-leaf node.</p></div><div class="section" title="Node Updator"><div class="titlepage"><div><div><h6 class="title"><a name="container.tree.node.updator"></a>Node Updator</h6></div></div></div><p>The tree-based containers are parametrized by a corresponding to a just-after-leaf node.</p></div><div class="section" title="Node Updator"><div class="titlepage"><div><div><h6 class="title"><a id="container.tree.node.updator"></a>Node Updator</h6></div></div></div><p>The tree-based containers are parametrized by a
<code class="classname">Node_Update</code> template-template parameter. A <code class="classname">Node_Update</code> template-template parameter. A
tree-based container instantiates tree-based container instantiates
<code class="classname">Node_Update</code> to some <code class="classname">Node_Update</code> to some
<code class="classname">node_update</code> class, and publicly subclasses <code class="classname">node_update</code> class, and publicly subclasses
<code class="classname">node_update</code>. The graphic below shows this <code class="classname">node_update</code>. The graphic below shows this
scheme, as well as some predefined policies (which are explained scheme, as well as some predefined policies (which are explained
below).</p><div class="figure"><a name="id646738"></a><p class="title"><b>Figure 22.24. A tree and its update policy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_tree_node_updator_policy_cd.png" align="middle" alt="A tree and its update policy"></div></div></div><br class="figure-break"><p><code class="classname">node_update</code> (an instantiation of below).</p><div class="figure"><a id="id620810"></a><p class="title"><strong>Figure 22.24. A tree and its update policy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_tree_node_updator_policy_cd.png" align="middle" alt="A tree and its update policy" /></div></div></div><br class="figure-break" /><p><code class="classname">node_update</code> (an instantiation of
<code class="classname">Node_Update</code>) must define <code class="classname">metadata_type</code> as <code class="classname">Node_Update</code>) must define <code class="classname">metadata_type</code> as
the type of metadata it requires. For order statistics, the type of metadata it requires. For order statistics,
e.g., <code class="classname">metadata_type</code> might be <code class="classname">size_t</code>. e.g., <code class="classname">metadata_type</code> might be <code class="classname">size_t</code>.
@ -967,7 +939,7 @@
<code class="classname">nd_it</code>. For example, say node x in the <code class="classname">nd_it</code>. For example, say node x in the
graphic below label A has an invalid invariant, but its' children, graphic below label A has an invalid invariant, but its' children,
y and z have valid invariants. After the invocation, all three y and z have valid invariants. After the invocation, all three
nodes should have valid invariants, as in label B.</p><div class="figure"><a name="id646835"></a><p class="title"><b>Figure 22.25. Restoring node invariants</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_restoring_node_invariants.png" align="middle" alt="Restoring node invariants"></div></div></div><br class="figure-break"><p>When a tree operation might invalidate some node invariant, nodes should have valid invariants, as in label B.</p><div class="figure"><a id="id620907"></a><p class="title"><strong>Figure 22.25. Restoring node invariants</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_restoring_node_invariants.png" align="middle" alt="Restoring node invariants" /></div></div></div><br class="figure-break" /><p>When a tree operation might invalidate some node invariant,
it invokes this method in its <code class="classname">node_update</code> base to it invokes this method in its <code class="classname">node_update</code> base to
restore the invariant. For example, the graphic below shows restore the invariant. For example, the graphic below shows
an <code class="function">insert</code> operation (point A); the tree performs some an <code class="function">insert</code> operation (point A); the tree performs some
@ -975,7 +947,7 @@
C, and D). (It is well known that any <code class="function">insert</code>, C, and D). (It is well known that any <code class="function">insert</code>,
<code class="function">erase</code>, <code class="function">split</code> or <code class="function">join</code>, can restore <code class="function">erase</code>, <code class="function">split</code> or <code class="function">join</code>, can restore
all node invariants by a small number of node invariant updates (<a class="xref" href="policy_data_structures.html#biblio.clrs2001" title="Introduction to Algorithms, 2nd edition">[biblio.clrs2001]</a>) all node invariants by a small number of node invariant updates (<a class="xref" href="policy_data_structures.html#biblio.clrs2001" title="Introduction to Algorithms, 2nd edition">[biblio.clrs2001]</a>)
.</p><div class="figure"><a name="id646903"></a><p class="title"><b>Figure 22.26. Insert update sequence</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_update_seq_diagram.png" align="middle" alt="Insert update sequence"></div></div></div><br class="figure-break"><p>To complete the description of the scheme, three questions .</p><div class="figure"><a id="id620975"></a><p class="title"><strong>Figure 22.26. Insert update sequence</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_update_seq_diagram.png" align="middle" alt="Insert update sequence" /></div></div></div><br class="figure-break" /><p>To complete the description of the scheme, three questions
need to be answered:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>How can a tree which supports order statistics define a need to be answered:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>How can a tree which supports order statistics define a
method such as <code class="classname">find_by_order</code>?</p></li><li class="listitem"><p>How can the node updater base access methods of the method such as <code class="classname">find_by_order</code>?</p></li><li class="listitem"><p>How can the node updater base access methods of the
tree?</p></li><li class="listitem"><p>How can the following cyclic dependency be resolved? tree?</p></li><li class="listitem"><p>How can the following cyclic dependency be resolved?
@ -1017,9 +989,9 @@
node's metadata (this is halting reducible). In the graphic node's metadata (this is halting reducible). In the graphic
below, assume the shaded node is inserted. The tree would have below, assume the shaded node is inserted. The tree would have
to traverse the useless path shown to the root, applying to traverse the useless path shown to the root, applying
redundant updates all the way.</p></li></ol></div><div class="figure"><a name="id647089"></a><p class="title"><b>Figure 22.27. Useless update path</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_rationale_null_node_updator.png" align="middle" alt="Useless update path"></div></div></div><br class="figure-break"><p>A null policy class, <code class="classname">null_node_update</code> redundant updates all the way.</p></li></ol></div><div class="figure"><a id="id621160"></a><p class="title"><strong>Figure 22.27. Useless update path</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_rationale_null_node_updator.png" align="middle" alt="Useless update path" /></div></div></div><br class="figure-break" /><p>A null policy class, <code class="classname">null_node_update</code>
solves both these problems. The tree detects that node solves both these problems. The tree detects that node
invariants are irrelevant, and defines all accordingly.</p></div></div><div class="section" title="Split and Join"><div class="titlepage"><div><div><h6 class="title"><a name="container.tree.details.split"></a>Split and Join</h6></div></div></div><p>Tree-based containers support split and join methods. invariants are irrelevant, and defines all accordingly.</p></div></div><div class="section" title="Split and Join"><div class="titlepage"><div><div><h6 class="title"><a id="container.tree.details.split"></a>Split and Join</h6></div></div></div><p>Tree-based containers support split and join methods.
It is possible to split a tree so that it passes It is possible to split a tree so that it passes
all nodes with keys larger than a given key to a different all nodes with keys larger than a given key to a different
tree. These methods have the following advantages over the tree. These methods have the following advantages over the
@ -1029,7 +1001,7 @@
trees are split and joined at linear complexity. The trees are split and joined at linear complexity. The
alternatives have super-linear complexity.</p></li><li class="listitem"><p>Aside from orders of growth, these operations perform alternatives have super-linear complexity.</p></li><li class="listitem"><p>Aside from orders of growth, these operations perform
few allocations and de-allocations. For red-black trees, allocations are not performed, few allocations and de-allocations. For red-black trees, allocations are not performed,
and the methods are exception-free. </p></li></ol></div></div></div></div><div class="section" title="Trie"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.container.trie"></a>Trie</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a name="container.trie.interface"></a>Interface</h5></div></div></div><p>The trie-based container has the following declaration:</p><pre class="programlisting"> and the methods are exception-free. </p></li></ol></div></div></div></div><div class="section" title="Trie"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.container.trie"></a>Trie</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a id="container.trie.interface"></a>Interface</h5></div></div></div><p>The trie-based container has the following declaration:</p><pre class="programlisting">
template&lt;typename Key, template&lt;typename Key,
typename Mapped, typename Mapped,
typename Cmp_Fn = std::less&lt;Key&gt;, typename Cmp_Fn = std::less&lt;Key&gt;,
@ -1063,7 +1035,7 @@
complexity and size).</p></li><li class="listitem"><p>It works well for common-prefix keys.</p></li><li class="listitem"><p>It can support efficiently queries such as which complexity and size).</p></li><li class="listitem"><p>It works well for common-prefix keys.</p></li><li class="listitem"><p>It can support efficiently queries such as which
keys match a certain prefix. This is sometimes useful in file keys match a certain prefix. This is sometimes useful in file
systems and routers, and for "type-ahead" aka predictive text matching systems and routers, and for "type-ahead" aka predictive text matching
on mobile devices.</p></li></ol></div></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a name="container.trie.details"></a>Details</h5></div></div></div><div class="section" title="Element Access Traits"><div class="titlepage"><div><div><h6 class="title"><a name="container.trie.details.etraits"></a>Element Access Traits</h6></div></div></div><p>A trie inherently views its keys as sequences of elements. on mobile devices.</p></li></ol></div></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a id="container.trie.details"></a>Details</h5></div></div></div><div class="section" title="Element Access Traits"><div class="titlepage"><div><div><h6 class="title"><a id="container.trie.details.etraits"></a>Element Access Traits</h6></div></div></div><p>A trie inherently views its keys as sequences of elements.
For example, a trie can view a string as a sequence of For example, a trie can view a string as a sequence of
characters. A trie needs to map each of n elements to a characters. A trie needs to map each of n elements to a
number in {0, n - 1}. For example, a trie can map a number in {0, n - 1}. For example, a trie can map a
@ -1100,7 +1072,7 @@
sub-tree with leafs "a" and "as". The maximal common prefix is sub-tree with leafs "a" and "as". The maximal common prefix is
"a". The internal node contains, consequently, to const "a". The internal node contains, consequently, to const
iterators, one pointing to <code class="varname">'a'</code>, and the other to iterators, one pointing to <code class="varname">'a'</code>, and the other to
<code class="varname">'s'</code>.</p><div class="figure"><a name="id647461"></a><p class="title"><b>Figure 22.28. A PATRICIA trie</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_pat_trie.png" align="middle" alt="A PATRICIA trie"></div></div></div><br class="figure-break"></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a name="container.trie.details.node"></a>Node Invariants</h6></div></div></div><p>Trie-based containers support node invariants, as do <code class="varname">'s'</code>.</p><div class="figure"><a id="id621533"></a><p class="title"><strong>Figure 22.28. A PATRICIA trie</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_pat_trie.png" align="middle" alt="A PATRICIA trie" /></div></div></div><br class="figure-break" /></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a id="container.trie.details.node"></a>Node Invariants</h6></div></div></div><p>Trie-based containers support node invariants, as do
tree-based containers. There are two minor tree-based containers. There are two minor
differences, though, which, unfortunately, thwart sharing them differences, though, which, unfortunately, thwart sharing them
sharing the same node-updating policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A trie's <code class="classname">Node_Update</code> template-template sharing the same node-updating policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A trie's <code class="classname">Node_Update</code> template-template
@ -1109,15 +1081,15 @@
parametrized by <code class="classname">Cmp_Fn</code>.</p></li><li class="listitem"><p>Tree-based containers store values in all nodes, while parametrized by <code class="classname">Cmp_Fn</code>.</p></li><li class="listitem"><p>Tree-based containers store values in all nodes, while
trie-based containers (at least in this implementation) store trie-based containers (at least in this implementation) store
values in leafs.</p></li></ol></div><p>The graphic below shows the scheme, as well as some predefined values in leafs.</p></li></ol></div><p>The graphic below shows the scheme, as well as some predefined
policies (which are explained below).</p><div class="figure"><a name="id647548"></a><p class="title"><b>Figure 22.29. A trie and its update policy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_trie_node_updator_policy_cd.png" align="middle" alt="A trie and its update policy"></div></div></div><br class="figure-break"><p>This library offers the following pre-defined trie node policies (which are explained below).</p><div class="figure"><a id="id621620"></a><p class="title"><strong>Figure 22.29. A trie and its update policy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_trie_node_updator_policy_cd.png" align="middle" alt="A trie and its update policy" /></div></div></div><br class="figure-break" /><p>This library offers the following pre-defined trie node
updating policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p> updating policies:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
<code class="classname">trie_order_statistics_node_update</code> <code class="classname">trie_order_statistics_node_update</code>
supports order statistics. supports order statistics.
</p></li><li class="listitem"><p><code class="classname">trie_prefix_search_node_update</code> </p></li><li class="listitem"><p><code class="classname">trie_prefix_search_node_update</code>
supports searching for ranges that match a given prefix.</p></li><li class="listitem"><p><code class="classname">null_node_update</code> supports searching for ranges that match a given prefix.</p></li><li class="listitem"><p><code class="classname">null_node_update</code>
is the null node updater.</p></li></ol></div></div><div class="section" title="Split and Join"><div class="titlepage"><div><div><h6 class="title"><a name="container.trie.details.split"></a>Split and Join</h6></div></div></div><p>Trie-based containers support split and join methods; the is the null node updater.</p></li></ol></div></div><div class="section" title="Split and Join"><div class="titlepage"><div><div><h6 class="title"><a id="container.trie.details.split"></a>Split and Join</h6></div></div></div><p>Trie-based containers support split and join methods; the
rationale is equal to that of tree-based containers supporting rationale is equal to that of tree-based containers supporting
these methods.</p></div></div></div><div class="section" title="List"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.container.list"></a>List</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a name="container.list.interface"></a>Interface</h5></div></div></div><p>The list-based container has the following declaration:</p><pre class="programlisting"> these methods.</p></div></div></div><div class="section" title="List"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.container.list"></a>List</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a id="container.list.interface"></a>Interface</h5></div></div></div><p>The list-based container has the following declaration:</p><pre class="programlisting">
template&lt;typename Key, template&lt;typename Key,
typename Mapped, typename Mapped,
typename Eq_Fn = std::equal_to&lt;Key&gt;, typename Eq_Fn = std::equal_to&lt;Key&gt;,
@ -1152,12 +1124,12 @@
useful manner? Remarkably, many on-line competitive useful manner? Remarkably, many on-line competitive
algorithms exist for reordering lists to reflect access algorithms exist for reordering lists to reflect access
prediction. (See <a class="xref" href="policy_data_structures.html#biblio.motwani95random" title="Randomized Algorithms">[biblio.motwani95random]</a> and <a class="xref" href="policy_data_structures.html#biblio.andrew04mtf" title="MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem">[biblio.andrew04mtf]</a>). prediction. (See <a class="xref" href="policy_data_structures.html#biblio.motwani95random" title="Randomized Algorithms">[biblio.motwani95random]</a> and <a class="xref" href="policy_data_structures.html#biblio.andrew04mtf" title="MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem">[biblio.andrew04mtf]</a>).
</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a name="container.list.details"></a>Details</h5></div></div></div><p> </p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a id="container.list.details"></a>Details</h5></div></div></div><p>
</p><div class="section" title="Underlying Data Structure"><div class="titlepage"><div><div><h6 class="title"><a name="container.list.details.ds"></a>Underlying Data Structure</h6></div></div></div><p>The graphic below shows a </p><div class="section" title="Underlying Data Structure"><div class="titlepage"><div><div><h6 class="title"><a id="container.list.details.ds"></a>Underlying Data Structure</h6></div></div></div><p>The graphic below shows a
simple list of integer keys. If we search for the integer 6, we simple list of integer keys. If we search for the integer 6, we
are paying an overhead: the link with key 6 is only the fifth are paying an overhead: the link with key 6 is only the fifth
link; if it were the first link, it could be accessed link; if it were the first link, it could be accessed
faster.</p><div class="figure"><a name="id647803"></a><p class="title"><b>Figure 22.30. A simple list</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_simple_list.png" align="middle" alt="A simple list"></div></div></div><br class="figure-break"><p>List-update algorithms reorder lists as elements are faster.</p><div class="figure"><a id="id621875"></a><p class="title"><strong>Figure 22.30. A simple list</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_simple_list.png" align="middle" alt="A simple list" /></div></div></div><br class="figure-break" /><p>List-update algorithms reorder lists as elements are
accessed. They try to determine, by the access history, which accessed. They try to determine, by the access history, which
keys to move to the front of the list. Some of these algorithms keys to move to the front of the list. Some of these algorithms
require adding some metadata alongside each entry.</p><p>For example, in the graphic below label A shows the counter require adding some metadata alongside each entry.</p><p>For example, in the graphic below label A shows the counter
@ -1167,7 +1139,7 @@
predetermined value, say 10, as shown in label C, the count is set predetermined value, say 10, as shown in label C, the count is set
to 0 and the node is moved to the front of the list, as in label to 0 and the node is moved to the front of the list, as in label
D. D.
</p><div class="figure"><a name="id647850"></a><p class="title"><b>Figure 22.31. The counter algorithm</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_list_update.png" align="middle" alt="The counter algorithm"></div></div></div><br class="figure-break"></div><div class="section" title="Policies"><div class="titlepage"><div><div><h6 class="title"><a name="container.list.details.policies"></a>Policies</h6></div></div></div><p>this library allows instantiating lists with policies </p><div class="figure"><a id="id621922"></a><p class="title"><strong>Figure 22.31. The counter algorithm</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_list_update.png" align="middle" alt="The counter algorithm" /></div></div></div><br class="figure-break" /></div><div class="section" title="Policies"><div class="titlepage"><div><div><h6 class="title"><a id="container.list.details.policies"></a>Policies</h6></div></div></div><p>this library allows instantiating lists with policies
implementing any algorithm moving nodes to the front of the implementing any algorithm moving nodes to the front of the
list (policies implementing algorithms interchanging nodes are list (policies implementing algorithms interchanging nodes are
unsupported).</p><p>Associative containers based on lists are parametrized by a unsupported).</p><p>Associative containers based on lists are parametrized by a
@ -1202,7 +1174,7 @@
the list. The latter type is very useful in this library, the list. The latter type is very useful in this library,
since there is no need to associate metadata with each element. since there is no need to associate metadata with each element.
(See <a class="xref" href="policy_data_structures.html#biblio.andrew04mtf" title="MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem">[biblio.andrew04mtf]</a> (See <a class="xref" href="policy_data_structures.html#biblio.andrew04mtf" title="MTF, Bit, and COMB: A Guide to Deterministic and Randomized Algorithms for the List Update Problem">[biblio.andrew04mtf]</a>
</p></div><div class="section" title="Use in Multimaps"><div class="titlepage"><div><div><h6 class="title"><a name="container.list.details.mapped"></a>Use in Multimaps</h6></div></div></div><p>In this library, there are no equivalents for the standard's </p></div><div class="section" title="Use in Multimaps"><div class="titlepage"><div><div><h6 class="title"><a id="container.list.details.mapped"></a>Use in Multimaps</h6></div></div></div><p>In this library, there are no equivalents for the standard's
multimaps and multisets; instead one uses an associative multimaps and multisets; instead one uses an associative
container mapping primary keys to secondary keys.</p><p>List-based containers are especially useful as associative container mapping primary keys to secondary keys.</p><p>List-based containers are especially useful as associative
containers for secondary keys. In fact, they are implemented containers for secondary keys. In fact, they are implemented
@ -1231,7 +1203,7 @@
object (a hash-based container object holds a object (a hash-based container object holds a
hash functor). List-based containers, conversely, only have hash functor). List-based containers, conversely, only have
class-wide policy objects. class-wide policy objects.
</p></li></ol></div></div></div></div><div class="section" title="Priority Queue"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.design.container.priority_queue"></a>Priority Queue</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a name="container.priority_queue.interface"></a>Interface</h5></div></div></div><p>The priority queue container has the following </p></li></ol></div></div></div></div><div class="section" title="Priority Queue"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.design.container.priority_queue"></a>Priority Queue</h4></div></div></div><div class="section" title="Interface"><div class="titlepage"><div><div><h5 class="title"><a id="container.priority_queue.interface"></a>Interface</h5></div></div></div><p>The priority queue container has the following
declaration: declaration:
</p><pre class="programlisting"> </p><pre class="programlisting">
template&lt;typename Value_Type, template&lt;typename Value_Type,
@ -1267,7 +1239,7 @@
insufficient for manipulating priority-queues. </p><p>Different settings require different priority-queue insufficient for manipulating priority-queues. </p><p>Different settings require different priority-queue
implementations which are described in later; see traits implementations which are described in later; see traits
discusses ways to differentiate between the different traits of discusses ways to differentiate between the different traits of
different implementations.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a name="container.priority_queue.details"></a>Details</h5></div></div></div><div class="section" title="Iterators"><div class="titlepage"><div><div><h6 class="title"><a name="container.priority_queue.details.iterators"></a>Iterators</h6></div></div></div><p>There are many different underlying-data structures for different implementations.</p></div><div class="section" title="Details"><div class="titlepage"><div><div><h5 class="title"><a id="container.priority_queue.details"></a>Details</h5></div></div></div><div class="section" title="Iterators"><div class="titlepage"><div><div><h6 class="title"><a id="container.priority_queue.details.iterators"></a>Iterators</h6></div></div></div><p>There are many different underlying-data structures for
implementing priority queues. Unfortunately, most such implementing priority queues. Unfortunately, most such
structures are oriented towards making <code class="function">push</code> and structures are oriented towards making <code class="function">push</code> and
<code class="function">top</code> efficient, and consequently don't allow efficient <code class="function">top</code> efficient, and consequently don't allow efficient
@ -1334,12 +1306,12 @@
this data and a priority queue's iterator. Using the embedded this data and a priority queue's iterator. Using the embedded
method would need to use two associative containers. Similar method would need to use two associative containers. Similar
problems might arise in cases where a value can reside problems might arise in cases where a value can reside
simultaneously in many priority queues.</p></div><div class="section" title="Underlying Data Structure"><div class="titlepage"><div><div><h6 class="title"><a name="container.priority_queue.details.d"></a>Underlying Data Structure</h6></div></div></div><p>There are three main implementations of priority queues: the simultaneously in many priority queues.</p></div><div class="section" title="Underlying Data Structure"><div class="titlepage"><div><div><h6 class="title"><a id="container.priority_queue.details.d"></a>Underlying Data Structure</h6></div></div></div><p>There are three main implementations of priority queues: the
first employs a binary heap, typically one which uses a first employs a binary heap, typically one which uses a
sequence; the second uses a tree (or forest of trees), which is sequence; the second uses a tree (or forest of trees), which is
typically less structured than an associative container's tree; typically less structured than an associative container's tree;
the third simply uses an associative container. These are the third simply uses an associative container. These are
shown in the graphic below, in labels A1 and A2, label B, and label C.</p><div class="figure"><a name="id648381"></a><p class="title"><b>Figure 22.32. Underlying Priority-Queue Data-Structures.</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_different_underlying_dss.png" align="middle" alt="Underlying Priority-Queue Data-Structures."></div></div></div><br class="figure-break"><p>Roughly speaking, any value that is both pushed and popped shown in the graphic below, in labels A1 and A2, label B, and label C.</p><div class="figure"><a id="id622453"></a><p class="title"><strong>Figure 22.32. Underlying Priority-Queue Data-Structures.</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_different_underlying_dss.png" align="middle" alt="Underlying Priority-Queue Data-Structures." /></div></div></div><br class="figure-break" /><p>Roughly speaking, any value that is both pushed and popped
from a priority queue must incur a logarithmic expense (in the from a priority queue must incur a logarithmic expense (in the
amortized sense). Any priority queue implementation that would amortized sense). Any priority queue implementation that would
avoid this, would violate known bounds on comparison-based avoid this, would violate known bounds on comparison-based
@ -1409,7 +1381,7 @@
at all; the priority queue itself is an associative container. at all; the priority queue itself is an associative container.
Most associative containers are too structured to compete with Most associative containers are too structured to compete with
priority queues in terms of <code class="function">push</code> and <code class="function">pop</code> priority queues in terms of <code class="function">push</code> and <code class="function">pop</code>
performance.</p></div><div class="section" title="Traits"><div class="titlepage"><div><div><h6 class="title"><a name="container.priority_queue.details.traits"></a>Traits</h6></div></div></div><p>It would be nice if all priority queues could performance.</p></div><div class="section" title="Traits"><div class="titlepage"><div><div><h6 class="title"><a id="container.priority_queue.details.traits"></a>Traits</h6></div></div></div><p>It would be nice if all priority queues could
share exactly the same behavior regardless of implementation. Sadly, this is not possible. Just one for instance is in join operations: joining share exactly the same behavior regardless of implementation. Sadly, this is not possible. Just one for instance is in join operations: joining
two binary heaps might throw an exception (not corrupt two binary heaps might throw an exception (not corrupt
any of the heaps on which it operates), but joining two pairing any of the heaps on which it operates), but joining two pairing
@ -1419,7 +1391,7 @@
container <code class="classname">Cntnr</code>, the tag of the underlying container <code class="classname">Cntnr</code>, the tag of the underlying
data structure can be found via <code class="classname">typename data structure can be found via <code class="classname">typename
Cntnr::container_category</code>; this is one of the possible tags shown in the graphic below. Cntnr::container_category</code>; this is one of the possible tags shown in the graphic below.
</p><div class="figure"><a name="id648673"></a><p class="title"><b>Figure 22.33. Priority-Queue Data-Structure Tags.</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_tag_hierarchy.png" align="middle" alt="Priority-Queue Data-Structure Tags."></div></div></div><br class="figure-break"><p>Additionally, a traits mechanism can be used to query a </p><div class="figure"><a id="id622744"></a><p class="title"><strong>Figure 22.33. Priority-Queue Data-Structure Tags.</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_tag_hierarchy.png" align="middle" alt="Priority-Queue Data-Structure Tags." /></div></div></div><br class="figure-break" /><p>Additionally, a traits mechanism can be used to query a
container type for its attributes. Given any container container type for its attributes. Given any container
<code class="classname">Cntnr</code>, then </p><pre class="programlisting">__gnu_pbds::container_traits&lt;Cntnr&gt;</pre><p> <code class="classname">Cntnr</code>, then </p><pre class="programlisting">__gnu_pbds::container_traits&lt;Cntnr&gt;</pre><p>
is a traits class identifying the properties of the is a traits class identifying the properties of the
@ -1455,4 +1427,4 @@
<code class="function">erase</code> operations is non-negligible (say <code class="function">erase</code> operations is non-negligible (say
super-logarithmic in the total sequence of operations) - binary super-logarithmic in the total sequence of operations) - binary
heaps will perform badly. heaps will perform badly.
</p></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures_using.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_based_data_structures_test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Testing</td></tr></table></div></body></html> </p></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures_using.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_based_data_structures_test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Testing</td></tr></table></div></body></html>

View File

@ -1,34 +1,6 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Using</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Using</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10;&#9;ISO C++&#10; , &#10;&#9;policy&#10; , &#10;&#9;container&#10; , &#10;&#9;data&#10; , &#10;&#9;structure&#10; , &#10;&#9;associated&#10; , &#10;&#9;tree&#10; , &#10;&#9;trie&#10; , &#10;&#9;hash&#10; , &#10;&#9;metaprogramming&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures" /><link rel="prev" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures" /><link rel="next" href="policy_data_structures_design.html" title="Design" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures_design.html">Next</a></td></tr></table><hr /></div><div class="section" title="Using"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="containers.pbds.using"></a>Using</h2></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.using.prereq"></a>Prerequisites</h3></div></div></div><p>The library contains only header files, and does not require any
policy
,
container
,
data
,
structure
,
associated
,
tree
,
trie
,
hash
,
metaprogramming
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures"><link rel="prev" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures"><link rel="next" href="policy_data_structures_design.html" title="Design"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures_design.html">Next</a></td></tr></table><hr></div><div class="section" title="Using"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="containers.pbds.using"></a>Using</h2></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.using.prereq"></a>Prerequisites</h3></div></div></div><p>The library contains only header files, and does not require any
other libraries except the standard C++ library . All classes are other libraries except the standard C++ library . All classes are
defined in namespace <code class="code">__gnu_pbds</code>. The library internally defined in namespace <code class="code">__gnu_pbds</code>. The library internally
uses macros beginning with <code class="code">PB_DS</code>, but uses macros beginning with <code class="code">PB_DS</code>, but
@ -39,7 +11,7 @@
Further dependencies are necessary to create the visual output Further dependencies are necessary to create the visual output
for the performance tests. To create these graphs, an for the performance tests. To create these graphs, an
additional package is needed: <span class="command"><strong>pychart</strong></span>. additional package is needed: <span class="command"><strong>pychart</strong></span>.
</p></div><div class="section" title="Organization"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.using.organization"></a>Organization</h3></div></div></div><p> </p></div><div class="section" title="Organization"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.using.organization"></a>Organization</h3></div></div></div><p>
The various data structures are organized as follows. The various data structures are organized as follows.
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Branch-Based Branch-Based
@ -90,7 +62,7 @@
In addition, there are the following diagnostics classes, In addition, there are the following diagnostics classes,
used to report errors specific to this library's data used to report errors specific to this library's data
structures. structures.
</p><div class="figure"><a name="id641972"></a><p class="title"><b>Figure 22.7. Exception Hierarchy</b></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_exception_hierarchy.png" align="middle" alt="Exception Hierarchy"></div></div></div><br class="figure-break"></div><div class="section" title="Tutorial"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.using.tutorial"></a>Tutorial</h3></div></div></div><div class="section" title="Basic Use"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.tutorial.basic"></a>Basic Use</h4></div></div></div><p> </p><div class="figure"><a id="id616044"></a><p class="title"><strong>Figure 22.7. Exception Hierarchy</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="../images/pbds_exception_hierarchy.png" align="middle" alt="Exception Hierarchy" /></div></div></div><br class="figure-break" /></div><div class="section" title="Tutorial"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.using.tutorial"></a>Tutorial</h3></div></div></div><div class="section" title="Basic Use"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.tutorial.basic"></a>Basic Use</h4></div></div></div><p>
For the most part, the policy-based containers containers in For the most part, the policy-based containers containers in
namespace <code class="literal">__gnu_pbds</code> have the same interface as namespace <code class="literal">__gnu_pbds</code> have the same interface as
the equivalent containers in the standard C++ library, except for the equivalent containers in the standard C++ library, except for
@ -214,7 +186,7 @@
</pre><p> </pre><p>
so all hash-based associative containers inherit the same so all hash-based associative containers inherit the same
hash-functor accessor methods. hash-functor accessor methods.
</p></div><div class="section" title="Configuring via Template Parameters"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.tutorial.configuring"></a> </p></div><div class="section" title="Configuring via Template Parameters"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.tutorial.configuring"></a>
Configuring via Template Parameters Configuring via Template Parameters
</h4></div></div></div><p> </h4></div></div></div><p>
In general, each of this library's containers is In general, each of this library's containers is
@ -268,7 +240,7 @@
by one of them.</p><p>Note that as opposed to the by one of them.</p><p>Note that as opposed to the
<code class="classname">std::priority_queue</code>, <code class="classname">std::priority_queue</code>,
<code class="classname">__gnu_pbds::priority_queue</code> is not a <code class="classname">__gnu_pbds::priority_queue</code> is not a
sequence-adapter; it is a regular container.</p></div><div class="section" title="Querying Container Attributes"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.tutorial.traits"></a> sequence-adapter; it is a regular container.</p></div><div class="section" title="Querying Container Attributes"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.tutorial.traits"></a>
Querying Container Attributes Querying Container Attributes
</h4></div></div></div><p></p><p>A containers underlying data structure </h4></div></div></div><p></p><p>A containers underlying data structure
affect their performance; Unfortunately, they can also affect affect their performance; Unfortunately, they can also affect
@ -306,7 +278,7 @@
</pre><p>is the container's invalidation guarantee. Invalidation </pre><p>is the container's invalidation guarantee. Invalidation
guarantees are especially important regarding priority queues, guarantees are especially important regarding priority queues,
since in this library's design, iterators are practically the since in this library's design, iterators are practically the
only way to manipulate them.</p></div><div class="section" title="Point and Range Iteration"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.tutorial.point_range_iteration"></a> only way to manipulate them.</p></div><div class="section" title="Point and Range Iteration"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.tutorial.point_range_iteration"></a>
Point and Range Iteration Point and Range Iteration
</h4></div></div></div><p></p><p>This library differentiates between two types of methods </h4></div></div></div><p></p><p>This library differentiates between two types of methods
and iterators: point-type, and range-type. For example, and iterators: point-type, and range-type. For example,
@ -405,11 +377,11 @@
</pre><p> </pre><p>
gives one of three pre-determined types that answer this gives one of three pre-determined types that answer this
query. query.
</p></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h3 class="title"><a name="pbds.using.examples"></a>Examples</h3></div></div></div><p> </p></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.using.examples"></a>Examples</h3></div></div></div><p>
Additional code examples are provided in the source Additional code examples are provided in the source
distribution, as part of the regression and performance distribution, as part of the regression and performance
testsuite. testsuite.
</p><div class="section" title="Intermediate Use"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.examples.basic"></a>Intermediate Use</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="section" title="Intermediate Use"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.examples.basic"></a>Intermediate Use</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Basic use of maps: Basic use of maps:
<code class="filename">basic_map.cc</code> <code class="filename">basic_map.cc</code>
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
@ -433,7 +405,7 @@
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
Conditionally erasing values from a priority queue: Conditionally erasing values from a priority queue:
<code class="filename">priority_queue_erase_if.cc</code> <code class="filename">priority_queue_erase_if.cc</code>
</p></li></ul></div></div><div class="section" title="Querying with container_traits"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.examples.query"></a>Querying with <code class="classname">container_traits</code> </h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div><div class="section" title="Querying with container_traits"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.examples.query"></a>Querying with <code class="classname">container_traits</code> </h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Using <code class="classname">container_traits</code> to query Using <code class="classname">container_traits</code> to query
about underlying data structure behavior: about underlying data structure behavior:
<code class="filename">assoc_container_traits.cc</code> <code class="filename">assoc_container_traits.cc</code>
@ -444,7 +416,7 @@
Using <code class="classname">container_traits</code> Using <code class="classname">container_traits</code>
to query about underlying data structure behavior: to query about underlying data structure behavior:
<code class="filename">priority_queue_container_traits.cc</code> <code class="filename">priority_queue_container_traits.cc</code>
</p></li></ul></div></div><div class="section" title="By Container Method"><div class="titlepage"><div><div><h4 class="title"><a name="pbds.using.examples.container"></a>By Container Method</h4></div></div></div><p></p><div class="section" title="Hash-Based"><div class="titlepage"><div><div><h5 class="title"><a name="pbds.using.examples.container.hash"></a>Hash-Based</h5></div></div></div><div class="section" title="size Related"><div class="titlepage"><div><div><h6 class="title"><a name="pbds.using.examples.container.hash.resize"></a>size Related</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div><div class="section" title="By Container Method"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.using.examples.container"></a>By Container Method</h4></div></div></div><p></p><div class="section" title="Hash-Based"><div class="titlepage"><div><div><h5 class="title"><a id="pbds.using.examples.container.hash"></a>Hash-Based</h5></div></div></div><div class="section" title="size Related"><div class="titlepage"><div><div><h6 class="title"><a id="pbds.using.examples.container.hash.resize"></a>size Related</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Setting the initial size of a hash-based container Setting the initial size of a hash-based container
object: object:
<code class="filename">hash_initial_size.cc</code> <code class="filename">hash_initial_size.cc</code>
@ -462,7 +434,7 @@
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
Changing the load factors of a hash-based container Changing the load factors of a hash-based container
object: <code class="filename">hash_load_set_change.cc</code> object: <code class="filename">hash_load_set_change.cc</code>
</p></li></ul></div></div><div class="section" title="Hashing Function Related"><div class="titlepage"><div><div><h6 class="title"><a name="pbds.using.examples.container.hash.hashor"></a>Hashing Function Related</h6></div></div></div><p></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div><div class="section" title="Hashing Function Related"><div class="titlepage"><div><div><h6 class="title"><a id="pbds.using.examples.container.hash.hashor"></a>Hashing Function Related</h6></div></div></div><p></p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Using a modulo range-hashing function for the case of an Using a modulo range-hashing function for the case of an
unknown skewed key distribution: unknown skewed key distribution:
<code class="filename">hash_mod.cc</code> <code class="filename">hash_mod.cc</code>
@ -476,7 +448,7 @@
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
Writing a ranged-hash functor: Writing a ranged-hash functor:
<code class="filename">ranged_hash.cc</code> <code class="filename">ranged_hash.cc</code>
</p></li></ul></div></div></div><div class="section" title="Branch-Based"><div class="titlepage"><div><div><h5 class="title"><a name="pbds.using.examples.container.branch"></a>Branch-Based</h5></div></div></div><div class="section" title="split or join Related"><div class="titlepage"><div><div><h6 class="title"><a name="pbds.using.examples.container.branch.split"></a>split or join Related</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div></div><div class="section" title="Branch-Based"><div class="titlepage"><div><div><h5 class="title"><a id="pbds.using.examples.container.branch"></a>Branch-Based</h5></div></div></div><div class="section" title="split or join Related"><div class="titlepage"><div><div><h6 class="title"><a id="pbds.using.examples.container.branch.split"></a>split or join Related</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Joining two tree-based container objects: Joining two tree-based container objects:
<code class="filename">tree_join.cc</code> <code class="filename">tree_join.cc</code>
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
@ -486,21 +458,21 @@
Order statistics while joining two tree-based container Order statistics while joining two tree-based container
objects: objects:
<code class="filename">tree_order_statistics_join.cc</code> <code class="filename">tree_order_statistics_join.cc</code>
</p></li></ul></div></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a name="pbds.using.examples.container.branch.invariants"></a>Node Invariants</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div><div class="section" title="Node Invariants"><div class="titlepage"><div><div><h6 class="title"><a id="pbds.using.examples.container.branch.invariants"></a>Node Invariants</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Using trees for order statistics: Using trees for order statistics:
<code class="filename">tree_order_statistics.cc</code> <code class="filename">tree_order_statistics.cc</code>
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
Augmenting trees to support operations on line Augmenting trees to support operations on line
intervals: intervals:
<code class="filename">tree_intervals.cc</code> <code class="filename">tree_intervals.cc</code>
</p></li></ul></div></div><div class="section" title="trie"><div class="titlepage"><div><div><h6 class="title"><a name="pbds.using.examples.container.branch.trie"></a>trie</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div><div class="section" title="trie"><div class="titlepage"><div><div><h6 class="title"><a id="pbds.using.examples.container.branch.trie"></a>trie</h6></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Using a PATRICIA trie for DNA strings: Using a PATRICIA trie for DNA strings:
<code class="filename">trie_dna.cc</code> <code class="filename">trie_dna.cc</code>
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
Using a PATRICIA Using a PATRICIA
trie for finding all entries whose key matches a given prefix: trie for finding all entries whose key matches a given prefix:
<code class="filename">trie_prefix_search.cc</code> <code class="filename">trie_prefix_search.cc</code>
</p></li></ul></div></div></div><div class="section" title="Priority Queues"><div class="titlepage"><div><div><h5 class="title"><a name="pbds.using.examples.container.priority_queue"></a>Priority Queues</h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p></li></ul></div></div></div><div class="section" title="Priority Queues"><div class="titlepage"><div><div><h5 class="title"><a id="pbds.using.examples.container.priority_queue"></a>Priority Queues</h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Cross referencing an associative container and a priority Cross referencing an associative container and a priority
queue: <code class="filename">priority_queue_xref.cc</code> queue: <code class="filename">priority_queue_xref.cc</code>
</p></li><li class="listitem"><p> </p></li><li class="listitem"><p>
@ -508,4 +480,4 @@
very simple version of Dijkstra's shortest path very simple version of Dijkstra's shortest path
algorithm: algorithm:
<code class="filename">priority_queue_dijkstra.cc</code> <code class="filename">priority_queue_dijkstra.cc</code>
</p></li></ul></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures_design.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 22. Policy-Based Data Structures </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html> </p></li></ul></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures_design.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 22. Policy-Based Data Structures </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 2. Setup</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="intro.html" title="Part I.  Introduction" /><link rel="prev" href="bugs.html" title="Bugs" /><link rel="next" href="configure.html" title="Configure" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><th width="60%" align="center">Part I. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="intro.html" title="Part I.  Introduction"><link rel="prev" href="bugs.html" title="Bugs"><link rel="next" href="configure.html" title="Configure"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Setup</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><th width="60%" align="center">Part I. 
Introduction Introduction
</th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 2. Setup"><div class="titlepage"><div><div><h2 class="title"><a name="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></div><p>To transform libstdc++ sources into installed include files </th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 2. Setup"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.setup"></a>Chapter 2. Setup</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></div><p>To transform libstdc++ sources into installed include files
and properly built binaries useful for linking to other software is and properly built binaries useful for linking to other software is
a multi-step process. Steps include getting the sources, a multi-step process. Steps include getting the sources,
configuring and building the sources, testing, and installation. configuring and building the sources, testing, and installation.
@ -27,7 +19,7 @@
make install make install
</pre><p> </pre><p>
Each step is described in more detail in the following sections. Each step is described in more detail in the following sections.
</p><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.setup.prereq"></a>Prerequisites</h2></div></div></div><p> </p><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.prereq"></a>Prerequisites</h2></div></div></div><p>
Because libstdc++ is part of GCC, the primary source for Because libstdc++ is part of GCC, the primary source for
installation instructions is installation instructions is
<a class="link" href="http://gcc.gnu.org/install/" target="_top">the GCC install page</a>. <a class="link" href="http://gcc.gnu.org/install/" target="_top">the GCC install page</a>.
@ -98,4 +90,4 @@ zh_TW BIG5
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>install all locales</p></li><li class="listitem"><p>install just the necessary locales</p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>with Debian GNU/Linux:</p><p> Add the above list, as shown, to the file </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>install all locales</p></li><li class="listitem"><p>install just the necessary locales</p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>with Debian GNU/Linux:</p><p> Add the above list, as shown, to the file
<code class="code">/etc/locale.gen</code> </p><p> run <code class="code">/usr/sbin/locale-gen</code> </p></li><li class="listitem"><p>on most Unix-like operating systems:</p><p><code class="code"> localedef -i de_DE -f ISO-8859-1 de_DE </code></p><p>(repeat for each entry in the above list) </p></li><li class="listitem"><p> <code class="code">/etc/locale.gen</code> </p><p> run <code class="code">/usr/sbin/locale-gen</code> </p></li><li class="listitem"><p>on most Unix-like operating systems:</p><p><code class="code"> localedef -i de_DE -f ISO-8859-1 de_DE </code></p><p>(repeat for each entry in the above list) </p></li><li class="listitem"><p>
Instructions for other operating systems solicited. Instructions for other operating systems solicited.
</p></li></ul></div></li></ul></div></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bugs </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Configure</td></tr></table></div></body></html> </p></li></ul></div></li></ul></div></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Bugs </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Configure</td></tr></table></div></body></html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,105 +1,97 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Directory Layout and Source Conventions</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Directory Layout and Source Conventions</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_contributing.html" title="Appendix A.  Contributing" /><link rel="prev" href="appendix_contributing.html" title="Appendix A.  Contributing" /><link rel="next" href="source_code_style.html" title="Coding Style" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Directory Layout and Source Conventions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><th width="60%" align="center">Appendix A. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_contributing.html" title="Appendix A.  Contributing"><link rel="prev" href="appendix_contributing.html" title="Appendix A.  Contributing"><link rel="next" href="source_code_style.html" title="Coding Style"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Directory Layout and Source Conventions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><th width="60%" align="center">Appendix A. 
Contributing Contributing
</th><td width="20%" align="right"> <a accesskey="n" href="source_code_style.html">Next</a></td></tr></table><hr></div><div class="section" title="Directory Layout and Source Conventions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="contrib.organization"></a>Directory Layout and Source Conventions</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="source_code_style.html">Next</a></td></tr></table><hr /></div><div class="section" title="Directory Layout and Source Conventions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="contrib.organization"></a>Directory Layout and Source Conventions</h2></div></div></div><p>
The unpacked source directory of libstdc++ contains the files The unpacked source directory of libstdc++ contains the files
needed to create the GNU C++ Library. needed to create the GNU C++ Library.
</p><div class="literallayout"><p><br> </p><div class="literallayout"><p><br />
It has subdirectories:<br> It has subdirectories:<br />
<br> <br />
  doc<br>   doc<br />
    Files in HTML and text format that document usage, quirks of the<br>     Files in HTML and text format that document usage, quirks of the<br />
    implementation, and contributor checklists.<br>     implementation, and contributor checklists.<br />
<br> <br />
  include<br>   include<br />
    All header files for the C++ library are within this directory,<br>     All header files for the C++ library are within this directory,<br />
    modulo specific runtime-related files that are in the libsupc++<br>     modulo specific runtime-related files that are in the libsupc++<br />
    directory.<br>     directory.<br />
<br> <br />
    include/std<br>     include/std<br />
      Files meant to be found by #include &lt;name&gt; directives in<br>       Files meant to be found by #include &lt;name&gt; directives in<br />
      standard-conforming user programs.<br>       standard-conforming user programs.<br />
<br> <br />
    include/c<br>     include/c<br />
      Headers intended to directly include standard C headers.<br>       Headers intended to directly include standard C headers.<br />
      [NB: this can be enabled via --enable-cheaders=c]<br>       [NB: this can be enabled via --enable-cheaders=c]<br />
<br> <br />
    include/c_global<br>     include/c_global<br />
      Headers intended to include standard C headers in<br>       Headers intended to include standard C headers in<br />
      the global namespace, and put select names into the std::<br>       the global namespace, and put select names into the std::<br />
      namespace.  [NB: this is the default, and is the same as<br>       namespace.  [NB: this is the default, and is the same as<br />
      --enable-cheaders=c_global]<br>       --enable-cheaders=c_global]<br />
<br> <br />
    include/c_std<br>     include/c_std<br />
      Headers intended to include standard C headers<br>       Headers intended to include standard C headers<br />
      already in namespace std, and put select names into the std::<br>       already in namespace std, and put select names into the std::<br />
      namespace.  [NB: this is the same as --enable-cheaders=c_std]<br>       namespace.  [NB: this is the same as --enable-cheaders=c_std]<br />
<br> <br />
    include/bits<br>     include/bits<br />
      Files included by standard headers and by other files in<br>       Files included by standard headers and by other files in<br />
      the bits directory.<br>       the bits directory.<br />
<br> <br />
    include/backward<br>     include/backward<br />
      Headers provided for backward compatibility, such as &lt;iostream.h&gt;.<br>       Headers provided for backward compatibility, such as &lt;iostream.h&gt;.<br />
      They are not used in this library.<br>       They are not used in this library.<br />
<br> <br />
    include/ext<br>     include/ext<br />
      Headers that define extensions to the standard library.  No<br>       Headers that define extensions to the standard library.  No<br />
      standard header refers to any of them.<br>       standard header refers to any of them.<br />
<br> <br />
  scripts<br>   scripts<br />
    Scripts that are used during the configure, build, make, or test<br>     Scripts that are used during the configure, build, make, or test<br />
    process.<br>     process.<br />
<br> <br />
  src<br>   src<br />
    Files that are used in constructing the library, but are not<br>     Files that are used in constructing the library, but are not<br />
    installed.<br>     installed.<br />
<br> <br />
  testsuites/[backward, demangle, ext, performance, thread, 17_* to 30_*]<br>   testsuites/[backward, demangle, ext, performance, thread, 17_* to 30_*]<br />
    Test programs are here, and may be used to begin to exercise the<br>     Test programs are here, and may be used to begin to exercise the<br />
    library.  Support for "make check" and "make check-install" is<br>     library.  Support for "make check" and "make check-install" is<br />
    complete, and runs through all the subdirectories here when this<br>     complete, and runs through all the subdirectories here when this<br />
    command is issued from the build directory.  Please note that<br>     command is issued from the build directory.  Please note that<br />
    "make check" requires DejaGNU 1.4 or later to be installed.  Please<br>     "make check" requires DejaGNU 1.4 or later to be installed.  Please<br />
    note that "make check-script" calls the script mkcheck, which<br>     note that "make check-script" calls the script mkcheck, which<br />
    requires bash, and which may need the paths to bash adjusted to<br>     requires bash, and which may need the paths to bash adjusted to<br />
    work properly, as /bin/bash is assumed.<br>     work properly, as /bin/bash is assumed.<br />
<br> <br />
Other subdirectories contain variant versions of certain files<br> Other subdirectories contain variant versions of certain files<br />
that are meant to be copied or linked by the configure script.<br> that are meant to be copied or linked by the configure script.<br />
Currently these are:<br> Currently these are:<br />
<br> <br />
  config/abi<br>   config/abi<br />
  config/cpu<br>   config/cpu<br />
  config/io<br>   config/io<br />
  config/locale<br>   config/locale<br />
  config/os<br>   config/os<br />
<br> <br />
In addition, a subdirectory holds the convenience library libsupc++.<br> In addition, a subdirectory holds the convenience library libsupc++.<br />
<br> <br />
  libsupc++<br>   libsupc++<br />
    Contains the runtime library for C++, including exception<br>     Contains the runtime library for C++, including exception<br />
    handling and memory allocation and deallocation, RTTI, terminate<br>     handling and memory allocation and deallocation, RTTI, terminate<br />
    handlers, etc.<br>     handlers, etc.<br />
<br> <br />
Note that glibc also has a bits/ subdirectory.  We will either<br> Note that glibc also has a bits/ subdirectory.  We will either<br />
need to be careful not to collide with names in its bits/<br> need to be careful not to collide with names in its bits/<br />
directory; or rename bits to (e.g.) cppbits/.<br> directory; or rename bits to (e.g.) cppbits/.<br />
<br> <br />
In files throughout the system, lines marked with an "XXX" indicate<br> In files throughout the system, lines marked with an "XXX" indicate<br />
a bug or incompletely-implemented feature.  Lines marked "XXX MT"<br> a bug or incompletely-implemented feature.  Lines marked "XXX MT"<br />
indicate a place that may require attention for multi-thread safety.<br> indicate a place that may require attention for multi-thread safety.<br />
  </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="source_code_style.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A.    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="appendix_contributing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_contributing.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="source_code_style.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix A. 
Contributing Contributing
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Coding Style</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Coding Style</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Stream Buffers</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Stream Buffers</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="io.html" title="Chapter 13.  Input and Output" /><link rel="prev" href="io.html" title="Chapter 13.  Input and Output" /><link rel="next" href="stringstreams.html" title="Memory Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Stream Buffers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="io.html" title="Chapter 13.  Input and Output"><link rel="prev" href="io.html" title="Chapter 13.  Input and Output"><link rel="next" href="stringstreams.html" title="Memory Based Streams"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Stream Buffers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
Input and Output Input and Output
</th><td width="20%" align="right"> <a accesskey="n" href="stringstreams.html">Next</a></td></tr></table><hr></div><div class="section" title="Stream Buffers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.io.streambufs"></a>Stream Buffers</h2></div></div></div><div class="section" title="Derived streambuf Classes"><div class="titlepage"><div><div><h3 class="title"><a name="io.streambuf.derived"></a>Derived streambuf Classes</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="stringstreams.html">Next</a></td></tr></table><hr /></div><div class="section" title="Stream Buffers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.io.streambufs"></a>Stream Buffers</h2></div></div></div><div class="section" title="Derived streambuf Classes"><div class="titlepage"><div><div><h3 class="title"><a id="io.streambuf.derived"></a>Derived streambuf Classes</h3></div></div></div><p>
</p><p>Creating your own stream buffers for I/O can be remarkably easy. </p><p>Creating your own stream buffers for I/O can be remarkably easy.
If you are interested in doing so, we highly recommend two very If you are interested in doing so, we highly recommend two very
excellent books: excellent books:
@ -65,7 +57,7 @@
<code class="code">include/ext/*_filebuf.h</code>, and in this article by James Kanze: <code class="code">include/ext/*_filebuf.h</code>, and in this article by James Kanze:
<a class="link" href="http://kanze.james.neuf.fr/articles/fltrsbf1.html" target="_top">Filtering <a class="link" href="http://kanze.james.neuf.fr/articles/fltrsbf1.html" target="_top">Filtering
Streambufs</a>. Streambufs</a>.
</p></div><div class="section" title="Buffering"><div class="titlepage"><div><div><h3 class="title"><a name="io.streambuf.buffering"></a>Buffering</h3></div></div></div><p>First, are you sure that you understand buffering? Particularly </p></div><div class="section" title="Buffering"><div class="titlepage"><div><div><h3 class="title"><a id="io.streambuf.buffering"></a>Buffering</h3></div></div></div><p>First, are you sure that you understand buffering? Particularly
the fact that C++ may not, in fact, have anything to do with it? the fact that C++ may not, in fact, have anything to do with it?
</p><p>The rules for buffering can be a little odd, but they aren't any </p><p>The rules for buffering can be a little odd, but they aren't any
different from those of C. (Maybe that's why they can be a bit different from those of C. (Maybe that's why they can be a bit
@ -139,7 +131,7 @@
just those at the language/library level. Kernel buffers, disk just those at the language/library level. Kernel buffers, disk
buffers, and the like will also have an effect. Inspecting and buffers, and the like will also have an effect. Inspecting and
changing those are system-dependent. changing those are system-dependent.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="stringstreams.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="stringstreams.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13. 
Input and Output Input and Output
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Memory Based Streams</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Memory Based Streams</td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 7.  Strings</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 7.  Strings</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="traits.html" title="Traits" /><link rel="next" href="localization.html" title="Chapter 8.  Localization" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="traits.html" title="Traits"><link rel="next" href="localization.html" title="Chapter 8.  Localization"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. 
Strings Strings
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="traits.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="traits.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 7.  Strings"><div class="titlepage"><div><div><h2 class="title"><a name="std.strings"></a>Chapter 7.  </th><td width="20%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 7.  Strings"><div class="titlepage"><div><div><h2 class="title"><a id="std.strings"></a>Chapter 7. 
Strings Strings
<a class="indexterm" name="id623691"></a> <a id="id597763" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></div><div class="section" title="String Classes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.strings.string"></a>String Classes</h2></div></div></div><div class="section" title="Simple Transformations"><div class="titlepage"><div><div><h3 class="title"><a name="strings.string.simple"></a>Simple Transformations</h3></div></div></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></div><div class="section" title="String Classes"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.strings.string"></a>String Classes</h2></div></div></div><div class="section" title="Simple Transformations"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.simple"></a>Simple Transformations</h3></div></div></div><p>
Here are Standard, simple, and portable ways to perform common Here are Standard, simple, and portable ways to perform common
transformations on a <code class="code">string</code> instance, such as transformations on a <code class="code">string</code> instance, such as
"convert to all upper case." The word transformations "convert to all upper case." The word transformations
@ -97,7 +89,7 @@
str.erase(notwhite+1); </pre><p>Obviously, the calls to <code class="code">find</code> could be inserted directly str.erase(notwhite+1); </pre><p>Obviously, the calls to <code class="code">find</code> could be inserted directly
into the calls to <code class="code">erase</code>, in case your compiler does not into the calls to <code class="code">erase</code>, in case your compiler does not
optimize named temporaries out of existence. optimize named temporaries out of existence.
</p></div><div class="section" title="Case Sensitivity"><div class="titlepage"><div><div><h3 class="title"><a name="strings.string.case"></a>Case Sensitivity</h3></div></div></div><p> </p></div><div class="section" title="Case Sensitivity"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.case"></a>Case Sensitivity</h3></div></div></div><p>
</p><p>The well-known-and-if-it-isn't-well-known-it-ought-to-be </p><p>The well-known-and-if-it-isn't-well-known-it-ought-to-be
<a class="link" href="http://www.gotw.ca/gotw/" target="_top">Guru of the Week</a> <a class="link" href="http://www.gotw.ca/gotw/" target="_top">Guru of the Week</a>
discussions held on Usenet covered this topic in January of 1998. discussions held on Usenet covered this topic in January of 1998.
@ -134,7 +126,7 @@
<a class="link" href="http://www.unicode.org/reports/tr21/tr21-5.html" target="_top">Unicode <a class="link" href="http://www.unicode.org/reports/tr21/tr21-5.html" target="_top">Unicode
Technical Report discussing case handling</a>, which provides some Technical Report discussing case handling</a>, which provides some
very good information. very good information.
</p></div><div class="section" title="Arbitrary Character Types"><div class="titlepage"><div><div><h3 class="title"><a name="strings.string.character_types"></a>Arbitrary Character Types</h3></div></div></div><p> </p></div><div class="section" title="Arbitrary Character Types"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.character_types"></a>Arbitrary Character Types</h3></div></div></div><p>
</p><p>The <code class="code">std::basic_string</code> is tantalizingly general, in that </p><p>The <code class="code">std::basic_string</code> is tantalizingly general, in that
it is parameterized on the type of the characters which it holds. it is parameterized on the type of the characters which it holds.
In theory, you could whip up a Unicode character class and instantiate In theory, you could whip up a Unicode character class and instantiate
@ -188,7 +180,7 @@
nice-looking first attempt</a> turned out to <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00242.html" target="_top">not nice-looking first attempt</a> turned out to <a class="link" href="http://gcc.gnu.org/ml/libstdc++/2002-08/msg00242.html" target="_top">not
be conforming C++</a>, due to the rule that CharT must be a POD. be conforming C++</a>, due to the rule that CharT must be a POD.
(See how tricky this is?) (See how tricky this is?)
</p></div><div class="section" title="Tokenizing"><div class="titlepage"><div><div><h3 class="title"><a name="strings.string.token"></a>Tokenizing</h3></div></div></div><p> </p></div><div class="section" title="Tokenizing"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.token"></a>Tokenizing</h3></div></div></div><p>
</p><p>The Standard C (and C++) function <code class="code">strtok()</code> leaves a lot to </p><p>The Standard C (and C++) function <code class="code">strtok()</code> leaves a lot to
be desired in terms of user-friendliness. It's unintuitive, it be desired in terms of user-friendliness. It's unintuitive, it
destroys the character string on which it operates, and it requires destroys the character string on which it operates, and it requires
@ -264,7 +256,7 @@ stringtok(Container &amp;container, string const &amp;in,
tokenizing as well. Build an istringstream from the input text, tokenizing as well. Build an istringstream from the input text,
and then use std::getline with varying delimiters (the three-argument and then use std::getline with varying delimiters (the three-argument
signature) to extract tokens into a string. signature) to extract tokens into a string.
</p></div><div class="section" title="Shrink to Fit"><div class="titlepage"><div><div><h3 class="title"><a name="strings.string.shrink"></a>Shrink to Fit</h3></div></div></div><p> </p></div><div class="section" title="Shrink to Fit"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.shrink"></a>Shrink to Fit</h3></div></div></div><p>
</p><p>From GCC 3.4 calling <code class="code">s.reserve(res)</code> on a </p><p>From GCC 3.4 calling <code class="code">s.reserve(res)</code> on a
<code class="code">string s</code> with <code class="code">res &lt; s.capacity()</code> will <code class="code">string s</code> with <code class="code">res &lt; s.capacity()</code> will
reduce the string's capacity to <code class="code">std::max(s.size(), res)</code>. reduce the string's capacity to <code class="code">std::max(s.size(), res)</code>.
@ -280,7 +272,7 @@ stringtok(Container &amp;container, string const &amp;in,
</p><p>In <a class="link" href="status.html#status.iso.2011" title="C++ 2011">C++11</a> mode you can call </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 <code class="code">s.shrink_to_fit()</code> to achieve the same effect as
<code class="code">s.reserve(s.size())</code>. <code class="code">s.reserve(s.size())</code>.
</p></div><div class="section" title="CString (MFC)"><div class="titlepage"><div><div><h3 class="title"><a name="strings.string.Cstring"></a>CString (MFC)</h3></div></div></div><p> </p></div><div class="section" title="CString (MFC)"><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 </p><p>A common lament seen in various newsgroups deals with the Standard
string class as opposed to the Microsoft Foundation Class called string class as opposed to the Microsoft Foundation Class called
CString. Often programmers realize that a standard portable CString. Often programmers realize that a standard portable
@ -368,7 +360,7 @@ stringtok(Container &amp;container, string const &amp;in,
libstdc++ string, the SGI string, and the SGI rope, and this libstdc++ string, the SGI string, and the SGI rope, and this
is all before any allocator or traits customizations! (More is all before any allocator or traits customizations! (More
choices than you can shake a stick at -- want fries with that?) choices than you can shake a stick at -- want fries with that?)
</p></li></ul></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="traits.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Traits </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8.  </p></li></ul></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="traits.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Traits </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. 
Localization Localization
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Memory Based Streams</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Memory Based Streams</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="io.html" title="Chapter 13.  Input and Output" /><link rel="prev" href="streambufs.html" title="Stream Buffers" /><link rel="next" href="fstreams.html" title="File Based Streams" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Memory Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="streambufs.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="io.html" title="Chapter 13.  Input and Output"><link rel="prev" href="streambufs.html" title="Stream Buffers"><link rel="next" href="fstreams.html" title="File Based Streams"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Memory Based Streams</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="streambufs.html">Prev</a> </td><th width="60%" align="center">Chapter 13. 
Input and Output Input and Output
</th><td width="20%" align="right"> <a accesskey="n" href="fstreams.html">Next</a></td></tr></table><hr></div><div class="section" title="Memory Based Streams"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.io.memstreams"></a>Memory Based Streams</h2></div></div></div><div class="section" title="Compatibility With strstream"><div class="titlepage"><div><div><h3 class="title"><a name="std.io.memstreams.compat"></a>Compatibility With strstream</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="fstreams.html">Next</a></td></tr></table><hr /></div><div class="section" title="Memory Based Streams"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.io.memstreams"></a>Memory Based Streams</h2></div></div></div><div class="section" title="Compatibility With strstream"><div class="titlepage"><div><div><h3 class="title"><a id="std.io.memstreams.compat"></a>Compatibility With strstream</h3></div></div></div><p>
</p><p>Stringstreams (defined in the header <code class="code">&lt;sstream&gt;</code>) </p><p>Stringstreams (defined in the header <code class="code">&lt;sstream&gt;</code>)
are in this author's opinion one of the coolest things since are in this author's opinion one of the coolest things since
sliced time. An example of their use is in the Received Wisdom sliced time. An example of their use is in the Received Wisdom
@ -42,4 +34,4 @@
memory yourself. The strstreams have been officially deprecated, memory yourself. The strstreams have been officially deprecated,
which means that 1) future revisions of the C++ Standard won't which means that 1) future revisions of the C++ Standard won't
support them, and 2) if you use them, people will laugh at you. support them, and 2) if you use them, people will laugh at you.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="streambufs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="fstreams.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Stream Buffers </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> File Based Streams</td></tr></table></div></body></html> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="streambufs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="io.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="fstreams.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Stream Buffers </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> File Based Streams</td></tr></table></div></body></html>

View File

@ -1,22 +1,14 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 4.  Support</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 4.  Support</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="prev" href="bk01pt02.html" title="Part II.  Standard Contents" /><link rel="next" href="dynamic_memory.html" title="Dynamic Memory" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="prev" href="bk01pt02.html" title="Part II.  Standard Contents"><link rel="next" href="dynamic_memory.html" title="Dynamic Memory"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. 
Support Support
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02.html">Prev</a> </td><th width="60%" align="center">Part II.  </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt02.html">Prev</a> </td><th width="60%" align="center">Part II. 
Standard Contents Standard Contents
</th><td width="20%" align="right"> <a accesskey="n" href="dynamic_memory.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 4.  Support"><div class="titlepage"><div><div><h2 class="title"><a name="std.support"></a>Chapter 4.  </th><td width="20%" align="right"> <a accesskey="n" href="dynamic_memory.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 4.  Support"><div class="titlepage"><div><div><h2 class="title"><a id="std.support"></a>Chapter 4. 
Support Support
<a class="indexterm" name="id607999"></a> <a id="id582070" class="indexterm"></a>
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="support.html#std.support.types">Types</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.numeric_limits">Numeric Properties</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.null">NULL</a></span></dt></dl></dd><dt><span class="section"><a href="dynamic_memory.html">Dynamic Memory</a></span></dt><dt><span class="section"><a href="termination.html">Termination</a></span></dt><dd><dl><dt><span class="section"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="section"><a href="termination.html#support.termination.verbose">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div><p> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="support.html#std.support.types">Types</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.numeric_limits">Numeric Properties</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.null">NULL</a></span></dt></dl></dd><dt><span class="section"><a href="dynamic_memory.html">Dynamic Memory</a></span></dt><dt><span class="section"><a href="termination.html">Termination</a></span></dt><dd><dl><dt><span class="section"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="section"><a href="termination.html#support.termination.verbose">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div><p>
This part deals with the functions called and objects created This part deals with the functions called and objects created
automatically during the course of a program's existence. automatically during the course of a program's existence.
</p><p> </p><p>
@ -24,7 +16,7 @@
need to get your own copy from your nation's member body; see our need to get your own copy from your nation's member body; see our
homepage for help), we can mention a couple of changes in what homepage for help), we can mention a couple of changes in what
kind of support a C++ program gets from the Standard Library. kind of support a C++ program gets from the Standard Library.
</p><div class="section" title="Types"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.support.types"></a>Types</h2></div></div></div><div class="section" title="Fundamental Types"><div class="titlepage"><div><div><h3 class="title"><a name="std.support.types.fundamental"></a>Fundamental Types</h3></div></div></div><p> </p><div class="section" title="Types"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.support.types"></a>Types</h2></div></div></div><div class="section" title="Fundamental Types"><div class="titlepage"><div><div><h3 class="title"><a id="std.support.types.fundamental"></a>Fundamental Types</h3></div></div></div><p>
C++ has the following builtin types: C++ has the following builtin types:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
char char
@ -61,7 +53,7 @@
</p><p> </p><p>
Specializing parts of the library on these types is prohibited: Specializing parts of the library on these types is prohibited:
instead, use a POD. instead, use a POD.
</p></div><div class="section" title="Numeric Properties"><div class="titlepage"><div><div><h3 class="title"><a name="std.support.types.numeric_limits"></a>Numeric Properties</h3></div></div></div><p> </p></div><div class="section" title="Numeric Properties"><div class="titlepage"><div><div><h3 class="title"><a id="std.support.types.numeric_limits"></a>Numeric Properties</h3></div></div></div><p>
The header <code class="filename">limits</code> defines The header <code class="filename">limits</code> defines
traits classes to give access to various implementation traits classes to give access to various implementation
defined-aspects of the fundamental types. The traits classes -- defined-aspects of the fundamental types. The traits classes --
@ -107,7 +99,7 @@
static const bool tinyness_before; static const bool tinyness_before;
static const float_round_style round_style; static const float_round_style round_style;
}; };
</pre></div><div class="section" title="NULL"><div class="titlepage"><div><div><h3 class="title"><a name="std.support.types.null"></a>NULL</h3></div></div></div><p> </pre></div><div class="section" title="NULL"><div class="titlepage"><div><div><h3 class="title"><a id="std.support.types.null"></a>NULL</h3></div></div></div><p>
The only change that might affect people is the type of The only change that might affect people is the type of
<code class="constant">NULL</code>: while it is required to be a macro, <code class="constant">NULL</code>: while it is required to be a macro,
the definition of that macro is <span class="emphasis"><em>not</em></span> allowed the definition of that macro is <span class="emphasis"><em>not</em></span> allowed
@ -133,6 +125,6 @@
</p><p>See </p><p>See
<a class="link" href="http://www.awprofessional.com/titles/0-201-31015-5/" target="_top">the <a class="link" href="http://www.awprofessional.com/titles/0-201-31015-5/" target="_top">the
Effective C++ CD example</a> Effective C++ CD example</a>
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dynamic_memory.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part II.  </p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01pt02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dynamic_memory.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part II. 
Standard Contents Standard Contents
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Dynamic Memory</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Dynamic Memory</td></tr></table></div></body></html>

View File

@ -1,17 +1,9 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Termination</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Termination</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="support.html" title="Chapter 4.  Support" /><link rel="prev" href="dynamic_memory.html" title="Dynamic Memory" /><link rel="next" href="diagnostics.html" title="Chapter 5.  Diagnostics" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Termination</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dynamic_memory.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="support.html" title="Chapter 4.  Support"><link rel="prev" href="dynamic_memory.html" title="Dynamic Memory"><link rel="next" href="diagnostics.html" title="Chapter 5.  Diagnostics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Termination</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dynamic_memory.html">Prev</a> </td><th width="60%" align="center">Chapter 4. 
Support Support
</th><td width="20%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr></table><hr></div><div class="section" title="Termination"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="std.support.termination"></a>Termination</h2></div></div></div><div class="section" title="Termination Handlers"><div class="titlepage"><div><div><h3 class="title"><a name="support.termination.handlers"></a>Termination Handlers</h3></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr></table><hr /></div><div class="section" title="Termination"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.support.termination"></a>Termination</h2></div></div></div><div class="section" title="Termination Handlers"><div class="titlepage"><div><div><h3 class="title"><a id="support.termination.handlers"></a>Termination Handlers</h3></div></div></div><p>
Not many changes here to <code class="filename">cstdlib</code>. You should note that the Not many changes here to <code class="filename">cstdlib</code>. You should note that the
<code class="function">abort()</code> function does not call the <code class="function">abort()</code> function does not call the
destructors of automatic nor static objects, so if you're destructors of automatic nor static objects, so if you're
@ -53,7 +45,7 @@
functions, and the compiler/library might already be using some of functions, and the compiler/library might already be using some of
those slots. If you think you may run out, we recommend using those slots. If you think you may run out, we recommend using
the <code class="function">xatexit</code>/<code class="function">xexit</code> combination from <code class="literal">libiberty</code>, which has no such limit. the <code class="function">xatexit</code>/<code class="function">xexit</code> combination from <code class="literal">libiberty</code>, which has no such limit.
</p></div><div class="section" title="Verbose Terminate Handler"><div class="titlepage"><div><div><h3 class="title"><a name="support.termination.verbose"></a>Verbose Terminate Handler</h3></div></div></div><p> </p></div><div class="section" title="Verbose Terminate Handler"><div class="titlepage"><div><div><h3 class="title"><a id="support.termination.verbose"></a>Verbose Terminate Handler</h3></div></div></div><p>
If you are having difficulty with uncaught exceptions and want a If you are having difficulty with uncaught exceptions and want a
little bit of help debugging the causes of the core dumps, you can little bit of help debugging the causes of the core dumps, you can
make use of a GNU extension, the verbose terminate handler. make use of a GNU extension, the verbose terminate handler.
@ -126,7 +118,7 @@ int main(int argc)
inappropriate location, inappropriate location,
<code class="function">__verbose_terminate_handler</code> will behave in <code class="function">__verbose_terminate_handler</code> will behave in
an unspecified manner. an unspecified manner.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dynamic_memory.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Dynamic Memory </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5.  </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dynamic_memory.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="support.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="diagnostics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Dynamic Memory </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. 
Diagnostics Diagnostics
</td></tr></table></div></body></html> </td></tr></table></div></body></html>

View File

@ -1,34 +1,12 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Test</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content=" <?xml version="1.0" encoding="UTF-8" standalone="no"?>
ISO C++ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Test</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1" /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; test&#10; , &#10; testsuite&#10; , &#10; performance&#10; , &#10; conformance&#10; , &#10; ABI&#10; , &#10; exception safety&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; library&#10; " /><meta name="keywords" content="&#10; ISO C++&#10; , &#10; runtime&#10; , &#10; library&#10; " /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="internals.html" title="Porting to New Hardware or Operating Systems" /><link rel="next" href="abi.html" title="ABI Policy and Guidelines" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
test
,
testsuite
,
performance
,
conformance
,
ABI
,
exception safety
"><meta name="keywords" content="
ISO C++
,
library
"><meta name="keywords" content="
ISO C++
,
runtime
,
library
"><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance"><link rel="prev" href="internals.html" title="Porting to New Hardware or Operating Systems"><link rel="next" href="abi.html" title="ABI Policy and Guidelines"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
Porting and Maintenance Porting and Maintenance
</th><td width="20%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr></table><hr></div><div class="section" title="Test"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="manual.intro.setup.test"></a>Test</h2></div></div></div><p> </th><td width="20%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr></table><hr /></div><div class="section" title="Test"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.test"></a>Test</h2></div></div></div><p>
The libstdc++ testsuite includes testing for standard conformance, The libstdc++ testsuite includes testing for standard conformance,
regressions, ABI, and performance. regressions, ABI, and performance.
</p><div class="section" title="Organization"><div class="titlepage"><div><div><h3 class="title"><a name="test.organization"></a>Organization</h3></div></div></div><div class="section" title="Directory Layout"><div class="titlepage"><div><div><h4 class="title"><a name="test.organization.layout"></a>Directory Layout</h4></div></div></div><p> </p><div class="section" title="Organization"><div class="titlepage"><div><div><h3 class="title"><a id="test.organization"></a>Organization</h3></div></div></div><div class="section" title="Directory Layout"><div class="titlepage"><div><div><h4 class="title"><a id="test.organization.layout"></a>Directory Layout</h4></div></div></div><p>
The directory <span class="emphasis"><em>libsrcdir/testsuite</em></span> contains the The directory <span class="emphasis"><em>libsrcdir/testsuite</em></span> contains the
individual test cases organized in sub-directories corresponding to individual test cases organized in sub-directories corresponding to
chapters of the C++ standard (detailed below), the dejagnu test chapters of the C++ standard (detailed below), the dejagnu test
@ -99,7 +77,7 @@ util Files for libtestc++, utilities and testing routines.
</pre><p> </pre><p>
All new tests should be written with the policy of one test All new tests should be written with the policy of one test
case, one file in mind. case, one file in mind.
</p></div><div class="section" title="Naming Conventions"><div class="titlepage"><div><div><h4 class="title"><a name="test.organization.naming"></a>Naming Conventions</h4></div></div></div><p> </p></div><div class="section" title="Naming Conventions"><div class="titlepage"><div><div><h4 class="title"><a id="test.organization.naming"></a>Naming Conventions</h4></div></div></div><p>
In addition, there are some special names and suffixes that are In addition, there are some special names and suffixes that are
used within the testsuite to designate particular kinds of used within the testsuite to designate particular kinds of
tests. tests.
@ -153,7 +131,7 @@ cat 27_io/objects/char/3_xin.in | a.out
analyze runtime performance, for performance regression testing, analyze runtime performance, for performance regression testing,
or for other optimization related analysis. At the moment, these or for other optimization related analysis. At the moment, these
test cases are not run by default. test cases are not run by default.
</p></li></ul></div></div></div><div class="section" title="Running the Testsuite"><div class="titlepage"><div><div><h3 class="title"><a name="test.run"></a>Running the Testsuite</h3></div></div></div><div class="section" title="Basic"><div class="titlepage"><div><div><h4 class="title"><a name="test.run.basic"></a>Basic</h4></div></div></div><p> </p></li></ul></div></div></div><div class="section" title="Running the Testsuite"><div class="titlepage"><div><div><h3 class="title"><a id="test.run"></a>Running the Testsuite</h3></div></div></div><div class="section" title="Basic"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.basic"></a>Basic</h4></div></div></div><p>
You can check the status of the build without installing it You can check the status of the build without installing it
using the dejagnu harness, much like the rest of the gcc using the dejagnu harness, much like the rest of the gcc
tools.</p><pre class="programlisting"> make check</pre><p>in the <span class="emphasis"><em>libbuilddir</em></span> directory.</p><p>or</p><pre class="programlisting"> make check-target-libstdc++-v3</pre><p>in the <span class="emphasis"><em>gccbuilddir</em></span> directory. tools.</p><pre class="programlisting"> make check</pre><p>in the <span class="emphasis"><em>libbuilddir</em></span> directory.</p><p>or</p><pre class="programlisting"> make check-target-libstdc++-v3</pre><p>in the <span class="emphasis"><em>gccbuilddir</em></span> directory.
@ -173,7 +151,7 @@ cat 27_io/objects/char/3_xin.in | a.out
archived on a daily basis on the <a class="link" href="http://gcc.gnu.org/ml/gcc-testresults/current" target="_top">gcc-testresults</a> archived on a daily basis on the <a class="link" href="http://gcc.gnu.org/ml/gcc-testresults/current" target="_top">gcc-testresults</a>
mailing list. Please check either of these places for a similar mailing list. Please check either of these places for a similar
combination of source version, operating system, and host CPU. combination of source version, operating system, and host CPU.
</p></div><div class="section" title="Variations"><div class="titlepage"><div><div><h4 class="title"><a name="test.run.variations"></a>Variations</h4></div></div></div><p> </p></div><div class="section" title="Variations"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.variations"></a>Variations</h4></div></div></div><p>
There are several options for running tests, including testing There are several options for running tests, including testing
the regression tests, testing a subset of the regression tests, the regression tests, testing a subset of the regression tests,
testing the performance tests, testing just compilation, testing testing the performance tests, testing just compilation, testing
@ -299,7 +277,7 @@ runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
We are interested in any strange failures of the testsuite; We are interested in any strange failures of the testsuite;
please email the main libstdc++ mailing list if you see please email the main libstdc++ mailing list if you see
something odd or have questions. something odd or have questions.
</p></div><div class="section" title="Permutations"><div class="titlepage"><div><div><h4 class="title"><a name="test.run.permutations"></a>Permutations</h4></div></div></div><p> </p></div><div class="section" title="Permutations"><div class="titlepage"><div><div><h4 class="title"><a id="test.run.permutations"></a>Permutations</h4></div></div></div><p>
To run the libstdc++ test suite under the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>, edit To run the libstdc++ test suite under the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>, edit
<code class="filename">libstdc++-v3/scripts/testsuite_flags</code> to add the <code class="filename">libstdc++-v3/scripts/testsuite_flags</code> to add the
compile-time flag <code class="constant">-D_GLIBCXX_DEBUG</code> to the compile-time flag <code class="constant">-D_GLIBCXX_DEBUG</code> to the
@ -319,7 +297,7 @@ runtest --tool libstdc++ --srcdir=/path/to/gcc/libstdc++-v3/testsuite
Or, just run the testsuites with <code class="constant">CXXFLAGS</code> Or, just run the testsuites with <code class="constant">CXXFLAGS</code>
set to <code class="constant">-D_GLIBCXX_DEBUG</code> or set to <code class="constant">-D_GLIBCXX_DEBUG</code> or
<code class="constant">-D_GLIBCXX_PARALLEL</code>. <code class="constant">-D_GLIBCXX_PARALLEL</code>.
</p></div></div><div class="section" title="Writing a new test case"><div class="titlepage"><div><div><h3 class="title"><a name="test.new_tests"></a>Writing a new test case</h3></div></div></div><p> </p></div></div><div class="section" title="Writing a new test case"><div class="titlepage"><div><div><h3 class="title"><a id="test.new_tests"></a>Writing a new test case</h3></div></div></div><p>
The first step in making a new test case is to choose the correct The first step in making a new test case is to choose the correct
directory and file name, given the organization as previously directory and file name, given the organization as previously
described. described.
@ -430,7 +408,7 @@ up in the normal.exp file.
// { dg-options "-O0" { target *-*-* } } // { dg-options "-O0" { target *-*-* } }
</pre><p> </pre><p>
More examples can be found in the libstdc++-v3/testsuite/*/*.cc files. More examples can be found in the libstdc++-v3/testsuite/*/*.cc files.
</p></div><div class="section" title="Test Harness and Utilities"><div class="titlepage"><div><div><h3 class="title"><a name="test.harness"></a>Test Harness and Utilities</h3></div></div></div><div class="section" title="Dejagnu Harness Details"><div class="titlepage"><div><div><h4 class="title"><a name="test.harness.dejagnu"></a>Dejagnu Harness Details</h4></div></div></div><p> </p></div><div class="section" title="Test Harness and Utilities"><div class="titlepage"><div><div><h3 class="title"><a id="test.harness"></a>Test Harness and Utilities</h3></div></div></div><div class="section" title="Dejagnu Harness Details"><div class="titlepage"><div><div><h4 class="title"><a id="test.harness.dejagnu"></a>Dejagnu Harness Details</h4></div></div></div><p>
Underlying details of testing for conformance and regressions are Underlying details of testing for conformance and regressions are
abstracted via the GNU Dejagnu package. This is similar to the abstracted via the GNU Dejagnu package. This is similar to the
rest of GCC. rest of GCC.
@ -457,7 +435,7 @@ callbacks loaded from the support library.
</p><p>The <code class="code">config</code> directory is searched for any particular "target </p><p>The <code class="code">config</code> directory is searched for any particular "target
board" information unique to this library. This is currently unused and sets board" information unique to this library. This is currently unused and sets
only default variables. only default variables.
</p></div><div class="section" title="Utilities"><div class="titlepage"><div><div><h4 class="title"><a name="test.harness.utils"></a>Utilities</h4></div></div></div><p> </p></div><div class="section" title="Utilities"><div class="titlepage"><div><div><h4 class="title"><a id="test.harness.utils"></a>Utilities</h4></div></div></div><p>
</p><p> </p><p>
The testsuite directory also contains some files that implement The testsuite directory also contains some files that implement
functionality that is intended to make writing test cases easier, functionality that is intended to make writing test cases easier,
@ -513,10 +491,10 @@ only default variables.
</p><p> </p><p>
A number of class abstractions for performance counters, and A number of class abstractions for performance counters, and
reporting functions including: reporting functions including:
</p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>time_counter</p></li><li class="listitem"><p>resource_counter</p></li><li class="listitem"><p>report_performance</p></li></ul></div></li></ul></div></div></div><div class="section" title="Special Topics"><div class="titlepage"><div><div><h3 class="title"><a name="test.special"></a>Special Topics</h3></div></div></div><div class="section" title="Qualifying Exception Safety Guarantees"><div class="titlepage"><div><div><h4 class="title"><a name="test.exception.safety"></a> </p><div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem"><p>time_counter</p></li><li class="listitem"><p>resource_counter</p></li><li class="listitem"><p>report_performance</p></li></ul></div></li></ul></div></div></div><div class="section" title="Special Topics"><div class="titlepage"><div><div><h3 class="title"><a id="test.special"></a>Special Topics</h3></div></div></div><div class="section" title="Qualifying Exception Safety Guarantees"><div class="titlepage"><div><div><h4 class="title"><a id="test.exception.safety"></a>
Qualifying Exception Safety Guarantees Qualifying Exception Safety Guarantees
<a class="indexterm" name="id681679"></a> <a id="id655751" class="indexterm"></a>
</h4></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h5 class="title"><a name="test.exception.safety.overview"></a>Overview</h5></div></div></div><p> </h4></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h5 class="title"><a id="test.exception.safety.overview"></a>Overview</h5></div></div></div><p>
Testing is composed of running a particular test sequence, Testing is composed of running a particular test sequence,
and looking at what happens to the surrounding code when and looking at what happens to the surrounding code when
exceptions are thrown. Each test is composed of measuring exceptions are thrown. Each test is composed of measuring
@ -546,7 +524,7 @@ only default variables.
completes without an exception being thrown, assume all completes without an exception being thrown, assume all
potential error paths have been exercised in a sequential potential error paths have been exercised in a sequential
manner. manner.
</p></div><div class="section" title="Existing tests"><div class="titlepage"><div><div><h5 class="title"><a name="test.exception.safety.status"></a> </p></div><div class="section" title="Existing tests"><div class="titlepage"><div><div><h5 class="title"><a id="test.exception.safety.status"></a>
Existing tests Existing tests
</h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Ad Hoc Ad Hoc
@ -585,7 +563,7 @@ as the allocator type.
instrumentation to <code class="classname">iterator</code> instrumentation to <code class="classname">iterator</code>
and <code class="classname">const_iterator</code> types that throw and <code class="classname">const_iterator</code> types that throw
conditionally on iterator operations. conditionally on iterator operations.
</p></li></ul></div></div><div class="section" title="C++11 Requirements Test Sequence Descriptions"><div class="titlepage"><div><div><h5 class="title"><a name="test.exception.safety.containers"></a> </p></li></ul></div></div><div class="section" title="C++11 Requirements Test Sequence Descriptions"><div class="titlepage"><div><div><h5 class="title"><a id="test.exception.safety.containers"></a>
C++11 Requirements Test Sequence Descriptions C++11 Requirements Test Sequence Descriptions
</h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> </h5></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
Basic Basic
@ -658,4 +636,4 @@ C++11 Requirements Test Sequence Descriptions
The general form demonstrated in The general form demonstrated in
<code class="filename">testsuite/23_containers/list/requirements/exception/propagation_coherent.cc <code class="filename">testsuite/23_containers/list/requirements/exception/propagation_coherent.cc
</code>. The instantiating test object is <code class="classname">__gnu_test::propagation_coherent</code> and is detailed in <code class="filename">testsuite/util/exception/safety.h</code>. </code>. The instantiating test object is <code class="classname">__gnu_test::propagation_coherent</code> and is detailed in <code class="filename">testsuite/util/exception/safety.h</code>.
</p></li></ul></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Porting to New Hardware or Operating Systems </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> ABI Policy and Guidelines</td></tr></table></div></body></html> </p></li></ul></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Porting to New Hardware or Operating Systems </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> ABI Policy and Guidelines</td></tr></table></div></body></html>

Some files were not shown because too many files have changed in this diff Show More