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