authors.xml: Update.
2009-10-14 Benjamin Kosnik <bkoz@redhat.com> * doc/xml/authors.xml: Update. * doc/xml/manual/intro.xml: Move test section... * doc/xml/manual/appendix_porting.xml: ...here. * doc/xml/manual/diagnostics.xml: Edit. * doc/xml/manual/using.xml: Break out exception section. * doc/xml/manual/using_exceptions.xml: New. * doc/html: Regenerate. From-SVN: r152797
This commit is contained in:
parent
7fee263aa4
commit
49d60f14c0
@ -1,3 +1,13 @@
|
||||
2009-10-14 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* doc/xml/authors.xml: Update.
|
||||
* doc/xml/manual/intro.xml: Move test section...
|
||||
* doc/xml/manual/appendix_porting.xml: ...here.
|
||||
* doc/xml/manual/diagnostics.xml: Edit.
|
||||
* doc/xml/manual/using.xml: Break out exception section.
|
||||
* doc/xml/manual/using_exceptions.xml: New.
|
||||
* doc/html: Regenerate.
|
||||
|
||||
2009-10-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* config/abi/pre/gnu.ver: Export the _S_construct<> helpers.
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<a class="ulink" href="http://www.fsf.org/" target="_top">FSF
|
||||
</a>
|
||||
</p></div><div><div class="legalnotice"><a id="id485923"></a><p>
|
||||
</p></div><div><div class="legalnotice"><a id="id596116"></a><p>
|
||||
<a class="link" href="manual/license.html" title="License">License
|
||||
</a>
|
||||
</p></div></div></div><hr /></div><p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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 Stylesheets V1.74.3" /><meta name="keywords" content=" C++ , ABI , version , dynamic , shared " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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="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="internals.html">Prev</a> </td><th width="60%" align="center">Appendix B.
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" C++ , ABI , version , dynamic , shared " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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.
|
||||
Porting and Maintenance
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><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>
|
||||
@ -464,60 +464,60 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
|
||||
<a class="ulink" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a>
|
||||
</p><p>
|
||||
<a class="ulink" 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"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id390229"></a><p><span class="title"><i>
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id658186"></a><p><span class="title"><i>
|
||||
ABIcheck, a vague idea of checking ABI compatibility
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://abicheck.sourceforge.net/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id390246"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id658203"></a><p><span class="title"><i>
|
||||
C++ ABI Reference
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.codesourcery.com/public/cxx-abi/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id390263"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id658220"></a><p><span class="title"><i>
|
||||
Intel® Compilers for Linux* -Compatibility with the GNU Compilers
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.intel.com/cd/software/products/asmo-na/eng/284736.htm" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497386"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id658238"></a><p><span class="title"><i>
|
||||
Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://docs.sun.com/app/docs/doc/817-1984" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497402"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id658254"></a><p><span class="title"><i>
|
||||
Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://docs.sun.com/app/docs/doc/819-5266" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497420"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id658272"></a><p><span class="title"><i>
|
||||
How to Write Shared Libraries
|
||||
</i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://people.redhat.com/drepper/dsohowto.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497448"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id675905"></a><p><span class="title"><i>
|
||||
C++ ABI for the ARM Architecture
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497465"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id675922"></a><p><span class="title"><i>
|
||||
Dynamic Shared Objects: Survey and Issues
|
||||
</i>. </span><span class="subtitle">
|
||||
ISO C++ J16/06-0046
|
||||
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497497"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id675954"></a><p><span class="title"><i>
|
||||
Versioning With Namespaces
|
||||
</i>. </span><span class="subtitle">
|
||||
ISO C++ J16/06-0083
|
||||
. </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id497530"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id675987"></a><p><span class="title"><i>
|
||||
Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems
|
||||
</i>. </span><span class="subtitle">
|
||||
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><span class="biblioid">
|
||||
<a class="ulink" href="http://syrcose.ispras.ru/2009/files/SYRCoSE2009-CfP.pdf" target="_top">
|
||||
</a>
|
||||
. </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="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="api.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="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html>
|
||||
. </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="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html>
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt08ch19s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.algorithms"></a>Part IX.
|
||||
Algorithms
|
||||
<a id="id397908" class="indexterm"></a>
|
||||
<a id="id721514" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt09pr02.html"></a></span></dt><dt><span class="chapter"><a href="bk01pt09ch20.html">20. Mutating</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt09ch20.html#algorithms.mutating.swap">swap</a></span></dt><dd><dl><dt><span class="sect2"><a href="bk01pt09ch20.html#algorithms.swap.specializations">Specializations</a></span></dt></dl></dd></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="bk01pt08ch19s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt09pr02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">One Past the End </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
|
||||
|
@ -75,11 +75,11 @@ _Alloc_traits</code> have been removed.
|
||||
<span class="type">__alloc</span> to select an underlying allocator that
|
||||
satisfied memory allocation requests. The selection of this
|
||||
underlying allocator was not user-configurable.
|
||||
</p><div class="table"><a id="id505845"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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<T></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<T></code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template<int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc<T></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc<T></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<T></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="id623096"></a><p class="title"><b>Table B.1. Extension Allocators</b></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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<T></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<T></code></td><td align="left"><code class="filename">ext/malloc_allocator.h</code></td><td align="left"><code class="classname">std::__malloc_alloc_template<int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td align="left"><code class="filename">ext/debug_allocator.h</code></td><td align="left"><code class="classname">std::debug_alloc<T></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td align="left"><code class="filename">ext/pool_allocator.h</code></td><td align="left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td align="left"><code class="filename">memory</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc<T></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<T></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
|
||||
standard-style. The following table includes details, along with
|
||||
the first released version of GCC that included the extension allocator.
|
||||
</p><div class="table"><a id="id403516"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></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<T></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<T></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="id721371"></a><p class="title"><b>Table B.2. Extension Allocators Continued</b></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /></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<T></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<T></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.
|
||||
</p><p>
|
||||
Precompiled header support <acronym class="acronym">PCH</acronym> support.
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt12ch41s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.contrib"></a>Appendix A.
|
||||
Contributing
|
||||
<a id="id384414" class="indexterm"></a>
|
||||
<a id="id622754" class="indexterm"></a>
|
||||
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="sect2"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="sect1"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="sect1"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="sect2"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="sect1"><a href="documentation_style.html">Documentation Style</a></span></dt><dd><dl><dt><span class="sect2"><a href="documentation_style.html#doc_style.doxygen">Doxygen</a></span></dt><dt><span class="sect2"><a href="documentation_style.html#doc_style.docbook">Docbook</a></span></dt></dl></dd><dt><span class="sect1"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></div><p>
|
||||
The GNU C++ Library follows an open development model. Active
|
||||
contributors are assigned maintainer-ship responsibility, and given
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="backwards.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.free"></a>Appendix C.
|
||||
Free Software Needs Free Documentation
|
||||
<a id="id501419" class="indexterm"></a>
|
||||
<a id="id675332" class="indexterm"></a>
|
||||
</h2></div></div></div><p>
|
||||
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
|
||||
|
@ -76,7 +76,7 @@
|
||||
</p><p>
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
</p><h2><a id="id514028"></a>
|
||||
</p><h2><a id="id746936"></a>
|
||||
TERMS AND CONDITIONS
|
||||
</h2><h2><a id="gpl-3-definitions"></a>
|
||||
0. Definitions.
|
||||
@ -617,7 +617,7 @@
|
||||
waiver of all civil liability in connection with the Program, unless a
|
||||
warranty or assumption of liability accompanies a copy of the Program in
|
||||
return for a fee.
|
||||
</p><h2><a id="id510808"></a>
|
||||
</p><h2><a id="id654357"></a>
|
||||
END OF TERMS AND CONDITIONS
|
||||
</h2><h2><a id="HowToApply"></a>
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="source_design_notes.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr /></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.porting"></a>Appendix B.
|
||||
Porting and Maintenance
|
||||
<a id="id509079" class="indexterm"></a>
|
||||
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable">GLIBCXX_ENABLE, the --enable maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300">3.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310">3.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320">3.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330">3.3</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340">3.4</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400">4.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410">4.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420">4.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430">4.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><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="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
|
||||
<a id="id744430" class="indexterm"></a>
|
||||
</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="sect2"><a href="appendix_porting.html#build_hacking.enable">GLIBCXX_ENABLE, the --enable maker</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="sect2"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd><dt><span class="sect1"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="sect2"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="sect2"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="sect1"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="sect2"><a href="api.html#api.rel_300">3.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_310">3.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_320">3.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_330">3.3</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_340">3.4</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_400">4.0</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_410">4.1</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_420">4.2</a></span></dt><dt><span class="sect2"><a href="api.html#api.rel_430">4.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="sect2"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="sect2"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><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="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
|
||||
As noted <a class="ulink" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>,
|
||||
certain other tools are necessary for hacking on files that
|
||||
control configure (<code class="code">configure.ac</code>,
|
||||
|
@ -17,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
|
||||
Committee couldn't include everything, and so a lot of those
|
||||
“<span class="quote">obvious</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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id426872"></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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id426904"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
|
||||
</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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id744149"></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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id744181"></a>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p>
|
||||
In earlier versions of the standard,
|
||||
<code class="filename">fstream.h</code>,
|
||||
<code class="filename">ostream.h</code>
|
||||
@ -44,7 +44,7 @@ considered replaced and rewritten.
|
||||
archived. The code is considered replaced and rewritten.
|
||||
</p><p>
|
||||
Portability notes and known implementation limitations are as follows.
|
||||
</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id427002"></a>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p>
|
||||
</p><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id744279"></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
|
||||
implementation that do not have the standard library in
|
||||
<code class="code">namespace std</code>.
|
||||
@ -108,7 +108,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
|
||||
AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id384005"></a>Illegal iterator usage</h4></div></div></div><p>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id673182"></a>Illegal iterator usage</h4></div></div></div><p>
|
||||
The following illustrate implementation-allowed illegal iterator
|
||||
use, and then correct use.
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||
@ -121,7 +121,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [
|
||||
</p></li><li><p>
|
||||
<code class="code">if (iterator)</code> won't work any more => use
|
||||
<code class="code">if (iterator != iterator_type())</code>
|
||||
</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id384066"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
|
||||
</p></li></ul></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id673243"></a><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro
|
||||
</h4></div></div></div><p>
|
||||
Glibc 2.0.x and 2.1.x define <code class="filename">ctype.h</code> functionality as macros
|
||||
(isspace, isalpha etc.).
|
||||
@ -154,7 +154,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ;
|
||||
(<code class="filename">ctype.h</code>) and the
|
||||
definitions in namespace <code class="code">std::</code>
|
||||
(<code class="code"><cctype></code>).
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id384160"></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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id586519"></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:
|
||||
</p><pre class="programlisting">
|
||||
AC_MSG_CHECKING(for container::at)
|
||||
@ -180,7 +180,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
|
||||
</pre><p>
|
||||
If you are using other (non-GNU) compilers it might be a good idea
|
||||
to check for <code class="code">string::at</code> separately.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492905"></a>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id586557"></a>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p>
|
||||
Use some kind of autoconf test, plus this:
|
||||
</p><pre class="programlisting">
|
||||
#ifdef HAVE_CHAR_TRAITS
|
||||
@ -188,7 +188,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
|
||||
#else
|
||||
#define CPP_EOF EOF
|
||||
#endif
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492923"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id586575"></a>No <code class="code">string::clear</code></h4></div></div></div><p>
|
||||
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
|
||||
string).
|
||||
@ -206,12 +206,12 @@ erase(size_type __pos = 0, size_type __n = npos)
|
||||
Unfortunately, <code class="code">clear</code> is not implemented in this
|
||||
version, so you should use <code class="code">erase</code> (which is probably
|
||||
faster than <code class="code">operator=(charT*)</code>).
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492968"></a>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id586620"></a>
|
||||
Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code>
|
||||
extensions
|
||||
</h4></div></div></div><p>
|
||||
These are no longer supported. Please use stringstreams instead.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id492987"></a>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id586640"></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
|
||||
provided, (<code class="filename">sstream</code>), for
|
||||
compatibility with older implementations the pre-ISO
|
||||
@ -299,14 +299,14 @@ any = temp;
|
||||
Another example of using stringstreams is in <a class="link" href="bk01pt05ch13s05.html" title="Shrink to Fit">this howto</a>.
|
||||
</p><p> There is additional information in the libstdc++-v2 info files, in
|
||||
particular “<span class="quote">info iostream</span>”.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511920"></a>Little or no wide character support</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id659623"></a>Little or no wide character support</h4></div></div></div><p>
|
||||
Classes <code class="classname">wstring</code> and
|
||||
<code class="classname">char_traits<wchar_t></code> are
|
||||
not supported.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511939"></a>No templatized iostreams</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id659642"></a>No templatized iostreams</h4></div></div></div><p>
|
||||
Classes <code class="classname">wfilebuf</code> and
|
||||
<code class="classname">wstringstream</code> are not supported.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id511958"></a>Thread safety issues</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id659661"></a>Thread safety issues</h4></div></div></div><p>
|
||||
Earlier GCC releases had a somewhat different approach to
|
||||
threading configuration and proper compilation. Before GCC 3.0,
|
||||
configuration of the threading model was dictated by compiler
|
||||
@ -364,7 +364,7 @@ libstdc++-v3.
|
||||
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
|
||||
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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id512074"></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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id659778"></a>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers
|
||||
(<code class="code">iostream.h</code>, <code class="code">defalloc.h</code> etc.) are
|
||||
available, unlike previous libstdc++ versions, but inclusion
|
||||
generates a warning that you are using deprecated headers.
|
||||
@ -436,7 +436,7 @@ like <code class="filename">vector.h</code> can be replaced with <code class="fi
|
||||
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
|
||||
other usage is correct.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385442"></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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id674389"></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.
|
||||
In particular, the unordered_map and unordered_set containers of TR1
|
||||
are suitable replacement for the non-standard hash_map and hash_set
|
||||
@ -508,7 +508,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [
|
||||
AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385545"></a>No <code class="code">ios::nocreate/ios::noreplace</code>.
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id674492"></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
|
||||
input-streams has been confirmed, most probably because the author
|
||||
thought it would be more correct to specify nocreate explicitly. So
|
||||
@ -519,7 +519,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,
|
||||
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> ?).
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385592"></a>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id674539"></a>
|
||||
No <code class="code">stream::attach(int fd)</code>
|
||||
</h4></div></div></div><p>
|
||||
Phil Edwards writes: It was considered and rejected for the ISO
|
||||
@ -542,7 +542,7 @@ No <code class="code">stream::attach(int fd)</code>
|
||||
For another example of this, refer to
|
||||
<a class="ulink" href="http://www.josuttis.com/cppcode/fdstream.html" target="_top">fdstream example</a>
|
||||
by Nicolai Josuttis.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id385656"></a>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id674603"></a>
|
||||
Support for C++98 dialect.
|
||||
</h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard.
|
||||
</p><pre class="programlisting">
|
||||
@ -610,7 +610,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
|
||||
AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id403656"></a>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id674631"></a>
|
||||
Support for C++TR1 dialect.
|
||||
</h4></div></div></div><p>Check for library coverage of the TR1 standard.
|
||||
</p><pre class="programlisting">
|
||||
@ -687,7 +687,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
|
||||
AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id403699"></a>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id675096"></a>
|
||||
Support for C++0x dialect.
|
||||
</h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++0xstandard.
|
||||
</p><pre class="programlisting">
|
||||
@ -899,27 +899,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
|
||||
AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
|
||||
fi
|
||||
])
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id403776"></a>
|
||||
</pre></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id675173"></a>
|
||||
Container::iterator_type is not necessarily Container::value_type*
|
||||
</h4></div></div></div><p>
|
||||
This is a change in behavior from the previous version. Now, most
|
||||
<span class="type">iterator_type</span> typedefs in container classes are POD
|
||||
objects, not <span class="type">value_type</span> pointers.
|
||||
</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id403806"></a><p>[<abbr class="abbrev">
|
||||
</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id675202"></a><p>[<abbr class="abbrev">
|
||||
kegel41
|
||||
</abbr>] <span class="title"><i>
|
||||
Migrating to GCC 4.1
|
||||
</i>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.kegel.com/gcc/gcc4.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id403838"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id675235"></a><p>[<abbr class="abbrev">
|
||||
kegel41
|
||||
</abbr>] <span class="title"><i>
|
||||
Building the Whole Debian Archive with GCC 4.1: A Summary
|
||||
</i>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://lists.debian.org/debian-gcc/2006/03/msg00405.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id403871"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id675268"></a><p>[<abbr class="abbrev">
|
||||
lbl32
|
||||
</abbr>] <span class="title"><i>
|
||||
Migration guide for GCC-3.2
|
||||
|
@ -103,7 +103,7 @@ else return false.</p></li></ol></div><p>
|
||||
</p><p>
|
||||
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).
|
||||
</p><div class="table"><a id="id393472"></a><p class="title"><b>Table 33.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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 -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
</p><div class="table"><a id="id730908"></a><p class="title"><b>Table 33.1. Bitmap Allocator Memory Map</b></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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 -> 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
|
||||
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
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="appendix_gfdl.html" title="Appendix E. GNU Free Documentation License" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_gfdl.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a id="id496564"></a>Index</h2></div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>Algorithms, <a class="indexterm" href="algorithms.html">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="appendix_gfdl.html" title="Appendix E. GNU Free Documentation License" /><link rel="next" href="../bk02.html" title="" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="appendix_gfdl.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="../bk02.html">Next</a></td></tr></table><hr /></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a id="id692397"></a>Index</h2></div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>Algorithms, <a class="indexterm" href="algorithms.html">
|
||||
Algorithms
|
||||
|
||||
</a></dt><dt>Appendix</dt><dd><dl><dt>Contributing, <a class="indexterm" href="appendix_contributing.html">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="support.html" title="Part II. Support" /><link rel="prev" href="support.html" title="Part II. Support" /><link rel="next" href="fundamental_types.html" title="Chapter 4. Types" /></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="support.html">Prev</a> </td><th width="60%" align="center">Part II.
|
||||
Support
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="fundamental_types.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id492782"></a></h2></div></div></div><p>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="fundamental_types.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id650354"></a></h2></div></div></div><p>
|
||||
This part deals with the functions called and objects created
|
||||
automatically during the course of a program's existence.
|
||||
</p><p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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>Adding Data to Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="exceptions.html" title="Chapter 7. Exceptions" /><link rel="prev" href="exceptions.html" title="Chapter 7. Exceptions" /><link rel="next" href="bk01pt03ch07s03.html" title="Cancellation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Adding Data to Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="exceptions.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.data"></a>Adding Data to Exceptions</h2></div></div></div><p>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Adding Data to Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="exceptions.html" title="Chapter 7. Exceptions" /><link rel="prev" href="exceptions.html" title="Chapter 7. Exceptions" /><link rel="next" href="bk01pt03ch08.html" title="Chapter 8. Concept Checking" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Adding Data to Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="exceptions.html">Prev</a> </td><th width="60%" align="center">Chapter 7. Exceptions</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch08.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.data"></a>Adding Data to Exceptions</h2></div></div></div><p>
|
||||
The standard exception classes carry with them a single string as
|
||||
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
|
||||
@ -17,4 +17,4 @@
|
||||
int e;
|
||||
DBID id; // some user-defined type
|
||||
};
|
||||
</pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="exceptions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="exceptions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch07s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Cancellation</td></tr></table></div></body></html>
|
||||
</pre></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="exceptions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="exceptions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt03ch08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Concept Checking</td></tr></table></div></body></html>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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. Concept Checking</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="utilities.html" title="Part IV. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">Part III.
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 8. Concept Checking</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /><link rel="next" href="utilities.html" title="Part IV. Utilities" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Concept Checking</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><th width="60%" align="center">Part III.
|
||||
Diagnostics
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="utilities.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.concept_checking"></a>Chapter 8. Concept Checking</h2></div></div></div><p>
|
||||
@ -39,7 +39,7 @@
|
||||
support for template parameter constraints based on concepts in the core
|
||||
language. This will obviate the need for the library-simulated concept
|
||||
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="bk01pt03ch07s03.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">Cancellation </td><td width="20%" align="center"><a accesskey="h" href="../spine.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="bk01pt03ch07s02.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">Adding Data to Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part IV.
|
||||
Utilities
|
||||
|
||||
</td></tr></table></div></body></html>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library , algorithm " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="algorithms.html" title="Part IX. Algorithms" /><link rel="prev" href="algorithms.html" title="Part IX. Algorithms" /><link rel="next" href="bk01pt09ch20.html" title="Chapter 20. Mutating" /></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="algorithms.html">Prev</a> </td><th width="60%" align="center">Part IX.
|
||||
Algorithms
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id397917"></a></h2></div></div></div><p>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt09ch20.html">Next</a></td></tr></table><hr /></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id617760"></a></h2></div></div></div><p>
|
||||
The neatest accomplishment of the algorithms chapter is that all the
|
||||
work is done via iterators, not containers directly. This means two
|
||||
important things:
|
||||
|
@ -19,6 +19,6 @@
|
||||
mode or with debug mode. The
|
||||
following table provides the names and headers of the debugging
|
||||
containers:
|
||||
</p><div class="table"><a id="id517820"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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">bitset</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">deque</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">list</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">map</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">map</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">set</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">set</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">string</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">string</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">string</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">vector</code></td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
|
||||
</p><div class="table"><a id="id672482"></a><p class="title"><b>Table 30.1. Debugging Containers</b></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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">bitset</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">deque</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">list</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">map</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">map</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">set</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">set</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">string</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">string</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">string</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">vector</code></td></tr></tbody></table></div></div><br class="table-break" /><p>In addition, when compiling in C++0x mode, these additional
|
||||
containers have additional debug capability.
|
||||
</p><div class="table"><a id="id357333"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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">unordered_map</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">unordered_map</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">unordered_set</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">unordered_set</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="bk01pt12ch30s02.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="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Design</td></tr></table></div></body></html>
|
||||
</p><div class="table"><a id="id646525"></a><p class="title"><b>Table 30.2. Debugging Containers C++0x</b></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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">unordered_map</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">unordered_map</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">unordered_set</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">unordered_set</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="bk01pt12ch30s02.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="bk01pt12ch30s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Semantics </td><td width="20%" align="center"><a accesskey="h" href="../spine.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
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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 Stylesheets V1.74.3" /><meta name="keywords" content=" C++ , library , profile " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="prev" href="profile_mode.html" title="Chapter 32. Profile Mode" /><link rel="next" href="bk01pt12ch32s03.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 32. Profile Mode</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt12ch32s03.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><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>
|
||||
</p><div class="table"><a id="id474437"></a><p class="title"><b>Table 32.1. Code Location</b></p><div class="table-contents"><table summary="Code Location" border="1"><colgroup><col align="left" /><col align="left" /></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
|
||||
</p><div class="table"><a id="id647548"></a><p class="title"><b>Table 32.1. Code Location</b></p><div class="table-contents"><table summary="Code Location" border="1"><colgroup><col align="left" /><col align="left" /></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
|
||||
file included from the public headers.</td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.wrapper"></a>Wrapper Model</h3></div></div></div><p>
|
||||
|
@ -18,7 +18,7 @@
|
||||
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
|
||||
specific needs or time budgets.
|
||||
</p><div class="table"><a id="id501361"></a><p class="title"><b>Table 32.2. Diagnostics</b></p><div class="table-contents"><table summary="Diagnostics" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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></tr></thead><tbody><tr><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.containers" target="_top">
|
||||
</p><div class="table"><a id="id521055"></a><p class="title"><b>Table 32.2. Diagnostics</b></p><div class="table-contents"><table summary="Diagnostics" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /></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></tr></thead><tbody><tr><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.containers" target="_top">
|
||||
CONTAINERS</a></td><td align="left"><a class="ulink" href="#manual.ext.profile_mode.analysis.hashtable_too_small" target="_top">
|
||||
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="ulink" href="#manual.ext.profile_mode.analysis.hashtable_too_large" target="_top">
|
||||
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="ulink" href="#manual.ext.profile_mode.analysis.inefficient_hash" target="_top">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="extensions.html" title="Part XII. Extensions" /><link rel="prev" href="extensions.html" title="Part XII. Extensions" /><link rel="next" href="ext_compile_checks.html" title="Chapter 29. 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 XII.
|
||||
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" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id450207"></a></h2></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" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id646774"></a></h2></div></div></div><p>
|
||||
Here we will make an attempt at describing the non-Standard extensions to
|
||||
the library. Some of these are from SGI's STL, some of these are GNU's,
|
||||
and some just seemed to appear on the doorstep.
|
||||
|
@ -337,41 +337,41 @@ codecvt usage.
|
||||
</p></li><li><p>
|
||||
wchar_t/char internal buffers and conversions between
|
||||
internal/external buffers?
|
||||
</p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id493338"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.codecvt.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id703118"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </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="id478473"></a><p><span class="title"><i>
|
||||
</i>. </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="id644322"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </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="id478501"></a><p><span class="title"><i>
|
||||
</i>. </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="id644350"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id497324"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id660838"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id497342"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id660857"></a><p><span class="title"><i>
|
||||
The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
<a class="ulink" href="http://www.unix.org/version3/ieee_std.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id461154"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id686728"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </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
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id409878"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id720408"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
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">
|
||||
Addison Wesley Longman
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id390798"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id692630"></a><p><span class="title"><i>
|
||||
A brief description of Normative Addendum 1
|
||||
</i>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.lysator.liu.se/c/na1.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id389025"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id617963"></a><p><span class="title"><i>
|
||||
The Unicode HOWTO
|
||||
</i>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="ftp://ftp.ilog.fr/pub/Users/haible/utf8/Unicode-HOWTO.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id337800"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id681295"></a><p><span class="title"><i>
|
||||
UTF-8 and Unicode FAQ for Unix/Linux
|
||||
</i>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cl.cam.ac.uk/~mgk25/unicode.html" target="_top">
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="messages.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="sequences.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.containers"></a>Part VII.
|
||||
Containers
|
||||
<a id="id421482" class="indexterm"></a>
|
||||
<a id="id644180" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="sequences.html">16. Sequences</a></span></dt><dd><dl><dt><span class="sect1"><a href="sequences.html#containers.sequences.list">list</a></span></dt><dd><dl><dt><span class="sect2"><a href="sequences.html#sequences.list.size">list::size() is O(n)</a></span></dt></dl></dd><dt><span class="sect1"><a href="vector.html">vector</a></span></dt><dd><dl><dt><span class="sect2"><a href="vector.html#sequences.vector.management">Space Overhead Management</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="associative.html">17. Associative</a></span></dt><dd><dl><dt><span class="sect1"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="sect1"><a href="bitset.html">bitset</a></span></dt><dd><dl><dt><span class="sect2"><a href="bitset.html#associative.bitset.size_variable">Size Variable</a></span></dt><dt><span class="sect2"><a href="bitset.html#associative.bitset.type_string">Type String</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="containers_and_c.html">18. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</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="messages.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sequences.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">messages </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 16. Sequences</td></tr></table></div></body></html>
|
||||
|
@ -138,16 +138,42 @@
|
||||
set print demangle on
|
||||
set demangle-style gnu-v3
|
||||
</pre><p>
|
||||
GDB 7.0 will include support for writing pretty-printers in Python.
|
||||
A library of printers for STL classes already exists within the
|
||||
libstdc++ svn repository. For information on enabling these printers,
|
||||
and for other GDB STL support options: please see
|
||||
<a class="ulink" href="http://sourceware.org/gdb/wiki/STLSupport" target="_top"> "GDB Support
|
||||
for STL" </a> in the GDB wiki. Additionally, in-depth
|
||||
documentation and discussion of this feature can be found in the GDB
|
||||
manual. Please see:
|
||||
<a class="ulink" href="http://sourceware.org/gdb/current/onlinedocs//gdb_24.html#SEC260" target="_top">
|
||||
"23.2.2.6 Pretty Printing" </a>
|
||||
Starting with version 7.0, GDB includes support for writing
|
||||
pretty-printers in Python. Pretty printers for STL classes are
|
||||
distributed with GCC from version 4.5.0. The most recent version of
|
||||
these printers are always found in libstdc++ svn repository.
|
||||
To enable these printers, check-out the latest printers to a local
|
||||
directory:
|
||||
</p><pre class="programlisting">
|
||||
svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
|
||||
</pre><p>
|
||||
Next, add the following section to your ~/.gdbinit The path must
|
||||
match the location where the Python module above was checked-out.
|
||||
So if checked out to: /home/maude/gdb_printers/, the path would be as
|
||||
written in the example below.
|
||||
</p><pre class="programlisting">
|
||||
python
|
||||
import sys
|
||||
sys.path.insert(0, '/home/maude/gdb_printers/python')
|
||||
from libstdcxx.v6.printers import register_libstdcxx_printers
|
||||
register_libstdcxx_printers (None)
|
||||
end
|
||||
</pre><p>
|
||||
The path should be the only element that needs to be adjusted in the
|
||||
example. Once loaded, STL classes that the printers support
|
||||
should print in a more human-readable format. To print the classes
|
||||
in the old style, use the /r (raw) switch in the print command
|
||||
(i.e., print /r foo). This will print the classes as if the Python
|
||||
pretty-printers were not loaded.
|
||||
</p><p>
|
||||
For additional information on STL support and GDB please visit:
|
||||
<a class="ulink" href="http://sourceware.org/gdb/wiki/STLSupport" target="_top"> "GDB Support
|
||||
for STL" </a> in the GDB wiki. Additionally, in-depth
|
||||
documentation and discussion of the pretty printing feature can be
|
||||
found in "Pretty Printing" node in the GDB manual. You can find
|
||||
on-line versions of the GDB user manual in GDB's homepage, at
|
||||
<a class="ulink" href="http://sourceware.org/gdb/" target="_top"> "GDB: The GNU Project
|
||||
Debugger" </a>.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><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="verbose_termination.html" title="Verbose Terminate Handler">verbose
|
||||
termination handler</a> gives information about uncaught
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="verbose_termination.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="exceptions.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.diagnostics"></a>Part III.
|
||||
Diagnostics
|
||||
<a id="id432454" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="exceptions.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="exceptions.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</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="verbose_termination.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="exceptions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Verbose Terminate Handler </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Exceptions</td></tr></table></div></body></html>
|
||||
<a id="id702920" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="exceptions.html">7. Exceptions</a></span></dt><dd><dl><dt><span class="sect1"><a href="exceptions.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt></dl></dd><dt><span class="chapter"><a href="bk01pt03ch08.html">8. Concept Checking</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="verbose_termination.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="exceptions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Verbose Terminate Handler </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Exceptions</td></tr></table></div></body></html>
|
||||
|
@ -211,11 +211,11 @@ Complete details on Docbook markup can be found in the DocBook Element
|
||||
Reference, <a class="ulink" href="http://www.docbook.org/tdg/en/html/part2.html" target="_top">online</a>. An
|
||||
incomplete reference for HTML to Docbook conversion is detailed in the
|
||||
table below.
|
||||
</p><div class="table"><a id="id431910"></a><p class="title"><b>Table A.1. 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" /><col align="left" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">XML</th></tr></thead><tbody><tr><td align="left"><p></td><td align="left"><para></td></tr><tr><td align="left"><pre></td><td align="left"><computeroutput>, <programlisting>,
|
||||
</p><div class="table"><a id="id740402"></a><p class="title"><b>Table A.1. 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" /><col align="left" /></colgroup><thead><tr><th align="left">HTML</th><th align="left">XML</th></tr></thead><tbody><tr><td align="left"><p></td><td align="left"><para></td></tr><tr><td align="left"><pre></td><td align="left"><computeroutput>, <programlisting>,
|
||||
<literallayout></td></tr><tr><td align="left"><ul></td><td align="left"><itemizedlist></td></tr><tr><td align="left"><ol></td><td align="left"><orderedlist></td></tr><tr><td align="left"><il></td><td align="left"><listitem></td></tr><tr><td align="left"><dl></td><td align="left"><variablelist></td></tr><tr><td align="left"><dt></td><td align="left"><term></td></tr><tr><td align="left"><dd></td><td align="left"><listitem></td></tr><tr><td align="left"><a href=""></td><td align="left"><ulink url=""></td></tr><tr><td align="left"><code></td><td align="left"><literal>, <programlisting></td></tr><tr><td align="left"><strong></td><td align="left"><emphasis></td></tr><tr><td align="left"><em></td><td align="left"><emphasis></td></tr><tr><td align="left">"</td><td align="left"><quote></td></tr></tbody></table></div></div><br class="table-break" /><p>
|
||||
And examples of detailed markup for which there are no real HTML
|
||||
equivalents are listed in the table below.
|
||||
</p><div class="table"><a id="id514274"></a><p class="title"><b>Table A.2. Docbook XML Element Use</b></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left"><structname></td><td align="left"><structname>char_traits</structname></td></tr><tr><td align="left"><classname></td><td align="left"><classname>string</classname></td></tr><tr><td align="left"><function></td><td align="left">
|
||||
</p><div class="table"><a id="id613462"></a><p class="title"><b>Table A.2. Docbook XML Element Use</b></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Element</th><th align="left">Use</th></tr></thead><tbody><tr><td align="left"><structname></td><td align="left"><structname>char_traits</structname></td></tr><tr><td align="left"><classname></td><td align="left"><classname>string</classname></td></tr><tr><td align="left"><function></td><td align="left">
|
||||
<p><function>clear()</function></p>
|
||||
<p><function>fs.clear()</function></p>
|
||||
</td></tr><tr><td align="left"><type></td><td align="left"><type>long long</type></td></tr><tr><td align="left"><varname></td><td align="left"><varname>fs</varname></td></tr><tr><td align="left"><literal></td><td align="left">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 7. Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="prev" href="diagnostics.html" title="Part III. Diagnostics" /><link rel="next" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="diagnostics.html">Prev</a> </td><th width="60%" align="center">Part III.
|
||||
Diagnostics
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.exceptions"></a>Chapter 7. Exceptions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="exceptions.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s03.html">Cancellation</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.hierarchy"></a>Exception Classes</h2></div></div></div><p>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt03ch07s02.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.diagnostics.exceptions"></a>Chapter 7. Exceptions</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="exceptions.html#manual.diagnostics.exceptions.hierarchy">Exception Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt03ch07s02.html">Adding Data to Exceptions</a></span></dt></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.diagnostics.exceptions.hierarchy"></a>Exception Classes</h2></div></div></div><p>
|
||||
All exception objects are defined in one of the standard header
|
||||
files: <code class="filename">exception</code>,
|
||||
<code class="filename">stdexcept</code>, <code class="filename">new</code>, and
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 15. Facets aka Categories</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="localization.html" title="Part VI. Localization" /><link rel="prev" href="locales.html" title="Chapter 14. Locales" /><link rel="next" href="codecvt.html" title="codecvt" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 15. Facets aka Categories</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="locales.html">Prev</a> </td><th width="60%" align="center">Part VI.
|
||||
Localization
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="facets.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id456506"></a>Specializations</h4></div></div></div><p>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="codecvt.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.localization.facet"></a>Chapter 15. Facets aka Categories</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="facets.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.localization.facet.ctype"></a>ctype</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id639240"></a>Specializations</h4></div></div></div><p>
|
||||
For the required specialization codecvt<wchar_t, char, mbstate_t> ,
|
||||
conversions are made between the internal character set (always UCS4
|
||||
on GNU/Linux) and whatever the currently selected locale for the
|
||||
@ -50,25 +50,25 @@ characters.
|
||||
</p></li><li><p>
|
||||
Rename abstract base class. See if just smash-overriding is a
|
||||
better approach. Clarify, add sanity to naming.
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id394298"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.ctype.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id621794"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </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="id480756"></a><p><span class="title"><i>
|
||||
</i>. </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="id641198"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </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="id396720"></a><p><span class="title"><i>
|
||||
</i>. </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="id734835"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id396738"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id629980"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id395771"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id629998"></a><p><span class="title"><i>
|
||||
The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
<a class="ulink" href="http://www.unix.org/version3/ieee_std.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id412160"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id619025"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </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
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id465171"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id637327"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
Advanced Programmer's Guide and Reference
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , internals " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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="abi.html" title="ABI Policy and Guidelines" /></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="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B.
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , internals " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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="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="appendix_porting.html">Prev</a> </td><th width="60%" align="center">Appendix B.
|
||||
Porting and Maintenance
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><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>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="test.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><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
|
||||
a new target.
|
||||
</p><p>In order to make the GNU C++ library (libstdc++) work with a new
|
||||
@ -368,7 +368,7 @@ 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
|
||||
that sets <code class="code">archive_cmds</code>. Here, adjust the setting for your
|
||||
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="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="abi.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B.
|
||||
</p></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="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B.
|
||||
Porting and Maintenance
|
||||
|
||||
</td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> ABI Policy and Guidelines</td></tr></table></div></body></html>
|
||||
</td><td width="20%" align="center"><a accesskey="h" href="../spine.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
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt10ch23s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="iostream_objects.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.io"></a>Part XI.
|
||||
Input and Output
|
||||
<a id="id412720" class="indexterm"></a>
|
||||
<a id="id585725" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="iostream_objects.html">24. Iostream Objects</a></span></dt><dt><span class="chapter"><a href="streambufs.html">25. Stream Buffers</a></span></dt><dd><dl><dt><span class="sect1"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch25s02.html">Buffering</a></span></dt></dl></dd><dt><span class="chapter"><a href="stringstreams.html">26. Memory Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="stringstreams.html#manual.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="chapter"><a href="fstreams.html">27. File Based Streams</a></span></dt><dd><dl><dt><span class="sect1"><a href="fstreams.html#manual.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch27s02.html">Binary Input and Output</a></span></dt></dl></dd><dt><span class="chapter"><a href="io_and_c.html">28. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="io_and_c.html#manual.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="sect1"><a href="bk01pt11ch28s02.html">Performance</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="bk01pt10ch23s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="iostream_objects.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C99 </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 24. Iostream Objects</td></tr></table></div></body></html>
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bitset.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.iterators"></a>Part VIII.
|
||||
Iterators
|
||||
<a id="id511191" class="indexterm"></a>
|
||||
<a id="id632651" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt08ch19.html">19. Predefined</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt08ch19.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="sect1"><a href="bk01pt08ch19s02.html">One Past the End</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="bitset.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt08ch19.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">bitset </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 19. Predefined</td></tr></table></div></body></html>
|
||||
|
@ -398,25 +398,25 @@ global locale" (emphasis Paolo), that is:
|
||||
What should non-required facet instantiations do? If the
|
||||
generic implementation is provided, then how to end-users
|
||||
provide specializations?
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id388197"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="locales.locale.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id658666"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </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="id403972"></a><p><span class="title"><i>
|
||||
</i>. </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="id679103"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </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="id404001"></a><p><span class="title"><i>
|
||||
</i>. </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="id635262"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id450687"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id709948"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id450705"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id709967"></a><p><span class="title"><i>
|
||||
The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opennc.org/austin/docreg.html" target="_top">
|
||||
<a class="ulink" href="http://www.unix.org/version3/ieee_std.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id429438"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id618881"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </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
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id405937"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id641063"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
Advanced Programmer's Guide and Reference
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt05ch13s06.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="locales.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.localization"></a>Part VI.
|
||||
Localization
|
||||
<a id="id421930" class="indexterm"></a>
|
||||
<a id="id585411" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="locales.html">14. Locales</a></span></dt><dd><dl><dt><span class="sect1"><a href="locales.html#manual.localization.locales.locale">locale</a></span></dt><dd><dl><dt><span class="sect2"><a href="locales.html#locales.locale.req">Requirements</a></span></dt><dt><span class="sect2"><a href="locales.html#locales.locale.design">Design</a></span></dt><dt><span class="sect2"><a href="locales.html#locales.locale.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="locales.html#locales.locale.future">Future</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="facets.html">15. Facets aka Categories</a></span></dt><dd><dl><dt><span class="sect1"><a href="facets.html#manual.localization.facet.ctype">ctype</a></span></dt><dd><dl><dt><span class="sect2"><a href="facets.html#facet.ctype.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="facets.html#facet.ctype.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="codecvt.html">codecvt</a></span></dt><dd><dl><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.req">Requirements</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.design">Design</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.use">Use</a></span></dt><dt><span class="sect2"><a href="codecvt.html#facet.codecvt.future">Future</a></span></dt></dl></dd><dt><span class="sect1"><a href="messages.html">messages</a></span></dt><dd><dl><dt><span class="sect2"><a href="messages.html#facet.messages.req">Requirements</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.design">Design</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.use">Use</a></span></dt><dt><span class="sect2"><a href="messages.html#facet.messages.future">Future</a></span></dt></dl></dd></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="bk01pt05ch13s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="locales.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">CString (MFC) </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. Locales</td></tr></table></div></body></html>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="setup.html" title="Chapter 2. Setup" /><link rel="prev" href="configure.html" title="Configure" /><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">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="test.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><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
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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="sect1" lang="en" xml:lang="en"><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
|
||||
<a class="ulink" href="http://gcc.gnu.org/install/" target="_top">GCC Installation
|
||||
Instructions</a> first. Read <span class="emphasis"><em>all of them</em></span>.
|
||||
<span class="emphasis"><em>Twice.</em></span>
|
||||
</p><p>Then type:<span class="command"><strong>make</strong></span>, and congratulations, you're
|
||||
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="test.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Configure </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Test</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="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html>
|
||||
|
@ -93,7 +93,7 @@
|
||||
or loading and unloading shared objects in memory. As such, using
|
||||
caching allocators on systems that do not support
|
||||
<code class="function">abi::__cxa_atexit</code> is not recommended.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id448064"></a>Interface Design</h4></div></div></div><p>
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id712986"></a>Interface Design</h4></div></div></div><p>
|
||||
The only allocator interface that
|
||||
is support is the standard C++ interface. As such, all STL
|
||||
containers have been adjusted, and all external allocators have
|
||||
@ -106,7 +106,7 @@
|
||||
</p><p>
|
||||
The base class that <code class="classname">allocator</code> is derived from
|
||||
may not be user-configurable.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id419395"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id629278"></a>Selecting Default Allocation Policy</h4></div></div></div><p>
|
||||
It's difficult to pick an allocation strategy that will provide
|
||||
maximum utility, without excessively penalizing some behavior. In
|
||||
fact, it's difficult just deciding which typical actions to measure
|
||||
@ -143,7 +143,7 @@
|
||||
The current default choice for
|
||||
<code class="classname">allocator</code> is
|
||||
<code class="classname">__gnu_cxx::new_allocator</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id392353"></a>Disabling Memory Caching</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id711751"></a>Disabling Memory Caching</h4></div></div></div><p>
|
||||
In use, <code class="classname">allocator</code> may allocate and
|
||||
deallocate using implementation-specified strategies and
|
||||
heuristics. Because of this, every call to an allocator object's
|
||||
@ -308,11 +308,11 @@
|
||||
A high-performance allocator that uses a bit-map to keep track
|
||||
of the used and unused memory locations. It has its own
|
||||
documentation, found <a class="link" href="bitmap_allocator.html" title="bitmap_allocator">here</a>.
|
||||
</p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id401721"></a><p><span class="title"><i>
|
||||
</p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id710951"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span>
|
||||
isoc++_1998
|
||||
<span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id401736"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
|
||||
<span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id710966"></a><p><span class="title"><i>The Standard Librarian: What Are Allocators Good
|
||||
</i>. </span>
|
||||
austernm
|
||||
<span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername">
|
||||
@ -320,28 +320,28 @@
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cuj.com/documents/s=8000/cujcexp1812austern/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id478919"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id644430"></a><p><span class="title"><i>The Hoard Memory Allocator</i>. </span>
|
||||
emeryb
|
||||
<span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cs.umass.edu/~emery/hoard/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id447245"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id689922"></a><p><span class="title"><i>Reconsidering Custom Memory Allocation</i>. </span>
|
||||
bergerzorn
|
||||
<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><span class="biblioid">
|
||||
<a class="ulink" href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id427350"></a><p><span class="title"><i>Allocator Types</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id709355"></a><p><span class="title"><i>Allocator Types</i>. </span>
|
||||
kreftlanger
|
||||
<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
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.langer.camelot.de/Articles/C++Report/Allocators/Allocators.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id291159"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
|
||||
. </span></p></div><div class="biblioentry"><a id="id642689"></a><p><span class="title"><i>The C++ Programming Language</i>. </span>
|
||||
tcpl
|
||||
<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
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id420450"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id614194"></a><p><span class="title"><i>Yalloc: A Recycling C++ Allocator</i>. </span>
|
||||
yenf
|
||||
<span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span><span class="copyright">Copyright © . </span><span class="biblioid">
|
||||
<a class="ulink" href="http://home.earthlink.net/~brimar/yalloc/" target="_top">
|
||||
|
@ -241,42 +241,42 @@ void test01()
|
||||
model. As of this writing, it is unknown how to query to see
|
||||
if a specified message catalog exists using the gettext
|
||||
package.
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id472238"></a><p><span class="title"><i>
|
||||
</p></li></ul></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="facet.messages.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id699687"></a><p><span class="title"><i>
|
||||
The GNU C Library
|
||||
</i>. </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="id414678"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id622574"></a><p><span class="title"><i>
|
||||
Correspondence
|
||||
</i>. </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="id412595"></a><p><span class="title"><i>
|
||||
</i>. </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="id630269"></a><p><span class="title"><i>
|
||||
ISO/IEC 14882:1998 Programming languages - C++
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id412614"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id630287"></a><p><span class="title"><i>
|
||||
ISO/IEC 9899:1999 Programming languages - C
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id400869"></a><p><span class="title"><i>
|
||||
</i>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id630306"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
|
||||
</i>. </span><span class="copyright">Copyright © 1999
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opengroup.org/austin/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id400897"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id567615"></a><p><span class="title"><i>
|
||||
The C++ Programming Language, Special Edition
|
||||
</i>. </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
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id426571"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id621555"></a><p><span class="title"><i>
|
||||
Standard C++ IOStreams and Locales
|
||||
</i>. </span><span class="subtitle">
|
||||
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">
|
||||
Addison Wesley Longman
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id414262"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id646611"></a><p><span class="title"><i>
|
||||
Java 2 Platform, Standard Edition, v 1.3.1 API Specification
|
||||
</i>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat,
|
||||
java.util.Locale, java.util.ResourceBundle. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://java.sun.com/reference/api/index.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id414283"></a><p><span class="title"><i>
|
||||
. </span></p></div><div class="biblioentry"><a id="id682026"></a><p><span class="title"><i>
|
||||
GNU gettext tools, version 0.10.38, Native Language Support
|
||||
Library and Tools.
|
||||
</i>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://sources.redhat.com/gettext" target="_top">
|
||||
<a class="ulink" href="http://www.gnu.org/software/gettext/" target="_top">
|
||||
</a>
|
||||
. </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="codecvt.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="facets.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">codecvt </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Part VII.
|
||||
Containers
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt09ch20.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="complex.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.numerics"></a>Part X.
|
||||
Numerics
|
||||
<a id="id399502" class="indexterm"></a>
|
||||
<a id="id624917" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="complex.html">21. Complex</a></span></dt><dd><dl><dt><span class="sect1"><a href="complex.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="chapter"><a href="generalized_numeric_operations.html">22. Generalized Operations</a></span></dt><dt><span class="chapter"><a href="numerics_and_c.html">23. Interacting with C</a></span></dt><dd><dl><dt><span class="sect1"><a href="numerics_and_c.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="sect1"><a href="bk01pt10ch23s02.html">C99</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="bk01pt09ch20.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="complex.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 20. Mutating </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Complex</td></tr></table></div></body></html>
|
||||
|
@ -13,11 +13,11 @@ explicit source declaration or by compiling existing sources with a
|
||||
specific compiler flag.
|
||||
</p><div class="sect1" lang="en" xml:lang="en"><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 type="disc"><li><p><code class="function">std::accumulate</code></p></li><li><p><code class="function">std::adjacent_difference</code></p></li><li><p><code class="function">std::inner_product</code></p></li><li><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 type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="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="id431585"></a><p><span class="title"><i>
|
||||
<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul type="disc"><li><p><code class="function">std::adjacent_find</code></p></li><li><p><code class="function">std::count</code></p></li><li><p><code class="function">std::count_if</code></p></li><li><p><code class="function">std::equal</code></p></li><li><p><code class="function">std::find</code></p></li><li><p><code class="function">std::find_if</code></p></li><li><p><code class="function">std::find_first_of</code></p></li><li><p><code class="function">std::for_each</code></p></li><li><p><code class="function">std::generate</code></p></li><li><p><code class="function">std::generate_n</code></p></li><li><p><code class="function">std::lexicographical_compare</code></p></li><li><p><code class="function">std::mismatch</code></p></li><li><p><code class="function">std::search</code></p></li><li><p><code class="function">std::search_n</code></p></li><li><p><code class="function">std::transform</code></p></li><li><p><code class="function">std::replace</code></p></li><li><p><code class="function">std::replace_if</code></p></li><li><p><code class="function">std::max_element</code></p></li><li><p><code class="function">std::merge</code></p></li><li><p><code class="function">std::min_element</code></p></li><li><p><code class="function">std::nth_element</code></p></li><li><p><code class="function">std::partial_sort</code></p></li><li><p><code class="function">std::partition</code></p></li><li><p><code class="function">std::random_shuffle</code></p></li><li><p><code class="function">std::set_union</code></p></li><li><p><code class="function">std::set_intersection</code></p></li><li><p><code class="function">std::set_symmetric_difference</code></p></li><li><p><code class="function">std::set_difference</code></p></li><li><p><code class="function">std::sort</code></p></li><li><p><code class="function">std::stable_sort</code></p></li><li><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="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="id660222"></a><p><span class="title"><i>
|
||||
Parallelization of Bulk Operations for STL Dictionaries
|
||||
</i>. </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)
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id389946"></a><p><span class="title"><i>
|
||||
. </span></span></p></div><div class="biblioentry"><a id="id660269"></a><p><span class="title"><i>
|
||||
The Multi-Core Standard Template Library
|
||||
</i>. </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)
|
||||
|
@ -135,7 +135,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
|
||||
call context.
|
||||
(Environment variable not supported.)
|
||||
</p></li></ul></div><p>
|
||||
</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id412060"></a><p><span class="title"><i>
|
||||
</p></div></div><div class="bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"></a>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id659013"></a><p><span class="title"><i>
|
||||
Perflint: A Context Sensitive Performance Advisor for C++ Programs
|
||||
</i>. </span><span class="author"><span class="firstname">Lixia</span> <span class="surname">Liu</span>. </span><span class="author"><span class="firstname">Silvius</span> <span class="surname">Rus</span>. </span><span class="copyright">Copyright © 2009 . </span><span class="publisher"><span class="publishername">
|
||||
Proceedings of the 2009 International Symposium on Code Generation
|
||||
|
@ -3,7 +3,7 @@
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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.
|
||||
Introduction
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="configure.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><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><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><a href="make.html">Make</a></span></dt><dt><span class="sect1"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="sect2"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="sect2"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="sect2"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="sect2"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt></dl></dd></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" lang="en" xml:lang="en"><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><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="sect1"><a href="configure.html">Configure</a></span></dt><dt><span class="sect1"><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
|
||||
a multi-step process. Steps include getting the sources,
|
||||
configuring and building the sources, testing, and installation.
|
||||
|
@ -29,7 +29,7 @@ drops to zero.
|
||||
Derived classes override those functions to destroy resources in a context
|
||||
where the correct dynamic type is known. This is an application of the
|
||||
technique known as type erasure.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id397705"></a>Class Hierarchy</h4></div></div></div><p>
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.impl"></a>Implementation</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id737043"></a>Class Hierarchy</h4></div></div></div><p>
|
||||
A <code class="classname">shared_ptr<T></code> contains a pointer of
|
||||
type <span class="type">T*</span> and an object of type
|
||||
<code class="classname">__shared_count</code>. The shared_count contains a
|
||||
@ -71,7 +71,7 @@ be forwarded to <span class="type">Tp</span>'s constructor.
|
||||
Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the
|
||||
type of object, not the type of pointer; this is purely a convenience
|
||||
that simplifies the implementation slightly.
|
||||
</p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id455193"></a>Thread Safety</h4></div></div></div><p>
|
||||
</p></dd></dl></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id656080"></a>Thread Safety</h4></div></div></div><p>
|
||||
The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++0x
|
||||
with support for rvalue-references and the other features from
|
||||
N2351. As with other libstdc++ headers shared by TR1 and C++0x,
|
||||
@ -129,7 +129,7 @@ compiler, standard library, platform etc. For the version of
|
||||
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
|
||||
Policy below for details.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id410726"></a>Selecting Lock Policy</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id618309"></a>Selecting Lock Policy</h4></div></div></div><p>
|
||||
</p><p>
|
||||
There is a single <code class="classname">_Sp_counted_base</code> class,
|
||||
which is a template parameterized on the enum
|
||||
@ -170,7 +170,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
|
||||
is multi-threaded. If only one thread of execution exists in
|
||||
the program then less expensive non-atomic operations are used.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id477345"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id679959"></a>Dual C++0x and TR1 Implementation</h4></div></div></div><p>
|
||||
The classes derived from <code class="classname">_Sp_counted_base</code> (see Class Hierarchy
|
||||
below) and <code class="classname">__shared_count</code> are implemented separately for C++0x
|
||||
and TR1, in <code class="filename">bits/boost_sp_shared_count.h</code> and
|
||||
@ -181,7 +181,7 @@ The TR1 implementation is considered relatively stable, so is unlikely to
|
||||
change unless bug fixes require it. If the code that is common to both
|
||||
C++0x and TR1 modes needs to diverge further then it might be necessary to
|
||||
duplicate additional classes and only make changes to the C++0x versions.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id474156"></a>Related functions and classes</h4></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="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id680859"></a>Related functions and classes</h4></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>
|
||||
As noted in N2351, these functions can be implemented non-intrusively using
|
||||
the alias constructor. However the aliasing constructor is only available
|
||||
@ -214,10 +214,10 @@ is called. Users should not try to use this.
|
||||
As well as the extra constructors, this implementation also needs some
|
||||
members of _Sp_counted_deleter to be protected where they could otherwise
|
||||
be private.
|
||||
</p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id498188"></a>Examples</h4></div></div></div><p>
|
||||
</p></dd></dl></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.using"></a>Use</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id715170"></a>Examples</h4></div></div></div><p>
|
||||
Examples of use can be found in the testsuite, under
|
||||
<code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id461223"></a>Unresolved Issues</h4></div></div></div><p>
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="id686787"></a>Unresolved Issues</h4></div></div></div><p>
|
||||
The resolution to C++ Standard Library issue <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674" target="_top">674</a>,
|
||||
"shared_ptr interface changes for consistency with N1856" will
|
||||
need to be implemented after it is accepted into the working
|
||||
@ -265,7 +265,7 @@ be private.
|
||||
code to work with, Peter Dimov in particular for his help and
|
||||
invaluable advice on thread safety. Phillip Jordan and Paolo
|
||||
Carlini for the lock policy implementation.
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id414603"></a><p>[<abbr class="abbrev">
|
||||
</p></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id622100"></a><p>[<abbr class="abbrev">
|
||||
n2351
|
||||
</abbr>] <span class="title"><i>
|
||||
Improving shared_ptr for C++0x, Revision 2
|
||||
@ -274,7 +274,7 @@ be private.
|
||||
. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id414627"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id622124"></a><p>[<abbr class="abbrev">
|
||||
n2456
|
||||
</abbr>] <span class="title"><i>
|
||||
C++ Standard Library Active Issues List (Revision R52)
|
||||
@ -283,7 +283,7 @@ be private.
|
||||
. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id469083"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id635143"></a><p>[<abbr class="abbrev">
|
||||
n2461
|
||||
</abbr>] <span class="title"><i>
|
||||
Working Draft, Standard for Programming Language C++
|
||||
@ -292,7 +292,7 @@ be private.
|
||||
. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id416974"></a><p>[<abbr class="abbrev">
|
||||
. </span></p></div><div class="biblioentry"><a id="id685426"></a><p>[<abbr class="abbrev">
|
||||
boostshared_ptr
|
||||
</abbr>] <span class="title"><i>
|
||||
Boost C++ Libraries documentation - shared_ptr class template
|
||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@ This status table is based on the table of contents of ISO/IEC 14882:2003.
|
||||
</p><p>
|
||||
This page describes the C++0x support in mainline GCC SVN, not in any
|
||||
particular release.
|
||||
</p><div class="table"><a id="id452999"></a><p class="title"><b>Table 1.1. C++ 1998/2003 Implementation Status</b></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
|
||||
</p><div class="table"><a id="id700007"></a><p class="title"><b>Table 1.1. C++ 1998/2003 Implementation Status</b></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
|
||||
<span class="emphasis"><em>18</em></span>
|
||||
</td><td colspan="3" align="left">
|
||||
<span class="emphasis"><em>Language support</em></span>
|
||||
@ -153,7 +153,7 @@ In this implementation the header names are prefixed by
|
||||
</p><p>
|
||||
This page describes the TR1 support in mainline GCC SVN, not in any particular
|
||||
release.
|
||||
</p><div class="table"><a id="id458222"></a><p class="title"><b>Table 1.2. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="3" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code"><memory></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left"> </td><td align="left">
|
||||
</p><div class="table"><a id="id693868"></a><p class="title"><b>Table 1.2. C++ TR1 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left"><span class="emphasis"><em>2</em></span></td><td colspan="3" align="left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td align="left">2.1</td><td align="left">Reference wrappers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.1</td><td align="left">Additions to header <code class="code"><functional></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.1.2.1</td><td align="left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.2</td><td align="left"><code class="code">reference_wrapper</code> assignment</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.3</td><td align="left"><code class="code">reference_wrapper</code> access</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.4</td><td align="left"><code class="code">reference_wrapper</code> invocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.1.2.5</td><td align="left"><code class="code">reference_wrapper</code> helper functions</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">2.2.1</td><td align="left">Additions to header <code class="code"><memory></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.2</td><td align="left">Class <code class="code">bad_weak_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">2.2.3</td><td align="left">Class template <code class="code">shared_ptr</code></td><td align="left"> </td><td align="left">
|
||||
<p>
|
||||
Uses code from
|
||||
<a class="ulink" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm" target="_top">boost::shared_ptr</a>.
|
||||
@ -171,7 +171,7 @@ presence of the required flag.
|
||||
</p><p>
|
||||
This page describes the C++0x support in mainline GCC SVN, not in any
|
||||
particular release.
|
||||
</p><div class="table"><a id="id478373"></a><p class="title"><b>Table 1.3. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
|
||||
</p><div class="table"><a id="id633674"></a><p class="title"><b>Table 1.3. C++ 200x Implementation Status</b></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
|
||||
<span class="emphasis"><em>18</em></span>
|
||||
</td><td colspan="3" align="left">
|
||||
<span class="emphasis"><em>Language support</em></span>
|
||||
@ -240,7 +240,7 @@ decimal floating-point arithmetic
|
||||
</p><p>
|
||||
This page describes the TR 24733 support in mainline GCC SVN, not in any
|
||||
particular release.
|
||||
</p><div class="table"><a id="id410254"></a><p class="title"><b>Table 1.4. C++ TR 24733 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
|
||||
</p><div class="table"><a id="id631613"></a><p class="title"><b>Table 1.4. C++ TR 24733 Implementation Status</b></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /></colgroup><thead><tr><th align="left">Section</th><th align="left">Description</th><th align="left">Status</th><th align="left">Comments</th></tr></thead><tbody><tr><td align="left">
|
||||
<span class="emphasis"><em>0</em></span>
|
||||
</td><td colspan="3" align="left">
|
||||
<span class="emphasis"><em>Introduction</em></span>
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="shared_ptr.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.strings"></a>Part V.
|
||||
Strings
|
||||
<a id="id405758" class="indexterm"></a>
|
||||
<a id="id710761" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="bk01pt05ch13.html">13. String Classes</a></span></dt><dd><dl><dt><span class="sect1"><a href="bk01pt05ch13.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s02.html">Case Sensitivity</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s03.html">Arbitrary Character Types</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s04.html">Tokenizing</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s05.html">Shrink to Fit</a></span></dt><dt><span class="sect1"><a href="bk01pt05ch13s06.html">CString (MFC)</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="shared_ptr.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt05ch13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">shared_ptr </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. String Classes</td></tr></table></div></body></html>
|
||||
|
@ -5,5 +5,5 @@
|
||||
|
||||
</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</th><td width="20%" align="right"> <a accesskey="n" href="bk01pt02pr01.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.support"></a>Part II.
|
||||
Support
|
||||
<a id="id492773" class="indexterm"></a>
|
||||
<a id="id652738" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="bk01pt02pr01.html"></a></span></dt><dt><span class="chapter"><a href="fundamental_types.html">4. Types</a></span></dt><dd><dl><dt><span class="sect1"><a href="fundamental_types.html#manual.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s02.html">Numeric Properties</a></span></dt><dt><span class="sect1"><a href="bk01pt02ch04s03.html">NULL</a></span></dt></dl></dd><dt><span class="chapter"><a href="dynamic_memory.html">5. Dynamic Memory</a></span></dt><dt><span class="chapter"><a href="termination.html">6. Termination</a></span></dt><dd><dl><dt><span class="sect1"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="sect1"><a href="verbose_termination.html">Verbose Terminate Handler</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="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk01pt02pr01.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="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , test , testsuite , performance , conformance , ABI , exception safety " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="setup.html" title="Chapter 2. Setup" /><link rel="prev" href="make.html" title="Make" /><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">Test</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="make.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="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.setup.test"></a>Test</h2></div></div></div><p>
|
||||
<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 Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , test , testsuite , performance , conformance , ABI , exception safety " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><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.
|
||||
Porting and Maintenance
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="abi.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><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,
|
||||
regressions, ABI, and performance.
|
||||
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="test.organization"></a>Organization</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="test.organization.layout"></a>Directory Layout</h4></div></div></div><p>
|
||||
@ -486,4 +489,4 @@ only default variables.
|
||||
</p><p>
|
||||
A number of class abstractions for performance counters, and
|
||||
reporting functions including:
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>time_counter</p></li><li><p>resource_counter</p></li><li><p>report_performance</p></li></ul></div></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="make.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">Make </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Using</td></tr></table></div></body></html>
|
||||
</p><div class="itemizedlist"><ul type="circle"><li><p>time_counter</p></li><li><p>resource_counter</p></li><li><p>report_performance</p></li></ul></div></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="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="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> ABI Policy and Guidelines</td></tr></table></div></body></html>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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 3. Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="test.html" title="Test" /><link rel="next" href="using_headers.html" title="Headers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Part I.
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 3. Using</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="intro.html" title="Part I. Introduction" /><link rel="prev" href="make.html" title="Make" /><link rel="next" href="using_headers.html" title="Headers" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 3. Using</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="make.html">Prev</a> </td><th width="60%" align="center">Part I.
|
||||
Introduction
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Propagating Exceptions aka Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Support for -fno-exceptions</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.lib"></a>Linking Library Binary Files</h2></div></div></div><p>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr></table><hr /></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="manual.intro.using"></a>Chapter 3. Using</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="using.html#manual.intro.using.lib">Linking Library Binary Files</a></span></dt><dt><span class="sect1"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and namespace std</a></span></dt><dt><span class="sect2"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="sect2"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_macros.html">Macros</a></span></dt><dt><span class="sect1"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="sect2"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="sect2"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt></dl></dd><dt><span class="sect1"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="sect2"><a href="debug.html#debug.compiler">Using g++</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.gdb">Using gdb</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="sect2"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.lib"></a>Linking Library Binary Files</h2></div></div></div><p>
|
||||
If you only built a static library (libstdc++.a), or if you
|
||||
specified static linking, you don't have to worry about this.
|
||||
But if you built a shared library (libstdc++.so) and linked
|
||||
@ -41,4 +41,4 @@
|
||||
A libstdc++.la file is also installed, for use with Libtool. If
|
||||
you use Libtool to create your executables, these details are
|
||||
taken care of for you.
|
||||
</p></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="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Test </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Headers</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="make.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="using_headers.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Make </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Headers</td></tr></table></div></body></html>
|
||||
|
@ -1,6 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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>Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using_concurrency.html" title="Concurrency" /><link rel="next" href="debug.html" title="Debugging Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.exception"></a>Exceptions</h2></div></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.propagating"></a>Propagating Exceptions aka Exception Neutrality</h3></div></div></div><p>
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.safety"></a>Exception Safety</h3></div></div></div><p>
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.no"></a>Support for <code class="literal">-fno-exceptions</code></h3></div></div></div><p>
|
||||
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using_concurrency.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="debug.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Debugging Support</td></tr></table></div></body></html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Exceptions</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" C++ , exception , error , exception neutrality , exception safety , exception propagation , -fno-exceptions " /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="using.html" title="Chapter 3. Using" /><link rel="prev" href="using_concurrency.html" title="Concurrency" /><link rel="next" href="debug.html" title="Debugging Support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Exceptions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Using</th><td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr></table><hr /></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.intro.using.exceptions"></a>Exceptions</h2></div></div></div><p>
|
||||
The C++ language provides language support for stack unwinding
|
||||
with <code class="literal">try</code> and <code class="literal">catch</code> blocks and
|
||||
the <code class="literal">throw</code> keyword.
|
||||
</p><p>
|
||||
These are very powerful constructs, and require some thought when
|
||||
applied to the standard library in order to yield components that work
|
||||
efficiently while cleaning up resources when unexpectedly killed via
|
||||
exceptional circumstances.
|
||||
</p><p>
|
||||
Two general topics of discussion follow:
|
||||
exception neutrality and exception safety.
|
||||
</p><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.safety"></a>Exception Safety</h3></div></div></div><p>
|
||||
What is exception-safe code?
|
||||
</p><p>
|
||||
Will define this as reasonable and well-defined behavior by classes
|
||||
and functions from the standard library when used by user-defined
|
||||
classes and functions that are themselves exception safe.
|
||||
</p><p>
|
||||
Please note that using exceptions in combination with templates
|
||||
imposes an additional requirement for exception
|
||||
safety. Instantiating types are required to have destructors that
|
||||
do no throw.
|
||||
</p><p>
|
||||
Using the layered approach from Abrahams, can classify library
|
||||
components as providing set levels of safety. These will be called
|
||||
exception guarantees, and can be divided into three categories.
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||
One. Don't throw.
|
||||
</p><p>
|
||||
As specified in 23.2.1 general container requirements. Applicable
|
||||
to container and string classes.
|
||||
</p><p>
|
||||
Member
|
||||
functions <code class="function">erase</code>, <code class="function">pop_back</code>, <code class="function">pop_front</code>, <code class="function">swap</code>, <code class="function">clear</code>. And <span class="type">iterator</span>
|
||||
copy constructor and assignment operator.
|
||||
</p></li><li><p>
|
||||
Two. Don't leak resources when exceptions are thrown. This is
|
||||
also referred to as the “<span class="quote">basic</span>” exception safety guarantee.
|
||||
</p><p>
|
||||
This applicable throughout the standard library.
|
||||
</p></li><li><p>
|
||||
Three. Commit-or-rollback semantics. This is
|
||||
referred to as “<span class="quote">strong</span>” exception safety guarantee.
|
||||
</p><p>
|
||||
As specified in 23.2.1 general container requirements. Applicable
|
||||
to container and string classes.
|
||||
</p><p>
|
||||
Member functions <code class="function">insert</code> of a single
|
||||
element, <code class="function">push_back</code>, <code class="function">push_front</code>,
|
||||
and <code class="function">rehash</code>.
|
||||
</p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.propagating"></a>Exception Neutrality</h3></div></div></div><p>
|
||||
Simply put, once thrown an exception object should continue in
|
||||
flight unless handled explicitly. In practice, this means
|
||||
propagating exceptions should not be swallowed in
|
||||
gratuitous <code class="literal">catch(...)</code> blocks. Instead,
|
||||
matching <code class="literal">try</code> and <code class="literal">catch</code>
|
||||
blocks should have specific catch handlers and allow un-handed
|
||||
exception objects to propagate. If a
|
||||
terminating <code class="literal">catch(...)</code> blocks exist then it
|
||||
should end with a <code class="literal">throw</code> to re-throw the current
|
||||
exception.
|
||||
</p><p>
|
||||
Why do this?
|
||||
</p><p>
|
||||
By allowing exception objects to propagate, a more flexible
|
||||
approach to error handling is made possible (although not
|
||||
required.) Instead of dealing with an error immediately, one can
|
||||
allow the exception to propagate up until sufficient context is
|
||||
available and the choice of exiting or retrying can be made in an
|
||||
informed manner.
|
||||
</p><p>
|
||||
Unfortunately, this tends to be more of a guideline than a strict
|
||||
rule as applied to the standard library. As such, the following is
|
||||
a list of known problem areas where exceptions are not propagated.
|
||||
</p><div class="itemizedlist"><ul type="disc"><li><p>
|
||||
Input/Output
|
||||
</p><p>
|
||||
The destructor <code class="function">ios_base::Init::~Init()</code>
|
||||
swallows all exceptions from <code class="function">flush</code> called on
|
||||
all open streams at termination.
|
||||
</p><p>
|
||||
All formatted input in <code class="classname">basic_istream</code> or
|
||||
formatted output in <code class="classname">basic_ostream</code> can be
|
||||
configured to swallow exceptions
|
||||
when <code class="function">exceptions</code> is set to
|
||||
ignore <span class="type">ios_base::badbit</span>.
|
||||
</p><p>
|
||||
Functions that have been registered
|
||||
with <code class="function">ios_base::register_callback</code> swallow all
|
||||
exceptions when called as part of a callback event.
|
||||
</p><p>
|
||||
When closing the underlying
|
||||
file, <code class="function">basic_filebuf::close</code> will swallow
|
||||
(non-cancellation) exceptions thrown and return <code class="literal">NULL</code>.
|
||||
</p></li><li><p>
|
||||
Thread
|
||||
</p><p>
|
||||
The constructors of <code class="classname">thread</code> that take a
|
||||
callable function argument swallow all exceptions resulting from
|
||||
executing the function argument.
|
||||
</p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.no"></a>Doing without</h3></div></div></div><p>
|
||||
C++ is a language that strives to be as efficient as is possible
|
||||
in delivering features. As such, considerable care is used by both
|
||||
language implementer and designers to make sure unused features
|
||||
not impose hidden or unexpected costs. The GNU system tries to be
|
||||
as flexible and as configurable as possible. So, it should come as
|
||||
no surprise that GNU C++ provides an optional language extension,
|
||||
spelled <code class="literal">-fno-exceptions</code>, as a way to excise the
|
||||
implicitly generated magic necessary to
|
||||
support <code class="literal">try</code> and <code class="literal">catch</code> blocks
|
||||
and thrown objects. (Language support
|
||||
for <code class="literal">-fno-exceptions</code> is documented in the GNU
|
||||
GCC <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options" target="_top">manual</a>.)
|
||||
</p><p>Before detailing the library support
|
||||
for <code class="literal">-fno-exceptions</code>, first a passing note on
|
||||
the things lost when this flag is used: it will break exceptions
|
||||
trying to pass through code compiled
|
||||
with <code class="literal">-fno-exceptions</code> whether or not that code
|
||||
has any <code class="literal">try</code> or <code class="literal">catch</code>
|
||||
constructs. If you might have some code that throws, you shouldn't
|
||||
use <code class="literal">-fno-exceptions</code>. If you have some code that
|
||||
uses <code class="literal">try</code> or <code class="literal">catch</code>, you
|
||||
shouldn't use <code class="literal">-fno-exceptions</code>.
|
||||
</p><p>
|
||||
And what it to be gained, tinkering in the back alleys with a
|
||||
language like this? Exception handling overhead can be measured
|
||||
in the size of the executable binary, and varies with the
|
||||
capabilities of the underlying operating system and specific
|
||||
configuration of the C++ compiler. On recent hardware with GNU
|
||||
system software of the same age, the combined code and data size
|
||||
overhead for enabling exception handling is around 7%. Of course,
|
||||
if code size is of singular concern than using the appropriate
|
||||
optimizer setting with exception handling enabled
|
||||
(ie, <code class="literal">-Os -fexceptions</code>) may save up to twice
|
||||
that, and preserve error checking.
|
||||
</p><p>
|
||||
So. Hell bent, we race down the slippery track, knowing the brakes
|
||||
are a little soft and that the right front wheel has a tendency to
|
||||
wobble at speed. Go on: detail the standard library support
|
||||
for <code class="literal">-fno-exceptions</code>.
|
||||
</p><p>
|
||||
In sum, valid C++ code with exception handling is transformed into
|
||||
a dialect without exception handling. In detailed steps: all use
|
||||
of the C++
|
||||
keywords <code class="literal">try</code>, <code class="literal">catch</code>,
|
||||
and <code class="literal">throw</code> in the standard library have been
|
||||
permanently replaced with the pre-processor controlled equivalents
|
||||
spelled <code class="literal">__try</code>, <code class="literal">__catch</code>,
|
||||
and <code class="literal">__throw_exception_again</code>. They are defined
|
||||
as follows.
|
||||
</p><pre class="programlisting">
|
||||
#ifdef __EXCEPTIONS
|
||||
# define __try try
|
||||
# define __catch(X) catch(X)
|
||||
# define __throw_exception_again throw
|
||||
#else
|
||||
# define __try if (true)
|
||||
# define __catch(X) if (false)
|
||||
# define __throw_exception_again
|
||||
#endif
|
||||
</pre><p>
|
||||
In addition, for every object derived from
|
||||
class <code class="classname">exception</code>, there exists a corresponding
|
||||
function with C language linkage. An example:
|
||||
</p><pre class="programlisting">
|
||||
#ifdef __EXCEPTIONS
|
||||
void __throw_bad_exception(void)
|
||||
{ throw bad_exception(); }
|
||||
#else
|
||||
void __throw_bad_exception(void)
|
||||
{ abort(); }
|
||||
#endif
|
||||
</pre><p>
|
||||
The last language feature needing to be transformed
|
||||
by <code class="literal">-fno-exceptions</code> is treatment of exception
|
||||
specifications on member functions. Fortunately, the compiler deals
|
||||
with this by ignoring exception specifications and so no alternate
|
||||
source markup is needed.
|
||||
</p><p>
|
||||
By using this combination of language re-specification by the
|
||||
compiler, and the pre-processor tricks and the functional
|
||||
indirection layer for thrown exception objects by the library,
|
||||
libstdc++ files can be compiled
|
||||
with <code class="literal">-fno-exceptions</code>.
|
||||
</p><p>
|
||||
User code that uses C++ keywords
|
||||
like <code class="literal">throw</code>, <code class="literal">try</code>,
|
||||
and <code class="literal">catch</code> will produce errors even if the user
|
||||
code has included libstdc++ headers and is using constructs
|
||||
like <code class="classname">basic_iostream</code>. Even though the standard
|
||||
library has been transformed, user code may need modification. User
|
||||
code that attempts or expects to do error checking on standard
|
||||
library components compiled with exception handling disabled should
|
||||
be evaluated and potentially made conditional.
|
||||
</p><p>
|
||||
Some issues remain with this approach (see bugzilla entry
|
||||
25191). Code paths are not equivalent, in
|
||||
particular <code class="literal">catch</code> blocks are not evaluated. Also
|
||||
problematic are <code class="literal">throw</code> expressions expecting a
|
||||
user-defined throw handler. Known problem areas in the standard
|
||||
library include using an instance
|
||||
of <code class="classname">basic_istream</code>
|
||||
with <code class="function">exceptions</code> set to specific
|
||||
<span class="type">ios_base::iostate</span> conditions, or
|
||||
cascading <code class="literal">catch</code> blocks that dispatch error
|
||||
handling or recovery efforts based on the type of exception object
|
||||
thrown.
|
||||
</p><p>
|
||||
Oh, and by the way: none of this hackery is at all
|
||||
special. (Although perhaps well-deserving of a raised eyebrow.)
|
||||
Support continues to evolve and may change in the future. Similar
|
||||
and even additional techniques are used in other C++ libraries and
|
||||
compilers.
|
||||
</p><p>
|
||||
C++ hackers with a bent for language and control-flow purity have
|
||||
been successfully consoled by grizzled C veterans lamenting the
|
||||
substitution of the C language keyword
|
||||
<code class="literal">const</code> with the uglified
|
||||
doppelganger <code class="literal">__const</code>.
|
||||
</p></div><div class="sect2" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="intro.using.exception.compat"></a>Compatibility</h3></div></div></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="using.exception.compat.c"></a>With <code class="literal">C</code></h4></div></div></div><p>
|
||||
C language code that is expecting to interoperate with C++ should be
|
||||
compiled with <code class="literal">-fexceptions</code>. This will make
|
||||
debugging a C language function called as part of C++-induced stack
|
||||
unwinding possible.
|
||||
</p><p>
|
||||
In particular, unwinding into a frame with no exception handling
|
||||
data will cause a runtime abort. If the unwinder runs out of unwind
|
||||
info before it finds a handler, <code class="function">std::terminate()</code>
|
||||
is called.
|
||||
</p><p>
|
||||
Please note that most development environments should take care of
|
||||
getting these details right. For GNU systems, all appropriate parts
|
||||
of the GNU C library are already compiled
|
||||
with <code class="literal">-fexceptions</code>.
|
||||
</p></div><div class="sect3" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="using.exception.compat.posix"></a>With <code class="literal">POSIX</code> thread cancellation</h4></div></div></div><p>
|
||||
GNU systems re-use some of the exception handling mechanisms to
|
||||
track control flow for <code class="literal">POSIX</code> thread cancellation.
|
||||
</p><p>
|
||||
Cancellation points are functions defined by POSIX as worthy of
|
||||
special treatment. The standard library may use some of these
|
||||
functions to implement parts of the ISO C++ standard or depend on
|
||||
them for extensions.
|
||||
</p><p>
|
||||
Of note:
|
||||
</p><p>
|
||||
<code class="function">nanosleep</code>,
|
||||
<code class="function">read</code>, <code class="function">write</code>, <code class="function">open</code>, <code class="function">close</code>,
|
||||
and <code class="function">wait</code>.
|
||||
</p><p>
|
||||
The parts of libstdc++ that use C library functions marked as
|
||||
cancellation points should take pains to be exception neutral.
|
||||
Failing this, <code class="literal">catch</code> blocks have been augmented to
|
||||
show that the POSIX cancellation object is in flight.
|
||||
</p><p>
|
||||
This augmentation adds a <code class="literal">catch</code> block
|
||||
for <code class="classname">__cxxabiv1::__forced_unwind</code>, which is the
|
||||
object representing the POSIX cancellation object. Like so:
|
||||
</p><pre class="programlisting">
|
||||
catch(const __cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
throw;
|
||||
}
|
||||
catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
</pre></div></div><div class="bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="using.exceptions.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id618326"></a><p><span class="title"><i>
|
||||
System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)
|
||||
</i>. </span><span class="pagenums">
|
||||
2.9.5 Thread Cancellation
|
||||
. </span><span class="copyright">Copyright © 2008
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.opengroup.org/austin/" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id627763"></a><p><span class="title"><i>
|
||||
Error and Exception Handling
|
||||
</i>. </span><span class="author"><span class="firstname">David</span> <span class="surname">Abrahams </span>. </span><span class="publisher"><span class="publishername">
|
||||
Boost
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.boost.org/community/error_handling.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id633982"></a><p><span class="title"><i>
|
||||
Exception-Safety in Generic Components
|
||||
</i>. </span><span class="author"><span class="firstname">David</span> <span class="surname">Abrahams</span>. </span><span class="publisher"><span class="publishername">
|
||||
Boost
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.boost.org/community/exception_safety.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id634268"></a><p><span class="title"><i>
|
||||
Standard Library Exception Policy
|
||||
</i>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername">
|
||||
WG21 N1077
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="www.open-std.org/jtc1/sc22/wg21/docs/papers/1997/N1077.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id642510"></a><p><span class="title"><i>
|
||||
ia64 c++ abi exception handling
|
||||
</i>. </span><span class="author"><span class="firstname">Richard</span> <span class="surname">Henderson</span>. </span><span class="publisher"><span class="publishername">
|
||||
GNU
|
||||
. </span></span><span class="biblioid">
|
||||
<a class="ulink" href="http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00661.html" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id636666"></a><p><span class="title"><i>
|
||||
Appendix E: Standard-Library Exception Safety
|
||||
</i>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="biblioid">
|
||||
<a class="ulink" href="http://www.research.att.com/~bs/3rd_safe.pdf" target="_top">
|
||||
</a>
|
||||
. </span></p></div><div class="biblioentry"><a id="id707620"></a><p><span class="title"><i>
|
||||
Exceptional C++
|
||||
</i>. </span><span class="pagenums">
|
||||
Exception-Safety Issues and Techniques
|
||||
. </span><span class="author"><span class="firstname">Herb</span> <span class="surname">Sutter</span>. </span></p></div><div class="biblioentry"><a id="id652939"></a><p><span class="title"><i>
|
||||
exception_defines.h #defines try/catch
|
||||
</i>. </span><span class="subtitle">
|
||||
GCC Bug <a class="ulink" href="http://gcc.gnu.org/PR25191" target="_top">25191</a>
|
||||
. </span><span class="biblioid">
|
||||
. </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="using_concurrency.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="debug.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Concurrency </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Debugging Support</td></tr></table></div></body></html>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!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. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt03ch07s03.html" title="Cancellation" /><link rel="next" href="functors.html" title="Chapter 9. Functors" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV.
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Part IV. Utilities</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3" /><meta name="keywords" content=" ISO C++ , library " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="spine.html" title="The GNU C++ Library" /><link rel="prev" href="bk01pt03ch07s02.html" title="Adding Data to Exceptions" /><link rel="next" href="functors.html" title="Chapter 9. Functors" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Part IV.
|
||||
Utilities
|
||||
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s03.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="functors.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.util"></a>Part IV.
|
||||
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01pt03ch07s02.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library</th><td width="20%" align="right"> <a accesskey="n" href="functors.html">Next</a></td></tr></table><hr /></div><div class="part" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="manual.util"></a>Part IV.
|
||||
Utilities
|
||||
<a id="id457371" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="functors.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="pairs.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="memory.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="memory.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="traits.html">12. Traits</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="bk01pt03ch07s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="functors.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Cancellation </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Functors</td></tr></table></div></body></html>
|
||||
<a id="id622508" class="indexterm"></a>
|
||||
</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="functors.html">9. Functors</a></span></dt><dt><span class="chapter"><a href="pairs.html">10. Pairs</a></span></dt><dt><span class="chapter"><a href="memory.html">11. Memory</a></span></dt><dd><dl><dt><span class="sect1"><a href="memory.html#manual.util.memory.allocator">Allocators</a></span></dt><dd><dl><dt><span class="sect2"><a href="memory.html#allocator.req">Requirements</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.using">Using a Specific Allocator</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.custom">Custom Allocators</a></span></dt><dt><span class="sect2"><a href="memory.html#allocator.ext">Extension Allocators</a></span></dt></dl></dd><dt><span class="sect1"><a href="auto_ptr.html">auto_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.limitations">Limitations</a></span></dt><dt><span class="sect2"><a href="auto_ptr.html#auto_ptr.using">Use in Containers</a></span></dt></dl></dd><dt><span class="sect1"><a href="shared_ptr.html">shared_ptr</a></span></dt><dd><dl><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.req">Requirements</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.design_issues">Design Issues</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.impl">Implementation</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.using">Use</a></span></dt><dt><span class="sect2"><a href="shared_ptr.html#shared_ptr.ack">Acknowledgments</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="traits.html">12. Traits</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="bk01pt03ch07s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="spine.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="functors.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Adding Data to Exceptions </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Functors</td></tr></table></div></body></html>
|
||||
|
File diff suppressed because one or more lines are too long
@ -74,7 +74,7 @@
|
||||
Allocators, ABI, API evolution and deprecation history,
|
||||
Backwards Compatibility, Thread, Debug Support, Locales,
|
||||
Facets, Parallel Mode, Headers, Namespaces, Construction and
|
||||
Structure, DocBook conversion and layout.
|
||||
Structure, Using Exceptions, DocBook conversion and layout.
|
||||
</para>
|
||||
</authorblurb>
|
||||
</author>
|
||||
@ -147,6 +147,17 @@
|
||||
</authorblurb>
|
||||
</author>
|
||||
|
||||
<author>
|
||||
<firstname>Silvius</firstname>
|
||||
<surname>Rus</surname>
|
||||
|
||||
<authorblurb>
|
||||
<para>
|
||||
Profile mode
|
||||
</para>
|
||||
</authorblurb>
|
||||
</author>
|
||||
|
||||
<author>
|
||||
<firstname>Johannes</firstname>
|
||||
<surname>Singler</surname>
|
||||
|
@ -35,6 +35,11 @@
|
||||
parse="xml" href="internals.xml">
|
||||
</xi:include>
|
||||
|
||||
<!-- Test -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="test.xml">
|
||||
</xi:include>
|
||||
|
||||
<!-- ABI Policy and Guidelines -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="abi.xml">
|
||||
|
@ -71,11 +71,6 @@
|
||||
</programlisting>
|
||||
|
||||
</sect1>
|
||||
<sect1 id="manual.diagnostics.exceptions.cancellation" xreflabel="Cancellation">
|
||||
<title>Cancellation</title>
|
||||
<para>
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="manual.diagnostics.concept_checking" xreflabel="Concept Checking">
|
||||
|
@ -870,13 +870,8 @@ started to build.
|
||||
|
||||
</sect1>
|
||||
|
||||
<!-- Section 04 : Test -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="test.xml">
|
||||
</xi:include>
|
||||
</chapter>
|
||||
|
||||
|
||||
<!-- Chapter 03 : Using -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="using.xml">
|
||||
|
@ -1290,32 +1290,12 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
</sect1>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="manual.intro.using.exception" xreflabel="Exceptions">
|
||||
<?dbhtml filename="using_exceptions.html"?>
|
||||
<title>Exceptions</title>
|
||||
|
||||
<sect2 id="intro.using.exception.propagating" xreflabel="Propagating Exceptions">
|
||||
|
||||
<title>Propagating Exceptions aka Exception Neutrality</title>
|
||||
<para>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="intro.using.exception.safety" xreflabel="Exception Safety">
|
||||
<title>Exception Safety</title>
|
||||
<para>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="intro.using.exception.no" xreflabel="-fno-exceptions">
|
||||
<title>Support for <literal>-fno-exceptions</literal></title>
|
||||
<para>
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
<!-- Section 0x : Exception policies, expectations, topics -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
parse="xml" href="using_exceptions.xml">
|
||||
</xi:include>
|
||||
|
||||
<!-- Section 0x : Debug -->
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
|
579
libstdc++-v3/doc/xml/manual/using_exceptions.xml
Normal file
579
libstdc++-v3/doc/xml/manual/using_exceptions.xml
Normal file
@ -0,0 +1,579 @@
|
||||
<sect1 id="manual.intro.using.exceptions" xreflabel="Using Exceptions">
|
||||
<?dbhtml filename="using_exceptions.html"?>
|
||||
|
||||
<sect1info>
|
||||
<keywordset>
|
||||
<keyword>
|
||||
C++
|
||||
</keyword>
|
||||
<keyword>
|
||||
exception
|
||||
</keyword>
|
||||
<keyword>
|
||||
error
|
||||
</keyword>
|
||||
<keyword>
|
||||
exception neutrality
|
||||
</keyword>
|
||||
<keyword>
|
||||
exception safety
|
||||
</keyword>
|
||||
<keyword>
|
||||
exception propagation
|
||||
</keyword>
|
||||
<keyword>
|
||||
-fno-exceptions
|
||||
</keyword>
|
||||
</keywordset>
|
||||
</sect1info>
|
||||
|
||||
<title>Exceptions</title>
|
||||
|
||||
<para>
|
||||
The C++ language provides language support for stack unwinding
|
||||
with <literal>try</literal> and <literal>catch</literal> blocks and
|
||||
the <literal>throw</literal> keyword.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
These are very powerful constructs, and require some thought when
|
||||
applied to the standard library in order to yield components that work
|
||||
efficiently while cleaning up resources when unexpectedly killed via
|
||||
exceptional circumstances.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Two general topics of discussion follow:
|
||||
exception neutrality and exception safety.
|
||||
</para>
|
||||
|
||||
|
||||
<sect2 id="intro.using.exception.safety" xreflabel="Exception Safety">
|
||||
<title>Exception Safety</title>
|
||||
|
||||
<para>
|
||||
What is exception-safe code?
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Will define this as reasonable and well-defined behavior by classes
|
||||
and functions from the standard library when used by user-defined
|
||||
classes and functions that are themselves exception safe.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please note that using exceptions in combination with templates
|
||||
imposes an additional requirement for exception
|
||||
safety. Instantiating types are required to have destructors that
|
||||
do no throw.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Using the layered approach from Abrahams, can classify library
|
||||
components as providing set levels of safety. These will be called
|
||||
exception guarantees, and can be divided into three categories.
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
One. Don't throw.
|
||||
</para>
|
||||
<para>
|
||||
As specified in 23.2.1 general container requirements. Applicable
|
||||
to container and string classes.
|
||||
</para>
|
||||
<para>
|
||||
Member
|
||||
functions <function>erase</function>, <function>pop_back</function>, <function>pop_front</function>, <function>swap</function>, <function>clear</function>. And <type>iterator</type>
|
||||
copy constructor and assignment operator.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Two. Don't leak resources when exceptions are thrown. This is
|
||||
also referred to as the <quote>basic</quote> exception safety guarantee.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This applicable throughout the standard library.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Three. Commit-or-rollback semantics. This is
|
||||
referred to as <quote>strong</quote> exception safety guarantee.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As specified in 23.2.1 general container requirements. Applicable
|
||||
to container and string classes.
|
||||
</para>
|
||||
<para>
|
||||
Member functions <function>insert</function> of a single
|
||||
element, <function>push_back</function>, <function>push_front</function>,
|
||||
and <function>rehash</function>.
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="intro.using.exception.propagating" xreflabel="Exceptions Neutrality">
|
||||
<title>Exception Neutrality</title>
|
||||
<para>
|
||||
Simply put, once thrown an exception object should continue in
|
||||
flight unless handled explicitly. In practice, this means
|
||||
propagating exceptions should not be swallowed in
|
||||
gratuitous <literal>catch(...)</literal> blocks. Instead,
|
||||
matching <literal>try</literal> and <literal>catch</literal>
|
||||
blocks should have specific catch handlers and allow un-handed
|
||||
exception objects to propagate. If a
|
||||
terminating <literal>catch(...)</literal> blocks exist then it
|
||||
should end with a <literal>throw</literal> to re-throw the current
|
||||
exception.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Why do this?
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By allowing exception objects to propagate, a more flexible
|
||||
approach to error handling is made possible (although not
|
||||
required.) Instead of dealing with an error immediately, one can
|
||||
allow the exception to propagate up until sufficient context is
|
||||
available and the choice of exiting or retrying can be made in an
|
||||
informed manner.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Unfortunately, this tends to be more of a guideline than a strict
|
||||
rule as applied to the standard library. As such, the following is
|
||||
a list of known problem areas where exceptions are not propagated.
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Input/Output
|
||||
</para>
|
||||
<para>
|
||||
The destructor <function>ios_base::Init::~Init()</function>
|
||||
swallows all exceptions from <function>flush</function> called on
|
||||
all open streams at termination.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
All formatted input in <classname>basic_istream</classname> or
|
||||
formatted output in <classname>basic_ostream</classname> can be
|
||||
configured to swallow exceptions
|
||||
when <function>exceptions</function> is set to
|
||||
ignore <type>ios_base::badbit</type>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Functions that have been registered
|
||||
with <function>ios_base::register_callback</function> swallow all
|
||||
exceptions when called as part of a callback event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When closing the underlying
|
||||
file, <function>basic_filebuf::close</function> will swallow
|
||||
(non-cancellation) exceptions thrown and return <literal>NULL</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Thread
|
||||
</para>
|
||||
<para>
|
||||
The constructors of <classname>thread</classname> that take a
|
||||
callable function argument swallow all exceptions resulting from
|
||||
executing the function argument.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="intro.using.exception.no" xreflabel="-fno-exceptions">
|
||||
<title>Doing without</title>
|
||||
<para>
|
||||
C++ is a language that strives to be as efficient as is possible
|
||||
in delivering features. As such, considerable care is used by both
|
||||
language implementer and designers to make sure unused features
|
||||
not impose hidden or unexpected costs. The GNU system tries to be
|
||||
as flexible and as configurable as possible. So, it should come as
|
||||
no surprise that GNU C++ provides an optional language extension,
|
||||
spelled <literal>-fno-exceptions</literal>, as a way to excise the
|
||||
implicitly generated magic necessary to
|
||||
support <literal>try</literal> and <literal>catch</literal> blocks
|
||||
and thrown objects. (Language support
|
||||
for <literal>-fno-exceptions</literal> is documented in the GNU
|
||||
GCC <ulink url="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options">manual</ulink>.)
|
||||
</para>
|
||||
|
||||
<para>Before detailing the library support
|
||||
for <literal>-fno-exceptions</literal>, first a passing note on
|
||||
the things lost when this flag is used: it will break exceptions
|
||||
trying to pass through code compiled
|
||||
with <literal>-fno-exceptions</literal> whether or not that code
|
||||
has any <literal>try</literal> or <literal>catch</literal>
|
||||
constructs. If you might have some code that throws, you shouldn't
|
||||
use <literal>-fno-exceptions</literal>. If you have some code that
|
||||
uses <literal>try</literal> or <literal>catch</literal>, you
|
||||
shouldn't use <literal>-fno-exceptions</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
And what it to be gained, tinkering in the back alleys with a
|
||||
language like this? Exception handling overhead can be measured
|
||||
in the size of the executable binary, and varies with the
|
||||
capabilities of the underlying operating system and specific
|
||||
configuration of the C++ compiler. On recent hardware with GNU
|
||||
system software of the same age, the combined code and data size
|
||||
overhead for enabling exception handling is around 7%. Of course,
|
||||
if code size is of singular concern than using the appropriate
|
||||
optimizer setting with exception handling enabled
|
||||
(ie, <literal>-Os -fexceptions</literal>) may save up to twice
|
||||
that, and preserve error checking.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
So. Hell bent, we race down the slippery track, knowing the brakes
|
||||
are a little soft and that the right front wheel has a tendency to
|
||||
wobble at speed. Go on: detail the standard library support
|
||||
for <literal>-fno-exceptions</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In sum, valid C++ code with exception handling is transformed into
|
||||
a dialect without exception handling. In detailed steps: all use
|
||||
of the C++
|
||||
keywords <literal>try</literal>, <literal>catch</literal>,
|
||||
and <literal>throw</literal> in the standard library have been
|
||||
permanently replaced with the pre-processor controlled equivalents
|
||||
spelled <literal>__try</literal>, <literal>__catch</literal>,
|
||||
and <literal>__throw_exception_again</literal>. They are defined
|
||||
as follows.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
#ifdef __EXCEPTIONS
|
||||
# define __try try
|
||||
# define __catch(X) catch(X)
|
||||
# define __throw_exception_again throw
|
||||
#else
|
||||
# define __try if (true)
|
||||
# define __catch(X) if (false)
|
||||
# define __throw_exception_again
|
||||
#endif
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
In addition, for every object derived from
|
||||
class <classname>exception</classname>, there exists a corresponding
|
||||
function with C language linkage. An example:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
#ifdef __EXCEPTIONS
|
||||
void __throw_bad_exception(void)
|
||||
{ throw bad_exception(); }
|
||||
#else
|
||||
void __throw_bad_exception(void)
|
||||
{ abort(); }
|
||||
#endif
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
The last language feature needing to be transformed
|
||||
by <literal>-fno-exceptions</literal> is treatment of exception
|
||||
specifications on member functions. Fortunately, the compiler deals
|
||||
with this by ignoring exception specifications and so no alternate
|
||||
source markup is needed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By using this combination of language re-specification by the
|
||||
compiler, and the pre-processor tricks and the functional
|
||||
indirection layer for thrown exception objects by the library,
|
||||
libstdc++ files can be compiled
|
||||
with <literal>-fno-exceptions</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
User code that uses C++ keywords
|
||||
like <literal>throw</literal>, <literal>try</literal>,
|
||||
and <literal>catch</literal> will produce errors even if the user
|
||||
code has included libstdc++ headers and is using constructs
|
||||
like <classname>basic_iostream</classname>. Even though the standard
|
||||
library has been transformed, user code may need modification. User
|
||||
code that attempts or expects to do error checking on standard
|
||||
library components compiled with exception handling disabled should
|
||||
be evaluated and potentially made conditional.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some issues remain with this approach (see bugzilla entry
|
||||
25191). Code paths are not equivalent, in
|
||||
particular <literal>catch</literal> blocks are not evaluated. Also
|
||||
problematic are <literal>throw</literal> expressions expecting a
|
||||
user-defined throw handler. Known problem areas in the standard
|
||||
library include using an instance
|
||||
of <classname>basic_istream</classname>
|
||||
with <function>exceptions</function> set to specific
|
||||
<type>ios_base::iostate</type> conditions, or
|
||||
cascading <literal>catch</literal> blocks that dispatch error
|
||||
handling or recovery efforts based on the type of exception object
|
||||
thrown.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Oh, and by the way: none of this hackery is at all
|
||||
special. (Although perhaps well-deserving of a raised eyebrow.)
|
||||
Support continues to evolve and may change in the future. Similar
|
||||
and even additional techniques are used in other C++ libraries and
|
||||
compilers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
C++ hackers with a bent for language and control-flow purity have
|
||||
been successfully consoled by grizzled C veterans lamenting the
|
||||
substitution of the C language keyword
|
||||
<literal>const</literal> with the uglified
|
||||
doppelganger <literal>__const</literal>.
|
||||
</para>
|
||||
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="intro.using.exception.compat">
|
||||
<title>Compatibility</title>
|
||||
|
||||
<sect3 id="using.exception.compat.c">
|
||||
<title>With <literal>C</literal></title>
|
||||
<para>
|
||||
C language code that is expecting to interoperate with C++ should be
|
||||
compiled with <literal>-fexceptions</literal>. This will make
|
||||
debugging a C language function called as part of C++-induced stack
|
||||
unwinding possible.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In particular, unwinding into a frame with no exception handling
|
||||
data will cause a runtime abort. If the unwinder runs out of unwind
|
||||
info before it finds a handler, <function>std::terminate()</function>
|
||||
is called.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please note that most development environments should take care of
|
||||
getting these details right. For GNU systems, all appropriate parts
|
||||
of the GNU C library are already compiled
|
||||
with <literal>-fexceptions</literal>.
|
||||
</para>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3 id="using.exception.compat.posix">
|
||||
<title>With <literal>POSIX</literal> thread cancellation</title>
|
||||
|
||||
<para>
|
||||
GNU systems re-use some of the exception handling mechanisms to
|
||||
track control flow for <literal>POSIX</literal> thread cancellation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Cancellation points are functions defined by POSIX as worthy of
|
||||
special treatment. The standard library may use some of these
|
||||
functions to implement parts of the ISO C++ standard or depend on
|
||||
them for extensions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Of note:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>nanosleep</function>,
|
||||
<function>read</function>, <function>write</function>, <function>open</function>, <function>close</function>,
|
||||
and <function>wait</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The parts of libstdc++ that use C library functions marked as
|
||||
cancellation points should take pains to be exception neutral.
|
||||
Failing this, <literal>catch</literal> blocks have been augmented to
|
||||
show that the POSIX cancellation object is in flight.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This augmentation adds a <literal>catch</literal> block
|
||||
for <classname>__cxxabiv1::__forced_unwind</classname>, which is the
|
||||
object representing the POSIX cancellation object. Like so:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
catch(const __cxxabiv1::__forced_unwind&)
|
||||
{
|
||||
this->_M_setstate(ios_base::badbit);
|
||||
throw;
|
||||
}
|
||||
catch(...)
|
||||
{ this->_M_setstate(ios_base::badbit); }
|
||||
</programlisting>
|
||||
|
||||
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
<bibliography id="using.exceptions.biblio">
|
||||
<title>Bibliography</title>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)
|
||||
</title>
|
||||
<pagenums>
|
||||
2.9.5 Thread Cancellation
|
||||
</pagenums>
|
||||
|
||||
<copyright>
|
||||
<year>2008</year>
|
||||
<holder>
|
||||
The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
|
||||
</copyright>
|
||||
|
||||
<biblioid>
|
||||
<ulink url="http://www.opengroup.org/austin/">
|
||||
</ulink>
|
||||
</biblioid>
|
||||
|
||||
</biblioentry>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
Error and Exception Handling
|
||||
</title>
|
||||
<author>
|
||||
<firstname>David</firstname>
|
||||
<surname>Abrahams </surname>
|
||||
</author>
|
||||
<publisher>
|
||||
<publishername>
|
||||
Boost
|
||||
</publishername>
|
||||
</publisher>
|
||||
<biblioid>
|
||||
<ulink url="http://www.boost.org/community/error_handling.html">
|
||||
</ulink>
|
||||
</biblioid>
|
||||
</biblioentry>
|
||||
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
Exception-Safety in Generic Components
|
||||
</title>
|
||||
<author>
|
||||
<firstname>David</firstname>
|
||||
<surname>Abrahams</surname>
|
||||
</author>
|
||||
<publisher>
|
||||
<publishername>
|
||||
Boost
|
||||
</publishername>
|
||||
</publisher>
|
||||
<biblioid>
|
||||
<ulink url="http://www.boost.org/community/exception_safety.html">
|
||||
</ulink>
|
||||
</biblioid>
|
||||
</biblioentry>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
Standard Library Exception Policy
|
||||
</title>
|
||||
<author>
|
||||
<firstname>Matt</firstname>
|
||||
<surname>Austern</surname>
|
||||
</author>
|
||||
<publisher>
|
||||
<publishername>
|
||||
WG21 N1077
|
||||
</publishername>
|
||||
</publisher>
|
||||
<biblioid>
|
||||
<ulink url="www.open-std.org/jtc1/sc22/wg21/docs/papers/1997/N1077.pdf">
|
||||
</ulink>
|
||||
</biblioid>
|
||||
</biblioentry>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
ia64 c++ abi exception handling
|
||||
</title>
|
||||
<author>
|
||||
<firstname>Richard</firstname>
|
||||
<surname>Henderson</surname>
|
||||
</author>
|
||||
<publisher>
|
||||
<publishername>
|
||||
GNU
|
||||
</publishername>
|
||||
</publisher>
|
||||
<biblioid>
|
||||
<ulink url="http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00661.html">
|
||||
</ulink>
|
||||
</biblioid>
|
||||
</biblioentry>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
Appendix E: Standard-Library Exception Safety
|
||||
</title>
|
||||
<author>
|
||||
<firstname>Bjarne</firstname>
|
||||
<surname>Stroustrup</surname>
|
||||
</author>
|
||||
<biblioid>
|
||||
<ulink url="http://www.research.att.com/~bs/3rd_safe.pdf">
|
||||
</ulink>
|
||||
</biblioid>
|
||||
</biblioentry>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
Exceptional C++
|
||||
</title>
|
||||
<pagenums>
|
||||
Exception-Safety Issues and Techniques
|
||||
</pagenums>
|
||||
<author>
|
||||
<firstname>Herb</firstname>
|
||||
<surname>Sutter</surname>
|
||||
</author>
|
||||
</biblioentry>
|
||||
|
||||
<biblioentry>
|
||||
<title>
|
||||
exception_defines.h #defines try/catch
|
||||
</title>
|
||||
<subtitle>
|
||||
GCC Bug <ulink url="http://gcc.gnu.org/PR25191">25191</ulink>
|
||||
</subtitle>
|
||||
<biblioid>
|
||||
</biblioid>
|
||||
</biblioentry>
|
||||
|
||||
</bibliography>
|
||||
|
||||
</sect1>
|
Loading…
x
Reference in New Issue
Block a user