xref: /openbsd-src/gnu/gcc/libstdc++-v3/docs/html/ext/howto.html (revision 404b540a9034ac75a6199ad1a32d1bbc7a0d4210)
1*404b540aSrobert<?xml version="1.0" encoding="ISO-8859-1"?>
2*404b540aSrobert<!DOCTYPE html
3*404b540aSrobert          PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4*404b540aSrobert          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5*404b540aSrobert
6*404b540aSrobert<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7*404b540aSrobert<head>
8*404b540aSrobert   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9*404b540aSrobert   <meta name="AUTHOR" content="pme@gcc.gnu.org (Phil Edwards)" />
10*404b540aSrobert   <meta name="KEYWORDS" content="HOWTO, libstdc++, GCC, g++, libg++, STL" />
11*404b540aSrobert   <meta name="DESCRIPTION" content="Notes for the libstdc++ extensions." />
12*404b540aSrobert   <meta name="GENERATOR" content="vi and eight fingers" />
13*404b540aSrobert   <title>libstdc++-v3 HOWTO:  Extensions</title>
14*404b540aSrobert<link rel="StyleSheet" href="../lib3styles.css" type="text/css" />
15*404b540aSrobert<link rel="Start" href="../documentation.html" type="text/html"
16*404b540aSrobert  title="GNU C++ Standard Library" />
17*404b540aSrobert<link rel="Prev" href="../27_io/howto.html" type="text/html"
18*404b540aSrobert  title="Input/Output" />
19*404b540aSrobert<link rel="Bookmark" href="sgiexts.html" type="text/html"
20*404b540aSrobert  title="SGI extensions" />
21*404b540aSrobert<link rel="Bookmark" href="mt_allocator.html" type="text/html"
22*404b540aSrobert  title="__mt_alloc" />
23*404b540aSrobert<link rel="Copyright" href="../17_intro/license.html" type="text/html" />
24*404b540aSrobert</head>
25*404b540aSrobert<body>
26*404b540aSrobert
27*404b540aSrobert<h1 class="centered"><a name="top">Extensions</a></h1>
28*404b540aSrobert
29*404b540aSrobert<p>Here we will make an attempt at describing the non-Standard extensions to
30*404b540aSrobert   the library.  Some of these are from SGI's STL, some of these are GNU's,
31*404b540aSrobert   and some just seemed to appear on the doorstep.
32*404b540aSrobert</p>
33*404b540aSrobert<p><strong>Before you leap in and use these</strong>, be aware of two things:
34*404b540aSrobert</p>
35*404b540aSrobert<ol>
36*404b540aSrobert   <li>Non-Standard means exactly that.  The behavior, and the very
37*404b540aSrobert       existence, of these extensions may change with little or no
38*404b540aSrobert       warning.  (Ideally, the really good ones will appear in the next
39*404b540aSrobert       revision of C++.)  Also, other platforms, other compilers, other
40*404b540aSrobert       versions of g++ or libstdc++-v3 may not recognize these names, or
41*404b540aSrobert       treat them differently, or... </li>
42*404b540aSrobert   <li>You should know how to <a href="../faq/index.html#5_4">access
43*404b540aSrobert       these headers properly</a>. </li>
44*404b540aSrobert</ol>
45*404b540aSrobert
46*404b540aSrobert
47*404b540aSrobert<!-- ####################################################### -->
48*404b540aSrobert<hr />
49*404b540aSrobert<h1>Contents</h1>
50*404b540aSrobert<ul>
51*404b540aSrobert   <li><a href="#1">Ropes and trees and hashes, oh my!</a></li>
52*404b540aSrobert   <li><a href="#2">Added members and types</a></li>
53*404b540aSrobert   <li><a href="mt_allocator.html"><code>__mt_alloc</code> </a></li>
54*404b540aSrobert   <li><a href="#4">Compile-time checks</a></li>
55*404b540aSrobert   <li><a href="#5">LWG Issues</a></li>
56*404b540aSrobert   <li><a href="../18_support/howto.html#6">Demangling</a></li>
57*404b540aSrobert</ul>
58*404b540aSrobert
59*404b540aSrobert<hr />
60*404b540aSrobert
61*404b540aSrobert<!-- ####################################################### -->
62*404b540aSrobert
63*404b540aSrobert<h2><a name="1">Ropes and trees and hashes, oh my!</a></h2>
64*404b540aSrobert   <p>The SGI headers</p>
65*404b540aSrobert   <pre>
66*404b540aSrobert     &lt;bvector&gt;
67*404b540aSrobert     &lt;hash_map&gt;
68*404b540aSrobert     &lt;hash_set&gt;
69*404b540aSrobert     &lt;rope&gt;
70*404b540aSrobert     &lt;slist&gt;
71*404b540aSrobert     &lt;tree&gt;
72*404b540aSrobert   </pre>
73*404b540aSrobert   <p>are all here; <code>&lt;bvector&gt;</code> exposes the old bit_vector
74*404b540aSrobert      class that was used before specialization of vector&lt;bool&gt; was
75*404b540aSrobert      available (it's actually a typedef for the specialization now).
76*404b540aSrobert      <code>&lt;hash_map&gt;</code> and <code>&lt;hash_set&gt;</code>
77*404b540aSrobert      are discussed further below.  <code>&lt;rope&gt;</code> is the SGI
78*404b540aSrobert      specialization for large strings (&quot;rope,&quot; &quot;large
79*404b540aSrobert      strings,&quot; get it?  love those SGI folks).
80*404b540aSrobert      <code>&lt;slist&gt;</code> is a singly-linked list, for when the
81*404b540aSrobert      doubly-linked <code>list&lt;&gt;</code> is too much space overhead, and
82*404b540aSrobert      <code>&lt;tree&gt;</code> exposes the red-black tree classes used in the
83*404b540aSrobert      implementation of the standard maps and sets.
84*404b540aSrobert   </p>
85*404b540aSrobert   <p>Okay, about those hashing classes...  I'm going to foist most of the
86*404b540aSrobert      work off onto SGI's own site.
87*404b540aSrobert   </p>
88*404b540aSrobert   <p>Each of the associative containers map, multimap, set, and multiset
89*404b540aSrobert      have a counterpart which uses a
90*404b540aSrobert      <a href="http://www.sgi.com/tech/stl/HashFunction.html">hashing
91*404b540aSrobert      function</a> to do the arranging, instead of a strict weak ordering
92*404b540aSrobert      function.  The classes take as one of their template parameters a
93*404b540aSrobert      function object that will return the hash value; by default, an
94*404b540aSrobert      instantiation of
95*404b540aSrobert      <a href="http://www.sgi.com/tech/stl/hash.html">hash</a>.
96*404b540aSrobert      You should specialize this functor for your class, or define your own,
97*404b540aSrobert      before trying to use one of the hashing classes.
98*404b540aSrobert   </p>
99*404b540aSrobert   <p>The hashing classes support all the usual associative container
100*404b540aSrobert      functions, as well as some extra constructors specifying the number
101*404b540aSrobert      of buckets, etc.
102*404b540aSrobert   </p>
103*404b540aSrobert   <p>Why would you want to use a hashing class instead of the
104*404b540aSrobert      &quot;normal&quot; implementations?  Matt Austern writes:
105*404b540aSrobert   </p>
106*404b540aSrobert   <blockquote><em>[W]ith a well chosen hash function, hash tables
107*404b540aSrobert   generally provide much better average-case performance than binary
108*404b540aSrobert   search trees, and much worse worst-case performance.  So if your
109*404b540aSrobert   implementation has hash_map, if you don't mind using nonstandard
110*404b540aSrobert   components, and if you aren't scared about the possibility of
111*404b540aSrobert   pathological cases, you'll probably get better performance from
112*404b540aSrobert   hash_map.</em></blockquote>
113*404b540aSrobert   <p>(Side note:  for those of you wondering, <strong>&quot;Why wasn't a hash
114*404b540aSrobert      table included in the Standard in the first #!$@ place?&quot;</strong>
115*404b540aSrobert      I'll give a quick answer:  it was proposed, but too late and in too
116*404b540aSrobert      unorganized a fashion.  Some sort of hashing will undoubtedly be
117*404b540aSrobert      included in a future Standard.)
118*404b540aSrobert   </p>
119*404b540aSrobert   <p>Return <a href="#top">to top of page</a> or
120*404b540aSrobert      <a href="../faq/index.html">to the FAQ</a>.
121*404b540aSrobert   </p>
122*404b540aSrobert
123*404b540aSrobert<hr />
124*404b540aSrobert<h2><a name="2">Added members and types</a></h2>
125*404b540aSrobert   <p>Some of the classes in the Standard Library have additional
126*404b540aSrobert      publicly-available members, and some classes are themselves not in
127*404b540aSrobert      the standard.  Of those, some are intended purely for the implementors,
128*404b540aSrobert      for example, additional typedefs.  Those won't be described here
129*404b540aSrobert      (or anywhere else).
130*404b540aSrobert   </p>
131*404b540aSrobert   <ul>
132*404b540aSrobert     <li>The extensions added by SGI are so numerous that they have
133*404b540aSrobert         <a href="sgiexts.html">their own page</a>.  Since the SGI STL is no
134*404b540aSrobert         longer actively maintained, we will try and keep this code working
135*404b540aSrobert         ourselves.</li>
136*404b540aSrobert     <li>Extensions allowing <code>filebuf</code>s to be constructed from
137*404b540aSrobert         stdio types are described in the
138*404b540aSrobert         <a href="../27_io/howto.html#11">chapter 27 notes</a>.</li>
139*404b540aSrobert   </ul>
140*404b540aSrobert   <p>Return <a href="#top">to top of page</a> or
141*404b540aSrobert      <a href="../faq/index.html">to the FAQ</a>.
142*404b540aSrobert   </p>
143*404b540aSrobert
144*404b540aSrobert<hr />
145*404b540aSrobert<h2><a name="4">Compile-time checks</a></h2>
146*404b540aSrobert   <p>Currently libstdc++-v3 uses the concept checkers from the Boost
147*404b540aSrobert      library to perform <a href="../19_diagnostics/howto.html#3">optional
148*404b540aSrobert      compile-time checking</a> of template instantiations of the standard
149*404b540aSrobert      containers.  They are described in the linked-to page.
150*404b540aSrobert   </p>
151*404b540aSrobert   <p>Return <a href="#top">to top of page</a> or
152*404b540aSrobert      <a href="../faq/index.html">to the FAQ</a>.
153*404b540aSrobert   </p>
154*404b540aSrobert
155*404b540aSrobert<hr />
156*404b540aSrobert<h2><a name="5">LWG Issues</a></h2>
157*404b540aSrobert   <p>Everybody's got issues.  Even the C++ Standard Library.
158*404b540aSrobert   </p>
159*404b540aSrobert   <p>The Library Working Group, or LWG, is the ISO subcommittee responsible
160*404b540aSrobert      for making changes to the library.  They periodically publish an
161*404b540aSrobert      Issues List containing problems and possible solutions.  As they reach
162*404b540aSrobert      a consensus on proposed solutions, we often incorporate the solution
163*404b540aSrobert      into libstdc++-v3.
164*404b540aSrobert   </p>
165*404b540aSrobert   <p>Here are the issues which have resulted in code changes to the library.
166*404b540aSrobert      The links are to the specific defect reports from a <strong>partial
167*404b540aSrobert      copy</strong> of the Issues List.  You can read the full version online
168*404b540aSrobert      at the <a href="http://www.open-std.org/jtc1/sc22/wg21/">ISO C++
169*404b540aSrobert      Committee homepage</a>, linked to on the
170*404b540aSrobert      <a href="http://gcc.gnu.org/readings.html">GCC &quot;Readings&quot;
171*404b540aSrobert      page</a>.  If
172*404b540aSrobert      you spend a lot of time reading the issues, we recommend downloading
173*404b540aSrobert      the ZIP file and reading them locally.
174*404b540aSrobert   </p>
175*404b540aSrobert   <p>(NB:  <strong>partial copy</strong> means that not all links within
176*404b540aSrobert      the lwg-*.html pages will work.
177*404b540aSrobert      Specifically, links to defect reports that have not been accorded full
178*404b540aSrobert      DR status will probably break.  Rather than trying to mirror the
179*404b540aSrobert      entire issues list on our overworked web server, we recommend you go
180*404b540aSrobert      to the LWG homepage instead.)
181*404b540aSrobert   </p>
182*404b540aSrobert   <p>
183*404b540aSrobert      If a DR is not listed here, we may simply not have gotten to it yet;
184*404b540aSrobert      feel free to submit a patch.  Search the include/bits and src
185*404b540aSrobert      directories for appearances of _GLIBCXX_RESOLVE_LIB_DEFECTS for
186*404b540aSrobert      examples of style.  Note that we usually do not make changes to the code
187*404b540aSrobert      until an issue has reached <a href="lwg-active.html#DR">DR</a> status.
188*404b540aSrobert   </p>
189*404b540aSrobert   <dl>
190*404b540aSrobert    <dt><a href="lwg-defects.html#5">5</a>:
191*404b540aSrobert        <em>string::compare specification questionable</em>
192*404b540aSrobert    </dt>
193*404b540aSrobert    <dd>This should be two overloaded functions rather than a single function.
194*404b540aSrobert    </dd>
195*404b540aSrobert
196*404b540aSrobert    <dt><a href="lwg-defects.html#17">17</a>:
197*404b540aSrobert        <em>Bad bool parsing</em>
198*404b540aSrobert    </dt>
199*404b540aSrobert    <dd>Apparently extracting Boolean values was messed up...
200*404b540aSrobert    </dd>
201*404b540aSrobert
202*404b540aSrobert    <dt><a href="lwg-defects.html#19">19</a>:
203*404b540aSrobert        <em>&quot;Noconv&quot; definition too vague</em>
204*404b540aSrobert    </dt>
205*404b540aSrobert    <dd>If <code>codecvt::do_in</code> returns <code>noconv</code> there are
206*404b540aSrobert        no changes to the values in <code>[to, to_limit)</code>.
207*404b540aSrobert    </dd>
208*404b540aSrobert
209*404b540aSrobert    <dt><a href="lwg-defects.html#22">22</a>:
210*404b540aSrobert        <em>Member open vs flags</em>
211*404b540aSrobert    </dt>
212*404b540aSrobert    <dd>Re-opening a file stream does <em>not</em> clear the state flags.
213*404b540aSrobert    </dd>
214*404b540aSrobert
215*404b540aSrobert    <dt><a href="lwg-defects.html#25">25</a>:
216*404b540aSrobert        <em>String operator&lt;&lt; uses width() value wrong</em>
217*404b540aSrobert    </dt>
218*404b540aSrobert    <dd>Padding issues.
219*404b540aSrobert    </dd>
220*404b540aSrobert
221*404b540aSrobert    <dt><a href="lwg-defects.html#48">48</a>:
222*404b540aSrobert        <em>Use of non-existent exception constructor</em>
223*404b540aSrobert    </dt>
224*404b540aSrobert    <dd>An instance of <code>ios_base::failure</code> is constructed instead.
225*404b540aSrobert    </dd>
226*404b540aSrobert
227*404b540aSrobert    <dt><a href="lwg-defects.html#49">49</a>:
228*404b540aSrobert        <em>Underspecification of ios_base::sync_with_stdio</em>
229*404b540aSrobert    </dt>
230*404b540aSrobert    <dd>The return type is the <em>previous</em> state of synchronization.
231*404b540aSrobert    </dd>
232*404b540aSrobert
233*404b540aSrobert    <dt><a href="lwg-defects.html#50">50</a>:
234*404b540aSrobert        <em>Copy constructor and assignment operator of ios_base</em>
235*404b540aSrobert    </dt>
236*404b540aSrobert    <dd>These members functions are declared <code>private</code> and are
237*404b540aSrobert        thus inaccessible.  Specifying the correct semantics of
238*404b540aSrobert        &quot;copying stream state&quot; was deemed too complicated.
239*404b540aSrobert    </dd>
240*404b540aSrobert
241*404b540aSrobert    <dt><a href="lwg-defects.html#60">60</a>:
242*404b540aSrobert        <em>What is a formatted input function?</em>
243*404b540aSrobert    </dt>
244*404b540aSrobert    <dd>This DR made many widespread changes to <code>basic_istream</code>
245*404b540aSrobert        and <code>basic_ostream</code> all of which have been implemented.
246*404b540aSrobert    </dd>
247*404b540aSrobert
248*404b540aSrobert    <dt><a href="lwg-defects.html#63">63</a>:
249*404b540aSrobert        <em>Exception-handling policy for unformatted output</em>
250*404b540aSrobert    </dt>
251*404b540aSrobert    <dd>Make the policy consistent with that of formatted input, unformatted
252*404b540aSrobert        input, and formatted output.
253*404b540aSrobert    </dd>
254*404b540aSrobert
255*404b540aSrobert    <dt><a href="lwg-defects.html#68">68</a>:
256*404b540aSrobert        <em>Extractors for char* should store null at end</em>
257*404b540aSrobert    </dt>
258*404b540aSrobert    <dd>And they do now.  An editing glitch in the last item in the list of
259*404b540aSrobert        [27.6.1.2.3]/7.
260*404b540aSrobert    </dd>
261*404b540aSrobert
262*404b540aSrobert    <dt><a href="lwg-defects.html#74">74</a>:
263*404b540aSrobert        <em>Garbled text for codecvt::do_max_length</em>
264*404b540aSrobert    </dt>
265*404b540aSrobert    <dd>The text of the standard was gibberish.  Typos gone rampant.
266*404b540aSrobert    </dd>
267*404b540aSrobert
268*404b540aSrobert    <dt><a href="lwg-defects.html#75">75</a>:
269*404b540aSrobert        <em>Contradiction in codecvt::length's argument types</em>
270*404b540aSrobert    </dt>
271*404b540aSrobert    <dd>Change the first parameter to <code>stateT&amp;</code> and implement
272*404b540aSrobert        the new effects paragraph.
273*404b540aSrobert    </dd>
274*404b540aSrobert
275*404b540aSrobert    <dt><a href="lwg-defects.html#83">83</a>:
276*404b540aSrobert        <em>string::npos vs. string::max_size()</em>
277*404b540aSrobert    </dt>
278*404b540aSrobert    <dd>Safety checks on the size of the string should test against
279*404b540aSrobert        <code>max_size()</code> rather than <code>npos</code>.
280*404b540aSrobert    </dd>
281*404b540aSrobert
282*404b540aSrobert    <dt><a href="lwg-defects.html#90">90</a>:
283*404b540aSrobert        <em>Incorrect description of operator&gt;&gt; for strings</em>
284*404b540aSrobert    </dt>
285*404b540aSrobert    <dd>The effect contain <code>isspace(c,getloc())</code> which must be
286*404b540aSrobert        replaced by <code>isspace(c,is.getloc())</code>.
287*404b540aSrobert    </dd>
288*404b540aSrobert
289*404b540aSrobert    <dt><a href="lwg-defects.html#91">91</a>:
290*404b540aSrobert        <em>Description of operator&gt;&gt; and getline() for string&lt;&gt;
291*404b540aSrobert	    might cause endless loop</em>
292*404b540aSrobert    </dt>
293*404b540aSrobert    <dd>They behave as a formatted input function and as an unformatted
294*404b540aSrobert        input function, respectively (except that <code>getline</code> is
295*404b540aSrobert	not required to set <code>gcount</code>).
296*404b540aSrobert    </dd>
297*404b540aSrobert
298*404b540aSrobert    <dt><a href="lwg-defects.html#103">103</a>:
299*404b540aSrobert        <em>set::iterator is required to be modifiable, but this allows
300*404b540aSrobert	    modification of keys.</em>
301*404b540aSrobert    </dt>
302*404b540aSrobert    <dd>For associative containers where the value type is the same as
303*404b540aSrobert        the key type, both <code>iterator</code> and <code>const_iterator
304*404b540aSrobert	</code> are constant iterators.
305*404b540aSrobert    </dd>
306*404b540aSrobert
307*404b540aSrobert    <dt><a href="lwg-defects.html#109">109</a>:
308*404b540aSrobert        <em>Missing binders for non-const sequence elements</em>
309*404b540aSrobert    </dt>
310*404b540aSrobert    <dd>The <code>binder1st</code> and <code>binder2nd</code> didn't have an
311*404b540aSrobert        <code>operator()</code> taking a non-const parameter.
312*404b540aSrobert    </dd>
313*404b540aSrobert
314*404b540aSrobert    <dt><a href="lwg-defects.html#110">110</a>:
315*404b540aSrobert        <em>istreambuf_iterator::equal not const</em>
316*404b540aSrobert    </dt>
317*404b540aSrobert    <dd>This was not a const member function.  Note that the DR says to
318*404b540aSrobert        replace the function with a const one; we have instead provided an
319*404b540aSrobert        overloaded version with identical contents.
320*404b540aSrobert    </dd>
321*404b540aSrobert
322*404b540aSrobert    <dt><a href="lwg-defects.html#117">117</a>:
323*404b540aSrobert        <em>basic_ostream uses nonexistent num_put member functions</em>
324*404b540aSrobert    </dt>
325*404b540aSrobert    <dd><code>num_put::put()</code> was overloaded on the wrong types.
326*404b540aSrobert    </dd>
327*404b540aSrobert
328*404b540aSrobert    <dt><a href="lwg-defects.html#118">118</a>:
329*404b540aSrobert        <em>basic_istream uses nonexistent num_get member functions</em>
330*404b540aSrobert    </dt>
331*404b540aSrobert    <dd>Same as 117, but for <code>num_get::get()</code>.
332*404b540aSrobert    </dd>
333*404b540aSrobert
334*404b540aSrobert    <dt><a href="lwg-defects.html#129">129</a>:
335*404b540aSrobert        <em>Need error indication from seekp() and seekg()</em>
336*404b540aSrobert    </dt>
337*404b540aSrobert    <dd>These functions set <code>failbit</code> on error now.
338*404b540aSrobert    </dd>
339*404b540aSrobert
340*404b540aSrobert    <dt><a href="lwg-defects.html#136">136</a>:
341*404b540aSrobert        <em>seekp, seekg setting wrong streams?</em>
342*404b540aSrobert    </dt>
343*404b540aSrobert    <dd><code>seekp</code> should only set the output stream, and
344*404b540aSrobert        <code>seekg</code> should only set the input stream.
345*404b540aSrobert    </dd>
346*404b540aSrobert
347*404b540aSrobert<!--<dt><a href="lwg-defects.html#159">159</a>:
348*404b540aSrobert        <em>Strange use of underflow()</em>
349*404b540aSrobert    </dt>
350*404b540aSrobert    <dd>In fstream.tcc, the basic_filebuf&lt;&gt;::showmanyc() function
351*404b540aSrobert        should probably not be calling <code>underflow()</code>.
352*404b540aSrobert    </dd> -->
353*404b540aSrobert
354*404b540aSrobert    <dt><a href="lwg-defects.html#167">167</a>:
355*404b540aSrobert        <em>Improper use of traits_type::length()</em>
356*404b540aSrobert    </dt>
357*404b540aSrobert    <dd><code>op&lt;&lt;</code> with a <code>const char*</code> was
358*404b540aSrobert        calculating an incorrect number of characters to write.
359*404b540aSrobert    </dd>
360*404b540aSrobert
361*404b540aSrobert    <dt><a href="lwg-defects.html#169">169</a>:
362*404b540aSrobert        <em>Bad efficiency of overflow() mandated</em>
363*404b540aSrobert    </dt>
364*404b540aSrobert    <dd>Grow efficiently the internal array object.
365*404b540aSrobert    </dd>
366*404b540aSrobert
367*404b540aSrobert    <dt><a href="lwg-defects.html#171">171</a>:
368*404b540aSrobert        <em>Strange seekpos() semantics due to joint position</em>
369*404b540aSrobert    </dt>
370*404b540aSrobert    <dd>Quite complex to summarize...
371*404b540aSrobert    </dd>
372*404b540aSrobert
373*404b540aSrobert    <dt><a href="lwg-defects.html#181">181</a>:
374*404b540aSrobert        <em>make_pair() unintended behavior</em>
375*404b540aSrobert    </dt>
376*404b540aSrobert    <dd>This function used to take its arguments as reference-to-const, now
377*404b540aSrobert        it copies them (pass by value).
378*404b540aSrobert    </dd>
379*404b540aSrobert
380*404b540aSrobert    <dt><a href="lwg-defects.html#195">195</a>:
381*404b540aSrobert        <em>Should basic_istream::sentry's constructor ever set eofbit?</em>
382*404b540aSrobert    </dt>
383*404b540aSrobert    <dd>Yes, it can, specifically if EOF is reached while skipping whitespace.
384*404b540aSrobert    </dd>
385*404b540aSrobert
386*404b540aSrobert    <dt><a href="lwg-defects.html#211">211</a>:
387*404b540aSrobert        <em>operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</em>
388*404b540aSrobert    </dt>
389*404b540aSrobert    <dd>If nothing is extracted into the string, <code>op&gt;&gt;</code> now
390*404b540aSrobert        sets <code>failbit</code> (which can cause an exception, etc., etc.).
391*404b540aSrobert    </dd>
392*404b540aSrobert
393*404b540aSrobert    <dt><a href="lwg-defects.html#214">214</a>:
394*404b540aSrobert        <em>set::find() missing const overload</em>
395*404b540aSrobert    </dt>
396*404b540aSrobert    <dd>Both <code>set</code> and <code>multiset</code> were missing
397*404b540aSrobert        overloaded find, lower_bound, upper_bound, and equal_range functions
398*404b540aSrobert        for const instances.
399*404b540aSrobert    </dd>
400*404b540aSrobert
401*404b540aSrobert    <dt><a href="lwg-defects.html#231">231</a>:
402*404b540aSrobert        <em>Precision in iostream?</em>
403*404b540aSrobert    </dt>
404*404b540aSrobert    <dd>For conversion from a floating-point type, <code>str.precision()</code>
405*404b540aSrobert        is specified in the conversion specification.
406*404b540aSrobert    </dd>
407*404b540aSrobert
408*404b540aSrobert    <dt><a href="lwg-active.html#233">233</a>:
409*404b540aSrobert        <em>Insertion hints in associative containers</em>
410*404b540aSrobert    </dt>
411*404b540aSrobert    <dd>Implement N1780, first check before then check after, insert as close
412*404b540aSrobert        to hint as possible.
413*404b540aSrobert    </dd>
414*404b540aSrobert
415*404b540aSrobert    <dt><a href="lwg-defects.html#235">235</a>:
416*404b540aSrobert        <em>No specification of default ctor for reverse_iterator</em>
417*404b540aSrobert    </dt>
418*404b540aSrobert    <dd>The declaration of <code>reverse_iterator</code> lists a default constructor.
419*404b540aSrobert        However, no specification is given what this constructor should do.
420*404b540aSrobert    </dd>
421*404b540aSrobert
422*404b540aSrobert    <dt><a href="lwg-defects.html#241">241</a>:
423*404b540aSrobert        <em>Does unique_copy() require CopyConstructible and Assignable?</em>
424*404b540aSrobert    </dt>
425*404b540aSrobert    <dd>Add an helper for forward_iterator/output_iterator, fix the existing
426*404b540aSrobert        one for input_iterator/output_iterator not to rely on Assignability.
427*404b540aSrobert    </dd>
428*404b540aSrobert
429*404b540aSrobert    <dt><a href="lwg-defects.html#243">243</a>:
430*404b540aSrobert        <em>get and getline when sentry reports failure</em>
431*404b540aSrobert    </dt>
432*404b540aSrobert    <dd>Store a null character only if the character array has a non-zero size.
433*404b540aSrobert    </dd>
434*404b540aSrobert
435*404b540aSrobert    <dt><a href="lwg-defects.html#251">251</a>:
436*404b540aSrobert        <em>basic_stringbuf missing allocator_type</em>
437*404b540aSrobert    </dt>
438*404b540aSrobert    <dd>This nested typedef was originally not specified.
439*404b540aSrobert    </dd>
440*404b540aSrobert
441*404b540aSrobert    <dt><a href="lwg-defects.html#253">253</a>:
442*404b540aSrobert        <em>valarray helper functions are almost entirely useless</em>
443*404b540aSrobert    </dt>
444*404b540aSrobert    <dd>Make the copy constructor and copy-assignment operator declarations
445*404b540aSrobert        public in gslice_array, indirect_array, mask_array, slice_array; provide
446*404b540aSrobert	definitions.
447*404b540aSrobert    </dd>
448*404b540aSrobert
449*404b540aSrobert    <dt><a href="lwg-defects.html#265">265</a>:
450*404b540aSrobert        <em>std::pair::pair() effects overly restrictive</em>
451*404b540aSrobert    </dt>
452*404b540aSrobert    <dd>The default ctor would build its members from copies of temporaries;
453*404b540aSrobert        now it simply uses their respective default ctors.
454*404b540aSrobert    </dd>
455*404b540aSrobert
456*404b540aSrobert    <dt><a href="lwg-defects.html#266">266</a>:
457*404b540aSrobert        <em>bad_exception::~bad_exception() missing Effects clause</em>
458*404b540aSrobert    </dt>
459*404b540aSrobert    <dd>The <code>bad_</code>* classes no longer have destructors (they
460*404b540aSrobert        are trivial), since no description of them was ever given.
461*404b540aSrobert    </dd>
462*404b540aSrobert
463*404b540aSrobert    <dt><a href="lwg-defects.html#271">271</a>:
464*404b540aSrobert        <em>basic_iostream missing typedefs</em>
465*404b540aSrobert    </dt>
466*404b540aSrobert    <dd>The typedefs it inherits from its base classes can't be used, since
467*404b540aSrobert        (for example) <code>basic_iostream&lt;T&gt;::traits_type</code> is ambiguous.
468*404b540aSrobert    </dd>
469*404b540aSrobert
470*404b540aSrobert    <dt><a href="lwg-defects.html#275">275</a>:
471*404b540aSrobert        <em>Wrong type in num_get::get() overloads</em>
472*404b540aSrobert    </dt>
473*404b540aSrobert    <dd>Similar to 118.
474*404b540aSrobert    </dd>
475*404b540aSrobert
476*404b540aSrobert    <dt><a href="lwg-defects.html#280">280</a>:
477*404b540aSrobert        <em>Comparison of reverse_iterator to const reverse_iterator</em>
478*404b540aSrobert    </dt>
479*404b540aSrobert    <dd>Add global functions with two template parameters.
480*404b540aSrobert        (NB: not added for now a templated assignment operator)
481*404b540aSrobert    </dd>
482*404b540aSrobert
483*404b540aSrobert    <dt><a href="lwg-defects.html#292">292</a>:
484*404b540aSrobert        <em>Effects of a.copyfmt (a)</em>
485*404b540aSrobert    </dt>
486*404b540aSrobert    <dd>If <code>(this == &amp;rhs)</code> do nothing.
487*404b540aSrobert    </dd>
488*404b540aSrobert
489*404b540aSrobert    <dt><a href="lwg-defects.html#300">300</a>:
490*404b540aSrobert        <em>List::merge() specification incomplete</em>
491*404b540aSrobert    </dt>
492*404b540aSrobert    <dd>If <code>(this == &amp;x)</code> do nothing.
493*404b540aSrobert    </dd>
494*404b540aSrobert
495*404b540aSrobert    <dt><a href="lwg-defects.html#303">303</a>:
496*404b540aSrobert        <em>Bitset input operator underspecified</em>
497*404b540aSrobert    </dt>
498*404b540aSrobert    <dd>Basically, compare the input character to <code>is.widen(0)</code>
499*404b540aSrobert        and <code>is.widen(1)</code>.
500*404b540aSrobert    </dd>
501*404b540aSrobert
502*404b540aSrobert    <dt><a href="lwg-defects.html#305">305</a>:
503*404b540aSrobert        <em>Default behavior of codecvt&lt;wchar_t, char, mbstate_t&gt;::length()</em>
504*404b540aSrobert    </dt>
505*404b540aSrobert    <dd>Do not specify what <code>codecvt&lt;wchar_t, char, mbstate_t&gt;::do_length</code>
506*404b540aSrobert        must return.
507*404b540aSrobert    </dd>
508*404b540aSrobert
509*404b540aSrobert    <dt><a href="lwg-defects.html#328">328</a>:
510*404b540aSrobert        <em>Bad sprintf format modifier in money_put&lt;&gt;::do_put()</em>
511*404b540aSrobert    </dt>
512*404b540aSrobert    <dd>Change the format string to &quot;%.0Lf&quot;.
513*404b540aSrobert    </dd>
514*404b540aSrobert
515*404b540aSrobert    <dt><a href="lwg-defects.html#365">365</a>:
516*404b540aSrobert        <em>Lack of const-qualification in clause 27</em>
517*404b540aSrobert    </dt>
518*404b540aSrobert    <dd>Add const overloads of <code>is_open</code>.
519*404b540aSrobert    </dd>
520*404b540aSrobert
521*404b540aSrobert    <dt><a href="lwg-defects.html#389">389</a>:
522*404b540aSrobert        <em>Const overload of valarray::operator[] returns by value</em>
523*404b540aSrobert    </dt>
524*404b540aSrobert    <dd>Change it to return a <code>const T&amp;</code>.
525*404b540aSrobert    </dd>
526*404b540aSrobert
527*404b540aSrobert    <dt><a href="lwg-defects.html#402">402</a>:
528*404b540aSrobert        <em>Wrong new expression in [some_]allocator::construct</em>
529*404b540aSrobert    </dt>
530*404b540aSrobert    <dd>Replace &quot;new&quot; with &quot;::new&quot;.
531*404b540aSrobert    </dd>
532*404b540aSrobert
533*404b540aSrobert    <dt><a href="lwg-defects.html#409">409</a>:
534*404b540aSrobert        <em>Closing an fstream should clear the error state</em>
535*404b540aSrobert    </dt>
536*404b540aSrobert    <dd>Have <code>open</code> clear the error flags.
537*404b540aSrobert    </dd>
538*404b540aSrobert
539*404b540aSrobert    <dt><a href="lwg-active.html#431">431</a>:
540*404b540aSrobert        <em>Swapping containers with unequal allocators</em>
541*404b540aSrobert    </dt>
542*404b540aSrobert    <dd>Implement Option 3, as per N1599.
543*404b540aSrobert    </dd>
544*404b540aSrobert
545*404b540aSrobert    <dt><a href="lwg-defects.html#432">432</a>:
546*404b540aSrobert        <em>432. stringbuf::overflow() makes only one write position
547*404b540aSrobert	    available</em>
548*404b540aSrobert    </dt>
549*404b540aSrobert    <dd>Implement the resolution, beyond DR 169.
550*404b540aSrobert    </dd>
551*404b540aSrobert
552*404b540aSrobert    <dt><a href="lwg-defects.html#434">434</a>:
553*404b540aSrobert        <em>bitset::to_string() hard to use</em>
554*404b540aSrobert    </dt>
555*404b540aSrobert    <dd>Add three overloads, taking fewer template arguments.
556*404b540aSrobert    </dd>
557*404b540aSrobert
558*404b540aSrobert    <dt><a href="lwg-defects.html#453">453</a>:
559*404b540aSrobert        <em>basic_stringbuf::seekoff need not always fail for an empty stream</em>
560*404b540aSrobert    </dt>
561*404b540aSrobert    <dd>Don't fail if the next pointer is null and newoff is zero.
562*404b540aSrobert    </dd>
563*404b540aSrobert
564*404b540aSrobert    <dt><a href="lwg-defects.html#455">455</a>:
565*404b540aSrobert        <em>cerr::tie() and wcerr::tie() are overspecified</em>
566*404b540aSrobert    </dt>
567*404b540aSrobert    <dd>Initialize cerr tied to cout and wcerr tied to wcout.
568*404b540aSrobert    </dd>
569*404b540aSrobert
570*404b540aSrobert    <dt><a href="lwg-defects.html#464">464</a>:
571*404b540aSrobert        <em>Suggestion for new member functions in standard containers</em>
572*404b540aSrobert    </dt>
573*404b540aSrobert    <dd>Add <code>data()</code> to <code>std::vector</code> and
574*404b540aSrobert        <code>at(const key_type&amp;)</code> to <code>std::map</code>.
575*404b540aSrobert    </dd>
576*404b540aSrobert
577*404b540aSrobert    <dt><a href="lwg-defects.html#508">508</a>:
578*404b540aSrobert        <em>Bad parameters for ranlux64_base_01</em>
579*404b540aSrobert    </dt>
580*404b540aSrobert    <dd>Fix the parameters.
581*404b540aSrobert    </dd>
582*404b540aSrobert
583*404b540aSrobert    <dt><a href="lwg-closed.html#512">512</a>:
584*404b540aSrobert        <em>Seeding subtract_with_carry_01 from a single unsigned long</em>
585*404b540aSrobert    </dt>
586*404b540aSrobert    <dd>Construct a <code>linear_congruential</code> engine and seed with it.
587*404b540aSrobert    </dd>
588*404b540aSrobert
589*404b540aSrobert    <dt><a href="lwg-defects.html#538">538</a>:
590*404b540aSrobert        <em>241 again: Does unique_copy() require CopyConstructible
591*404b540aSrobert	    and Assignable?</em>
592*404b540aSrobert    </dt>
593*404b540aSrobert    <dd>In case of input_iterator/output_iterator rely on Assignability of
594*404b540aSrobert        input_iterator' value_type.
595*404b540aSrobert    </dd>
596*404b540aSrobert
597*404b540aSrobert    <dt><a href="lwg-active.html#586">586</a>:
598*404b540aSrobert        <em>string inserter not a formatted function</em>
599*404b540aSrobert    </dt>
600*404b540aSrobert    <dd>Change it to be a formatted output function (i.e. catch exceptions).
601*404b540aSrobert    </dd>
602*404b540aSrobert<!--
603*404b540aSrobert    <dt><a href="lwg-defects.html#"></a>:
604*404b540aSrobert        <em></em>
605*404b540aSrobert    </dt>
606*404b540aSrobert    <dd>
607*404b540aSrobert    </dd>
608*404b540aSrobert
609*404b540aSrobert-->
610*404b540aSrobert   </dl>
611*404b540aSrobert   <p>Return <a href="#top">to top of page</a> or
612*404b540aSrobert      <a href="../faq/index.html">to the FAQ</a>.
613*404b540aSrobert   </p>
614*404b540aSrobert
615*404b540aSrobert
616*404b540aSrobert<!-- ####################################################### -->
617*404b540aSrobert
618*404b540aSrobert<hr />
619*404b540aSrobert<p class="fineprint"><em>
620*404b540aSrobertSee <a href="../17_intro/license.html">license.html</a> for copying conditions.
621*404b540aSrobertComments and suggestions are welcome, and may be sent to
622*404b540aSrobert<a href="mailto:libstdc++@gcc.gnu.org">the libstdc++ mailing list</a>.
623*404b540aSrobert</em></p>
624*404b540aSrobert
625*404b540aSrobert
626*404b540aSrobert</body>
627*404b540aSrobert</html>
628