]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/doc/html/manual/api.html
libstdc++: Disable volatile-qualified std::bind for C++20
[gcc.git] / libstdc++-v3 / doc / html / manual / api.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!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. 
3 Porting and Maintenance
4
5 </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>
6 A list of user-visible changes, in chronological order
7 </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>
8 Extensions moved to <code class="filename">include/ext</code>.
9 </p><p>
10 Include files from the SGI/HP sources that pre-date the ISO standard
11 are added. These files are placed into
12 the <code class="filename">include/backward</code> directory and a deprecated warning
13 is added that notifies on inclusion (<code class="literal">-Wno-deprecated</code>
14 deactivates the warning.)
15 </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>.
16 </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>
17 </p><p>
18 Extensions from SGI/HP moved from <code class="code">namespace std</code>
19 to <code class="code">namespace __gnu_cxx</code>. As part of this, the following
20 new includes are
21 added: <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>.
22 </p><p>
23 Extensions 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>.
24 </p><p>
25 Extensions to tree data structures added in <code class="filename">&lt;ext/rb_tree&gt;</code>.
26 </p><p>
27 Removal of <code class="filename">&lt;ext/tree&gt;</code>, moved to <code class="filename">&lt;backward/tree.h&gt;</code>.
28 </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>
29 </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
30 <code class="literal">__USE_MALLOC</code> on the gcc command line would change the
31 default allocation strategy to instead use <code class="code">malloc</code> and
32 <code class="code">free</code>. For the 3.2 and 3.3 release series the same
33 functionality was spelled <code class="literal">_GLIBCXX_FORCE_NEW</code>. From
34 GCC 3.4 onwards the default allocator uses <code class="code">new</code> anyway,
35 but for the optional pooling allocators the functionality is enabled by
36 setting <code class="literal">GLIBCXX_FORCE_NEW</code> in the environment, see
37 <a class="link" href="mt_allocator.html" title="Chapter 19. The mt_allocator">the mt allocator chapter</a>
38 for details.
39 </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>
40 </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>
41 </p><p>
42 Large file support.
43 </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>.
44 </p><p>
45 Support 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.
46 </p><p>
47 Support for <code class="code">char_traits</code> beyond builtin types.
48 </p><p>
49 Conformant <code class="code">allocator</code> class and usage in containers. As
50 part of this, the following extensions are
51 added: <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>.
52 </p><p>
53 This is a change from all previous versions, and may require
54 source-level changes due to allocator-related changes to structures
55 names and template parameters, filenames, and file locations. Some,
56 like <code class="code">__simple_alloc, __allocator, __alloc, </code> and <code class="code">
57 _Alloc_traits</code> have been removed.
58 </p><p>Default behavior of <code class="code">std::allocator</code> has changed.</p><p>
59 Previous versions prior to 3.4 cache allocations in a memory
60 pool, instead of passing through to call the global allocation
61 operators (i.e., <code class="classname">__gnu_cxx::pool_allocator</code>). More
62 recent versions default to the
63 simpler <code class="classname">__gnu_cxx::new_allocator</code>.
64 </p><p> Previously, all allocators were written to the SGI
65 style, and all STL containers expected this interface. This
66 interface had a traits class called <code class="code">_Alloc_traits</code> that
67 attempted to provide more information for compile-time allocation
68 selection and optimization. This traits class had another allocator
69 wrapper, <code class="code">__simple_alloc&lt;T,A&gt;</code>, which was a
70 wrapper around another allocator, A, which itself is an allocator
71 for instances of T. But wait, there's more:
72 <code class="code">__allocator&lt;T,A&gt;</code> is another adapter. Many of
73 the provided allocator classes were SGI style: such classes can be
74 changed to a conforming interface with this wrapper:
75 <code class="code">__allocator&lt;T, __alloc&gt;</code> is thus the same as
76 <code class="code">allocator&lt;T&gt;</code>.
77 </p><p> The class <code class="classname">allocator</code> used the typedef
78 <span class="type">__alloc</span> to select an underlying allocator that
79 satisfied memory allocation requests. The selection of this
80 underlying allocator was not user-configurable.
81 </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
82 of available allocators. All of these new allocators are
83 standard-style. The following table includes details, along with
84 the first released version of GCC that included the extension allocator.
85 </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>
86 Debug mode first appears.
87 </p><p>
88 Precompiled header support <acronym class="acronym">PCH</acronym> support.
89 </p><p>
90 Macro guard for changed, from <code class="literal">_GLIBCPP_</code> to <code class="literal">_GLIBCXX_</code>.
91 </p><p>
92 Extension <code class="filename">&lt;ext/stdio_sync_filebuf.h&gt;</code> added.
93 </p><p>
94 Extension <code class="filename">&lt;ext/demangle.h&gt;</code> added.
95 </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>
96 </p><p>
97 TR1 features first appear.
98 </p><p>
99 Extension allocator <code class="filename">&lt;ext/array_allocator.h&gt;</code> added.
100 </p><p>
101 Extension <code class="code">codecvt</code> specializations moved to <code class="filename">&lt;ext/codecvt_specializations.h&gt;</code>.
102 </p><p>
103 Removal of <code class="filename">&lt;ext/demangle.h&gt;</code>.
104 </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>
105 </p><p>
106 Removal 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.
107 </p><p> Extensions for policy-based data structures first added. New includes,
108 types, namespace <code class="code">pb_assoc</code>.
109 </p><p> Extensions for typelists added in <code class="filename">&lt;ext/typelist.h&gt;</code>.
110 </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>.
111 </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>
112 </p><p> Default visibility attributes applied to <code class="code">namespace std</code>. Support for <code class="code">-fvisibility</code>.
113 </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
114 into <code class="filename">&lt;ext/concurrence.h&gt;</code> and <code class="filename">&lt;ext/atomicity.h&gt;</code>,
115 including change of namespace to <code class="code">__gnu_cxx</code> in some
116 cases. Added types
117 include <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
118 into <code class="filename">&lt;ext/type_traits.h&gt;</code>. Additional traits are added
119 (<code class="code">__conditional_type</code>, <code class="code">__enable_if</code>, others.)
120 </p><p> Extensions for policy-based data structures revised. New includes,
121 types, namespace moved to <code class="code">__pb_ds</code>.
122 </p><p> Extensions for debug mode modified: now nested in <code class="code">namespace
123 std::__debug</code> and extensions in <code class="code">namespace
124 __gnu_cxx::__debug</code>.</p><p> Extensions added: <code class="filename">&lt;ext/typelist.h&gt;</code>
125 and <code class="filename">&lt;ext/throw_allocator.h&gt;</code>.
126 </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>
127 </p><p>
128 C++0X features first appear.
129 </p><p>TR1 <code class="filename">&lt;regex&gt;</code> and <code class="filename">&lt;cmath&gt;</code>'s mathematical special function added.
130 </p><p>
131 Backward include edit.
132 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Removed</p><p>
133 <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>
134 <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>
135 <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>
136 <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>
137 <code class="filename">&lt;tree.h&gt;</code> <code class="filename">&lt;vector.h&gt;</code>
138 </p></li><li class="listitem"><p>Added</p><p>
139 <code class="filename">&lt;hash_map&gt;</code> and <code class="filename">&lt;hash_set&gt;</code>
140 </p></li><li class="listitem"><p>Added in C++11</p><p>
141 <code class="filename">&lt;auto_ptr.h&gt;</code> and <code class="filename">&lt;binders.h&gt;</code>
142 </p></li></ul></div><p>
143 Header dependency streamlining.
144 </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>
145 Debug mode for <code class="filename">&lt;unordered_map&gt;</code> and <code class="filename">&lt;unordered_set&gt;</code>.
146 </p><p>
147 Parallel mode first appears.
148 </p><p>Variadic template implementations of items in <code class="filename">&lt;tuple&gt;</code> and
149 <code class="filename">&lt;functional&gt;</code>.
150 </p><p>Default <code class="code">what</code> implementations give more elaborate
151 exception strings for <code class="code">bad_cast</code>,
152 <code class="code">bad_typeid</code>, <code class="code">bad_exception</code>, and
153 <code class="code">bad_alloc</code>.
154 </p><p>
155 PCH binary files no longer installed. Instead, the source files are installed.
156 </p><p>
157 Namespace pb_ds moved to __gnu_pb_ds.
158 </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>
159 </p><p>
160 C++0X features.
161 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
162 Added.
163 </p><p>
164 <code class="filename">&lt;atomic&gt;</code>,
165 <code class="filename">&lt;chrono&gt;</code>,
166 <code class="filename">&lt;condition_variable&gt;</code>,
167 <code class="filename">&lt;forward_list&gt;</code>,
168 <code class="filename">&lt;initializer_list&gt;</code>,
169 <code class="filename">&lt;mutex&gt;</code>,
170 <code class="filename">&lt;ratio&gt;</code>,
171 <code class="filename">&lt;thread&gt;</code>
172 </p></li><li class="listitem"><p>
173 Updated and improved.
174 </p><p>
175 <code class="filename">&lt;algorithm&gt;</code>,
176 <code class="filename">&lt;system_error&gt;</code>,
177 <code class="filename">&lt;type_traits&gt;</code>
178 </p></li><li class="listitem"><p>
179 Use of the GNU extension namespace association converted to inline namespaces.
180 </p></li><li class="listitem"><p>
181 Preliminary support for <code class="classname">initializer_list</code>
182 and defaulted and deleted constructors in container classes.
183 </p></li><li class="listitem"><p>
184 <code class="classname">unique_ptr</code>.
185 </p></li><li class="listitem"><p>
186 Support for new character types <span class="type">char16_t</span>
187 and <span class="type">char32_t</span> added
188 to <code class="classname">char_traits</code>, <code class="classname">basic_string</code>, <code class="classname">numeric_limits</code>,
189 and assorted compile-time type traits.
190 </p></li><li class="listitem"><p>
191 Support for string conversions <code class="function">to_string</code>
192 and <code class="function">to_wstring</code>.
193 </p></li><li class="listitem"><p>
194 Member functions taking string arguments were added to iostreams
195 including <code class="classname">basic_filebuf</code>, <code class="classname">basic_ofstream</code>,
196 and <code class="classname">basic_ifstream</code>.
197 </p></li><li class="listitem"><p>
198 Exception propagation support,
199 including <code class="classname">exception_ptr</code>, <code class="function">current_exception</code>, <code class="function">copy_exception</code>,
200 and <code class="function">rethrow_exception</code>.
201 </p></li></ul></div><p>
202 Uglification of <code class="literal">try</code> to <code class="literal">__try</code>
203 and <code class="literal">catch</code> to <code class="literal">__catch</code>.
204 </p><p>
205 Audit of internal mutex usage, conversion to functions returning static
206 local mutex.
207 </p><p> Extensions
208 added: <code class="filename">&lt;ext/pointer.h&gt;</code>
209 and <code class="filename">&lt;ext/extptr_allocator.h&gt;</code>. Support
210 for non-standard pointer types has been added
211 to <code class="classname">vector</code>
212 and <code class="classname">forward_list</code>.
213 </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>
214 </p><p>
215 C++0X features.
216 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
217 Added.
218 </p><p>
219 <code class="filename">&lt;functional&gt;</code>,
220 <code class="filename">&lt;future&gt;</code>,
221 <code class="filename">&lt;random&gt;</code>
222 </p></li><li class="listitem"><p>
223 Updated and improved.
224 </p><p>
225 <code class="filename">&lt;atomic&gt;</code>,
226 <code class="filename">&lt;system_error&gt;</code>,
227 <code class="filename">&lt;type_traits&gt;</code>
228 </p></li><li class="listitem"><p>
229 Add support for explicit operators and standard layout types.
230 </p></li></ul></div><p>
231 Profile mode first appears.
232 </p><p>
233 Support for decimal floating-point arithmetic, including <code class="classname">decimal32</code>, <code class="classname">decimal64</code>, and <code class="classname">decimal128</code>.
234 </p><p>
235 Python pretty-printers are added for use with appropriately-advanced versions of <span class="command"><strong>gdb</strong></span>.
236 </p><p>
237 Audit for application of function attributes nothrow, const, pure, and noreturn.
238 </p><p>
239 The default behavior for comparing typeinfo names changed, so
240 in <code class="filename">&lt;typeinfo&gt;</code>, <code class="literal">__GXX_MERGED_TYPEINFO_NAMES</code>
241 now defaults to zero.
242 </p><p> Extensions modified: <code class="filename">&lt;ext/throw_allocator.h&gt;</code>.
243 </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>
244 Use constexpr and nullptr where appropriate throughout the library.
245 </p><p>
246 The library was updated to avoid including
247 <code class="filename">&lt;stddef.h&gt;</code> in order
248 to reduce namespace pollution.
249 </p><p>Reference-count annotations to assist data race detectors.
250 </p><p>
251 Added <code class="function">make_exception_ptr</code> as an alias of
252 <code class="function">copy_exception</code>.
253 </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>
254 <code class="classname">monotonic_clock</code> renamed to
255 <code class="classname">steady_clock</code> as required by the final C++11
256 standard.
257 </p><p>A new clocale model for newlib is available.</p><p>
258 The library was updated to avoid including
259 <code class="filename">&lt;unistd.h&gt;</code> in order
260 to reduce namespace pollution.
261 </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>
262 New random number engines and distributions.
263 Optimisations for random.
264 </p><p>New --enable-libstdcxx-verbose configure option</p><p>
265 The --enable-libstdcxx-time configure option becomes unnecessary given a
266 sufficiently recent glibc.
267 </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>
268 ABI transition adds new implementations of several components, using the
269 <code class="code">abi_tag</code> attribute and the <code class="code">__cxx11</code> inline
270 namespace to distinguish the new entities from the old ones.
271 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
272 Use of the new or old ABI can be selected per-translation unit with the
273 <a class="xref" href="using_macros.html" title="Macros">Macros</a>.
274 </p></li><li class="listitem"><p>
275 New non-reference-counted <code class="classname">string</code> implementation.
276 </p></li><li class="listitem"><p>
277 New <code class="classname">list</code> implementation containing a new
278 data member in order to provide O(1) <code class="function">size()</code>.
279 </p></li><li class="listitem"><p>
280 New <code class="classname">ios_base::failure</code> implementation inheriting
281 from <code class="classname">system_error</code>.
282 </p></li></ul></div><p>
283 C++11 support completed (movable iostreams, new I/O manipulators,
284 Unicode conversion utilities, atomic operations for
285 <code class="classname">shared_ptr</code>, functions for notifying condition
286 variables and making futures ready at thread exit).
287 </p><p>
288 Changed formatting of floating point types when
289 <code class="code">ios_base::fixed|ios_base::scientific</code> is set in a stream's
290 format flags.
291 </p><p> Improved C++14 support and TS implementations. </p><p> New random number engines and distributions. </p><p>
292 GDB Xmethods for containers and <code class="classname">unique_ptr</code> added.
293 </p><p>
294 <code class="classname">has_trivial_default_constructor</code>,
295 <code class="classname">has_trivial_copy_constructor</code> and
296 <code class="classname">has_trivial_copy_assign</code> deprecated.
297 </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>
298 Support for mathematical special functions (ISO/IEC 29124:2010) added.
299 </p><p>
300 Assertions to check function preconditions can be enabled by defining the
301 <a class="link" href="using_macros.html" title="Macros"><span class="symbol">_GLIBCXX_ASSERTIONS</span>
302 macro</a>.
303 The initial set of assertions are a subset of the checks enabled by
304 the Debug Mode, but without the ABI changes and changes to algorithmic
305 complexity that are caused by enabling the full Debug Mode.
306 </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>
307 The type of exception thrown by iostreams changed to the <code class="code">cxx11</code>
308 ABI version of <code class="classname">std::ios_base::failure</code>.
309 </p><p>
310 Experimental C++17 support added, including most new library features.
311 The meaning of <code class="classname">shared_ptr&lt;T[]&gt;</code> changed to
312 match the C++17 semantics.
313 </p><p>
314 <a class="xref" href="using_macros.html" title="Macros">Macros</a> added.
315 </p><p>
316 <code class="classname">has_trivial_default_constructor</code>,
317 <code class="classname">has_trivial_copy_constructor</code> and
318 <code class="classname">has_trivial_copy_assign</code> removed.
319 </p><p>
320 Calling a <code class="code">std::bind</code> result as volatile was deprecated for C++17.
321 </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>
322 Library Fundamentals TS header
323 <code class="filename">&lt;experimental/source_location&gt;</code>
324 added.
325 </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>
326 Including new C++14 or C++17 headers without a suitable <code class="option">-std</code>
327 no longer causes compilation to fail via <code class="literal">#error</code>.
328 Instead the header is simply empty and doesn't define anything.
329 </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>
330 The exceptions thrown by iostreams can now be caught by handlers for either
331 version of <code class="classname">std::ios_base::failure</code>.
332 </p><p>
333 Improved experimental C++17 support. Headers
334 <code class="filename">&lt;charconv&gt;</code> and
335 <code class="filename">&lt;filesystem&gt;</code>.
336 Experimental implementation of the C++17 Filesystem library added.
337 </p><p>
338 Experimental C++2a support
339 (<code class="function">to_address</code> and <code class="classname">endian</code>).
340 </p><p>
341 AddressSanitizer annotations added to <code class="classname">std::vector</code>
342 to detect out-of-range accesses to the unused capacity of a vector.
343 </p><p>
344 <code class="function">std::char_traits&lt;char16_t&gt;::to_int_type(u'\uFFFF')</code>
345 now returns <code class="literal">0xFFFD</code>, as <code class="literal">0xFFFF</code> is
346 used for <code class="function">std::char_traits&lt;char16_t&gt;::eof()</code>.
347 </p><p>
348 The extension allowing arithmetic on
349 <code class="classname">std::atomic&lt;void*&gt;</code> and types like
350 <code class="classname">std::atomic&lt;R(*)()&gt;</code> was deprecated.
351 </p><p>
352 The <code class="function">std::uncaught_exception</code> function was deprecated
353 for C++17 mode.
354 </p><p>
355 The nested typedefs <span class="type">std::hash::result_type</span> and
356 <span class="type">std::hash::argument_type</span> were deprecated for C++17 mode.
357 </p><p>
358 The deprecated iostream members <span class="type">ios_base::io_state</span>,
359 <span class="type">ios_base::open_mode</span>, <span class="type">ios_base::seek_dir</span>, and
360 <code class="function">basic_streambuf::stossc</code> were removed for C++17 mode.
361 </p><p>
362 The non-standard C++0x <code class="function">std::copy_exception</code> function
363 was removed.
364 </p><p>
365 For <code class="option">-std=c++11</code>, <code class="option">-std=c++14</code>, and
366 <code class="option">-std=c++17</code> modes the <code class="filename">&lt;complex.h&gt;</code>
367 header no longer includes the C99 <code class="filename">&lt;complex.h&gt;</code>
368 header.
369 </p><p>
370 For the non-default <code class="option">--enable-symvers=gnu-versioned-namespace</code>
371 configuration, the shared library SONAME has been changed to
372 <code class="filename">libstdc++.so.8</code>.
373 </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>
374 C++17 header
375 <code class="filename">&lt;memory_resource&gt;</code>
376 added.
377 </p><p>
378 Experimental C++2a support improved, with new headers
379 <code class="filename">&lt;bit&gt;</code> and
380 <code class="filename">&lt;version&gt;</code> added.
381 Support for new character type <span class="type">char8_t</span> added
382 to <code class="classname">char_traits</code>, <code class="classname">basic_string</code>,
383 <code class="classname">numeric_limits</code>,
384 and relevant locale facets and type traits.
385 </p><p>
386 Experimental implementation of the Networking TS library added,
387 with new headers
388 <code class="filename">&lt;experimental/buffer&gt;</code>,
389 <code class="filename">&lt;experimental/executor&gt;</code>,
390 <code class="filename">&lt;experimental/internet&gt;</code>,
391 <code class="filename">&lt;experimental/io_context&gt;</code>,
392 <code class="filename">&lt;experimental/net&gt;</code>,
393 <code class="filename">&lt;experimental/netfwd&gt;</code>,
394 <code class="filename">&lt;experimental/socket&gt;</code>,
395 and
396 <code class="filename">&lt;experimental/timer&gt;</code>.
397 </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:
398 </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>
399 </p><p>
400 The non-standard <code class="function">std::__is_nullptr_t</code> type trait
401 was deprecated.
402 </p><p>
403 The <code class="classname">std::packaged_task</code> constructors taking
404 an allocator argument are only defined for C++11 and C++14.
405 </p><p>
406 Several members of <code class="classname">std::allocator</code> were removed
407 for C++20 mode. The removed functionality has been provided by
408 <code class="classname">std::allocator_traits</code> since C++11 and that should
409 be used instead.
410 </p><p>
411 The type of the <code class="classname">std::iterator</code> base class of
412 <code class="classname">std::istreambuf_iterator</code> was changed to be
413 consistent for all <code class="option">-std</code> modes.
414 Before GCC 10.1 the base class had one type in C++98 mode and a
415 different type in C++11 and later modes. The type in C++98 mode
416 was changed to be the same as for C++11 and later.
417 </p><p>
418 Experimental C++2a support improved, with new headers
419 <code class="filename">&lt;concepts&gt;</code>,
420 <code class="filename">&lt;ranges&gt;</code>,
421 <code class="filename">&lt;compare&gt;</code>,
422 <code class="filename">&lt;coroutine&gt;</code>,
423 <code class="filename">&lt;numbers&gt;</code>,
424 <code class="filename">&lt;span&gt;</code>,
425 and
426 <code class="filename">&lt;stop_token&gt;</code>
427 added.
428 </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_111"></a><code class="constant">11</code></h3></div></div></div><p>
429 The <code class="option">--enable-cheaders=c_std</code> configuration
430 was deprecated.
431 </p><p>
432 When compiling as C++20, the <code class="function">operator&gt;&gt;</code> overloads
433 for extracting strings into character buffers only work with arrays,
434 not raw pointers.
435 </p><p>
436 <code class="code">std::string::reserve(n)</code> will no longer reduce
437 the string's capacity.
438 Calling <code class="function">reserve()</code> with no arguments is equivalent
439 to <code class="function">shrink_to_fit()</code>, but is deprecated.
440 <code class="function">shrink_to_fit()</code> should be used instead.
441 </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_121"></a><code class="constant">12</code></h3></div></div></div><p>
442 The <code class="function">std::random_shuffle</code> algorithms are deprecated
443 for C++14 and later. The C++11 <code class="function">std::shuffle</code> algorithm
444 can be used instead.
445 </p><p>
446 The <code class="function">std::unexpected</code> function and related typedef and
447 accessors for the unexpected handler are deprecated for C++11 and later.
448 Dynamic exception specifications should be replaced with <code class="code">noexcept</code>.
449 </p><p>
450 C++98 adaptable function utilities
451 (<code class="code">std::bind1st</code>, <code class="code">std::unary_function</code>,
452 <code class="code">std::ptr_fun</code>, <code class="code">std::mem_fun_ref</code> etc.)
453 were deprecated for C++11.
454 <code class="code">std::iterator</code>, <code class="code">std::raw_storage_iterator</code>,
455 <code class="code">get_temporary_buffer</code>, and <code class="code">std::not_fun</code>
456 were deprecated for C++17.
457 </p><p>
458 Non-standard <code class="code">std::pair</code> constructors were deprecated.
459 A non-standard default argument for
460 <code class="code">vector&lt;bool&gt;::insert(const_iterator, const bool&amp;)</code>
461 was deprecated.
462 </p><p>
463 The <code class="literal">bitmap</code>, <code class="literal">mt</code>, and <code class="literal">pool</code>
464 options for <code class="option">--enable-libstdcxx-allocator</code> were removed.
465 For the <code class="literal">new</code> option, <code class="classname">std::allocator</code>
466 no longer derives from <code class="classname">__gnu_cxx::new_allocator</code>;
467 they both derive from <code class="classname">std::__new_allocator</code> instead.
468 </p><p>
469 <code class="function">std::condition_variable::wait</code> changed to be
470 <code class="code">noexcept(false)</code> to allow thread cancellation exceptions to
471 be thrown from <code class="function">pthread_cond_wait</code> without aborting
472 the process.
473 </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_123"></a><code class="constant">12.3</code></h3></div></div></div><p>
474 Calling a <code class="code">std::bind</code> result as volatile is ill-formed for C++20
475 and later.
476 </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>
This page took 0.061828 seconds and 5 git commands to generate.