1<?xml version='1.0'?> 2<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" 4[ ]> 5 6<part id="manual.intro" xreflabel="Introduction"> 7<?dbhtml filename="intro.html"?> 8 9<partinfo> 10 <keywordset> 11 <keyword> 12 ISO C++ 13 </keyword> 14 <keyword> 15 library 16 </keyword> 17 </keywordset> 18</partinfo> 19 20<title> 21 Introduction 22 <indexterm><primary>Introduction</primary></indexterm> 23</title> 24<!-- Chapter 01 : Status --> 25<chapter id="manual.intro.status" xreflabel="Status"> 26 <?dbhtml filename="status.html"?> 27 <title>Status</title> 28 29 <!-- Section 01 : Implementation Status --> 30 <sect1 id="manual.intro.status.iso" xreflabel="Status"> 31 <title>Implementation Status</title> 32 33 <!-- Section 01.1 : Status C++ 1998 --> 34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 35 parse="xml" href="status_cxx1998.xml"> 36 </xi:include> 37 38 <!-- Section 01.2 : Status C++ 200x --> 39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 40 parse="xml" href="status_cxx200x.xml"> 41 </xi:include> 42 43 <!-- Section 01.3 : Status C++ TR1 --> 44 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 45 parse="xml" href="status_cxxtr1.xml"> 46 </xi:include> 47 48 <!-- Section 01.4 : Status C++ TR24733 --> 49 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 50 parse="xml" href="status_cxxtr24733.xml"> 51 </xi:include> 52 </sect1> 53 54 <!-- Section 02 : License --> 55 <sect1 id="manual.intro.status.license" xreflabel="License"> 56 <?dbhtml filename="license.html"?> 57 <title>License</title> 58 <para> 59 There are two licenses affecting GNU libstdc++: one for the code, 60 and one for the documentation. 61 </para> 62 63 <para> 64 There is a license section in the FAQ regarding common <link 65 linkend="faq.license">questions</link>. If you have more 66 questions, ask the FSF or the <ulink 67 url="http://gcc.gnu.org/lists.html">gcc mailing list</ulink>. 68 </para> 69 70 <sect2 id="manual.intro.status.license.gpl" xreflabel="License GPL"> 71 <title>The Code: GPL</title> 72 73 <para> 74 The source code is distributed under the <link 75 linkend="appendix.gpl-3.0">GNU General Public License version 3</link>, 76 with the addition under section 7 of an exception described in 77 the <quote>GCC Runtime Library Exception, version 3.1</quote> 78 as follows (or see the file COPYING.RUNTIME): 79 </para> 80 81 <literallayout> 82GCC RUNTIME LIBRARY EXCEPTION 83 84Version 3.1, 31 March 2009 85 86Copyright (C) 2009 <ulink url="http://www.fsf.org">Free Software Foundation, Inc.</ulink> 87 88Everyone is permitted to copy and distribute verbatim copies of this 89license document, but changing it is not allowed. 90 91This GCC Runtime Library Exception ("Exception") is an additional 92permission under section 7 of the GNU General Public License, version 933 ("GPLv3"). It applies to a given file (the "Runtime Library") that 94bears a notice placed by the copyright holder of the file stating that 95the file is governed by GPLv3 along with this Exception. 96 97When you use GCC to compile a program, GCC may combine portions of 98certain GCC header files and runtime libraries with the compiled 99program. The purpose of this Exception is to allow compilation of 100non-GPL (including proprietary) programs to use, in this way, the 101header files and runtime libraries covered by this Exception. 102 1030. Definitions. 104 105A file is an "Independent Module" if it either requires the Runtime 106Library for execution after a Compilation Process, or makes use of an 107interface provided by the Runtime Library, but is not otherwise based 108on the Runtime Library. 109 110"GCC" means a version of the GNU Compiler Collection, with or without 111modifications, governed by version 3 (or a specified later version) of 112the GNU General Public License (GPL) with the option of using any 113subsequent versions published by the FSF. 114 115"GPL-compatible Software" is software whose conditions of propagation, 116modification and use would permit combination with GCC in accord with 117the license of GCC. 118 119"Target Code" refers to output from any compiler for a real or virtual 120target processor architecture, in executable form or suitable for 121input to an assembler, loader, linker and/or execution 122phase. Notwithstanding that, Target Code does not include data in any 123format that is used as a compiler intermediate representation, or used 124for producing a compiler intermediate representation. 125 126The "Compilation Process" transforms code entirely represented in 127non-intermediate languages designed for human-written code, and/or in 128Java Virtual Machine byte code, into Target Code. Thus, for example, 129use of source code generators and preprocessors need not be considered 130part of the Compilation Process, since the Compilation Process can be 131understood as starting with the output of the generators or 132preprocessors. 133 134A Compilation Process is "Eligible" if it is done using GCC, alone or 135with other GPL-compatible software, or if it is done without using any 136work based on GCC. For example, using non-GPL-compatible Software to 137optimize any GCC intermediate representations would not qualify as an 138Eligible Compilation Process. 139 1401. Grant of Additional Permission. 141 142You have permission to propagate a work of Target Code formed by 143combining the Runtime Library with Independent Modules, even if such 144propagation would otherwise violate the terms of GPLv3, provided that 145all Target Code was generated by Eligible Compilation Processes. You 146may then convey such a combination under terms of your choice, 147consistent with the licensing of the Independent Modules. 148 1492. No Weakening of GCC Copyleft. 150 151The availability of this Exception does not imply any general 152presumption that third-party software is unaffected by the copyleft 153requirements of the license of GCC. 154 </literallayout> 155 156 <para> 157 Hopefully that text is self-explanatory. If it isn't, you need to speak 158 to your lawyer, or the Free Software Foundation. 159 </para> 160 </sect2> 161 162 <sect2 id="manual.intro.status.license.fdl" xreflabel="License FDL"> 163 <title>The Documentation: GPL, FDL</title> 164 165 <para> 166 The documentation shipped with the library and made available over 167 the web, excluding the pages generated from source comments, are 168 copyrighted by the Free Software Foundation, and placed under the 169 <link linkend="appendix.gfdl-1.2"> GNU Free Documentation 170 License version 1.2</link>. There are no Front-Cover Texts, no 171 Back-Cover Texts, and no Invariant Sections. 172 </para> 173 174 <para> 175 For documentation generated by doxygen or other automated tools 176 via processing source code comments and markup, the original source 177 code license applies to the generated files. Thus, the doxygen 178 documents are licensed <link linkend="appendix.gpl-3.0">GPL</link>. 179 </para> 180 181 <para> 182 If you plan on making copies of the documentation, please let us know. 183 We can probably offer suggestions. 184 </para> 185 </sect2> 186 187 </sect1> 188 189 <!-- Section 03 : Known Bugs --> 190 <sect1 id="manual.intro.status.bugs" xreflabel="Bugs"> 191 <?dbhtml filename="bugs.html"?> 192 <title>Bugs</title> 193 194 <sect2 id="manual.intro.status.bugs.impl" xreflabel="Bugs impl"> 195 <title>Implementation Bugs</title> 196 <para> 197 Information on known bugs, details on efforts to fix them, and 198 fixed bugs are all available as part of the <ulink 199 url="http://gcc.gnu.org/bugs/">GCC bug tracking system</ulink>, 200 with the category set to <literal>libstdc++</literal>. 201 </para> 202 </sect2> 203 204 <sect2 id="manual.intro.status.bugs.iso" xreflabel="Bugs iso"> 205 <title>Standard Bugs</title> 206 <para> 207 Everybody's got issues. Even the C++ Standard Library. 208 </para> 209 <para> 210 The Library Working Group, or LWG, is the ISO subcommittee responsible 211 for making changes to the library. They periodically publish an 212 Issues List containing problems and possible solutions. As they reach 213 a consensus on proposed solutions, we often incorporate the solution. 214 </para> 215 <para> 216 Here are the issues which have resulted in code changes to the library. 217 The links are to the specific defect reports from a <emphasis>partial 218 copy</emphasis> of the Issues List. You can read the full version online 219 at the <ulink url="http://www.open-std.org/jtc1/sc22/wg21/">ISO C++ 220 Committee homepage</ulink>, linked to on the 221 <ulink url="http://gcc.gnu.org/readings.html">GCC "Readings" 222 page</ulink>. If 223 you spend a lot of time reading the issues, we recommend downloading 224 the ZIP file and reading them locally. 225 </para> 226 <para> 227 (NB: <emphasis>partial copy</emphasis> means that not all 228 links within the lwg-*.html pages will work. Specifically, 229 links to defect reports that have not been accorded full DR 230 status will probably break. Rather than trying to mirror the 231 entire issues list on our overworked web server, we recommend 232 you go to the LWG homepage instead.) 233 </para> 234 <para> 235 If a DR is not listed here, we may simply not have gotten to 236 it yet; feel free to submit a patch. Search the include/bits 237 and src directories for appearances of 238 <constant>_GLIBCXX_RESOLVE_LIB_DEFECTS</constant> for examples 239 of style. Note that we usually do not make changes to the 240 code until an issue has reached <ulink url="../ext/lwg-active.html#DR">DR</ulink> status. 241 </para> 242 243 <variablelist> 244 <varlistentry><term><ulink url="../ext/lwg-defects.html#5">5</ulink>: 245 <emphasis>string::compare specification questionable</emphasis> 246 </term> 247 <listitem><para>This should be two overloaded functions rather than a single function. 248 </para></listitem></varlistentry> 249 250 <varlistentry><term><ulink url="../ext/lwg-defects.html#17">17</ulink>: 251 <emphasis>Bad bool parsing</emphasis> 252 </term> 253 <listitem><para>Apparently extracting Boolean values was messed up... 254 </para></listitem></varlistentry> 255 256 <varlistentry><term><ulink url="../ext/lwg-defects.html#19">19</ulink>: 257 <emphasis>"Noconv" definition too vague</emphasis> 258 </term> 259 <listitem><para>If <code>codecvt::do_in</code> returns <code>noconv</code> there are 260 no changes to the values in <code>[to, to_limit)</code>. 261 </para></listitem></varlistentry> 262 263 <varlistentry><term><ulink url="../ext/lwg-defects.html#22">22</ulink>: 264 <emphasis>Member open vs flags</emphasis> 265 </term> 266 <listitem><para>Re-opening a file stream does <emphasis>not</emphasis> clear the state flags. 267 </para></listitem></varlistentry> 268 269 <varlistentry><term><ulink url="../ext/lwg-defects.html#23">23</ulink>: 270 <emphasis>Num_get overflow result</emphasis> 271 </term> 272 <listitem><para>Implement the proposed resolution. 273 </para></listitem></varlistentry> 274 275 <varlistentry><term><ulink url="../ext/lwg-defects.html#25">25</ulink>: 276 <emphasis>String operator<< uses width() value wrong</emphasis> 277 </term> 278 <listitem><para>Padding issues. 279 </para></listitem></varlistentry> 280 281 <varlistentry><term><ulink url="../ext/lwg-defects.html#48">48</ulink>: 282 <emphasis>Use of non-existent exception constructor</emphasis> 283 </term> 284 <listitem><para>An instance of <code>ios_base::failure</code> is constructed instead. 285 </para></listitem></varlistentry> 286 287 <varlistentry><term><ulink url="../ext/lwg-defects.html#49">49</ulink>: 288 <emphasis>Underspecification of ios_base::sync_with_stdio</emphasis> 289 </term> 290 <listitem><para>The return type is the <emphasis>previous</emphasis> state of synchronization. 291 </para></listitem></varlistentry> 292 293 <varlistentry><term><ulink url="../ext/lwg-defects.html#50">50</ulink>: 294 <emphasis>Copy constructor and assignment operator of ios_base</emphasis> 295 </term> 296 <listitem><para>These members functions are declared <code>private</code> and are 297 thus inaccessible. Specifying the correct semantics of 298 "copying stream state" was deemed too complicated. 299 </para></listitem></varlistentry> 300 301 <varlistentry><term><ulink url="../ext/lwg-defects.html#60">60</ulink>: 302 <emphasis>What is a formatted input function?</emphasis> 303 </term> 304 <listitem><para>This DR made many widespread changes to <code>basic_istream</code> 305 and <code>basic_ostream</code> all of which have been implemented. 306 </para></listitem></varlistentry> 307 308 <varlistentry><term><ulink url="../ext/lwg-defects.html#63">63</ulink>: 309 <emphasis>Exception-handling policy for unformatted output</emphasis> 310 </term> 311 <listitem><para>Make the policy consistent with that of formatted input, unformatted 312 input, and formatted output. 313 </para></listitem></varlistentry> 314 315 <varlistentry><term><ulink url="../ext/lwg-defects.html#68">68</ulink>: 316 <emphasis>Extractors for char* should store null at end</emphasis> 317 </term> 318 <listitem><para>And they do now. An editing glitch in the last item in the list of 319 [27.6.1.2.3]/7. 320 </para></listitem></varlistentry> 321 322 <varlistentry><term><ulink url="../ext/lwg-defects.html#74">74</ulink>: 323 <emphasis>Garbled text for codecvt::do_max_length</emphasis> 324 </term> 325 <listitem><para>The text of the standard was gibberish. Typos gone rampant. 326 </para></listitem></varlistentry> 327 328 <varlistentry><term><ulink url="../ext/lwg-defects.html#75">75</ulink>: 329 <emphasis>Contradiction in codecvt::length's argument types</emphasis> 330 </term> 331 <listitem><para>Change the first parameter to <code>stateT&</code> and implement 332 the new effects paragraph. 333 </para></listitem></varlistentry> 334 335 <varlistentry><term><ulink url="../ext/lwg-defects.html#83">83</ulink>: 336 <emphasis>string::npos vs. string::max_size()</emphasis> 337 </term> 338 <listitem><para>Safety checks on the size of the string should test against 339 <code>max_size()</code> rather than <code>npos</code>. 340 </para></listitem></varlistentry> 341 342 <varlistentry><term><ulink url="../ext/lwg-defects.html#90">90</ulink>: 343 <emphasis>Incorrect description of operator>> for strings</emphasis> 344 </term> 345 <listitem><para>The effect contain <code>isspace(c,getloc())</code> which must be 346 replaced by <code>isspace(c,is.getloc())</code>. 347 </para></listitem></varlistentry> 348 349 <varlistentry><term><ulink url="../ext/lwg-defects.html#91">91</ulink>: 350 <emphasis>Description of operator>> and getline() for string<> 351 might cause endless loop</emphasis> 352 </term> 353 <listitem><para>They behave as a formatted input function and as an unformatted 354 input function, respectively (except that <code>getline</code> is 355 not required to set <code>gcount</code>). 356 </para></listitem></varlistentry> 357 358 <varlistentry><term><ulink url="../ext/lwg-defects.html#103">103</ulink>: 359 <emphasis>set::iterator is required to be modifiable, but this allows 360 modification of keys.</emphasis> 361 </term> 362 <listitem><para>For associative containers where the value type is the same as 363 the key type, both <code>iterator</code> and <code>const_iterator 364 </code> are constant iterators. 365 </para></listitem></varlistentry> 366 367 <varlistentry><term><ulink url="../ext/lwg-defects.html#109">109</ulink>: 368 <emphasis>Missing binders for non-const sequence elements</emphasis> 369 </term> 370 <listitem><para>The <code>binder1st</code> and <code>binder2nd</code> didn't have an 371 <code>operator()</code> taking a non-const parameter. 372 </para></listitem></varlistentry> 373 374 <varlistentry><term><ulink url="../ext/lwg-defects.html#110">110</ulink>: 375 <emphasis>istreambuf_iterator::equal not const</emphasis> 376 </term> 377 <listitem><para>This was not a const member function. Note that the DR says to 378 replace the function with a const one; we have instead provided an 379 overloaded version with identical contents. 380 </para></listitem></varlistentry> 381 382 <varlistentry><term><ulink url="../ext/lwg-defects.html#117">117</ulink>: 383 <emphasis>basic_ostream uses nonexistent num_put member functions</emphasis> 384 </term> 385 <listitem><para><code>num_put::put()</code> was overloaded on the wrong types. 386 </para></listitem></varlistentry> 387 388 <varlistentry><term><ulink url="../ext/lwg-defects.html#118">118</ulink>: 389 <emphasis>basic_istream uses nonexistent num_get member functions</emphasis> 390 </term> 391 <listitem><para>Same as 117, but for <code>num_get::get()</code>. 392 </para></listitem></varlistentry> 393 394 <varlistentry><term><ulink url="../ext/lwg-defects.html#129">129</ulink>: 395 <emphasis>Need error indication from seekp() and seekg()</emphasis> 396 </term> 397 <listitem><para>These functions set <code>failbit</code> on error now. 398 </para></listitem></varlistentry> 399 400 <varlistentry><term><ulink url="../ext/lwg-defects.html#130">130</ulink>: 401 <emphasis>Return type of container::erase(iterator) differs for associative containers</emphasis> 402 </term> 403 <listitem><para>Make member <code>erase</code> return iterator for <code>set</code>, <code>multiset</code>, <code>map</code>, <code>multimap</code>. 404 </para></listitem></varlistentry> 405 406 <varlistentry><term><ulink url="../ext/lwg-defects.html#136">136</ulink>: 407 <emphasis>seekp, seekg setting wrong streams?</emphasis> 408 </term> 409 <listitem><para><code>seekp</code> should only set the output stream, and 410 <code>seekg</code> should only set the input stream. 411 </para></listitem></varlistentry> 412 413<!--<varlistentry><term><ulink url="../ext/lwg-defects.html#159">159</ulink>: 414 <emphasis>Strange use of underflow()</emphasis> 415 </term> 416 <listitem><para>In fstream.tcc, the basic_filebuf<>::showmanyc() function 417 should probably not be calling <code>underflow()</code>. 418 </para></listitem></varlistentry> --> 419 420 <varlistentry><term><ulink url="../ext/lwg-defects.html#167">167</ulink>: 421 <emphasis>Improper use of traits_type::length()</emphasis> 422 </term> 423 <listitem><para><code>op<<</code> with a <code>const char*</code> was 424 calculating an incorrect number of characters to write. 425 </para></listitem></varlistentry> 426 427 <varlistentry><term><ulink url="../ext/lwg-defects.html#169">169</ulink>: 428 <emphasis>Bad efficiency of overflow() mandated</emphasis> 429 </term> 430 <listitem><para>Grow efficiently the internal array object. 431 </para></listitem></varlistentry> 432 433 <varlistentry><term><ulink url="../ext/lwg-defects.html#171">171</ulink>: 434 <emphasis>Strange seekpos() semantics due to joint position</emphasis> 435 </term> 436 <listitem><para>Quite complex to summarize... 437 </para></listitem></varlistentry> 438 439 <varlistentry><term><ulink url="../ext/lwg-defects.html#181">181</ulink>: 440 <emphasis>make_pair() unintended behavior</emphasis> 441 </term> 442 <listitem><para>This function used to take its arguments as reference-to-const, now 443 it copies them (pass by value). 444 </para></listitem></varlistentry> 445 446 <varlistentry><term><ulink url="../ext/lwg-defects.html#195">195</ulink>: 447 <emphasis>Should basic_istream::sentry's constructor ever set eofbit?</emphasis> 448 </term> 449 <listitem><para>Yes, it can, specifically if EOF is reached while skipping whitespace. 450 </para></listitem></varlistentry> 451 452 <varlistentry><term><ulink url="../ext/lwg-defects.html#211">211</ulink>: 453 <emphasis>operator>>(istream&, string&) doesn't set failbit</emphasis> 454 </term> 455 <listitem><para>If nothing is extracted into the string, <code>op>></code> now 456 sets <code>failbit</code> (which can cause an exception, etc., etc.). 457 </para></listitem></varlistentry> 458 459 <varlistentry><term><ulink url="../ext/lwg-defects.html#214">214</ulink>: 460 <emphasis>set::find() missing const overload</emphasis> 461 </term> 462 <listitem><para>Both <code>set</code> and <code>multiset</code> were missing 463 overloaded find, lower_bound, upper_bound, and equal_range functions 464 for const instances. 465 </para></listitem></varlistentry> 466 467 <varlistentry><term><ulink url="../ext/lwg-defects.html#231">231</ulink>: 468 <emphasis>Precision in iostream?</emphasis> 469 </term> 470 <listitem><para>For conversion from a floating-point type, <code>str.precision()</code> 471 is specified in the conversion specification. 472 </para></listitem></varlistentry> 473 474 <varlistentry><term><ulink url="../ext/lwg-defects.html#233">233</ulink>: 475 <emphasis>Insertion hints in associative containers</emphasis> 476 </term> 477 <listitem><para>Implement N1780, first check before then check after, insert as close 478 to hint as possible. 479 </para></listitem></varlistentry> 480 481 <varlistentry><term><ulink url="../ext/lwg-defects.html#235">235</ulink>: 482 <emphasis>No specification of default ctor for reverse_iterator</emphasis> 483 </term> 484 <listitem><para>The declaration of <code>reverse_iterator</code> lists a default constructor. 485 However, no specification is given what this constructor should do. 486 </para></listitem></varlistentry> 487 488 <varlistentry><term><ulink url="../ext/lwg-defects.html#241">241</ulink>: 489 <emphasis>Does unique_copy() require CopyConstructible and Assignable?</emphasis> 490 </term> 491 <listitem><para>Add a helper for forward_iterator/output_iterator, fix the existing 492 one for input_iterator/output_iterator to not rely on Assignability. 493 </para></listitem></varlistentry> 494 495 <varlistentry><term><ulink url="../ext/lwg-defects.html#243">243</ulink>: 496 <emphasis>get and getline when sentry reports failure</emphasis> 497 </term> 498 <listitem><para>Store a null character only if the character array has a non-zero size. 499 </para></listitem></varlistentry> 500 501 <varlistentry><term><ulink url="../ext/lwg-defects.html#251">251</ulink>: 502 <emphasis>basic_stringbuf missing allocator_type</emphasis> 503 </term> 504 <listitem><para>This nested typedef was originally not specified. 505 </para></listitem></varlistentry> 506 507 <varlistentry><term><ulink url="../ext/lwg-defects.html#253">253</ulink>: 508 <emphasis>valarray helper functions are almost entirely useless</emphasis> 509 </term> 510 <listitem><para>Make the copy constructor and copy-assignment operator declarations 511 public in gslice_array, indirect_array, mask_array, slice_array; provide 512 definitions. 513 </para></listitem></varlistentry> 514 515 <varlistentry><term><ulink url="../ext/lwg-defects.html#265">265</ulink>: 516 <emphasis>std::pair::pair() effects overly restrictive</emphasis> 517 </term> 518 <listitem><para>The default ctor would build its members from copies of temporaries; 519 now it simply uses their respective default ctors. 520 </para></listitem></varlistentry> 521 522 <varlistentry><term><ulink url="../ext/lwg-defects.html#266">266</ulink>: 523 <emphasis>bad_exception::~bad_exception() missing Effects clause</emphasis> 524 </term> 525 <listitem><para>The <code>bad_</code>* classes no longer have destructors (they 526 are trivial), since no description of them was ever given. 527 </para></listitem></varlistentry> 528 529 <varlistentry><term><ulink url="../ext/lwg-defects.html#271">271</ulink>: 530 <emphasis>basic_iostream missing typedefs</emphasis> 531 </term> 532 <listitem><para>The typedefs it inherits from its base classes can't be used, since 533 (for example) <code>basic_iostream<T>::traits_type</code> is ambiguous. 534 </para></listitem></varlistentry> 535 536 <varlistentry><term><ulink url="../ext/lwg-defects.html#275">275</ulink>: 537 <emphasis>Wrong type in num_get::get() overloads</emphasis> 538 </term> 539 <listitem><para>Similar to 118. 540 </para></listitem></varlistentry> 541 542 <varlistentry><term><ulink url="../ext/lwg-defects.html#280">280</ulink>: 543 <emphasis>Comparison of reverse_iterator to const reverse_iterator</emphasis> 544 </term> 545 <listitem><para>Add global functions with two template parameters. 546 (NB: not added for now a templated assignment operator) 547 </para></listitem></varlistentry> 548 549 <varlistentry><term><ulink url="../ext/lwg-defects.html#292">292</ulink>: 550 <emphasis>Effects of a.copyfmt (a)</emphasis> 551 </term> 552 <listitem><para>If <code>(this == &rhs)</code> do nothing. 553 </para></listitem></varlistentry> 554 555 <varlistentry><term><ulink url="../ext/lwg-defects.html#300">300</ulink>: 556 <emphasis>List::merge() specification incomplete</emphasis> 557 </term> 558 <listitem><para>If <code>(this == &x)</code> do nothing. 559 </para></listitem></varlistentry> 560 561 <varlistentry><term><ulink url="../ext/lwg-defects.html#303">303</ulink>: 562 <emphasis>Bitset input operator underspecified</emphasis> 563 </term> 564 <listitem><para>Basically, compare the input character to 565 <code>is.widen(0)</code> and <code>is.widen(1)</code>. 566 </para></listitem></varlistentry> 567 568 <varlistentry><term><ulink url="../ext/lwg-defects.html#305">305</ulink>: 569 <emphasis>Default behavior of codecvt<wchar_t, char, 570 mbstate_t>::length()</emphasis> 571 </term> 572 <listitem><para>Do not specify what <code>codecvt<wchar_t, char, 573 mbstate_t>::do_length</code> must return. 574 </para></listitem></varlistentry> 575 576 <varlistentry><term><ulink url="../ext/lwg-defects.html#328">328</ulink>: 577 <emphasis>Bad sprintf format modifier in 578 money_put<>::do_put()</emphasis> 579 </term> 580 <listitem><para>Change the format string to "%.0Lf". 581 </para></listitem></varlistentry> 582 583 <varlistentry><term><ulink url="../ext/lwg-defects.html#365">365</ulink>: 584 <emphasis>Lack of const-qualification in clause 27</emphasis> 585 </term> 586 <listitem><para>Add const overloads of <code>is_open</code>. 587 </para></listitem></varlistentry> 588 589 <varlistentry><term><ulink url="../ext/lwg-defects.html#387">387</ulink>: 590 <emphasis>std::complex over-encapsulated</emphasis> 591 </term> 592 <listitem><para>Add the <code>real(T)</code> and <code>imag(T)</code> 593 members; in C++0x mode, also adjust the existing 594 <code>real()</code> and <code>imag()</code> members and 595 free functions. 596 </para></listitem></varlistentry> 597 598 <varlistentry><term><ulink url="../ext/lwg-defects.html#389">389</ulink>: 599 <emphasis>Const overload of valarray::operator[] returns 600 by value</emphasis> 601 </term> 602 <listitem><para>Change it to return a <code>const T&</code>. 603 </para></listitem></varlistentry> 604 605 <varlistentry><term><ulink url="../ext/lwg-defects.html#396">396</ulink>: 606 <emphasis>what are characters zero and one</emphasis> 607 </term> 608 <listitem><para>Implement the proposed resolution. 609 </para></listitem></varlistentry> 610 611 <varlistentry><term><ulink url="../ext/lwg-defects.html#402">402</ulink>: 612 <emphasis>Wrong new expression in [some_]allocator::construct</emphasis> 613 </term> 614 <listitem><para>Replace "new" with "::new". 615 </para></listitem></varlistentry> 616 617 <varlistentry><term><ulink url="../ext/lwg-active.html#408">408</ulink>: 618 <emphasis> 619 Is vector<reverse_iterator<char*> > forbidden? 620 </emphasis> 621 </term> 622 <listitem><para>Tweak the debug-mode checks in _Safe_iterator. 623 </para></listitem></varlistentry> 624 625 <varlistentry><term><ulink url="../ext/lwg-defects.html#409">409</ulink>: 626 <emphasis>Closing an fstream should clear the error state</emphasis> 627 </term> 628 <listitem><para>Have <code>open</code> clear the error flags. 629 </para></listitem></varlistentry> 630 631 <varlistentry><term><ulink url="../ext/lwg-closed.html#431">431</ulink>: 632 <emphasis>Swapping containers with unequal allocators</emphasis> 633 </term> 634 <listitem><para>Implement Option 3, as per N1599. 635 </para></listitem></varlistentry> 636 637 <varlistentry><term><ulink url="../ext/lwg-defects.html#432">432</ulink>: 638 <emphasis>stringbuf::overflow() makes only one write position 639 available</emphasis> 640 </term> 641 <listitem><para>Implement the resolution, beyond DR 169. 642 </para></listitem></varlistentry> 643 644 <varlistentry><term><ulink url="../ext/lwg-defects.html#434">434</ulink>: 645 <emphasis>bitset::to_string() hard to use</emphasis> 646 </term> 647 <listitem><para>Add three overloads, taking fewer template arguments. 648 </para></listitem></varlistentry> 649 650 <varlistentry><term><ulink url="../ext/lwg-defects.html#438">438</ulink>: 651 <emphasis>Ambiguity in the "do the right thing" clause</emphasis> 652 </term> 653 <listitem><para>Implement the resolution, basically cast less. 654 </para></listitem></varlistentry> 655 656 <varlistentry><term><ulink url="../ext/lwg-defects.html#453">453</ulink>: 657 <emphasis>basic_stringbuf::seekoff need not always fail for an empty stream</emphasis> 658 </term> 659 <listitem><para>Don't fail if the next pointer is null and newoff is zero. 660 </para></listitem></varlistentry> 661 662 <varlistentry><term><ulink url="../ext/lwg-defects.html#455">455</ulink>: 663 <emphasis>cerr::tie() and wcerr::tie() are overspecified</emphasis> 664 </term> 665 <listitem><para>Initialize cerr tied to cout and wcerr tied to wcout. 666 </para></listitem></varlistentry> 667 668 <varlistentry><term><ulink url="../ext/lwg-defects.html#464">464</ulink>: 669 <emphasis>Suggestion for new member functions in standard containers</emphasis> 670 </term> 671 <listitem><para>Add <code>data()</code> to <code>std::vector</code> and 672 <code>at(const key_type&)</code> to <code>std::map</code>. 673 </para></listitem></varlistentry> 674 675 <varlistentry><term><ulink url="../ext/lwg-defects.html#508">508</ulink>: 676 <emphasis>Bad parameters for ranlux64_base_01</emphasis> 677 </term> 678 <listitem><para>Fix the parameters. 679 </para></listitem></varlistentry> 680 681 <varlistentry><term><ulink url="../ext/lwg-closed.html#512">512</ulink>: 682 <emphasis>Seeding subtract_with_carry_01 from a single unsigned long</emphasis> 683 </term> 684 <listitem><para>Construct a <code>linear_congruential</code> engine and seed with it. 685 </para></listitem></varlistentry> 686 687 <varlistentry><term><ulink url="../ext/lwg-closed.html#526">526</ulink>: 688 <emphasis>Is it undefined if a function in the standard changes in 689 parameters?</emphasis> 690 </term> 691 <listitem><para>Use &value. 692 </para></listitem></varlistentry> 693 694 <varlistentry><term><ulink url="../ext/lwg-defects.html#538">538</ulink>: 695 <emphasis>241 again: Does unique_copy() require CopyConstructible 696 and Assignable?</emphasis> 697 </term> 698 <listitem><para>In case of input_iterator/output_iterator rely on Assignability of 699 input_iterator' value_type. 700 </para></listitem></varlistentry> 701 702 <varlistentry><term><ulink url="../ext/lwg-active.html#539">539</ulink>: 703 <emphasis>partial_sum and adjacent_difference should mention 704 requirements</emphasis> 705 </term> 706 <listitem><para>We were almost doing the right thing, just use std::move 707 in adjacent_difference. 708 </para></listitem></varlistentry> 709 710 <varlistentry><term><ulink url="../ext/lwg-defects.html#541">541</ulink>: 711 <emphasis>shared_ptr template assignment and void</emphasis> 712 </term> 713 <listitem><para>Add an auto_ptr<void> specialization. 714 </para></listitem></varlistentry> 715 716 <varlistentry><term><ulink url="../ext/lwg-defects.html#543">543</ulink>: 717 <emphasis>valarray slice default constructor</emphasis> 718 </term> 719 <listitem><para>Follow the straightforward proposed resolution. 720 </para></listitem></varlistentry> 721 722 <varlistentry><term><ulink url="../ext/lwg-defects.html#550">550</ulink>: 723 <emphasis>What should the return type of pow(float,int) be?</emphasis> 724 </term> 725 <listitem><para>In C++0x mode, remove the pow(float,int), etc., signatures. 726 </para></listitem></varlistentry> 727 728 <varlistentry><term><ulink url="../ext/lwg-defects.html#586">586</ulink>: 729 <emphasis>string inserter not a formatted function</emphasis> 730 </term> 731 <listitem><para>Change it to be a formatted output function (i.e. catch exceptions). 732 </para></listitem></varlistentry> 733 734 <varlistentry><term><ulink url="../ext/lwg-defects.html#596">596</ulink>: 735 <emphasis>27.8.1.3 Table 112 omits "a+" and "a+b" modes</emphasis> 736 </term> 737 <listitem><para>Add the missing modes to fopen_mode. 738 </para></listitem></varlistentry> 739 740 <varlistentry><term><ulink url="../ext/lwg-defects.html#630">630</ulink>: 741 <emphasis>arrays of valarray</emphasis> 742 </term> 743 <listitem><para>Implement the simple resolution. 744 </para></listitem></varlistentry> 745 746 <varlistentry><term><ulink url="../ext/lwg-defects.html#660">660</ulink>: 747 <emphasis>Missing bitwise operations</emphasis> 748 </term> 749 <listitem><para>Add the missing operations. 750 </para></listitem></varlistentry> 751 752 <varlistentry><term><ulink url="../ext/lwg-defects.html#691">691</ulink>: 753 <emphasis>const_local_iterator cbegin, cend missing from TR1</emphasis> 754 </term> 755 <listitem><para>In C++0x mode add cbegin(size_type) and cend(size_type) 756 to the unordered containers. 757 </para></listitem></varlistentry> 758 759 <varlistentry><term><ulink url="../ext/lwg-defects.html#693">693</ulink>: 760 <emphasis>std::bitset::all() missing</emphasis> 761 </term> 762 <listitem><para>Add it, consistently with the discussion. 763 </para></listitem></varlistentry> 764 765 <varlistentry><term><ulink url="../ext/lwg-defects.html#695">695</ulink>: 766 <emphasis>ctype<char>::classic_table() not accessible</emphasis> 767 </term> 768 <listitem><para>Make the member functions table and classic_table public. 769 </para></listitem></varlistentry> 770 771 <varlistentry><term><ulink url="../ext/lwg-defects.html#696">696</ulink>: 772 <emphasis>istream::operator>>(int&) broken</emphasis> 773 </term> 774 <listitem><para>Implement the straightforward resolution. 775 </para></listitem></varlistentry> 776 777 <varlistentry><term><ulink url="../ext/lwg-defects.html#761">761</ulink>: 778 <emphasis>unordered_map needs an at() member function</emphasis> 779 </term> 780 <listitem><para>In C++0x mode, add at() and at() const. 781 </para></listitem></varlistentry> 782 783 <varlistentry><term><ulink url="../ext/lwg-defects.html#775">775</ulink>: 784 <emphasis>Tuple indexing should be unsigned?</emphasis> 785 </term> 786 <listitem><para>Implement the int -> size_t replacements. 787 </para></listitem></varlistentry> 788 789 <varlistentry><term><ulink url="../ext/lwg-defects.html#776">776</ulink>: 790 <emphasis>Undescribed assign function of std::array</emphasis> 791 </term> 792 <listitem><para>In C++0x mode, remove assign, add fill. 793 </para></listitem></varlistentry> 794 795 <varlistentry><term><ulink url="../ext/lwg-defects.html#781">781</ulink>: 796 <emphasis>std::complex should add missing C99 functions</emphasis> 797 </term> 798 <listitem><para>In C++0x mode, add std::proj. 799 </para></listitem></varlistentry> 800 801 <varlistentry><term><ulink url="../ext/lwg-defects.html#809">809</ulink>: 802 <emphasis>std::swap should be overloaded for array types</emphasis> 803 </term> 804 <listitem><para>Add the overload. 805 </para></listitem></varlistentry> 806 807 <varlistentry><term><ulink url="../ext/lwg-defects.html#844">844</ulink>: 808 <emphasis>complex pow return type is ambiguous</emphasis> 809 </term> 810 <listitem><para>In C++0x mode, remove the pow(complex<T>, int) signature. 811 </para></listitem></varlistentry> 812 813 <varlistentry><term><ulink url="../ext/lwg-defects.html#853">853</ulink>: 814 <emphasis>to_string needs updating with zero and one</emphasis> 815 </term> 816 <listitem><para>Update / add the signatures. 817 </para></listitem></varlistentry> 818 819 <varlistentry><term><ulink url="../ext/lwg-active.html#865">865</ulink>: 820 <emphasis>More algorithms that throw away information</emphasis> 821 </term> 822 <listitem><para>The traditional HP / SGI return type and value is blessed 823 by the resolution of the DR. 824 </para></listitem></varlistentry> 825 </variablelist> 826 827 </sect2> 828 </sect1> 829</chapter> 830 831 832<!-- Chapter 02 : Setup --> 833<chapter id="manual.intro.setup" xreflabel="Setup"> 834 <?dbhtml filename="setup.html"?> 835 <title>Setup</title> 836 837 <para>To transform libstdc++ sources into installed include files 838 and properly built binaries useful for linking to other software is 839 a multi-step process. Steps include getting the sources, 840 configuring and building the sources, testing, and installation. 841 </para> 842 843 <para>The general outline of commands is something like: 844 </para> 845 846 <programlisting> 847 <emphasis>get gcc sources</emphasis> 848 <emphasis>extract into gccsrcdir</emphasis> 849 mkdir <emphasis>gccbuilddir</emphasis> 850 cd <emphasis>gccbuilddir</emphasis> 851 <emphasis>gccsrcdir</emphasis>/configure --prefix=<emphasis>destdir</emphasis> --other-opts... 852 make 853 make check 854 make install 855 </programlisting> 856 857 <para> 858 Each step is described in more detail in the following sections. 859 </para> 860 861 <!-- Section 01 : Prerequisites --> 862 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 863 parse="xml" href="prerequisites.xml"> 864 </xi:include> 865 866 <!-- Section 02 : Configure --> 867 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 868 parse="xml" href="configure.xml"> 869 </xi:include> 870 871 <!-- Section 03 : Make --> 872<sect1 id="manual.intro.setup.make" xreflabel="Make"> 873 <?dbhtml filename="make.html"?> 874<title>Make</title> 875 <para>If you have never done this before, you should read the basic 876 <ulink url="http://gcc.gnu.org/install/">GCC Installation 877 Instructions</ulink> first. Read <emphasis>all of them</emphasis>. 878 <emphasis>Twice.</emphasis> 879 </para> 880 881<para>Then type:<command>make</command>, and congratulations, you're 882started to build. 883</para> 884 885</sect1> 886 887</chapter> 888 889<!-- Chapter 03 : Using --> 890<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 891 parse="xml" href="using.xml"> 892</xi:include> 893 894</part> 895