xref: /netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/doc/html/manual/api.html (revision 23f5f46327e37e7811da3520f4bb933f9489322f)
136ac495dSmrg<?xml version="1.0" encoding="UTF-8" standalone="no"?>
236ac495dSmrg<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>API Evolution and Deprecation History</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><meta name="keywords" content="ISO C++, api, evolution, deprecation, history" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="abi.html" title="ABI Policy and Guidelines" /><link rel="next" href="backwards.html" title="Backwards Compatibility" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">API Evolution and Deprecation History</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
336ac495dSmrg  Porting and Maintenance
436ac495dSmrg
536ac495dSmrg</th><td width="20%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.api"></a>API Evolution and Deprecation History</h2></div></div></div><p>
636ac495dSmrgA list of user-visible changes, in chronological order
736ac495dSmrg</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_300"></a><code class="constant">3.0</code></h3></div></div></div><p>
836ac495dSmrgExtensions moved to <code class="filename">include/ext</code>.
936ac495dSmrg  </p><p>
1036ac495dSmrgInclude files from the SGI/HP sources that pre-date the ISO standard
1136ac495dSmrgare added. These files are placed into
1236ac495dSmrgthe <code class="filename">include/backward</code> directory and a deprecated warning
1336ac495dSmrgis added that notifies on inclusion (<code class="literal">-Wno-deprecated</code>
1436ac495dSmrgdeactivates the warning.)
15c0a68be4Smrg</p><p>Deprecated include <code class="filename">&lt;backward/strstream&gt;</code> added.</p><p>Removal of include <code class="filename">&lt;builtinbuf.h&gt;</code>, <code class="filename">&lt;indstream.h&gt;</code>, <code class="filename">&lt;parsestream.h&gt;</code>, <code class="filename">&lt;PlotFile.h&gt;</code>, <code class="filename">&lt;SFile.h&gt;</code>, <code class="filename">&lt;stdiostream.h&gt;</code>, and <code class="filename">&lt;stream.h&gt;</code>.
1636ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_310"></a><code class="constant">3.1</code></h3></div></div></div><p>
1736ac495dSmrg  </p><p>
1836ac495dSmrgExtensions from SGI/HP moved from <code class="code">namespace std</code>
1936ac495dSmrgto <code class="code">namespace __gnu_cxx</code>. As part of this, the following
2036ac495dSmrgnew includes are
21c0a68be4Smrgadded: <code class="filename">&lt;ext/algorithm&gt;</code>, <code class="filename">&lt;ext/functional&gt;</code>, <code class="filename">&lt;ext/iterator&gt;</code>, <code class="filename">&lt;ext/memory&gt;</code>, and <code class="filename">&lt;ext/numeric&gt;</code>.
2236ac495dSmrg</p><p>
2336ac495dSmrgExtensions to <code class="code">basic_filebuf</code> introduced: <code class="code">__gnu_cxx::enc_filebuf</code>, and <code class="code">__gnu_cxx::stdio_filebuf</code>.
2436ac495dSmrg</p><p>
25c0a68be4SmrgExtensions to tree data structures added in <code class="filename">&lt;ext/rb_tree&gt;</code>.
2636ac495dSmrg</p><p>
27c0a68be4SmrgRemoval of <code class="filename">&lt;ext/tree&gt;</code>, moved to <code class="filename">&lt;backward/tree.h&gt;</code>.
2836ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_320"></a><code class="constant">3.2</code></h3></div></div></div><p>
29c0a68be4Smrg  </p><p>Symbol versioning introduced for shared library.</p><p>Removal of include <code class="filename">&lt;backward/strstream.h&gt;</code>.</p><p>Allocator changes. Change <code class="code">__malloc_alloc</code> to <code class="code">malloc_allocator</code> and <code class="code">__new_alloc</code> to <code class="code">new_allocator</code>. </p><p> For GCC releases from 2.95 through the 3.1 series, defining
3036ac495dSmrg   <code class="literal">__USE_MALLOC</code> on the gcc command line would change the
3136ac495dSmrg   default allocation strategy to instead use <code class="code">malloc</code> and
32a2dc1f3fSmrg   <code class="code">free</code>. For the 3.2 and 3.3 release series the same
3336ac495dSmrg   functionality was spelled <code class="literal">_GLIBCXX_FORCE_NEW</code>. From
34a2dc1f3fSmrg   GCC 3.4 onwards the default allocator uses <code class="code">new</code> anyway,
35a2dc1f3fSmrg   but for the optional pooling allocators the functionality is enabled by
36a2dc1f3fSmrg   setting <code class="literal">GLIBCXX_FORCE_NEW</code> in the environment, see
378feb0f0bSmrg   <a class="link" href="mt_allocator.html" title="Chapter 19. The mt_allocator">the mt allocator chapter</a>
3836ac495dSmrg   for details.
3936ac495dSmrg   </p><p>Error handling in iostreams cleaned up, made consistent. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_330"></a><code class="constant">3.3</code></h3></div></div></div><p>
4036ac495dSmrg  </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_340"></a><code class="constant">3.4</code></h3></div></div></div><p>
4136ac495dSmrg  </p><p>
4236ac495dSmrgLarge file support.
43c0a68be4Smrg</p><p> Extensions for generic characters and <code class="code">char_traits</code> added in <code class="filename">&lt;ext/pod_char_traits.h&gt;</code>.
4436ac495dSmrg</p><p>
4536ac495dSmrgSupport for <code class="code">wchar_t</code> specializations of <code class="code">basic_filebuf</code> enhanced to support <code class="code">UTF-8</code> and <code class="code">Unicode</code>, depending on host. More hosts support basic <code class="code">wchar_t</code> functionality.
4636ac495dSmrg</p><p>
4736ac495dSmrgSupport for <code class="code">char_traits</code> beyond builtin types.
4836ac495dSmrg</p><p>
4936ac495dSmrgConformant <code class="code">allocator</code> class and usage in containers. As
5036ac495dSmrgpart of this, the following extensions are
51c0a68be4Smrgadded: <code class="filename">&lt;ext/bitmap_allocator.h&gt;</code>, <code class="filename">&lt;ext/debug_allocator.h&gt;</code>, <code class="filename">&lt;ext/mt_allocator.h&gt;</code>, <code class="filename">&lt;ext/malloc_allocator.h&gt;</code>,<code class="filename">&lt;ext/new_allocator.h&gt;</code>, <code class="filename">&lt;ext/pool_allocator.h&gt;</code>.
5236ac495dSmrg</p><p>
5336ac495dSmrgThis is a change from all previous versions, and may require
5436ac495dSmrgsource-level changes due to allocator-related changes to structures
5536ac495dSmrgnames and template parameters, filenames, and file locations. Some,
5636ac495dSmrglike <code class="code">__simple_alloc, __allocator, __alloc, </code> and <code class="code">
5736ac495dSmrg_Alloc_traits</code> have been removed.
5836ac495dSmrg</p><p>Default behavior of <code class="code">std::allocator</code> has changed.</p><p>
5936ac495dSmrg   Previous versions prior to 3.4 cache allocations in a memory
6036ac495dSmrg   pool, instead of passing through to call the global allocation
6136ac495dSmrg   operators (i.e., <code class="classname">__gnu_cxx::pool_allocator</code>).  More
6236ac495dSmrg   recent versions default to the
6336ac495dSmrg   simpler <code class="classname">__gnu_cxx::new_allocator</code>.
6436ac495dSmrg</p><p> Previously, all allocators were written to the SGI
6536ac495dSmrg   style, and all STL containers expected this interface. This
6636ac495dSmrg   interface had a traits class called <code class="code">_Alloc_traits</code> that
6736ac495dSmrg   attempted to provide more information for compile-time allocation
6836ac495dSmrg   selection and optimization. This traits class had another allocator
6936ac495dSmrg   wrapper, <code class="code">__simple_alloc&lt;T,A&gt;</code>, which was a
7036ac495dSmrg   wrapper around another allocator, A, which itself is an allocator
7136ac495dSmrg   for instances of T. But wait, there's more:
7236ac495dSmrg   <code class="code">__allocator&lt;T,A&gt;</code> is another adapter.  Many of
7336ac495dSmrg   the provided allocator classes were SGI style: such classes can be
7436ac495dSmrg   changed to a conforming interface with this wrapper:
7536ac495dSmrg   <code class="code">__allocator&lt;T, __alloc&gt;</code> is thus the same as
7636ac495dSmrg   <code class="code">allocator&lt;T&gt;</code>.
7736ac495dSmrg   </p><p> The class <code class="classname">allocator</code> used the typedef
7836ac495dSmrg   <span class="type">__alloc</span> to select an underlying allocator that
7936ac495dSmrg   satisfied memory allocation requests. The selection of this
8036ac495dSmrg   underlying allocator was not user-configurable.
81c0a68be4Smrg   </p><div class="table"><a id="table.extension_allocators"></a><p class="title"><strong>Table B.6. Extension Allocators</strong></p><div class="table-contents"><table class="table" summary="Extension Allocators" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /></colgroup><thead><tr><th align="left">Allocator (3.4)</th><th align="left">Header (3.4)</th><th align="left">Allocator (3.[0-3])</th><th align="left">Header (3.[0-3])</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::new_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/new_allocator.h&gt;</code></td><td align="left"><code class="classname">std::__new_alloc</code></td><td align="left"><code class="filename">&lt;memory&gt;</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::malloc_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/malloc_allocator.h&gt;</code></td><td align="left"><code class="classname">std::__malloc_alloc_template&lt;int&gt;</code></td><td align="left"><code class="filename">&lt;memory&gt;</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::debug_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/debug_allocator.h&gt;</code></td><td align="left"><code class="classname">std::debug_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;memory&gt;</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__pool_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/pool_allocator.h&gt;</code></td><td align="left"><code class="classname">std::__default_alloc_template&lt;bool,int&gt;</code></td><td align="left"><code class="filename">&lt;memory&gt;</code></td></tr><tr><td align="left"><code class="classname">__gnu_cxx::__mt_alloc&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/mt_allocator.h&gt;</code></td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left"><code class="classname">__gnu_cxx::bitmap_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/bitmap_allocator.h&gt;</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
8236ac495dSmrg   of available allocators. All of these new allocators are
8336ac495dSmrg   standard-style. The following table includes details, along with
8436ac495dSmrg   the first released version of GCC that included the extension allocator.
85c0a68be4Smrg   </p><div class="table"><a id="table.extension_allocators2"></a><p class="title"><strong>Table B.7. Extension Allocators Continued</strong></p><div class="table-contents"><table class="table" summary="Extension Allocators Continued" border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left">Allocator</th><th align="left">Include</th><th align="left">Version</th></tr></thead><tbody><tr><td align="left"><code class="classname">__gnu_cxx::array_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/array_allocator.h&gt;</code></td><td align="left">4.0.0</td></tr><tr><td align="left"><code class="classname">__gnu_cxx::throw_allocator&lt;T&gt;</code></td><td align="left"><code class="filename">&lt;ext/throw_allocator.h&gt;</code></td><td align="left">4.2.0</td></tr></tbody></table></div></div><br class="table-break" /><p>
8636ac495dSmrgDebug mode first appears.
8736ac495dSmrg</p><p>
8836ac495dSmrgPrecompiled header support <acronym class="acronym">PCH</acronym> support.
8936ac495dSmrg</p><p>
9036ac495dSmrgMacro guard for changed, from <code class="literal">_GLIBCPP_</code> to <code class="literal">_GLIBCXX_</code>.
9136ac495dSmrg</p><p>
92c0a68be4SmrgExtension <code class="filename">&lt;ext/stdio_sync_filebuf.h&gt;</code> added.
9336ac495dSmrg</p><p>
94c0a68be4SmrgExtension <code class="filename">&lt;ext/demangle.h&gt;</code> added.
9536ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_400"></a><code class="constant">4.0</code></h3></div></div></div><p>
9636ac495dSmrg  </p><p>
9736ac495dSmrgTR1 features first appear.
9836ac495dSmrg</p><p>
99c0a68be4SmrgExtension allocator <code class="filename">&lt;ext/array_allocator.h&gt;</code> added.
10036ac495dSmrg</p><p>
101c0a68be4SmrgExtension <code class="code">codecvt</code> specializations moved to <code class="filename">&lt;ext/codecvt_specializations.h&gt;</code>.
10236ac495dSmrg</p><p>
103c0a68be4SmrgRemoval of <code class="filename">&lt;ext/demangle.h&gt;</code>.
10436ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_410"></a><code class="constant">4.1</code></h3></div></div></div><p>
10536ac495dSmrg  </p><p>
106c0a68be4SmrgRemoval of <code class="filename">&lt;cassert&gt;</code> from all standard headers: now has to be explicitly included for <code class="code">std::assert</code> calls.
10736ac495dSmrg</p><p> Extensions for policy-based data structures first added. New includes,
10836ac495dSmrgtypes, namespace <code class="code">pb_assoc</code>.
109c0a68be4Smrg</p><p> Extensions for typelists added in <code class="filename">&lt;ext/typelist.h&gt;</code>.
110c0a68be4Smrg</p><p> Extension for policy-based <code class="code">basic_string</code> first added: <code class="code">__gnu_cxx::__versa_string</code> in <code class="filename">&lt;ext/vstring.h&gt;</code>.
11136ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_420"></a><code class="constant">4.2</code></h3></div></div></div><p>
11236ac495dSmrg  </p><p> Default visibility attributes applied to <code class="code">namespace std</code>. Support for <code class="code">-fvisibility</code>.
113c0a68be4Smrg</p><p>TR1 <code class="filename">&lt;random&gt;</code>, <code class="filename">&lt;complex&gt;</code>, and C compatibility headers added.</p><p> Extensions for concurrent programming consolidated
114c0a68be4Smrginto <code class="filename">&lt;ext/concurrence.h&gt;</code> and <code class="filename">&lt;ext/atomicity.h&gt;</code>,
11536ac495dSmrgincluding change of namespace to <code class="code">__gnu_cxx</code> in some
11636ac495dSmrgcases. Added types
11736ac495dSmrginclude <code class="code">_Lock_policy</code>, <code class="code">__concurrence_lock_error</code>, <code class="code">__concurrence_unlock_error</code>, <code class="code">__mutex</code>, <code class="code">__scoped_lock</code>.</p><p> Extensions for type traits consolidated
118c0a68be4Smrginto <code class="filename">&lt;ext/type_traits.h&gt;</code>. Additional traits are added
11936ac495dSmrg(<code class="code">__conditional_type</code>, <code class="code">__enable_if</code>, others.)
12036ac495dSmrg</p><p> Extensions for policy-based data structures revised. New includes,
12136ac495dSmrgtypes, namespace moved to <code class="code">__pb_ds</code>.
12236ac495dSmrg</p><p> Extensions for debug mode modified: now nested in <code class="code">namespace
12336ac495dSmrgstd::__debug</code> and extensions in <code class="code">namespace
124c0a68be4Smrg__gnu_cxx::__debug</code>.</p><p> Extensions added: <code class="filename">&lt;ext/typelist.h&gt;</code>
125c0a68be4Smrgand <code class="filename">&lt;ext/throw_allocator.h&gt;</code>.
12636ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_430"></a><code class="constant">4.3</code></h3></div></div></div><p>
12736ac495dSmrg  </p><p>
12836ac495dSmrgC++0X features first appear.
129c0a68be4Smrg</p><p>TR1 <code class="filename">&lt;regex&gt;</code> and <code class="filename">&lt;cmath&gt;</code>'s mathematical special function added.
13036ac495dSmrg</p><p>
13136ac495dSmrgBackward include edit.
13236ac495dSmrg</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Removed</p><p>
133c0a68be4Smrg<code class="filename">&lt;algobase.h&gt;</code> <code class="filename">&lt;algo.h&gt;</code> <code class="filename">&lt;alloc.h&gt;</code> <code class="filename">&lt;bvector.h&gt;</code> <code class="filename">&lt;complex.h&gt;</code>
134c0a68be4Smrg<code class="filename">&lt;defalloc.h&gt;</code> <code class="filename">&lt;deque.h&gt;</code> <code class="filename">&lt;fstream.h&gt;</code> <code class="filename">&lt;function.h&gt;</code> <code class="filename">&lt;hash_map.h&gt;</code> <code class="filename">&lt;hash_set.h&gt;</code>
135c0a68be4Smrg<code class="filename">&lt;hashtable.h&gt;</code> <code class="filename">&lt;heap.h&gt;</code> <code class="filename">&lt;iomanip.h&gt;</code> <code class="filename">&lt;iostream.h&gt;</code> <code class="filename">&lt;istream.h&gt;</code> <code class="filename">&lt;iterator.h&gt;</code>
136c0a68be4Smrg<code class="filename">&lt;list.h&gt;</code> <code class="filename">&lt;map.h&gt;</code> <code class="filename">&lt;multimap.h&gt;</code> <code class="filename">&lt;multiset.h&gt;</code> <code class="filename">&lt;new.h&gt;</code> <code class="filename">&lt;ostream.h&gt;</code> <code class="filename">&lt;pair.h&gt;</code> <code class="filename">&lt;queue.h&gt;</code> <code class="filename">&lt;rope.h&gt;</code> <code class="filename">&lt;set.h&gt;</code> <code class="filename">&lt;slist.h&gt;</code> <code class="filename">&lt;stack.h&gt;</code> <code class="filename">&lt;streambuf.h&gt;</code> <code class="filename">&lt;stream.h&gt;</code> <code class="filename">&lt;tempbuf.h&gt;</code>
137c0a68be4Smrg<code class="filename">&lt;tree.h&gt;</code> <code class="filename">&lt;vector.h&gt;</code>
13836ac495dSmrg  </p></li><li class="listitem"><p>Added</p><p>
139c0a68be4Smrg  <code class="filename">&lt;hash_map&gt;</code> and <code class="filename">&lt;hash_set&gt;</code>
14036ac495dSmrg  </p></li><li class="listitem"><p>Added in C++11</p><p>
141c0a68be4Smrg    <code class="filename">&lt;auto_ptr.h&gt;</code> and <code class="filename">&lt;binders.h&gt;</code>
14236ac495dSmrg  </p></li></ul></div><p>
14336ac495dSmrgHeader dependency streamlining.
144c0a68be4Smrg</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="filename">&lt;algorithm&gt;</code> no longer includes <code class="filename">&lt;climits&gt;</code>, <code class="filename">&lt;cstring&gt;</code>, or <code class="filename">&lt;iosfwd&gt;</code> </p></li><li class="listitem"><p><code class="filename">&lt;bitset&gt;</code> no longer includes <code class="filename">&lt;istream&gt;</code> or <code class="filename">&lt;ostream&gt;</code>, adds <code class="filename">&lt;iosfwd&gt;</code> </p></li><li class="listitem"><p><code class="filename">&lt;functional&gt;</code> no longer includes <code class="filename">&lt;cstddef&gt;</code></p></li><li class="listitem"><p><code class="filename">&lt;iomanip&gt;</code> no longer includes <code class="filename">&lt;istream&gt;</code>, <code class="filename">&lt;istream&gt;</code>, or <code class="filename">&lt;functional&gt;</code>, adds <code class="filename">&lt;ioswd&gt;</code> </p></li><li class="listitem"><p><code class="filename">&lt;numeric&gt;</code> no longer includes <code class="filename">&lt;iterator&gt;</code></p></li><li class="listitem"><p><code class="filename">&lt;string&gt;</code> no longer includes <code class="filename">&lt;algorithm&gt;</code> or <code class="filename">&lt;memory&gt;</code></p></li><li class="listitem"><p><code class="filename">&lt;valarray&gt;</code> no longer includes <code class="filename">&lt;numeric&gt;</code> or <code class="filename">&lt;cstdlib&gt;</code></p></li><li class="listitem"><p><code class="filename">&lt;tr1/hashtable&gt;</code> no longer includes <code class="filename">&lt;memory&gt;</code> or <code class="filename">&lt;functional&gt;</code></p></li><li class="listitem"><p><code class="filename">&lt;tr1/memory&gt;</code> no longer includes <code class="filename">&lt;algorithm&gt;</code></p></li><li class="listitem"><p><code class="filename">&lt;tr1/random&gt;</code> no longer includes <code class="filename">&lt;algorithm&gt;</code> or <code class="filename">&lt;fstream&gt;</code></p></li></ul></div><p>
145c0a68be4SmrgDebug mode for <code class="filename">&lt;unordered_map&gt;</code> and <code class="filename">&lt;unordered_set&gt;</code>.
14636ac495dSmrg</p><p>
14736ac495dSmrgParallel mode first appears.
148c0a68be4Smrg</p><p>Variadic template implementations of items in <code class="filename">&lt;tuple&gt;</code> and
149c0a68be4Smrg    <code class="filename">&lt;functional&gt;</code>.
15036ac495dSmrg</p><p>Default <code class="code">what</code> implementations give more elaborate
15136ac495dSmrg    exception strings for <code class="code">bad_cast</code>,
15236ac495dSmrg    <code class="code">bad_typeid</code>, <code class="code">bad_exception</code>, and
15336ac495dSmrg    <code class="code">bad_alloc</code>.
15436ac495dSmrg</p><p>
15536ac495dSmrgPCH binary files no longer installed. Instead, the source files are installed.
15636ac495dSmrg</p><p>
15736ac495dSmrgNamespace pb_ds moved to __gnu_pb_ds.
15836ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_440"></a><code class="constant">4.4</code></h3></div></div></div><p>
15936ac495dSmrg  </p><p>
16036ac495dSmrgC++0X features.
16136ac495dSmrg</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
16236ac495dSmrg    Added.
16336ac495dSmrg  </p><p>
164c0a68be4Smrg    <code class="filename">&lt;atomic&gt;</code>,
165c0a68be4Smrg    <code class="filename">&lt;chrono&gt;</code>,
166c0a68be4Smrg    <code class="filename">&lt;condition_variable&gt;</code>,
167c0a68be4Smrg    <code class="filename">&lt;forward_list&gt;</code>,
168c0a68be4Smrg    <code class="filename">&lt;initializer_list&gt;</code>,
169c0a68be4Smrg    <code class="filename">&lt;mutex&gt;</code>,
170c0a68be4Smrg    <code class="filename">&lt;ratio&gt;</code>,
171c0a68be4Smrg    <code class="filename">&lt;thread&gt;</code>
17236ac495dSmrg  </p></li><li class="listitem"><p>
17336ac495dSmrg    Updated and improved.
17436ac495dSmrg  </p><p>
175c0a68be4Smrg    <code class="filename">&lt;algorithm&gt;</code>,
176c0a68be4Smrg    <code class="filename">&lt;system_error&gt;</code>,
177c0a68be4Smrg    <code class="filename">&lt;type_traits&gt;</code>
17836ac495dSmrg  </p></li><li class="listitem"><p>
17936ac495dSmrg    Use of the GNU extension namespace association converted to inline namespaces.
18036ac495dSmrg  </p></li><li class="listitem"><p>
18136ac495dSmrg    Preliminary support for <code class="classname">initializer_list</code>
18236ac495dSmrg    and defaulted and deleted constructors in container classes.
18336ac495dSmrg  </p></li><li class="listitem"><p>
18436ac495dSmrg    <code class="classname">unique_ptr</code>.
18536ac495dSmrg  </p></li><li class="listitem"><p>
18636ac495dSmrg    Support for new character types <span class="type">char16_t</span>
18736ac495dSmrg    and <span class="type">char32_t</span> added
18836ac495dSmrg    to <code class="classname">char_traits</code>, <code class="classname">basic_string</code>, <code class="classname">numeric_limits</code>,
18936ac495dSmrg    and assorted compile-time type traits.
19036ac495dSmrg  </p></li><li class="listitem"><p>
19136ac495dSmrg    Support for string conversions <code class="function">to_string</code>
19236ac495dSmrg    and <code class="function">to_wstring</code>.
19336ac495dSmrg  </p></li><li class="listitem"><p>
19436ac495dSmrg    Member functions taking string arguments were added to iostreams
19536ac495dSmrg    including <code class="classname">basic_filebuf</code>, <code class="classname">basic_ofstream</code>,
19636ac495dSmrg    and <code class="classname">basic_ifstream</code>.
19736ac495dSmrg  </p></li><li class="listitem"><p>
19836ac495dSmrg    Exception propagation support,
19936ac495dSmrg    including <code class="classname">exception_ptr</code>, <code class="function">current_exception</code>, <code class="function">copy_exception</code>,
20036ac495dSmrg    and <code class="function">rethrow_exception</code>.
20136ac495dSmrg  </p></li></ul></div><p>
20236ac495dSmrgUglification of <code class="literal">try</code> to <code class="literal">__try</code>
20336ac495dSmrgand <code class="literal">catch</code> to <code class="literal">__catch</code>.
20436ac495dSmrg  </p><p>
20536ac495dSmrgAudit of internal mutex usage, conversion to functions returning static
20636ac495dSmrglocal mutex.
20736ac495dSmrg  </p><p> Extensions
208c0a68be4Smrgadded: <code class="filename">&lt;ext/pointer.h&gt;</code>
209c0a68be4Smrgand <code class="filename">&lt;ext/extptr_allocator.h&gt;</code>. Support
21036ac495dSmrgfor non-standard pointer types has been added
21136ac495dSmrgto <code class="classname">vector</code>
21236ac495dSmrgand <code class="classname">forward_list</code>.
21336ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_450"></a><code class="constant">4.5</code></h3></div></div></div><p>
21436ac495dSmrg  </p><p>
21536ac495dSmrgC++0X features.
21636ac495dSmrg</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
21736ac495dSmrg    Added.
21836ac495dSmrg  </p><p>
219c0a68be4Smrg    <code class="filename">&lt;functional&gt;</code>,
220c0a68be4Smrg    <code class="filename">&lt;future&gt;</code>,
221c0a68be4Smrg    <code class="filename">&lt;random&gt;</code>
22236ac495dSmrg  </p></li><li class="listitem"><p>
22336ac495dSmrg    Updated and improved.
22436ac495dSmrg  </p><p>
225c0a68be4Smrg    <code class="filename">&lt;atomic&gt;</code>,
226c0a68be4Smrg    <code class="filename">&lt;system_error&gt;</code>,
227c0a68be4Smrg    <code class="filename">&lt;type_traits&gt;</code>
22836ac495dSmrg  </p></li><li class="listitem"><p>
22936ac495dSmrg    Add support for explicit operators and standard layout types.
23036ac495dSmrg  </p></li></ul></div><p>
23136ac495dSmrgProfile mode first appears.
23236ac495dSmrg</p><p>
23336ac495dSmrgSupport for decimal floating-point arithmetic, including <code class="classname">decimal32</code>, <code class="classname">decimal64</code>, and <code class="classname">decimal128</code>.
23436ac495dSmrg</p><p>
23536ac495dSmrgPython pretty-printers are added for use with appropriately-advanced versions of <span class="command"><strong>gdb</strong></span>.
23636ac495dSmrg</p><p>
23736ac495dSmrgAudit for application of function attributes nothrow, const, pure, and noreturn.
23836ac495dSmrg</p><p>
23936ac495dSmrgThe default behavior for comparing typeinfo names changed, so
240c0a68be4Smrgin <code class="filename">&lt;typeinfo&gt;</code>, <code class="literal">__GXX_MERGED_TYPEINFO_NAMES</code>
24136ac495dSmrgnow defaults to zero.
242c0a68be4Smrg</p><p> Extensions modified: <code class="filename">&lt;ext/throw_allocator.h&gt;</code>.
24336ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_460"></a><code class="constant">4.6</code></h3></div></div></div><p>
24436ac495dSmrg  Use constexpr and nullptr where appropriate throughout the library.
24536ac495dSmrg</p><p>
24636ac495dSmrg  The library was updated to avoid including
247c0a68be4Smrg  <code class="filename">&lt;stddef.h&gt;</code> in order
24836ac495dSmrg  to reduce namespace pollution.
24936ac495dSmrg</p><p>Reference-count annotations to assist data race detectors.
25036ac495dSmrg</p><p>
25136ac495dSmrg  Added <code class="function">make_exception_ptr</code> as an alias of
25236ac495dSmrg  <code class="function">copy_exception</code>.
25336ac495dSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_470"></a><code class="constant">4.7</code></h3></div></div></div><p>Use of noexcept throughout library.</p><p>Partial support for C++11 allocators first appears.</p><p>
25436ac495dSmrg  <code class="classname">monotonic_clock</code> renamed to
25536ac495dSmrg  <code class="classname">steady_clock</code> as required by the final C++11
25636ac495dSmrg  standard.
25736ac495dSmrg</p><p>A new clocale model for newlib is available.</p><p>
25836ac495dSmrg  The library was updated to avoid including
259c0a68be4Smrg  <code class="filename">&lt;unistd.h&gt;</code> in order
26036ac495dSmrg  to reduce namespace pollution.
26136ac495dSmrg</p><p>Debug Mode was improved for unordered containers. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_480"></a><code class="constant">4.8</code></h3></div></div></div><p>
26236ac495dSmrg  New random number engines and distributions.
26336ac495dSmrg  Optimisations for random.
26436ac495dSmrg</p><p>New --enable-libstdcxx-verbose configure option</p><p>
26536ac495dSmrg  The --enable-libstdcxx-time configure option becomes unnecessary given a
26636ac495dSmrg  sufficiently recent glibc.
267a2dc1f3fSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_490"></a><code class="constant">4.9</code></h3></div></div></div><p> Implementation of <code class="classname">regex</code> completed. </p><p> C++14 library and TS implementations are added. </p><p> <code class="function">copy_exception</code> deprecated. </p><p> <code class="classname">__gnu_cxx::array_allocator</code> deprecated. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_51"></a><code class="constant">5</code></h3></div></div></div><p>
26836ac495dSmrg  ABI transition adds new implementations of several components, using the
26936ac495dSmrg  <code class="code">abi_tag</code> attribute and the <code class="code">__cxx11</code> inline
27036ac495dSmrg  namespace to distinguish the new entities from the old ones.
27136ac495dSmrg</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
27236ac495dSmrg    Use of the new or old ABI can be selected per-translation unit with the
273a2dc1f3fSmrg    <a class="xref" href="using_macros.html" title="Macros">Macros</a>.
27436ac495dSmrg  </p></li><li class="listitem"><p>
27536ac495dSmrg    New non-reference-counted <code class="classname">string</code> implementation.
27636ac495dSmrg  </p></li><li class="listitem"><p>
27736ac495dSmrg    New <code class="classname">list</code> implementation containing a new
27836ac495dSmrg    data member in order to provide O(1) <code class="function">size()</code>.
279a2dc1f3fSmrg  </p></li><li class="listitem"><p>
280a2dc1f3fSmrg    New <code class="classname">ios_base::failure</code> implementation inheriting
281a2dc1f3fSmrg    from <code class="classname">system_error</code>.
28236ac495dSmrg  </p></li></ul></div><p>
28336ac495dSmrg  C++11 support completed (movable iostreams, new I/O manipulators,
28436ac495dSmrg  Unicode conversion utilities, atomic operations for
28536ac495dSmrg  <code class="classname">shared_ptr</code>, functions for notifying condition
28636ac495dSmrg  variables and making futures ready at thread exit).
28736ac495dSmrg</p><p>
28836ac495dSmrg   Changed formatting of floating point types when
28936ac495dSmrg   <code class="code">ios_base::fixed|ios_base::scientific</code> is set in a stream's
29036ac495dSmrg   format flags.
29136ac495dSmrg</p><p> Improved C++14 support and TS implementations. </p><p> New random number engines and distributions. </p><p>
29236ac495dSmrg  GDB Xmethods for containers and <code class="classname">unique_ptr</code> added.
29336ac495dSmrg</p><p>
29436ac495dSmrg  <code class="classname">has_trivial_default_constructor</code>,
29536ac495dSmrg  <code class="classname">has_trivial_copy_constructor</code> and
29636ac495dSmrg  <code class="classname">has_trivial_copy_assign</code> deprecated.
297a2dc1f3fSmrg</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="api.rel_53"></a><code class="constant">5.3</code></h4></div></div></div><p> Experimental implementation of the C++ Filesystem TS added. </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_61"></a><code class="constant">6</code></h3></div></div></div><p> C++14 support completed. </p><p>
298a2dc1f3fSmrg  Support for mathematical special functions (ISO/IEC 29124:2010) added.
299a2dc1f3fSmrg</p><p>
300a2dc1f3fSmrg  Assertions to check function preconditions can be enabled by defining the
3018feb0f0bSmrg  <a class="link" href="using_macros.html" title="Macros"><span class="symbol">_GLIBCXX_ASSERTIONS</span>
3028feb0f0bSmrg  macro</a>.
303a2dc1f3fSmrg  The initial set of assertions are a subset of the checks enabled by
304a2dc1f3fSmrg  the Debug Mode, but without the ABI changes and changes to algorithmic
305a2dc1f3fSmrg  complexity that are caused by enabling the full Debug Mode.
306a2dc1f3fSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_71"></a><code class="constant">7</code></h3></div></div></div><p>
307a2dc1f3fSmrg  The type of exception thrown by iostreams changed to the <code class="code">cxx11</code>
308a2dc1f3fSmrg  ABI version of <code class="classname">std::ios_base::failure</code>.
309a2dc1f3fSmrg</p><p>
310a2dc1f3fSmrg  Experimental C++17 support added, including most new library features.
311a2dc1f3fSmrg  The meaning of <code class="classname">shared_ptr&lt;T[]&gt;</code> changed to
312a2dc1f3fSmrg  match the C++17 semantics.
313a2dc1f3fSmrg</p><p>
314a2dc1f3fSmrg  <a class="xref" href="using_macros.html" title="Macros">Macros</a> added.
315a2dc1f3fSmrg</p><p>
316a2dc1f3fSmrg  <code class="classname">has_trivial_default_constructor</code>,
317a2dc1f3fSmrg  <code class="classname">has_trivial_copy_constructor</code> and
318a2dc1f3fSmrg  <code class="classname">has_trivial_copy_assign</code> removed.
319c0a68be4Smrg</p><p> Profile Mode was deprecated. </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="api.rel_72"></a><code class="constant">7.2</code></h4></div></div></div><p>
320c0a68be4Smrg  Library Fundamentals TS header
321c0a68be4Smrg  <code class="filename">&lt;experimental/source_location&gt;</code>
322c0a68be4Smrg  added.
323c0a68be4Smrg</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="api.rel_73"></a><code class="constant">7.3</code></h4></div></div></div><p>
324a2dc1f3fSmrg  Including new C++14 or C++17 headers without a suitable <code class="option">-std</code>
325a2dc1f3fSmrg  no longer causes compilation to fail via <code class="literal">#error</code>.
326a2dc1f3fSmrg  Instead the header is simply empty and doesn't define anything.
327a2dc1f3fSmrg</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_81"></a><code class="constant">8</code></h3></div></div></div><p>
328a2dc1f3fSmrg  The exceptions thrown by iostreams can now be caught by handlers for either
329a2dc1f3fSmrg  version of <code class="classname">std::ios_base::failure</code>.
330a2dc1f3fSmrg</p><p>
331c0a68be4Smrg  Improved experimental C++17 support. Headers
332c0a68be4Smrg  <code class="filename">&lt;charconv&gt;</code> and
333c0a68be4Smrg  <code class="filename">&lt;filesystem&gt;</code>.
334a2dc1f3fSmrg  Experimental implementation of the C++17 Filesystem library added.
335a2dc1f3fSmrg</p><p>
336c0a68be4Smrg  Experimental C++2a support
337c0a68be4Smrg  (<code class="function">to_address</code> and <code class="classname">endian</code>).
338c0a68be4Smrg</p><p>
339a2dc1f3fSmrg  AddressSanitizer annotations added to <code class="classname">std::vector</code>
340a2dc1f3fSmrg  to detect out-of-range accesses to the unused capacity of a vector.
341a2dc1f3fSmrg</p><p>
342a2dc1f3fSmrg  <code class="function">std::char_traits&lt;char16_t&gt;::to_int_type(u'\uFFFF')</code>
343a2dc1f3fSmrg  now returns <code class="literal">0xFFFD</code>, as <code class="literal">0xFFFF</code> is
344a2dc1f3fSmrg  used for <code class="function">std::char_traits&lt;char16_t&gt;::eof()</code>.
345a2dc1f3fSmrg</p><p>
346a2dc1f3fSmrg  The extension allowing arithmetic on
347a2dc1f3fSmrg  <code class="classname">std::atomic&lt;void*&gt;</code> and types like
348a2dc1f3fSmrg  <code class="classname">std::atomic&lt;R(*)()&gt;</code> was deprecated.
349a2dc1f3fSmrg</p><p>
350a2dc1f3fSmrg  The <code class="function">std::uncaught_exception</code> function was deprecated
351a2dc1f3fSmrg  for C++17 mode.
352a2dc1f3fSmrg</p><p>
353a2dc1f3fSmrg  The nested typedefs <span class="type">std::hash::result_type</span> and
354a2dc1f3fSmrg  <span class="type">std::hash::argument_type</span> were deprecated for C++17 mode.
355a2dc1f3fSmrg</p><p>
356a2dc1f3fSmrg  The deprecated iostream members <span class="type">ios_base::io_state</span>,
357a2dc1f3fSmrg  <span class="type">ios_base::open_mode</span>, <span class="type">ios_base::seek_dir</span>, and
358a2dc1f3fSmrg  <code class="function">basic_streambuf::stossc</code> were removed for C++17 mode.
359a2dc1f3fSmrg</p><p>
360a2dc1f3fSmrg  The non-standard C++0x <code class="function">std::copy_exception</code> function
361a2dc1f3fSmrg  was removed.
362a2dc1f3fSmrg</p><p>
363a2dc1f3fSmrg  For <code class="option">-std=c++11</code>, <code class="option">-std=c++14</code>, and
364a2dc1f3fSmrg  <code class="option">-std=c++17</code> modes the <code class="filename">&lt;complex.h&gt;</code>
365a2dc1f3fSmrg  header no longer includes the C99 <code class="filename">&lt;complex.h&gt;</code>
366a2dc1f3fSmrg  header.
367a2dc1f3fSmrg</p><p>
368a2dc1f3fSmrg  For the non-default <code class="option">--enable-symvers=gnu-versioned-namespace</code>
369a2dc1f3fSmrg  configuration, the shared library SONAME has been changed to
370a2dc1f3fSmrg  <code class="filename">libstdc++.so.8</code>.
371*23f5f463Smrg</p><p>
372*23f5f463Smrg  The extension allowing containers to be instantiated with an allocator
373*23f5f463Smrg  that doesn't match the container's value type is no longer allowed in
374*23f5f463Smrg  strict (<code class="option">-std=c++NN</code>) modes, only in
375*23f5f463Smrg  <code class="option">-std=gnu++NN</code> modes.
376c0a68be4Smrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_91"></a><code class="constant">9</code></h3></div></div></div><p>
377c0a68be4Smrg  C++17 header
378c0a68be4Smrg  <code class="filename">&lt;memory_resource&gt;</code>
379c0a68be4Smrg  added.
380c0a68be4Smrg</p><p>
381c0a68be4Smrg  Experimental C++2a support improved, with new headers
382c0a68be4Smrg  <code class="filename">&lt;bit&gt;</code> and
383c0a68be4Smrg  <code class="filename">&lt;version&gt;</code> added.
384c0a68be4Smrg  Support for new character type <span class="type">char8_t</span> added
385c0a68be4Smrg  to <code class="classname">char_traits</code>, <code class="classname">basic_string</code>,
386c0a68be4Smrg  <code class="classname">numeric_limits</code>,
387c0a68be4Smrg  and relevant locale facets and type traits.
388c0a68be4Smrg</p><p>
389c0a68be4Smrg  Experimental implementation of the Networking TS library added,
390c0a68be4Smrg  with new headers
391c0a68be4Smrg  <code class="filename">&lt;experimental/buffer&gt;</code>,
392c0a68be4Smrg  <code class="filename">&lt;experimental/executor&gt;</code>,
393c0a68be4Smrg  <code class="filename">&lt;experimental/internet&gt;</code>,
394c0a68be4Smrg  <code class="filename">&lt;experimental/io_context&gt;</code>,
395c0a68be4Smrg  <code class="filename">&lt;experimental/net&gt;</code>,
396c0a68be4Smrg  <code class="filename">&lt;experimental/netfwd&gt;</code>,
397c0a68be4Smrg  <code class="filename">&lt;experimental/socket&gt;</code>,
398c0a68be4Smrg  and
399c0a68be4Smrg  <code class="filename">&lt;experimental/timer&gt;</code>.
4008feb0f0bSmrg</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_101"></a><code class="constant">10</code></h3></div></div></div><p> Deprecated features removed:
4018feb0f0bSmrg</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> Profile Mode </li><li class="listitem"><code class="classname">__gnu_cxx::array_allocator</code></li></ul></div><p>
4028feb0f0bSmrg</p><p>
4038feb0f0bSmrg  The non-standard <code class="function">std::__is_nullptr_t</code> type trait
4048feb0f0bSmrg  was deprecated.
4058feb0f0bSmrg</p><p>
4068feb0f0bSmrg  The <code class="classname">std::packaged_task</code> constructors taking
4078feb0f0bSmrg  an allocator argument are only defined for C++11 and C++14.
4088feb0f0bSmrg</p><p>
4098feb0f0bSmrg  Several members of <code class="classname">std::allocator</code> were removed
4108feb0f0bSmrg  for C++20 mode. The removed functionality has been provided by
4118feb0f0bSmrg  <code class="classname">std::allocator_traits</code> since C++11 and that should
4128feb0f0bSmrg  be used instead.
4138feb0f0bSmrg</p><p>
4148feb0f0bSmrg  The type of the <code class="classname">std::iterator</code> base class of
4158feb0f0bSmrg  <code class="classname">std::istreambuf_iterator</code> was changed to be
4168feb0f0bSmrg  consistent for all <code class="option">-std</code> modes.
4178feb0f0bSmrg  Before GCC 10.1 the base class had one type in C++98 mode and a
4188feb0f0bSmrg  different type in C++11 and later modes. The type in C++98 mode
4198feb0f0bSmrg  was changed to be the same as for C++11 and later.
4208feb0f0bSmrg</p><p>
4218feb0f0bSmrg  Experimental C++2a support improved, with new headers
4228feb0f0bSmrg  <code class="filename">&lt;concepts&gt;</code>,
4238feb0f0bSmrg  <code class="filename">&lt;ranges&gt;</code>,
4248feb0f0bSmrg  <code class="filename">&lt;compare&gt;</code>,
4258feb0f0bSmrg  <code class="filename">&lt;coroutine&gt;</code>,
4268feb0f0bSmrg  <code class="filename">&lt;numbers&gt;</code>,
4278feb0f0bSmrg  <code class="filename">&lt;span&gt;</code>,
4288feb0f0bSmrg  and
4298feb0f0bSmrg  <code class="filename">&lt;stop_token&gt;</code>
4308feb0f0bSmrg  added.
431*23f5f463Smrg</p><p>
432*23f5f463Smrg  The extension allowing containers to be instantiated with an allocator
433*23f5f463Smrg  that doesn't match the container's value type is no longer allowed in
434*23f5f463Smrg  C++20 mode, even in non-strict <code class="option">-std=gnu++20</code> mode.
43536ac495dSmrg</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ABI Policy and Guidelines </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Backwards Compatibility</td></tr></table></div></body></html>