]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/doc/xml/manual/evolution.xml
libstdc++: Fix non-reserved name in std::allocator base class [PR64135]
[gcc.git] / libstdc++-v3 / doc / xml / manual / evolution.xml
1 <section xmlns="http://docbook.org/ns/docbook" version="5.0"
2 xml:id="appendix.porting.api" xreflabel="api">
3 <?dbhtml filename="api.html"?>
4
5 <info><title>API Evolution and Deprecation History</title>
6 <keywordset>
7 <keyword>ISO C++</keyword>
8 <keyword>api</keyword>
9 <keyword>evolution</keyword>
10 <keyword>deprecation</keyword>
11 <keyword>history</keyword>
12 </keywordset>
13 </info>
14
15
16 <para>
17 A list of user-visible changes, in chronological order
18 </para>
19
20 <section xml:id="api.rel_300"><info><title><constant>3.0</constant></title></info>
21
22
23 <para>
24 Extensions moved to <filename class="directory">include/ext</filename>.
25 </para>
26
27 <para>
28 Include files from the SGI/HP sources that pre-date the ISO standard
29 are added. These files are placed into
30 the <filename class="directory">include/backward</filename> directory and a deprecated warning
31 is added that notifies on inclusion (<literal>-Wno-deprecated</literal>
32 deactivates the warning.)
33 </para>
34
35 <para>Deprecated include <filename class="headerfile">&lt;backward/strstream&gt;</filename> added.</para>
36
37 <para>Removal of include <filename class="headerfile">&lt;builtinbuf.h&gt;</filename>, <filename class="headerfile">&lt;indstream.h&gt;</filename>, <filename class="headerfile">&lt;parsestream.h&gt;</filename>, <filename class="headerfile">&lt;PlotFile.h&gt;</filename>, <filename class="headerfile">&lt;SFile.h&gt;</filename>, <filename class="headerfile">&lt;stdiostream.h&gt;</filename>, and <filename class="headerfile">&lt;stream.h&gt;</filename>.
38 </para>
39
40
41
42 </section>
43
44 <section xml:id="api.rel_310"><info><title><constant>3.1</constant></title></info>
45
46 <para>
47 </para>
48
49 <para>
50 Extensions from SGI/HP moved from <code>namespace std</code>
51 to <code>namespace __gnu_cxx</code>. As part of this, the following
52 new includes are
53 added: <filename class="headerfile">&lt;ext/algorithm&gt;</filename>, <filename class="headerfile">&lt;ext/functional&gt;</filename>, <filename class="headerfile">&lt;ext/iterator&gt;</filename>, <filename class="headerfile">&lt;ext/memory&gt;</filename>, and <filename class="headerfile">&lt;ext/numeric&gt;</filename>.
54 </para>
55
56 <para>
57 Extensions to <code>basic_filebuf</code> introduced: <code>__gnu_cxx::enc_filebuf</code>, and <code>__gnu_cxx::stdio_filebuf</code>.
58 </para>
59
60 <para>
61 Extensions to tree data structures added in <filename class="headerfile">&lt;ext/rb_tree&gt;</filename>.
62 </para>
63
64 <para>
65 Removal of <filename class="headerfile">&lt;ext/tree&gt;</filename>, moved to <filename class="headerfile">&lt;backward/tree.h&gt;</filename>.
66 </para>
67
68 </section>
69
70 <section xml:id="api.rel_320"><info><title><constant>3.2</constant></title></info>
71
72 <para>
73 </para>
74 <para>Symbol versioning introduced for shared library.</para>
75
76 <para>Removal of include <filename class="headerfile">&lt;backward/strstream.h&gt;</filename>.</para>
77
78 <para>Allocator changes. Change <code>__malloc_alloc</code> to <code>malloc_allocator</code> and <code>__new_alloc</code> to <code>new_allocator</code>. </para>
79
80 <para> For GCC releases from 2.95 through the 3.1 series, defining
81 <literal>__USE_MALLOC</literal> on the gcc command line would change the
82 default allocation strategy to instead use <code>malloc</code> and
83 <code>free</code>. For the 3.2 and 3.3 release series the same
84 functionality was spelled <literal>_GLIBCXX_FORCE_NEW</literal>. From
85 GCC 3.4 onwards the default allocator uses <code>new</code> anyway,
86 but for the optional pooling allocators the functionality is enabled by
87 setting <literal>GLIBCXX_FORCE_NEW</literal> in the environment, see
88 <link linkend="manual.ext.allocator.mt">the mt allocator chapter</link>
89 for details.
90 </para>
91
92
93 <para>Error handling in iostreams cleaned up, made consistent. </para>
94
95
96 </section>
97
98 <section xml:id="api.rel_330"><info><title><constant>3.3</constant></title></info>
99
100 <para>
101 </para>
102 </section>
103
104 <section xml:id="api.rel_340"><info><title><constant>3.4</constant></title></info>
105
106 <para>
107 </para>
108 <para>
109 Large file support.
110 </para>
111
112 <para> Extensions for generic characters and <code>char_traits</code> added in <filename class="headerfile">&lt;ext/pod_char_traits.h&gt;</filename>.
113 </para>
114
115 <para>
116 Support for <code>wchar_t</code> specializations of <code>basic_filebuf</code> enhanced to support <code>UTF-8</code> and <code>Unicode</code>, depending on host. More hosts support basic <code>wchar_t</code> functionality.
117 </para>
118
119 <para>
120 Support for <code>char_traits</code> beyond builtin types.
121 </para>
122
123 <para>
124 Conformant <code>allocator</code> class and usage in containers. As
125 part of this, the following extensions are
126 added: <filename class="headerfile">&lt;ext/bitmap_allocator.h&gt;</filename>, <filename class="headerfile">&lt;ext/debug_allocator.h&gt;</filename>, <filename class="headerfile">&lt;ext/mt_allocator.h&gt;</filename>, <filename class="headerfile">&lt;ext/malloc_allocator.h&gt;</filename>,<filename class="headerfile">&lt;ext/new_allocator.h&gt;</filename>, <filename class="headerfile">&lt;ext/pool_allocator.h&gt;</filename>.
127 </para>
128
129 <para>
130 This is a change from all previous versions, and may require
131 source-level changes due to allocator-related changes to structures
132 names and template parameters, filenames, and file locations. Some,
133 like <code>__simple_alloc, __allocator, __alloc, </code> and <code>
134 _Alloc_traits</code> have been removed.
135 </para>
136
137 <para>Default behavior of <code>std::allocator</code> has changed.</para>
138
139 <para>
140 Previous versions prior to 3.4 cache allocations in a memory
141 pool, instead of passing through to call the global allocation
142 operators (i.e., <classname>__gnu_cxx::pool_allocator</classname>). More
143 recent versions default to the
144 simpler <classname>__gnu_cxx::new_allocator</classname>.
145 </para>
146
147 <para> Previously, all allocators were written to the SGI
148 style, and all STL containers expected this interface. This
149 interface had a traits class called <code>_Alloc_traits</code> that
150 attempted to provide more information for compile-time allocation
151 selection and optimization. This traits class had another allocator
152 wrapper, <code>__simple_alloc&lt;T,A&gt;</code>, which was a
153 wrapper around another allocator, A, which itself is an allocator
154 for instances of T. But wait, there's more:
155 <code>__allocator&lt;T,A&gt;</code> is another adapter. Many of
156 the provided allocator classes were SGI style: such classes can be
157 changed to a conforming interface with this wrapper:
158 <code>__allocator&lt;T, __alloc&gt;</code> is thus the same as
159 <code>allocator&lt;T&gt;</code>.
160 </para>
161
162 <para> The class <classname>allocator</classname> used the typedef
163 <type>__alloc</type> to select an underlying allocator that
164 satisfied memory allocation requests. The selection of this
165 underlying allocator was not user-configurable.
166 </para>
167
168 <table frame="all" xml:id="table.extension_allocators">
169 <title>Extension Allocators</title>
170
171 <tgroup cols="4" align="left" colsep="1" rowsep="1">
172 <colspec colname="c1"/>
173 <colspec colname="c2"/>
174 <colspec colname="c3"/>
175 <colspec colname="c4"/>
176
177 <thead>
178 <row>
179 <entry>Allocator (3.4)</entry>
180 <entry>Header (3.4)</entry>
181 <entry>Allocator (3.[0-3])</entry>
182 <entry>Header (3.[0-3])</entry>
183 </row>
184 </thead>
185
186 <tbody>
187 <row>
188 <entry><classname>__gnu_cxx::new_allocator&lt;T&gt;</classname></entry>
189 <entry><filename class="headerfile">&lt;ext/new_allocator.h&gt;</filename></entry>
190 <entry><classname>std::__new_alloc</classname></entry>
191 <entry><filename class="headerfile">&lt;memory&gt;</filename></entry>
192 </row>
193 <row>
194 <entry><classname>__gnu_cxx::malloc_allocator&lt;T&gt;</classname></entry>
195 <entry><filename class="headerfile">&lt;ext/malloc_allocator.h&gt;</filename></entry>
196 <entry><classname>std::__malloc_alloc_template&lt;int&gt;</classname></entry>
197 <entry><filename class="headerfile">&lt;memory&gt;</filename></entry>
198 </row>
199 <row>
200 <entry><classname>__gnu_cxx::debug_allocator&lt;T&gt;</classname></entry>
201 <entry><filename class="headerfile">&lt;ext/debug_allocator.h&gt;</filename></entry>
202 <entry><classname>std::debug_alloc&lt;T&gt;</classname></entry>
203 <entry><filename class="headerfile">&lt;memory&gt;</filename></entry>
204 </row>
205 <row>
206 <entry><classname>__gnu_cxx::__pool_alloc&lt;T&gt;</classname></entry>
207 <entry><filename class="headerfile">&lt;ext/pool_allocator.h&gt;</filename></entry>
208 <entry><classname>std::__default_alloc_template&lt;bool,int&gt;</classname></entry>
209 <entry><filename class="headerfile">&lt;memory&gt;</filename></entry>
210 </row>
211 <row>
212 <entry><classname>__gnu_cxx::__mt_alloc&lt;T&gt;</classname></entry>
213 <entry><filename class="headerfile">&lt;ext/mt_allocator.h&gt;</filename></entry>
214 <entry> </entry>
215 <entry> </entry>
216 </row>
217 <row>
218 <entry><classname>__gnu_cxx::bitmap_allocator&lt;T&gt;</classname></entry>
219 <entry><filename class="headerfile">&lt;ext/bitmap_allocator.h&gt;</filename></entry>
220 <entry> </entry>
221 <entry> </entry>
222 </row>
223 </tbody>
224 </tgroup>
225 </table>
226
227 <para> Releases after gcc-3.4 have continued to add to the collection
228 of available allocators. All of these new allocators are
229 standard-style. The following table includes details, along with
230 the first released version of GCC that included the extension allocator.
231 </para>
232
233 <table frame="all" xml:id="table.extension_allocators2">
234 <title>Extension Allocators Continued</title>
235
236 <tgroup cols="3" align="left" colsep="1" rowsep="1">
237 <colspec colname="c1"/>
238 <colspec colname="c2"/>
239 <colspec colname="c3"/>
240
241 <thead>
242 <row>
243 <entry>Allocator</entry>
244 <entry>Include</entry>
245 <entry>Version</entry>
246 </row>
247 </thead>
248
249 <tbody>
250 <row>
251 <entry><classname>__gnu_cxx::array_allocator&lt;T&gt;</classname></entry>
252 <entry><filename class="headerfile">&lt;ext/array_allocator.h&gt;</filename></entry>
253 <entry>4.0.0</entry>
254 </row>
255 <row>
256 <entry><classname>__gnu_cxx::throw_allocator&lt;T&gt;</classname></entry>
257 <entry><filename class="headerfile">&lt;ext/throw_allocator.h&gt;</filename></entry>
258 <entry>4.2.0</entry>
259 </row>
260 </tbody>
261 </tgroup>
262 </table>
263
264
265 <para>
266 Debug mode first appears.
267 </para>
268
269 <para>
270 Precompiled header support <acronym>PCH</acronym> support.
271 </para>
272
273 <para>
274 Macro guard for changed, from <literal>_GLIBCPP_</literal> to <literal>_GLIBCXX_</literal>.
275 </para>
276
277 <para>
278 Extension <filename class="headerfile">&lt;ext/stdio_sync_filebuf.h&gt;</filename> added.
279 </para>
280
281 <para>
282 Extension <filename class="headerfile">&lt;ext/demangle.h&gt;</filename> added.
283 </para>
284
285
286 </section>
287
288 <section xml:id="api.rel_400"><info><title><constant>4.0</constant></title></info>
289
290 <para>
291 </para>
292 <para>
293 TR1 features first appear.
294 </para>
295
296 <para>
297 Extension allocator <filename class="headerfile">&lt;ext/array_allocator.h&gt;</filename> added.
298 </para>
299
300 <para>
301 Extension <code>codecvt</code> specializations moved to <filename class="headerfile">&lt;ext/codecvt_specializations.h&gt;</filename>.
302 </para>
303
304 <para>
305 Removal of <filename class="headerfile">&lt;ext/demangle.h&gt;</filename>.
306 </para>
307
308
309 </section>
310
311 <section xml:id="api.rel_410"><info><title><constant>4.1</constant></title></info>
312
313 <para>
314 </para>
315
316
317 <para>
318 Removal of <filename class="headerfile">&lt;cassert&gt;</filename> from all standard headers: now has to be explicitly included for <code>std::assert</code> calls.
319 </para>
320
321 <para> Extensions for policy-based data structures first added. New includes,
322 types, namespace <code>pb_assoc</code>.
323 </para>
324
325
326
327 <para> Extensions for typelists added in <filename class="headerfile">&lt;ext/typelist.h&gt;</filename>.
328 </para>
329
330 <para> Extension for policy-based <code>basic_string</code> first added: <code>__gnu_cxx::__versa_string</code> in <filename class="headerfile">&lt;ext/vstring.h&gt;</filename>.
331 </para>
332
333 </section>
334
335 <section xml:id="api.rel_420"><info><title><constant>4.2</constant></title></info>
336
337 <para>
338 </para>
339
340
341 <para> Default visibility attributes applied to <code>namespace std</code>. Support for <code>-fvisibility</code>.
342 </para>
343
344 <para>TR1 <filename class="headerfile">&lt;random&gt;</filename>, <filename class="headerfile">&lt;complex&gt;</filename>, and C compatibility headers added.</para>
345
346 <para> Extensions for concurrent programming consolidated
347 into <filename class="headerfile">&lt;ext/concurrence.h&gt;</filename> and <filename class="headerfile">&lt;ext/atomicity.h&gt;</filename>,
348 including change of namespace to <code>__gnu_cxx</code> in some
349 cases. Added types
350 include <code>_Lock_policy</code>, <code>__concurrence_lock_error</code>, <code>__concurrence_unlock_error</code>, <code>__mutex</code>, <code>__scoped_lock</code>.</para>
351
352 <para> Extensions for type traits consolidated
353 into <filename class="headerfile">&lt;ext/type_traits.h&gt;</filename>. Additional traits are added
354 (<code>__conditional_type</code>, <code>__enable_if</code>, others.)
355 </para>
356
357 <para> Extensions for policy-based data structures revised. New includes,
358 types, namespace moved to <code>__pb_ds</code>.
359 </para>
360
361 <para> Extensions for debug mode modified: now nested in <code>namespace
362 std::__debug</code> and extensions in <code>namespace
363 __gnu_cxx::__debug</code>.</para>
364
365 <para> Extensions added: <filename class="headerfile">&lt;ext/typelist.h&gt;</filename>
366 and <filename class="headerfile">&lt;ext/throw_allocator.h&gt;</filename>.
367 </para>
368
369 </section>
370
371 <section xml:id="api.rel_430"><info><title><constant>4.3</constant></title></info>
372
373 <para>
374 </para>
375
376
377 <para>
378 C++0X features first appear.
379 </para>
380
381 <para>TR1 <filename class="headerfile">&lt;regex&gt;</filename> and <filename class="headerfile">&lt;cmath&gt;</filename>'s mathematical special function added.
382 </para>
383
384 <para>
385 Backward include edit.
386 </para>
387 <itemizedlist>
388 <listitem>
389 <para>Removed</para>
390 <para>
391 <filename class="headerfile">&lt;algobase.h&gt;</filename> <filename class="headerfile">&lt;algo.h&gt;</filename> <filename class="headerfile">&lt;alloc.h&gt;</filename> <filename class="headerfile">&lt;bvector.h&gt;</filename> <filename class="headerfile">&lt;complex.h&gt;</filename>
392 <filename class="headerfile">&lt;defalloc.h&gt;</filename> <filename class="headerfile">&lt;deque.h&gt;</filename> <filename class="headerfile">&lt;fstream.h&gt;</filename> <filename class="headerfile">&lt;function.h&gt;</filename> <filename class="headerfile">&lt;hash_map.h&gt;</filename> <filename class="headerfile">&lt;hash_set.h&gt;</filename>
393 <filename class="headerfile">&lt;hashtable.h&gt;</filename> <filename class="headerfile">&lt;heap.h&gt;</filename> <filename class="headerfile">&lt;iomanip.h&gt;</filename> <filename class="headerfile">&lt;iostream.h&gt;</filename> <filename class="headerfile">&lt;istream.h&gt;</filename> <filename class="headerfile">&lt;iterator.h&gt;</filename>
394 <filename class="headerfile">&lt;list.h&gt;</filename> <filename class="headerfile">&lt;map.h&gt;</filename> <filename class="headerfile">&lt;multimap.h&gt;</filename> <filename class="headerfile">&lt;multiset.h&gt;</filename> <filename class="headerfile">&lt;new.h&gt;</filename> <filename class="headerfile">&lt;ostream.h&gt;</filename> <filename class="headerfile">&lt;pair.h&gt;</filename> <filename class="headerfile">&lt;queue.h&gt;</filename> <filename class="headerfile">&lt;rope.h&gt;</filename> <filename class="headerfile">&lt;set.h&gt;</filename> <filename class="headerfile">&lt;slist.h&gt;</filename> <filename class="headerfile">&lt;stack.h&gt;</filename> <filename class="headerfile">&lt;streambuf.h&gt;</filename> <filename class="headerfile">&lt;stream.h&gt;</filename> <filename class="headerfile">&lt;tempbuf.h&gt;</filename>
395 <filename class="headerfile">&lt;tree.h&gt;</filename> <filename class="headerfile">&lt;vector.h&gt;</filename>
396 </para>
397 </listitem>
398 <listitem>
399 <para>Added</para>
400 <para>
401 <filename class="headerfile">&lt;hash_map&gt;</filename> and <filename class="headerfile">&lt;hash_set&gt;</filename>
402 </para>
403 </listitem>
404 <listitem>
405 <para>Added in C++11</para>
406 <para>
407 <filename class="headerfile">&lt;auto_ptr.h&gt;</filename> and <filename class="headerfile">&lt;binders.h&gt;</filename>
408 </para>
409 </listitem>
410
411 </itemizedlist>
412
413 <para>
414 Header dependency streamlining.
415 </para>
416
417 <itemizedlist>
418 <listitem><para><filename class="headerfile">&lt;algorithm&gt;</filename> no longer includes <filename class="headerfile">&lt;climits&gt;</filename>, <filename class="headerfile">&lt;cstring&gt;</filename>, or <filename class="headerfile">&lt;iosfwd&gt;</filename> </para></listitem>
419 <listitem><para><filename class="headerfile">&lt;bitset&gt;</filename> no longer includes <filename class="headerfile">&lt;istream&gt;</filename> or <filename class="headerfile">&lt;ostream&gt;</filename>, adds <filename class="headerfile">&lt;iosfwd&gt;</filename> </para></listitem>
420 <listitem><para><filename class="headerfile">&lt;functional&gt;</filename> no longer includes <filename class="headerfile">&lt;cstddef&gt;</filename></para></listitem>
421 <listitem><para><filename class="headerfile">&lt;iomanip&gt;</filename> no longer includes <filename class="headerfile">&lt;istream&gt;</filename>, <filename class="headerfile">&lt;istream&gt;</filename>, or <filename class="headerfile">&lt;functional&gt;</filename>, adds <filename class="headerfile">&lt;ioswd&gt;</filename> </para></listitem>
422 <listitem><para><filename class="headerfile">&lt;numeric&gt;</filename> no longer includes <filename class="headerfile">&lt;iterator&gt;</filename></para></listitem>
423 <listitem><para><filename class="headerfile">&lt;string&gt;</filename> no longer includes <filename class="headerfile">&lt;algorithm&gt;</filename> or <filename class="headerfile">&lt;memory&gt;</filename></para></listitem>
424
425 <listitem><para><filename class="headerfile">&lt;valarray&gt;</filename> no longer includes <filename class="headerfile">&lt;numeric&gt;</filename> or <filename class="headerfile">&lt;cstdlib&gt;</filename></para></listitem>
426 <listitem><para><filename class="headerfile">&lt;tr1/hashtable&gt;</filename> no longer includes <filename class="headerfile">&lt;memory&gt;</filename> or <filename class="headerfile">&lt;functional&gt;</filename></para></listitem>
427 <listitem><para><filename class="headerfile">&lt;tr1/memory&gt;</filename> no longer includes <filename class="headerfile">&lt;algorithm&gt;</filename></para></listitem>
428 <listitem><para><filename class="headerfile">&lt;tr1/random&gt;</filename> no longer includes <filename class="headerfile">&lt;algorithm&gt;</filename> or <filename class="headerfile">&lt;fstream&gt;</filename></para></listitem>
429 </itemizedlist>
430
431 <para>
432 Debug mode for <filename class="headerfile">&lt;unordered_map&gt;</filename> and <filename class="headerfile">&lt;unordered_set&gt;</filename>.
433 </para>
434
435 <para>
436 Parallel mode first appears.
437 </para>
438
439 <para>Variadic template implementations of items in <filename class="headerfile">&lt;tuple&gt;</filename> and
440 <filename class="headerfile">&lt;functional&gt;</filename>.
441 </para>
442
443 <para>Default <code>what</code> implementations give more elaborate
444 exception strings for <code>bad_cast</code>,
445 <code>bad_typeid</code>, <code>bad_exception</code>, and
446 <code>bad_alloc</code>.
447 </para>
448
449 <para>
450 PCH binary files no longer installed. Instead, the source files are installed.
451 </para>
452
453 <para>
454 Namespace pb_ds moved to __gnu_pb_ds.
455 </para>
456
457 </section>
458
459
460 <section xml:id="api.rel_440"><info><title><constant>4.4</constant></title></info>
461
462 <para>
463 </para>
464
465 <para>
466 C++0X features.
467 </para>
468
469 <itemizedlist>
470 <listitem>
471 <para>
472 Added.
473 </para>
474 <para>
475 <filename class="headerfile">&lt;atomic&gt;</filename>,
476 <filename class="headerfile">&lt;chrono&gt;</filename>,
477 <filename class="headerfile">&lt;condition_variable&gt;</filename>,
478 <filename class="headerfile">&lt;forward_list&gt;</filename>,
479 <filename class="headerfile">&lt;initializer_list&gt;</filename>,
480 <filename class="headerfile">&lt;mutex&gt;</filename>,
481 <filename class="headerfile">&lt;ratio&gt;</filename>,
482 <filename class="headerfile">&lt;thread&gt;</filename>
483 </para>
484 </listitem>
485
486 <listitem>
487 <para>
488 Updated and improved.
489 </para>
490 <para>
491 <filename class="headerfile">&lt;algorithm&gt;</filename>,
492 <filename class="headerfile">&lt;system_error&gt;</filename>,
493 <filename class="headerfile">&lt;type_traits&gt;</filename>
494 </para>
495 </listitem>
496
497 <listitem>
498 <para>
499 Use of the GNU extension namespace association converted to inline namespaces.
500 </para>
501 </listitem>
502
503 <listitem>
504 <para>
505 Preliminary support for <classname>initializer_list</classname>
506 and defaulted and deleted constructors in container classes.
507 </para>
508 </listitem>
509
510 <listitem>
511 <para>
512 <classname>unique_ptr</classname>.
513 </para>
514 </listitem>
515
516 <listitem>
517 <para>
518 Support for new character types <type>char16_t</type>
519 and <type>char32_t</type> added
520 to <classname>char_traits</classname>, <classname>basic_string</classname>, <classname>numeric_limits</classname>,
521 and assorted compile-time type traits.
522 </para>
523 </listitem>
524
525 <listitem>
526 <para>
527 Support for string conversions <function>to_string</function>
528 and <function>to_wstring</function>.
529 </para>
530 </listitem>
531
532 <listitem>
533 <para>
534 Member functions taking string arguments were added to iostreams
535 including <classname>basic_filebuf</classname>, <classname>basic_ofstream</classname>,
536 and <classname>basic_ifstream</classname>.
537 </para>
538 </listitem>
539
540 <listitem>
541 <para>
542 Exception propagation support,
543 including <classname>exception_ptr</classname>, <function>current_exception</function>, <function>copy_exception</function>,
544 and <function>rethrow_exception</function>.
545 </para>
546 </listitem>
547 </itemizedlist>
548
549
550 <para>
551 Uglification of <literal>try</literal> to <literal>__try</literal>
552 and <literal>catch</literal> to <literal>__catch</literal>.
553 </para>
554
555 <para>
556 Audit of internal mutex usage, conversion to functions returning static
557 local mutex.
558 </para>
559
560 <para> Extensions
561 added: <filename class="headerfile">&lt;ext/pointer.h&gt;</filename>
562 and <filename class="headerfile">&lt;ext/extptr_allocator.h&gt;</filename>. Support
563 for non-standard pointer types has been added
564 to <classname>vector</classname>
565 and <classname>forward_list</classname>.
566 </para>
567 </section>
568
569 <section xml:id="api.rel_450"><info><title><constant>4.5</constant></title></info>
570
571 <para>
572 </para>
573
574 <para>
575 C++0X features.
576 </para>
577
578 <itemizedlist>
579 <listitem>
580 <para>
581 Added.
582 </para>
583 <para>
584 <filename class="headerfile">&lt;functional&gt;</filename>,
585 <filename class="headerfile">&lt;future&gt;</filename>,
586 <filename class="headerfile">&lt;random&gt;</filename>
587 </para>
588 </listitem>
589
590 <listitem>
591 <para>
592 Updated and improved.
593 </para>
594 <para>
595 <filename class="headerfile">&lt;atomic&gt;</filename>,
596 <filename class="headerfile">&lt;system_error&gt;</filename>,
597 <filename class="headerfile">&lt;type_traits&gt;</filename>
598 </para>
599 </listitem>
600
601 <listitem>
602 <para>
603 Add support for explicit operators and standard layout types.
604 </para>
605 </listitem>
606 </itemizedlist>
607
608 <para>
609 Profile mode first appears.
610 </para>
611
612 <para>
613 Support for decimal floating-point arithmetic, including <classname>decimal32</classname>, <classname>decimal64</classname>, and <classname>decimal128</classname>.
614 </para>
615
616 <para>
617 Python pretty-printers are added for use with appropriately-advanced versions of <command>gdb</command>.
618 </para>
619
620 <para>
621 Audit for application of function attributes nothrow, const, pure, and noreturn.
622 </para>
623
624 <para>
625 The default behavior for comparing typeinfo names changed, so
626 in <filename class="headerfile">&lt;typeinfo&gt;</filename>, <literal>__GXX_MERGED_TYPEINFO_NAMES</literal>
627 now defaults to zero.
628 </para>
629
630 <para> Extensions modified: <filename class="headerfile">&lt;ext/throw_allocator.h&gt;</filename>.
631 </para>
632 </section>
633
634 <section xml:id="api.rel_460"><info><title><constant>4.6</constant></title></info>
635
636 <para>
637 Use constexpr and nullptr where appropriate throughout the library.
638 </para>
639
640 <para>
641 The library was updated to avoid including
642 <filename class="headerfile">&lt;stddef.h&gt;</filename> in order
643 to reduce namespace pollution.
644 </para>
645
646 <para>Reference-count annotations to assist data race detectors.
647 </para>
648
649 <para>
650 Added <function>make_exception_ptr</function> as an alias of
651 <function>copy_exception</function>.
652 </para>
653
654 </section>
655
656 <section xml:id="api.rel_470"><info><title><constant>4.7</constant></title></info>
657
658 <para>Use of noexcept throughout library.</para>
659
660 <para>Partial support for C++11 allocators first appears.</para>
661
662 <para>
663 <classname>monotonic_clock</classname> renamed to
664 <classname>steady_clock</classname> as required by the final C++11
665 standard.
666 </para>
667
668 <para>A new clocale model for newlib is available.</para>
669
670 <para>
671 The library was updated to avoid including
672 <filename class="headerfile">&lt;unistd.h&gt;</filename> in order
673 to reduce namespace pollution.
674 </para>
675
676 <para>Debug Mode was improved for unordered containers. </para>
677
678 </section>
679
680 <section xml:id="api.rel_480"><info><title><constant>4.8</constant></title></info>
681
682 <para>
683 New random number engines and distributions.
684 Optimisations for random.
685 </para>
686
687 <para>New --enable-libstdcxx-verbose configure option</para>
688
689 <para>
690 The --enable-libstdcxx-time configure option becomes unnecessary given a
691 sufficiently recent glibc.
692 </para>
693
694 </section>
695
696 <section xml:id="api.rel_490"><info><title><constant>4.9</constant></title></info>
697
698 <para> Implementation of <classname>regex</classname> completed. </para>
699
700 <para> C++14 library and TS implementations are added. </para>
701
702 <para> <function>copy_exception</function> deprecated. </para>
703
704 <para> <classname>__gnu_cxx::array_allocator</classname> deprecated. </para>
705
706 </section>
707
708 <section xml:id="api.rel_51"><info><title><constant>5</constant></title></info>
709
710 <para>
711 ABI transition adds new implementations of several components, using the
712 <code>abi_tag</code> attribute and the <code>__cxx11</code> inline
713 namespace to distinguish the new entities from the old ones.
714 </para>
715
716 <itemizedlist>
717 <listitem>
718 <para>
719 Use of the new or old ABI can be selected per-translation unit with the
720 <xref linkend="manual.intro.using.macros"><symbol>_GLIBCXX_USE_CXX11_ABI</symbol>
721 macro</xref>.
722 </para>
723 </listitem>
724 <listitem>
725 <para>
726 New non-reference-counted <classname>string</classname> implementation.
727 </para>
728 </listitem>
729 <listitem>
730 <para>
731 New <classname>list</classname> implementation containing a new
732 data member in order to provide O(1) <function>size()</function>.
733 </para>
734 </listitem>
735 <listitem>
736 <para>
737 New <classname>ios_base::failure</classname> implementation inheriting
738 from <classname>system_error</classname>.
739 </para>
740 </listitem>
741 </itemizedlist>
742
743 <para>
744 C++11 support completed (movable iostreams, new I/O manipulators,
745 Unicode conversion utilities, atomic operations for
746 <classname>shared_ptr</classname>, functions for notifying condition
747 variables and making futures ready at thread exit).
748 </para>
749
750 <para>
751 Changed formatting of floating point types when
752 <code>ios_base::fixed|ios_base::scientific</code> is set in a stream's
753 format flags.
754 </para>
755
756 <para> Improved C++14 support and TS implementations. </para>
757
758 <para> New random number engines and distributions. </para>
759
760 <para>
761 GDB Xmethods for containers and <classname>unique_ptr</classname> added.
762 </para>
763
764 <para>
765 <classname>has_trivial_default_constructor</classname>,
766 <classname>has_trivial_copy_constructor</classname> and
767 <classname>has_trivial_copy_assign</classname> deprecated.
768 </para>
769
770 <section xml:id="api.rel_53"><info><title><constant>5.3</constant></title></info>
771 <para> Experimental implementation of the C++ Filesystem TS added. </para>
772
773 </section>
774
775 </section>
776
777 <section xml:id="api.rel_61"><info><title><constant>6</constant></title></info>
778
779 <para> C++14 support completed. </para>
780
781 <para>
782 Support for mathematical special functions (ISO/IEC 29124:2010) added.
783 </para>
784
785 <para>
786 Assertions to check function preconditions can be enabled by defining the
787 <link linkend="manual.intro.using.macros"><symbol>_GLIBCXX_ASSERTIONS</symbol>
788 macro</link>.
789 The initial set of assertions are a subset of the checks enabled by
790 the Debug Mode, but without the ABI changes and changes to algorithmic
791 complexity that are caused by enabling the full Debug Mode.
792 </para>
793
794 </section>
795
796 <section xml:id="api.rel_71"><info><title><constant>7</constant></title></info>
797
798 <para>
799 The type of exception thrown by iostreams changed to the <code>cxx11</code>
800 ABI version of <classname>std::ios_base::failure</classname>.
801 </para>
802
803 <para>
804 Experimental C++17 support added, including most new library features.
805 The meaning of <classname>shared_ptr&lt;T[]&gt;</classname> changed to
806 match the C++17 semantics.
807 </para>
808
809 <para>
810 <xref linkend="manual.intro.using.macros"><symbol>_GLIBCXX_RELEASE</symbol>
811 macro</xref> added.
812 </para>
813
814 <para>
815 <classname>has_trivial_default_constructor</classname>,
816 <classname>has_trivial_copy_constructor</classname> and
817 <classname>has_trivial_copy_assign</classname> removed.
818 </para>
819
820 <para> Profile Mode was deprecated. </para>
821
822 <section xml:id="api.rel_72"><info><title><constant>7.2</constant></title></info>
823
824 <para>
825 Library Fundamentals TS header
826 <filename class="headerfile">&lt;experimental/source_location&gt;</filename>
827 added.
828 </para>
829
830 </section>
831
832 <section xml:id="api.rel_73"><info><title><constant>7.3</constant></title></info>
833
834 <para>
835 Including new C++14 or C++17 headers without a suitable <option>-std</option>
836 no longer causes compilation to fail via <literal>#error</literal>.
837 Instead the header is simply empty and doesn't define anything.
838 </para>
839
840 </section>
841
842 </section>
843
844 <section xml:id="api.rel_81"><info><title><constant>8</constant></title></info>
845
846 <para>
847 The exceptions thrown by iostreams can now be caught by handlers for either
848 version of <classname>std::ios_base::failure</classname>.
849 </para>
850
851 <para>
852 Improved experimental C++17 support. Headers
853 <filename class="headerfile">&lt;charconv&gt;</filename> and
854 <filename class="headerfile">&lt;filesystem&gt;</filename>.
855 Experimental implementation of the C++17 Filesystem library added.
856 </para>
857
858 <para>
859 Experimental C++2a support
860 (<function>to_address</function> and <classname>endian</classname>).
861 </para>
862
863 <para>
864 AddressSanitizer annotations added to <classname>std::vector</classname>
865 to detect out-of-range accesses to the unused capacity of a vector.
866 </para>
867
868 <para>
869 <function>std::char_traits&lt;char16_t&gt;::to_int_type(u'\uFFFF')</function>
870 now returns <literal>0xFFFD</literal>, as <literal>0xFFFF</literal> is
871 used for <function>std::char_traits&lt;char16_t&gt;::eof()</function>.
872 </para>
873
874 <para>
875 The extension allowing arithmetic on
876 <classname>std::atomic&lt;void*&gt;</classname> and types like
877 <classname>std::atomic&lt;R(*)()&gt;</classname> was deprecated.
878 </para>
879
880 <para>
881 The <function>std::uncaught_exception</function> function was deprecated
882 for C++17 mode.
883 </para>
884
885 <para>
886 The nested typedefs <type>std::hash::result_type</type> and
887 <type>std::hash::argument_type</type> were deprecated for C++17 mode.
888 </para>
889
890 <para>
891 The deprecated iostream members <type>ios_base::io_state</type>,
892 <type>ios_base::open_mode</type>, <type>ios_base::seek_dir</type>, and
893 <function>basic_streambuf::stossc</function> were removed for C++17 mode.
894 </para>
895
896 <para>
897 The non-standard C++0x <function>std::copy_exception</function> function
898 was removed.
899 </para>
900
901 <para>
902 For <option>-std=c++11</option>, <option>-std=c++14</option>, and
903 <option>-std=c++17</option> modes the <filename>&lt;complex.h&gt;</filename>
904 header no longer includes the C99 <filename>&lt;complex.h&gt;</filename>
905 header.
906 </para>
907
908 <para>
909 For the non-default <option>--enable-symvers=gnu-versioned-namespace</option>
910 configuration, the shared library SONAME has been changed to
911 <filename>libstdc++.so.8</filename>.
912 </para>
913
914 </section>
915
916 <section xml:id="api.rel_91"><info><title><constant>9</constant></title></info>
917
918 <para>
919 C++17 header
920 <filename class="headerfile">&lt;memory_resource&gt;</filename>
921 added.
922 </para>
923
924 <para>
925 Experimental C++2a support improved, with new headers
926 <filename class="headerfile">&lt;bit&gt;</filename> and
927 <filename class="headerfile">&lt;version&gt;</filename> added.
928 Support for new character type <type>char8_t</type> added
929 to <classname>char_traits</classname>, <classname>basic_string</classname>,
930 <classname>numeric_limits</classname>,
931 and relevant locale facets and type traits.
932 </para>
933
934 <para>
935 Experimental implementation of the Networking TS library added,
936 with new headers
937 <filename class="headerfile">&lt;experimental/buffer&gt;</filename>,
938 <filename class="headerfile">&lt;experimental/executor&gt;</filename>,
939 <filename class="headerfile">&lt;experimental/internet&gt;</filename>,
940 <filename class="headerfile">&lt;experimental/io_context&gt;</filename>,
941 <filename class="headerfile">&lt;experimental/net&gt;</filename>,
942 <filename class="headerfile">&lt;experimental/netfwd&gt;</filename>,
943 <filename class="headerfile">&lt;experimental/socket&gt;</filename>,
944 and
945 <filename class="headerfile">&lt;experimental/timer&gt;</filename>.
946 </para>
947
948 </section>
949
950 <section xml:id="api.rel_101"><info><title><constant>10</constant></title></info>
951 <para> Deprecated features removed:
952 <itemizedlist>
953 <listitem> Profile Mode </listitem>
954 <listitem> <classname>__gnu_cxx::array_allocator</classname> </listitem>
955 </itemizedlist>
956 </para>
957
958 <para>
959 The non-standard <function>std::__is_nullptr_t</function> type trait
960 was deprecated.
961 </para>
962
963 <para>
964 The <classname>std::packaged_task</classname> constructors taking
965 an allocator argument are only defined for C++11 and C++14.
966 </para>
967
968 <para>
969 Several members of <classname>std::allocator</classname> were removed
970 for C++20 mode. The removed functionality has been provided by
971 <classname>std::allocator_traits</classname> since C++11 and that should
972 be used instead.
973 </para>
974
975 <para>
976 The type of the <classname>std::iterator</classname> base class of
977 <classname>std::istreambuf_iterator</classname> was changed to be
978 consistent for all <option>-std</option> modes.
979 Before GCC 10.1 the base class had one type in C++98 mode and a
980 different type in C++11 and later modes. The type in C++98 mode
981 was changed to be the same as for C++11 and later.
982 </para>
983
984 <para>
985 Experimental C++2a support improved, with new headers
986 <filename class="headerfile">&lt;concepts&gt;</filename>,
987 <filename class="headerfile">&lt;ranges&gt;</filename>,
988 <filename class="headerfile">&lt;compare&gt;</filename>,
989 <filename class="headerfile">&lt;coroutine&gt;</filename>,
990 <filename class="headerfile">&lt;numbers&gt;</filename>,
991 <filename class="headerfile">&lt;span&gt;</filename>,
992 and
993 <filename class="headerfile">&lt;stop_token&gt;</filename>
994 added.
995 </para>
996
997 </section>
998
999 <section xml:id="api.rel_111"><info><title><constant>11</constant></title></info>
1000
1001 <para>
1002 The <option>--enable-cheaders=c_std</option> configuration
1003 was deprecated.
1004 </para>
1005
1006 <para>
1007 When compiling as C++20, the <function>operator&gt;&gt;</function> overloads
1008 for extracting strings into character buffers only work with arrays,
1009 not raw pointers.
1010 </para>
1011
1012 <para>
1013 <code>std::string::reserve(n)</code> will no longer reduce
1014 the string's capacity.
1015 Calling <function>reserve()</function> with no arguments is equivalent
1016 to <function>shrink_to_fit()</function>, but is deprecated.
1017 <function>shrink_to_fit()</function> should be used instead.
1018 </para>
1019
1020 </section>
1021
1022 <section xml:id="api.rel_121"><info><title><constant>12</constant></title></info>
1023
1024 <para>
1025 The <function>std::random_shuffle</function> algorithms are deprecated
1026 for C++14 and later. The C++11 <function>std::shuffle</function> algorithm
1027 can be used instead.
1028 </para>
1029
1030 <para>
1031 The <function>std::unexpected</function> function and related typedef and
1032 accessors for the unexpected handler are deprecated for C++11 and later.
1033 Dynamic exception specifications should be replaced with <code>noexcept</code>.
1034 </para>
1035
1036 <para>
1037 The <literal>bitmap</literal>, <literal>mt</literal>, and <literal>pool</literal>
1038 options for <option>--enable-libstdcxx-allocator</option> were removed.
1039 For the <literal>new</literal> option, <classname>std::allocator</classname>
1040 no longer derives from <classname>__gnu_cxx::new_allocator</classname>;
1041 they both derive from <classname>std::__new_allocator</classname> instead.
1042 </para>
1043
1044 </section>
1045
1046 </section>
This page took 0.095148 seconds and 6 git commands to generate.