2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / libstdc++-v3 / doc / html / ext / lwg-closed.html
blob68bca503aa2b1112f5750847ed7801af5e0db79d
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html><head><title>C++ Standard Library Closed Issues List</title>
6 <style type="text/css">
7 p {text-align:justify}
8 li {text-align:justify}
9 ins {background-color:#A0FFA0}
10 del {background-color:#FFA0A0}
11 </style></head><body>
12 <table>
13 <tbody><tr>
14 <td align="left">Doc. no.</td>
15 <td align="left">N2614=08-0124</td>
16 </tr>
17 <tr>
18 <td align="left">Date:</td>
19 <td align="left">2008-05-18</td>
20 </tr>
21 <tr>
22 <td align="left">Project:</td>
23 <td align="left">Programming Language C++</td>
24 </tr>
25 <tr>
26 <td align="left">Reply to:</td>
27 <td align="left">Howard Hinnant &lt;<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>&gt;</td>
28 </tr>
29 </tbody></table>
30 <h1>C++ Standard Library Closed Issues List (Revision R56)</h1>
32 <p>Reference ISO/IEC IS 14882:1998(E)</p>
33 <p>Also see:</p>
34 <ul>
35 <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
36 <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
37 <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
38 <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li>
39 <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li>
40 </ul>
42 <p>This document contains only library issues which have been closed
43 by the Library Working Group as duplicates or not defects. That is,
44 issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> or
45 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a> active issues and more
46 information. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a> for issues considered
47 defects. The introductory material in that document also applies to
48 this document.</p>
50 <h2>Revision History</h2>
51 <ul>
52 <li>R56:
53 2008-05-16 pre-Sophia Antipolis mailing.
54 <ul>
55 <li><b>Summary:</b><ul>
56 <li>191 open issues, up by 24.</li>
57 <li>647 closed issues, up by 1.</li>
58 <li>838 issues total, up by 25.</li>
59 </ul></li>
60 <li><b>Details:</b><ul>
61 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#814">814</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#815">815</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#816">816</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#817">817</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#818">818</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#819">819</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#820">820</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#821">821</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#822">822</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#823">823</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#824">824</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#825">825</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#826">826</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#827">827</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#828">828</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#829">829</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#830">830</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#831">831</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#832">832</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#833">833</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#834">834</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#835">835</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#836">836</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#837">837</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#838">838</a>.</li>
62 <li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#802">802</a>.</li>
63 </ul></li>
64 </ul>
65 </li>
66 <li>R55:
67 2008-03-14 post-Bellevue mailing.
68 <ul>
69 <li><b>Summary:</b><ul>
70 <li>167 open issues, down by 39.</li>
71 <li>646 closed issues, up by 65.</li>
72 <li>813 issues total, up by 26.</li>
73 </ul></li>
74 <li><b>Details:</b><ul>
75 <li>Added the following Dup issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#795">795</a>.</li>
76 <li>Added the following NAD issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#790">790</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#791">791</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#796">796</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#797">797</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#799">799</a>.</li>
77 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#788">788</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#794">794</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#802">802</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#804">804</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#805">805</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#806">806</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#807">807</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#808">808</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#809">809</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#810">810</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#811">811</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#812">812</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#813">813</a>.</li>
78 <li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#793">793</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#800">800</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#801">801</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#803">803</a>.</li>
79 <li>Added the following Ready issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#789">789</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#792">792</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#798">798</a>.</li>
80 <li>Changed the following issues from NAD Future to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#116">116</a>.</li>
81 <li>Changed the following issues from NAD Future to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#188">188</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.</li>
82 <li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#729">729</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#730">730</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#731">731</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#733">733</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#735">735</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#736">736</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#737">737</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#739">739</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#741">741</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#745">745</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#748">748</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#763">763</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#764">764</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#773">773</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#784">784</a>.</li>
83 <li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#388">388</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#462">462</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#579">579</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#707">707</a>.</li>
84 <li>Changed the following issues from NAD Future to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>.</li>
85 <li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#626">626</a>.</li>
86 <li>Changed the following issues from Review to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#684">684</a>.</li>
87 <li>Changed the following issues from NAD Future to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#128">128</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#180">180</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#190">190</a>.</li>
88 <li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#617">617</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#718">718</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#719">719</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#720">720</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#724">724</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#734">734</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#742">742</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#747">747</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#750">750</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#753">753</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#756">756</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#760">760</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#762">762</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#767">767</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#774">774</a>.</li>
89 <li>Changed the following issues from Ready to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>.</li>
90 <li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#709">709</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#717">717</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#725">725</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#738">738</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#754">754</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#757">757</a>.</li>
91 <li>Changed the following issues from Open to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#424">424</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#625">625</a>.</li>
92 <li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#755">755</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#758">758</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#759">759</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#761">761</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#766">766</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#768">768</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#770">770</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#775">775</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#777">777</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#778">778</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#781">781</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#782">782</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#783">783</a>.</li>
93 <li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>.</li>
94 <li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>.</li>
95 <li>Changed the following issues from New to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#711">711</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#728">728</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#771">771</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#776">776</a>.</li>
96 <li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>.</li>
97 <li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#561">561</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#562">562</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#563">563</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#567">567</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#581">581</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#706">706</a>.</li>
98 <li>Changed the following issues from Tentatively Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#527">527</a>.</li>
99 </ul></li>
100 </ul>
101 </li>
102 <li>R54:
103 2008-02-01 pre-Bellevue mailing.
104 <ul>
105 <li><b>Summary:</b><ul>
106 <li>206 open issues, up by 23.</li>
107 <li>581 closed issues, up by 0.</li>
108 <li>787 issues total, up by 23.</li>
109 </ul></li>
110 <li><b>Details:</b><ul>
111 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#765">765</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#766">766</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#767">767</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#768">768</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#769">769</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#770">770</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#771">771</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#772">772</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#773">773</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#774">774</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#775">775</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#776">776</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#777">777</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#778">778</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#779">779</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#780">780</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#781">781</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#782">782</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#783">783</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#784">784</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#785">785</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#786">786</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#787">787</a>.</li>
112 <li>Changed the following issues from NAD Future to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#105">105</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>.</li>
113 <li>Changed the following issues from NAD Future to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#353">353</a>.</li>
114 <li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#697">697</a>.</li>
115 <li>Changed the following issues from NAD Future to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#388">388</a>.</li>
116 <li>Changed the following issues from Open to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#527">527</a>.</li>
117 </ul></li>
118 </ul>
119 </li>
120 <li>R53:
121 2007-12-09 mid-term mailing.
122 <ul>
123 <li><b>Summary:</b><ul>
124 <li>183 open issues, up by 11.</li>
125 <li>581 closed issues, down by 1.</li>
126 <li>764 issues total, up by 10.</li>
127 </ul></li>
128 <li><b>Details:</b><ul>
129 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#755">755</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#756">756</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#757">757</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#758">758</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#759">759</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#760">760</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#761">761</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#762">762</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#763">763</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#764">764</a>.</li>
130 <li>Changed the following issues from NAD to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>.</li>
131 <li>Changed the following issues from Pending WP to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#607">607</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#608">608</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>.</li>
132 </ul></li>
133 </ul>
134 </li>
135 <li>R52:
136 2007-10-19 post-Kona mailing.
137 <ul>
138 <li><b>Summary:</b><ul>
139 <li>172 open issues, up by 4.</li>
140 <li>582 closed issues, up by 27.</li>
141 <li>754 issues total, up by 31.</li>
142 </ul></li>
143 <li><b>Details:</b><ul>
144 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#724">724</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#725">725</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#726">726</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#727">727</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#728">728</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#729">729</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#730">730</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#731">731</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#733">733</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#734">734</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#735">735</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#736">736</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#737">737</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#738">738</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#739">739</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#741">741</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#742">742</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#745">745</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#747">747</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#748">748</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#750">750</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#751">751</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#752">752</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#753">753</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#754">754</a>.</li>
145 <li>Changed the following issues from NAD Future to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>.</li>
146 <li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>.</li>
147 <li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a>.</li>
148 <li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#546">546</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#564">564</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#565">565</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#573">573</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#585">585</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#588">588</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
149 <li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#393">393</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
150 <li>Changed the following issues from New to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#607">607</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#608">608</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>.</li>
151 <li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#561">561</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#562">562</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#563">563</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#567">567</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#581">581</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#595">595</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#706">706</a>.</li>
152 <li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#680">680</a>.</li>
153 <li>Changed the following issues from New to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>.</li>
154 <li>Changed the following issues from New to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#552">552</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>.</li>
155 <li>Changed the following issues from Open to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#401">401</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>.</li>
156 <li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
157 </ul></li>
158 </ul>
159 </li>
160 <li>R51:
161 2007-09-09 pre-Kona mailing.
162 <ul>
163 <li><b>Summary:</b><ul>
164 <li>168 open issues, up by 15.</li>
165 <li>555 closed issues, up by 0.</li>
166 <li>723 issues total, up by 15.</li>
167 </ul></li>
168 <li><b>Details:</b><ul>
169 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#709">709</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#711">711</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#712">712</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#713">713</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#714">714</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#716">716</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#717">717</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#718">718</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#719">719</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#720">720</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#721">721</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#723">723</a>.</li>
170 </ul></li>
171 </ul>
172 </li>
173 <li>R50:
174 2007-08-05 post-Toronto mailing.
175 <ul>
176 <li><b>Summary:</b><ul>
177 <li>153 open issues, down by 5.</li>
178 <li>555 closed issues, up by 17.</li>
179 <li>708 issues total, up by 12.</li>
180 </ul></li>
181 <li><b>Details:</b><ul>
182 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#697">697</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#698">698</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#699">699</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#700">700</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#701">701</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#702">702</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#703">703</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#704">704</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#705">705</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#706">706</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#707">707</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#708">708</a>.</li>
183 <li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#584">584</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>.</li>
184 <li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.</li>
185 <li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>.</li>
186 <li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>.</li>
187 <li>Changed the following issues from Pending NAD Editorial to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
188 <li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#579">579</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#680">680</a>.</li>
189 <li>Changed the following issues from Pending WP to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
190 <li>Changed the following issues from Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>.</li>
191 <li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#577">577</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>.</li>
192 <li>Changed the following issues from Open to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>.</li>
193 <li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>.</li>
194 <li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
195 <li>Changed the following issues from DR to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#453">453</a>.</li>
196 <li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
197 </ul></li>
198 </ul>
199 </li>
200 <li>R49:
201 2007-06-23 pre-Toronto mailing.
202 <ul>
203 <li><b>Summary:</b><ul>
204 <li>158 open issues, up by 13.</li>
205 <li>538 closed issues, up by 7.</li>
206 <li>696 issues total, up by 20.</li>
207 </ul></li>
208 <li><b>Details:</b><ul>
209 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#687">687</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#688">688</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#690">690</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#692">692</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li>
210 <li>Added the following Pending NAD Editorial issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#683">683</a>.</li>
211 <li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#587">587</a>.</li>
212 <li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>.</li>
213 <li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>.</li>
214 </ul></li>
215 </ul>
216 </li>
217 <li>R48:
218 2007-05-06 post-Oxford mailing.
219 <ul>
220 <li><b>Summary:</b><ul>
221 <li>145 open issues, down by 33.</li>
222 <li>531 closed issues, up by 53.</li>
223 <li>676 issues total, up by 20.</li>
224 </ul></li>
225 <li><b>Details:</b><ul>
226 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#658">658</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#659">659</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#674">674</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#675">675</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#676">676</a>.</li>
227 <li>Changed the following issues from Tentatively Ready to Dup: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>.</li>
228 <li>Changed the following issues from Tentatively Ready to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
229 <li>Changed the following issues from NAD to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#357">357</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#368">368</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a>.</li>
230 <li>Changed the following issues from Tentatively Ready to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>.</li>
231 <li>Changed the following issues from NAD_Future to NAD Future: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#105">105</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#116">116</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#128">128</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#149">149</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#180">180</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#188">188</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#190">190</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#219">219</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#353">353</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#388">388</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>.</li>
232 <li>Changed the following issues from Tentatively Ready to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>.</li>
233 <li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
234 <li>Changed the following issues from Tentatively Ready to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>.</li>
235 <li>Changed the following issues from Tentatively Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>.</li>
236 <li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
237 <li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a>.</li>
238 <li>Changed the following issues from Ready to TRDec: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#599">599</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#600">600</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#601">601</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#602">602</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a>.</li>
239 <li>Changed the following issues from Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>.</li>
240 <li>Changed the following issues from Tentatively Ready to WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
241 </ul></li>
242 </ul>
243 </li>
244 <li>R47:
245 2007-03-09 pre-Oxford mailing.
246 <ul>
247 <li><b>Summary:</b><ul>
248 <li>178 open issues, up by 37.</li>
249 <li>478 closed issues, up by 0.</li>
250 <li>656 issues total, up by 37.</li>
251 </ul></li>
252 <li><b>Details:</b><ul>
253 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#629">629</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#630">630</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#631">631</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#632">632</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#633">633</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#635">635</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#636">636</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#641">641</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#642">642</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#643">643</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#647">647</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#648">648</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#649">649</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li>
254 <li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#626">626</a>.</li>
255 <li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li>
256 <li>Changed the following issues from New to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#547">547</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#553">553</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#560">560</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#571">571</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#576">576</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#578">578</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#586">586</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#591">591</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#594">594</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#611">611</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#613">613</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#615">615</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#616">616</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
257 <li>Changed the following issues from Open to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#201">201</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#206">206</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#258">258</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#385">385</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#416">416</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#422">422</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456">456</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#466">466</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#470">470</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#482">482</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>.</li>
258 <li>Changed the following issues from Review to Tentatively Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a>.</li>
259 </ul></li>
260 </ul>
261 </li>
262 <li>R46:
263 2007-01-12 mid-term mailing.
264 <ul>
265 <li><b>Summary:</b><ul>
266 <li>141 open issues, up by 11.</li>
267 <li>478 closed issues, down by 1.</li>
268 <li>619 issues total, up by 10.</li>
269 </ul></li>
270 <li><b>Details:</b><ul>
271 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#610">610</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#619">619</a>.</li>
272 </ul></li>
273 </ul>
274 </li>
275 <li>R45:
276 2006-11-03 post-Portland mailing.
277 <ul>
278 <li><b>Summary:</b><ul>
279 <li>130 open issues, up by 0.</li>
280 <li>479 closed issues, up by 17.</li>
281 <li>609 issues total, up by 17.</li>
282 </ul></li>
283 <li><b>Details:</b><ul>
284 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a> to WP.</li>
285 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#554">554</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#555">555</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#558">558</a> to NAD.</li>
286 <li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li>
287 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#542">542</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#556">556</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#559">559</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#597">597</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#606">606</a> to Open.</li>
288 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#545">545</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#605">605</a> to Ready.</li>
289 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#604">604</a> to Review.</li>
290 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#609">609</a>.</li>
291 </ul></li>
292 </ul>
293 </li>
294 <li>R44:
295 2006-09-08 pre-Portland mailing.
296 <ul>
297 <li><b>Summary:</b><ul>
298 <li>130 open issues, up by 6.</li>
299 <li>462 closed issues, down by 1.</li>
300 <li>592 issues total, up by 5.</li>
301 </ul></li>
302 <li><b>Details:</b><ul>
303 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#592">592</a>.</li>
304 </ul></li>
305 </ul>
306 </li>
307 <li>R43:
308 2006-06-23 mid-term mailing.
309 <ul>
310 <li><b>Summary:</b><ul>
311 <li>124 open issues, up by 14.</li>
312 <li>463 closed issues, down by 1.</li>
313 <li>587 issues total, up by 13.</li>
314 </ul></li>
315 <li><b>Details:</b><ul>
316 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>.</li>
317 <li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li>
318 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#520">520</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">541</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#544">544</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Tentatively Ready.</li>
319 </ul></li>
320 </ul>
321 </li>
322 <li>R42:
323 2006-04-21 post-Berlin mailing.
324 <ul>
325 <li><b>Summary:</b><ul>
326 <li>110 open issues, down by 16.</li>
327 <li>464 closed issues, up by 24.</li>
328 <li>574 issues total, up by 8.</li>
329 </ul></li>
330 <li><b>Details:</b><ul>
331 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li>
332 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#499">499</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#501">501</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#517">517</a> to NAD.</li>
333 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#502">502</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#515">515</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#516">516</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#539">539</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#548">548</a> to Open.</li>
334 <li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#521">521</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#530">530</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#537">537</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538">538</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#540">540</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#549">549</a> to Ready.</li>
335 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> to WP.</li>
336 <li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li>
337 </ul></li>
338 </ul>
339 </li>
340 <li>R41:
341 2006-02-24 pre-Berlin mailing.
342 <ul>
343 <li><b>Summary:</b><ul>
344 <li>126 open issues, up by 31.</li>
345 <li>440 closed issues, up by 0.</li>
346 <li>566 issues total, up by 31.</li>
347 </ul></li>
348 <li><b>Details:</b><ul>
349 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#566">566</a>.</li>
350 <li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li>
351 <li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li>
352 </ul></li>
353 </ul>
354 </li>
355 <li>R40:
356 2005-12-16 mid-term mailing.
357 <ul>
358 <li><b>Summary:</b><ul>
359 <li>95 open issues.</li>
360 <li>440 closed issues.</li>
361 <li>535 issues total.</li>
362 </ul></li>
363 <li><b>Details:</b><ul>
364 <li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li>
365 </ul></li>
366 </ul>
367 </li>
368 <li>R39:
369 2005-10-14 post-Mont Tremblant mailing.
370 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#528">528</a>.
371 Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#461">461</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464">464</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#465">465</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#467">467</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#468">468</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#474">474</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#496">496</a> from Ready to WP as per the vote from Mont Tremblant.
372 Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#247">247</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#294">294</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#369">369</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#376">376</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#384">384</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">475</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#495">495</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#497">497</a> from Review to Ready.
373 Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#506">506</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#509">509</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#510">510</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#511">511</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#512">512</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#513">513</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#514">514</a> from New to Open.
374 Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#505">505</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#507">507</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#508">508</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#519">519</a> from New to Ready.
375 Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
376 Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a> from New to Review.
377 </li>
378 <li>R38:
379 2005-07-03 pre-Mont Tremblant mailing.
380 Merged open TR1 issues in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
381 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>
382 </li>
383 <li>R37:
384 2005-06 mid-term mailing.
385 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#498">498</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#503">503</a>.
386 </li>
387 <li>R36:
388 2005-04 post-Lillehammer mailing. All issues in "ready" status except
389 for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a> were moved to "DR" status, and all issues
390 previously in "DR" status were moved to "WP".
391 </li>
392 <li>R35:
393 2005-03 pre-Lillehammer mailing.
394 </li>
395 <li>R34:
396 2005-01 mid-term mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#488">488</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#494">494</a>.
397 </li>
398 <li>R33:
399 2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
400 </li>
401 <li>R32:
402 2004-09 pre-Redmond mailing: reflects new proposed resolutions and
403 new issues received after the 2004-07 mailing. Added
404 new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>.
405 </li>
406 <li>R31:
407 2004-07 mid-term mailing: reflects new proposed resolutions and
408 new issues received after the post-Sydney mailing. Added
409 new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
410 </li>
411 <li>R30:
412 Post-Sydney mailing: reflects decisions made at the Sydney meeting.
413 Voted all "Ready" issues from R29 into the working paper.
414 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#460">460</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#462">462</a>.
415 </li>
416 <li>R29:
417 Pre-Sydney mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#441">441</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#457">457</a>.
418 </li>
419 <li>R28:
420 Post-Kona mailing: reflects decisions made at the Kona meeting.
421 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432">432</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#440">440</a>.
422 </li>
423 <li>R27:
424 Pre-Kona mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#404">404</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>.
425 </li>
426 <li>R26:
427 Post-Oxford mailing: reflects decisions made at the Oxford meeting.
428 All issues in Ready status were voted into DR status. All issues in
429 DR status were voted into WP status.
430 </li>
431 <li>R25:
432 Pre-Oxford mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#390">390</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#402">402</a>.
433 </li>
434 <li>R24:
435 Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
436 meeting. All Ready issues from R23 with the exception of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, which has been given a new proposed resolution, were
437 moved to DR status. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#383">383</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a>. (Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#387">387</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> were discussed
438 at the meeting.) Made progress on issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a> have been moved to Ready status, and the only remaining
439 concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
440 </li>
441 <li>R23:
442 Pre-Santa Cruz mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#367">367</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382">382</a>.
443 Moved issues in the TC to TC status.
444 </li>
445 <li>R22:
446 Post-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#362">362</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#366">366</a>.
447 </li>
448 <li>R21:
449 Pre-Curaçao mailing. Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#351">351</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#361">361</a>.
450 </li>
451 <li>R20:
452 Post-Redmond mailing; reflects actions taken in Redmond. Added
453 new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#336">336</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, of which issues
454 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a> were added since Redmond, hence
455 not discussed at the meeting.
457 All Ready issues were moved to DR status, with the exception of issues
458 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a>, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
460 Noteworthy issues discussed at Redmond include
461 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#202">202</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>,
462 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#254">254</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.
463 </li>
464 <li>R19:
465 Pre-Redmond mailing. Added new issues
466 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#335">335</a>.
467 </li>
468 <li>R18:
469 Post-Copenhagen mailing; reflects actions taken in Copenhagen.
470 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#317">317</a>, and discussed
471 new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>.
473 Changed status of issues
474 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#118">118</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>
475 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#165">165</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#171">171</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#183">183</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">184</a>
476 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#185">185</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#186">186</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>
477 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#234">234</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#237">237</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#248">248</a>
478 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#251">251</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#256">256</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#260">260</a>
479 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#261">261</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#262">262</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#263">263</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>
480 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
481 to DR.
483 Changed status of issues
484 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#117">117</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>
485 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#230">230</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>
486 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#238">238</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241">241</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#242">242</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>
487 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#259">259</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#266">266</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>
488 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#271">271</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#273">273</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#275">275</a>
489 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#284">284</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#285">285</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#286">286</a>
490 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#288">288</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#292">292</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#295">295</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#297">297</a>
491 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#298">298</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#301">301</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#306">306</a>
492 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#307">307</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#308">308</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#312">312</a>
493 to Ready.
495 Closed issues
496 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#287">287</a>
497 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#289">289</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#293">293</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#302">302</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#313">313</a>
498 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
499 as NAD.
501 </li>
502 <li>R17:
503 Pre-Copenhagen mailing. Converted issues list to XML. Added proposed
504 resolutions for issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#49">49</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#76">76</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#235">235</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#250">250</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#267">267</a>.
505 Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#278">278</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#311">311</a>.
506 </li>
507 <li>R16:
508 post-Toronto mailing; reflects actions taken in Toronto. Added new
509 issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#265">265</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#277">277</a>. Changed status of issues
510 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#8">8</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#9">9</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>,
511 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#26">26</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#61">61</a>,
512 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#63">63</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#108">108</a>,
513 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#115">115</a>,
514 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#122">122</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>,
515 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#142">142</a>,
516 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#144">144</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#146">146</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#147">147</a>,
517 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#159">159</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#164">164</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#170">170</a>,
518 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#181">181</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#208">208</a>,
519 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#209">209</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#210">210</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>,
520 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#217">217</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#220">220</a>,
521 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#222">222</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#223">223</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#224">224</a>,
522 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> to "DR". Reopened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</a>. Reopened
523 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#187">187</a>. Changed issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#2">2</a> and
524 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD. Fixed a typo in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a>. Fixed
525 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#70">70</a>: signature should be changed both places it
526 appears. Fixed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#160">160</a>: previous version didn't fix
527 the bug in enough places.
528 </li>
529 <li>R15:
530 pre-Toronto mailing. Added issues
531 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>. Some small HTML formatting
532 changes so that we pass Weblint tests.
533 </li>
534 <li>R14:
535 post-Tokyo II mailing; reflects committee actions taken in
536 Tokyo. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#232">232</a>. (00-0019R1/N1242)
537 </li>
538 <li>R13:
539 pre-Tokyo II updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#212">212</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a>.
540 </li>
541 <li>R12:
542 pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
543 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#211">211</a>. Added "and paragraph 5" to the proposed resolution
544 of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>. Add further rationale to issue
545 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
546 </li>
547 <li>R11:
548 post-Kona mailing: Updated to reflect LWG and full committee actions
549 in Kona (99-0048/N1224). Note changed resolution of issues
550 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a>
551 to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#198">198</a>. Closed issues list split into "defects" and
552 "closed" documents. Changed the proposed resolution of issue
553 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#4">4</a> to NAD, and changed the wording of proposed resolution
554 of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
555 </li>
556 <li>R10:
557 pre-Kona updated. Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
558 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#86">86</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#91">91</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>,
559 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#190">190</a> to
560 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
561 </li>
562 <li>R9:
563 pre-Kona mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
564 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
565 "closed" documents. (99-0030/N1206, 25 Aug 99)
566 </li>
567 <li>R8:
568 post-Dublin mailing. Updated to reflect LWG and full committee actions
569 in Dublin. (99-0016/N1193, 21 Apr 99)
570 </li>
571 <li>R7:
572 pre-Dublin updated: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#131">131</a>,
573 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#132">132</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#133">133</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#134">134</a>,
574 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#135">135</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#136">136</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#137">137</a>,
575 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#139">139</a> (31 Mar 99)
576 </li>
577 <li>R6:
578 pre-Dublin mailing. Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#127">127</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#128">128</a>,
579 and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>. (99-0007/N1194, 22 Feb 99)
580 </li>
581 <li>R5:
582 update issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>; added issues
583 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#126">126</a>. Format revisions to prepare
584 for making list public. (30 Dec 98)
585 </li>
586 <li>R4:
587 post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
588 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#111">111</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#112">112</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#113">113</a> added, several
589 issues corrected. (22 Oct 98)
590 </li>
591 <li>R3:
592 post-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#94">94</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#109">109</a>
593 added, many issues updated to reflect LWG consensus (12 Oct 98)
594 </li>
595 <li>R2:
596 pre-Santa Cruz II: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a> to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#93">93</a> added,
597 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
598 </li>
599 <li>R1:
600 Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#55">55</a> resolution, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> code
601 format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
602 </li>
603 </ul>
605 <h2>Closed Issues</h2>
606 <hr>
607 <h3><a name="2"></a>2. Auto_ptr conversions effects incorrect</h3>
608 <p><b>Section:</b> D.9.1.3 [auto.ptr.conv] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
609 <b>Submitter:</b> Nathan Myers <b>Date:</b> 1997-12-04</p>
610 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
611 <p><b>Discussion:</b></p>
612 <p>Paragraph 1 in "Effects", says "Calls
613 p-&gt;release()" where it clearly must be "Calls
614 p.release()". (As it is, it seems to require using
615 auto_ptr&lt;&gt;::operator-&gt; to refer to X::release, assuming that
616 exists.)</p>
619 <p><b>Proposed resolution:</b></p>
620 <p>Change 20.4.4.3 [meta.unary.prop] paragraph 1 Effects from
621 "Calls p-&gt;release()" to "Calls p.release()".</p>
624 <p><b>Rationale:</b></p>
625 <p>Not a defect: the proposed change is already found in the standard.
626 [Originally classified as a defect, later reclassified.]</p>
632 <hr>
633 <h3><a name="4"></a>4. Basic_string size_type and difference_type should be implementation defined</h3>
634 <p><b>Section:</b> 21.3 [basic.string] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
635 <b>Submitter:</b> Beman Dawes <b>Date:</b> 1997-11-16</p>
636 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#basic.string">active issues</a> in [basic.string].</p>
637 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.string">issues</a> in [basic.string].</p>
638 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
639 <p><b>Discussion:</b></p>
640 <p>In Morristown we changed the size_type and difference_type typedefs
641 for all the other containers to implementation defined with a
642 reference to 23.1 [container.requirements]. This should probably also have been
643 done for strings. </p>
646 <p><b>Rationale:</b></p>
647 <p>Not a defect. [Originally classified as a defect, later
648 reclassified.] basic_string, unlike the other standard library
649 template containers, is severely constrained by its use of
650 char_traits. Those types are dictated by the traits class, and are far
651 from implementation defined.</p>
657 <hr>
658 <h3><a name="6"></a>6. File position not an offset unimplementable</h3>
659 <p><b>Section:</b> 27.4.3 [fpos] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
660 <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-15</p>
661 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fpos">issues</a> in [fpos].</p>
662 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
663 <p><b>Discussion:</b></p>
664 <p>Table 88, in I/O, is too strict; it's unimplementable on systems
665 where a file position isn't just an offset. It also never says just
666 what fpos&lt;&gt; is really supposed to be. [Here's my summary, which
667 Jerry agrees is more or less accurate. "I think I now know what
668 the class really is, at this point: it's a magic cookie that
669 encapsulates an mbstate_t and a file position (possibly represented as
670 an fpos_t), it has syntactic support for pointer-like arithmetic, and
671 implementors are required to have real, not just syntactic, support
672 for arithmetic." This isn't standardese, of course.] </p>
675 <p><b>Rationale:</b></p>
676 <p>Not a defect. The LWG believes that the Standard is already clear,
677 and that the above summary is what the Standard in effect says.</p>
683 <hr>
684 <h3><a name="10"></a>10. Codecvt&lt;&gt;::do unclear</h3>
685 <p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
686 <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-14</p>
687 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
688 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
689 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a></p>
690 <p><b>Discussion:</b></p>
691 <p>Section 22.2.1.5.2 says that codecvt&lt;&gt;::do_in and do_out
692 should return the value noconv if "no conversion was
693 needed". However, I don't see anything anywhere that defines what
694 it means for a conversion to be needed or not needed. I can think of
695 several circumstances where one might plausibly think that a
696 conversion is not "needed", but I don't know which one is
697 intended here. </p>
700 <p><b>Rationale:</b></p>
707 <hr>
708 <h3><a name="12"></a>12. Way objects hold allocators unclear</h3>
709 <p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
710 <b>Submitter:</b> Angelika Langer <b>Date:</b> 1998-02-23</p>
711 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
712 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
713 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
714 <p><b>Discussion:</b></p>
715 <p>I couldn't find a statement in the standard saying whether the allocator object held by
716 a container is held as a copy of the constructor argument or whether a pointer of
717 reference is maintained internal. There is an according statement for compare objects and
718 how they are maintained by the associative containers, but I couldn't find anything
719 regarding allocators. </p>
721 <p>Did I overlook it? Is it an open issue or known defect? Or is it deliberately left
722 unspecified? </p>
725 <p><b>Rationale:</b></p>
726 <p>Not a defect. The LWG believes that the Standard is already
727 clear.&nbsp; See 23.1 [container.requirements], paragraph 8.</p>
733 <hr>
734 <h3><a name="43"></a>43. Locale table correction</h3>
735 <p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
736 <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1998-06-01</p>
737 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
738 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
739 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#33">33</a></p>
740 <p><b>Discussion:</b></p>
743 <p><b>Rationale:</b></p>
750 <hr>
751 <h3><a name="45"></a>45. Stringstreams read/write pointers initial position unclear</h3>
752 <p><b>Section:</b> 27.7.3 [ostringstream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
753 <b>Submitter:</b> Matthias Mueller <b>Date:</b> 1998-05-27</p>
754 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
755 <p><b>Discussion:</b></p>
756 <p>In a comp.lang.c++.moderated Matthias Mueller wrote:</p>
758 <p>"We are not sure how to interpret the CD2 (see 27.2
759 [iostream.forward], 27.7.3.1 [ostringstream.cons], 27.7.1.1
760 [stringbuf.cons])
761 with respect to the question as to what the correct initial positions
762 of the write and&nbsp; read pointers of a stringstream should
763 be."</p>
765 <p>"Is it the same to output two strings or to initialize the stringstream with the
766 first and to output the second?"</p>
768 <p><i>[PJ Plauger, Bjarne Stroustrup, Randy Smithey, Sean Corfield, and
769 Jerry Schwarz have all offered opinions; see reflector messages
770 lib-6518, 6519, 6520, 6521, 6523, 6524.]</i></p>
775 <p><b>Rationale:</b></p>
776 <p>The LWG believes the Standard is correct as written. The behavior
777 of stringstreams is consistent with fstreams, and there is a
778 constructor which can be used to obtain the desired effect. This
779 behavior is known to be different from strstreams.</p>
785 <hr>
786 <h3><a name="58"></a>58. Extracting a char from a wide-oriented stream</h3>
787 <p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
788 <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-01</p>
789 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
790 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
791 <p><b>Discussion:</b></p>
792 <p>27.6.1.2.3 has member functions for extraction of signed char and
793 unsigned char, both singly and as strings. However, it doesn't say
794 what it means to extract a <tt>char</tt> from a
795 <tt>basic_streambuf&lt;charT, Traits&gt;</tt>. </p>
797 <p>basic_streambuf, after all, has no members to extract a char, so
798 basic_istream must somehow convert from charT to signed char or
799 unsigned char. The standard doesn't say how it is to perform that
800 conversion. </p>
803 <p><b>Rationale:</b></p>
804 <p>The Standard is correct as written. There is no such extractor and
805 this is the intent of the LWG.</p>
810 <hr>
811 <h3><a name="65"></a>65. Underspecification of strstreambuf::seekoff</h3>
812 <p><b>Section:</b> D.7.1.3 [depr.strstreambuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
813 <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-18</p>
814 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.strstreambuf.virtuals">issues</a> in [depr.strstreambuf.virtuals].</p>
815 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
816 <p><b>Discussion:</b></p>
817 <p>The standard says how this member function affects the current
818 stream position. (<tt>gptr</tt> or <tt>pptr</tt>) However, it does not
819 say how this member function affects the beginning and end of the
820 get/put area. </p>
822 <p>This is an issue when seekoff is used to position the get pointer
823 beyond the end of the current read area. (Which is legal. This is
824 implicit in the definition of <i>seekhigh</i> in D.7.1, paragraph 4.)
825 </p>
828 <p><b>Rationale:</b></p>
829 <p>The LWG agrees that seekoff() is underspecified, but does not wish
830 to invest effort in this deprecated feature.</p>
836 <hr>
837 <h3><a name="67"></a>67. Setw useless for strings</h3>
838 <p><b>Section:</b> 21.3.8.9 [string.io] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
839 <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-07-09</p>
840 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.io">issues</a> in [string.io].</p>
841 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
842 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#25">25</a></p>
843 <p><b>Discussion:</b></p>
844 <p>In a comp.std.c++ posting Michel Michaud wrote: What
845 should be output by: </p>
847 <pre> string text("Hello");
848 cout &lt;&lt; '[' &lt;&lt; setw(10) &lt;&lt; right &lt;&lt; text &lt;&lt; ']';
849 </pre>
851 <p>Shouldn't it be:</p>
853 <pre> [ Hello]</pre>
855 <p>Another person replied: Actually, according to the FDIS, the width
856 of the field should be the minimum of width and the length of the
857 string, so the output shouldn't have any padding. I think that this is
858 a typo, however, and that what is wanted is the maximum of the
859 two. (As written, setw is useless for strings. If that had been the
860 intent, one wouldn't expect them to have mentioned using its value.)
861 </p>
863 <p>It's worth pointing out that this is a recent correction anyway;
864 IIRC, earlier versions of the draft forgot to mention formatting
865 parameters whatsoever.</p>
868 <p><b>Rationale:</b></p>
875 <hr>
876 <h3><a name="72"></a>72. Do_convert phantom member function</h3>
877 <p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
878 <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-24</p>
879 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
880 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
881 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#24">24</a></p>
882 <p><b>Discussion:</b></p>
883 <p>In 22.2.1.4 [locale.codecvt] par 3, and in 22.2.1.4.2 [locale.codecvt.virtuals] par 8, a nonexistent member function
884 "do_convert" is mentioned. This member was replaced with
885 "do_in" and "do_out", the proper referents in the
886 contexts above.</p>
889 <p><b>Rationale:</b></p>
895 <hr>
896 <h3><a name="73"></a>73. <tt>is_open</tt> should be const</h3>
897 <p><b>Section:</b> 27.8.1 [fstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
898 <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-27</p>
899 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fstreams">issues</a> in [fstreams].</p>
900 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
901 <p><b>Discussion:</b></p>
902 <p>Classes <tt>basic_ifstream</tt>, <tt>basic_ofstream</tt>, and
903 <tt>basic_fstream</tt> all have a member function <tt>is_open</tt>. It
904 should be a <tt>const</tt> member function, since it does nothing but
905 call one of <tt>basic_filebuf</tt>'s const member functions. </p>
908 <p><b>Rationale:</b></p>
909 <p>Not a defect. This is a deliberate feature; const streams would be
910 meaningless.</p>
915 <hr>
916 <h3><a name="77"></a>77. Valarray operator[] const returning value</h3>
917 <p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
918 <b>Submitter:</b> Levente Farkas <b>Date:</b> 1998-09-09</p>
919 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
920 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
921 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a></p>
922 <p><b>Discussion:</b></p>
923 <p>valarray:<br>
924 <br>
925 &nbsp;&nbsp;&nbsp; <tt>T operator[] (size_t) const;</tt><br>
926 <br>
927 why not <br>
928 <br>
929 &nbsp;&nbsp;&nbsp; <tt>const T&amp; operator[] (size_t) const;</tt><br>
930 <br>
931 as in vector ???<br>
932 <br>
933 One can't copy even from a const valarray eg:<br>
934 <br>
935 &nbsp;&nbsp;&nbsp; <tt>memcpy(ptr, &amp;v[0], v.size() * sizeof(double));<br>
936 </tt><br>
937 [I] find this bug in valarray is very difficult.</p>
940 <p><b>Rationale:</b></p>
941 <p>The LWG believes that the interface was deliberately designed that
942 way. That is what valarray was designed to do; that's where the
943 "value array" name comes from. LWG members further comment
944 that "we don't want valarray to be a full STL container."
945 26.5.2.3 [valarray.access] specifies properties that indicate "an
946 absence of aliasing" for non-constant arrays; this allows
947 optimizations, including special hardware optimizations, that are not
948 otherwise possible. </p>
954 <hr>
955 <h3><a name="81"></a>81. Wrong declaration of slice operations</h3>
956 <p><b>Section:</b> 26.5.5 [template.slice.array], 26.5.7 [template.gslice.array], 26.5.8 [template.mask.array], 26.5.9 [template.indirect.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
957 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
958 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.slice.array">issues</a> in [template.slice.array].</p>
959 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
960 <p><b>Discussion:</b></p>
961 <p>Isn't the definition of copy constructor and assignment operators wrong?
962 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Instead of</p>
964 <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array(const slice_array&amp;);
965 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array&amp; operator=(const slice_array&amp;);</pre>
967 <p>IMHO they have to be</p>
969 <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array(const slice_array&lt;T&gt;&amp;);
970 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array&amp; operator=(const slice_array&lt;T&gt;&amp;);</pre>
972 <p>Same for gslice_array. </p>
975 <p><b>Rationale:</b></p>
976 <p>Not a defect. The Standard is correct as written. </p>
981 <hr>
982 <h3><a name="82"></a>82. Missing constant for set elements</h3>
983 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
984 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
985 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
986 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
987 <p><b>Discussion:</b></p>
988 <p>Paragraph 5 specifies:</p>
990 <blockquote><p>
991 For set and multiset the value type is the same as the key type. For
992 map and multimap it is equal to pair&lt;const Key, T&gt;.
993 </p></blockquote>
995 <p>Strictly speaking, this is not correct because for set and multiset
996 the value type is the same as the <b>constant</b> key type.</p>
999 <p><b>Rationale:</b></p>
1000 <p>Not a defect. The Standard is correct as written; it uses a
1001 different mechanism (const &amp;) for <tt>set</tt> and
1002 <tt>multiset</tt>. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> for a related
1003 issue.</p>
1008 <hr>
1009 <h3><a name="84"></a>84. Ambiguity with string::insert()</h3>
1010 <p><b>Section:</b> 21.3.5 [string.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1011 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1012 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1013 <p><b>Discussion:</b></p>
1014 <p>If I try</p>
1015 <pre> s.insert(0,1,' ');</pre>
1017 <p>&nbsp; I get an nasty ambiguity. It might be</p>
1018 <pre> s.insert((size_type)0,(size_type)1,(charT)' ');</pre>
1020 <p>which inserts 1 space character at position 0, or</p>
1021 <pre> s.insert((char*)0,(size_type)1,(charT)' ')</pre>
1023 <p>which inserts 1 space character at iterator/address 0 (bingo!), or</p>
1024 <pre> s.insert((char*)0, (InputIterator)1, (InputIterator)' ')</pre>
1026 <p>which normally inserts characters from iterator 1 to iterator '
1027 '. But according to 23.1.1.9 (the "do the right thing" fix)
1028 it is equivalent to the second. However, it is still ambiguous,
1029 because of course I mean the first!</p>
1032 <p><b>Rationale:</b></p>
1033 <p>Not a defect. The LWG believes this is a "genetic
1034 misfortune" inherent in the design of string and thus not a
1035 defect in the Standard as such .</p>
1040 <hr>
1041 <h3><a name="85"></a>85. String char types</h3>
1042 <p><b>Section:</b> 21 [strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1043 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1044 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#strings">issues</a> in [strings].</p>
1045 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1046 <p><b>Discussion:</b></p>
1047 <p>The standard seems not to require that charT is equivalent to
1048 traits::char_type. So, what happens if charT is not equivalent to
1049 traits::char_type?</p>
1052 <p><b>Rationale:</b></p>
1053 <p>There is already wording in 21.1 [char.traits] paragraph 3 that
1054 requires them to be the same.</p>
1059 <hr>
1060 <h3><a name="87"></a>87. Error in description of string::compare()</h3>
1061 <p><b>Section:</b> 21.3.6.8 [string::swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
1062 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1063 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::swap">issues</a> in [string::swap].</p>
1064 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
1065 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#5">5</a></p>
1066 <p><b>Discussion:</b></p>
1067 <p>The following compare() description is obviously a bug:</p>
1069 <pre>int compare(size_type pos, size_type n1,
1070 charT *s, size_type n2 = npos) const;
1071 </pre>
1073 <p>because without passing n2 it should compare up to the end of the
1074 string instead of comparing npos characters (which throws an
1075 exception) </p>
1078 <p><b>Rationale:</b></p>
1084 <hr>
1085 <h3><a name="88"></a>88. Inconsistency between string::insert() and string::append()</h3>
1086 <p><b>Section:</b> 21.3.6.4 [string::insert], 21.3.6.2 [string::append] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1087 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1088 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
1089 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1090 <p><b>Discussion:</b></p>
1091 <p>Why does </p>
1092 <pre> template&lt;class InputIterator&gt;
1093 basic_string&amp; append(InputIterator first, InputIterator last);</pre>
1095 <p>return a string, while</p>
1096 <pre> template&lt;class InputIterator&gt;
1097 void insert(iterator p, InputIterator first, InputIterator last);</pre>
1099 <p>returns nothing ?</p>
1102 <p><b>Rationale:</b></p>
1103 <p>The LWG believes this stylistic inconsistency is not sufficiently
1104 serious to constitute a defect.</p>
1109 <hr>
1110 <h3><a name="89"></a>89. Missing throw specification for string::insert() and string::replace()</h3>
1111 <p><b>Section:</b> 21.3.6.4 [string::insert], 21.3.6.6 [string::replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
1112 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1113 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
1114 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
1115 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a></p>
1116 <p><b>Discussion:</b></p>
1117 <p>All insert() and replace() members for strings with an iterator as
1118 first argument lack a throw specification. The throw
1119 specification should probably be: length_error if size exceeds
1120 maximum. </p>
1123 <p><b>Rationale:</b></p>
1124 <p>Considered a duplicate because it will be solved by the resolution
1125 of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p>
1131 <hr>
1132 <h3><a name="93"></a>93. Incomplete Valarray Subset Definitions</h3>
1133 <p><b>Section:</b> 26.5 [numarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1134 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1135 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numarray">issues</a> in [numarray].</p>
1136 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1137 <p><b>Discussion:</b></p>
1138 <p>You can easily create subsets, but you can't easily combine them
1139 with other subsets. Unfortunately, you almost always needs an
1140 explicit type conversion to valarray. This is because the standard
1141 does not specify that valarray subsets provide the same operations as
1142 valarrays. </p>
1144 <p>For example, to multiply two subsets and assign the result to a third subset, you can't
1145 write the following:</p>
1147 <pre>va[slice(0,4,3)] = va[slice(1,4,3)] * va[slice(2,4,3)];</pre>
1149 <p>Instead, you have to code as follows:</p>
1151 <pre>va[slice(0,4,3)] = static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(1,4,3)]) *
1152 static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(2,4,3)]);</pre>
1154 <p>This is tedious and error-prone. Even worse, it costs performance because each cast
1155 creates a temporary objects, which could be avoided without the cast. </p>
1158 <p><b>Proposed resolution:</b></p>
1159 <p>Extend all valarray subset types so that they offer all valarray operations.</p>
1162 <p><b>Rationale:</b></p>
1163 <p>This is not a defect in the Standard; it is a request for an extension.</p>
1168 <hr>
1169 <h3><a name="94"></a>94. May library implementors add template parameters to Standard Library classes?</h3>
1170 <p><b>Section:</b> 17.4.4 [conforming] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1171 <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-22</p>
1172 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1173 <p><b>Discussion:</b></p>
1174 <p>Is it a permitted extension for library implementors to add template parameters to
1175 standard library classes, provided that those extra parameters have defaults? For example,
1176 instead of defining <tt>template &lt;class T, class Alloc = allocator&lt;T&gt; &gt; class
1177 vector;</tt> defining it as <tt>template &lt;class T, class Alloc = allocator&lt;T&gt;,
1178 int N = 1&gt; class vector;</tt> </p>
1180 <p>The standard may well already allow this (I can't think of any way that this extension
1181 could break a conforming program, considering that users are not permitted to
1182 forward-declare standard library components), but it ought to be explicitly permitted or
1183 forbidden. </p>
1185 <p>comment from Steve Cleary via comp.std.c++:</p>
1186 <blockquote>
1187 <p>I disagree [with the proposed resolution] for the following reason:
1188 consider user library code with template template parameters. For
1189 example, a user library object may be templated on the type of
1190 underlying sequence storage to use (deque/list/vector), since these
1191 classes all take the same number and type of template parameters; this
1192 would allow the user to determine the performance tradeoffs of the
1193 user library object. A similar example is a user library object
1194 templated on the type of underlying set storage (set/multiset) or map
1195 storage (map/multimap), which would allow users to change (within
1196 reason) the semantic meanings of operations on that object.</p>
1197 <p>I think that additional template parameters should be forbidden in
1198 the Standard classes. Library writers don't lose any expressive power,
1199 and can still offer extensions because additional template parameters
1200 may be provided by a non-Standard implementation class:</p>
1201 <pre>
1202 template &lt;class T, class Allocator = allocator&lt;T&gt;, int N = 1&gt;
1203 class __vector
1204 { ... };
1205 template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
1206 class vector: public __vector&lt;T, Allocator&gt;
1207 { ... };
1208 </pre>
1210 </blockquote>
1214 <p><b>Proposed resolution:</b></p>
1215 <p>Add a new subclause [presumably 17.4.4.9] following 17.4.4.8 [res.on.exception.handling]:</p>
1217 <blockquote>
1218 <p>17.4.4.9 Template Parameters</p> <p>A specialization of a
1219 template class described in the C++ Standard Library behaves the
1220 same as if the implementation declares no additional template
1221 parameters.</p> <p>Footnote: Additional template parameters with
1222 default values are thus permitted.</p>
1223 </blockquote>
1225 <p>Add "template parameters" to the list of subclauses at
1226 the end of 17.4.4 [conforming] paragraph 1.</p>
1228 <p><i>[Kona: The LWG agreed the standard needs clarification. After
1229 discussion with John Spicer, it seems added template parameters can be
1230 detected by a program using template-template parameters. A straw vote
1231 - "should implementors be allowed to add template
1232 parameters?" found no consensus ; 5 - yes, 7 - no.]</i></p>
1237 <p><b>Rationale:</b></p>
1239 There is no ambiguity; the standard is clear as written. Library
1240 implementors are not permitted to add template parameters to standard
1241 library classes. This does not fall under the "as if" rule,
1242 so it would be permitted only if the standard gave explicit license
1243 for implementors to do this. This would require a change in the
1244 standard.
1245 </p>
1248 The LWG decided against making this change, because it would break
1249 user code involving template template parameters or specializations
1250 of standard library class templates.
1251 </p>
1257 <hr>
1258 <h3><a name="95"></a>95. Members added by the implementation</h3>
1259 <p><b>Section:</b> 17.4.4.4 [member.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1260 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1261 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1262 <p><b>Discussion:</b></p>
1263 <p>In 17.3.4.4/2 vs 17.3.4.7/0 there is a hole; an implementation could add virtual
1264 members a base class and break user derived classes.</p>
1266 <p>Example: </p>
1268 <blockquote>
1269 <pre>// implementation code:
1270 struct _Base { // _Base is in the implementer namespace
1271 virtual void foo ();
1273 class vector : _Base // deriving from a class is allowed
1274 { ... };
1276 // user code:
1277 class vector_checking : public vector
1279 void foo (); // don't want to override _Base::foo () as the
1280 // user doesn't know about _Base::foo ()
1281 };</pre>
1282 </blockquote>
1285 <p><b>Proposed resolution:</b></p>
1286 <p>Clarify the wording to make the example illegal.</p>
1289 <p><b>Rationale:</b></p>
1290 <p>This is not a defect in the Standard.&nbsp; The example is already
1291 illegal.&nbsp; See 17.4.4.4 [member.functions] paragraph 2.</p>
1296 <hr>
1297 <h3><a name="97"></a>97. Insert inconsistent definition</h3>
1298 <p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1299 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1300 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#containers">active issues</a> in [containers].</p>
1301 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#containers">issues</a> in [containers].</p>
1302 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1303 <p><b>Discussion:</b></p>
1304 <p><tt>insert(iterator, const value_type&amp;)</tt> is defined both on
1305 sequences and on set, with unrelated semantics: insert here (in
1306 sequences), and insert with hint (in associative containers). They
1307 should have different names (B.S. says: do not abuse overloading).</p>
1310 <p><b>Rationale:</b></p>
1311 <p>This is not a defect in the Standard. It is a genetic misfortune of
1312 the design, for better or for worse.</p>
1317 <hr>
1318 <h3><a name="99"></a>99. Reverse_iterator comparisons completely wrong</h3>
1319 <p><b>Section:</b> 24.4.1.3.13 [reverse.iter.op==] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1320 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1321 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1322 <p><b>Discussion:</b></p>
1323 <p>The &lt;, &gt;, &lt;=, &gt;= comparison operator are wrong: they
1324 return the opposite of what they should.</p>
1326 <p>Note: same problem in CD2, these were not even defined in CD1. SGI
1327 STL code is correct; this problem is known since the Morristown
1328 meeting but there it was too late</p>
1331 <p><b>Rationale:</b></p>
1332 <p>This is not a defect in the Standard. A careful reading shows the Standard is correct
1333 as written. A review of several implementations show that they implement
1334 exactly what the Standard says.</p>
1339 <hr>
1340 <h3><a name="100"></a>100. Insert iterators/ostream_iterators overconstrained</h3>
1341 <p><b>Section:</b> 24.4.2 [insert.iterators], 24.5.4 [ostreambuf.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1342 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1343 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1344 <p><b>Discussion:</b></p>
1345 <p>Overspecified For an insert iterator it, the expression *it is
1346 required to return a reference to it. This is a simple possible
1347 implementation, but as the SGI STL documentation says, not the only
1348 one, and the user should not assume that this is the case.</p>
1351 <p><b>Rationale:</b></p>
1352 <p>The LWG believes this causes no harm and is not a defect in the
1353 standard. The only example anyone could come up with caused some
1354 incorrect code to work, rather than the other way around.</p>
1360 <hr>
1361 <h3><a name="101"></a>101. No way to free storage for vector and deque</h3>
1362 <p><b>Section:</b> 23.2.6 [vector], 23.2.1 [array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1363 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1364 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
1365 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1366 <p><b>Discussion:</b></p>
1367 <p>Reserve can not free storage, unlike string::reserve</p>
1370 <p><b>Rationale:</b></p>
1371 <p>This is not a defect in the Standard. The LWG has considered this
1372 issue in the past and sees no need to change the Standard. Deque has
1373 no reserve() member function. For vector, shrink-to-fit can be
1374 expressed in a single line of code (where <tt>v</tt> is
1375 <tt>vector&lt;T&gt;</tt>):
1376 </p>
1378 <blockquote>
1379 <p><tt>vector&lt;T&gt;(v).swap(v);&nbsp; // shrink-to-fit v</tt></p>
1380 </blockquote>
1386 <hr>
1387 <h3><a name="102"></a>102. Bug in insert range in associative containers</h3>
1388 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
1389 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1390 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
1391 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
1392 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a></p>
1393 <p><b>Discussion:</b></p>
1394 <p>Table 69 of Containers say that a.insert(i,j) is linear if [i, j) is ordered. It seems
1395 impossible to implement, as it means that if [i, j) = [x], insert in an associative
1396 container is O(1)!</p>
1399 <p><b>Proposed resolution:</b></p>
1400 <p>N+log (size()) if [i,j) is sorted according to value_comp()</p>
1403 <p><b>Rationale:</b></p>
1404 <p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>.</p>
1410 <hr>
1411 <h3><a name="104"></a>104. Description of basic_string::operator[] is unclear</h3>
1412 <p><b>Section:</b> 21.3.4 [string.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1413 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1414 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.capacity">issues</a> in [string.capacity].</p>
1415 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1416 <p><b>Discussion:</b></p>
1417 <p>It is not clear that undefined behavior applies when pos == size ()
1418 for the non const version.</p>
1421 <p><b>Proposed resolution:</b></p>
1422 <p>Rewrite as: Otherwise, if pos &gt; size () or pos == size () and
1423 the non-const version is used, then the behavior is undefined.</p>
1426 <p><b>Rationale:</b></p>
1427 <p>The Standard is correct. The proposed resolution already appears in
1428 the Standard.</p>
1433 <hr>
1434 <h3><a name="105"></a>105. fstream ctors argument types desired</h3>
1435 <p><b>Section:</b> 27.8 [file.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
1436 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1437 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
1438 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a></p>
1439 <p><b>Discussion:</b></p>
1442 <p>fstream ctors take a const char* instead of string.<br>
1443 fstream ctors can't take wchar_t</p>
1445 <p>An extension to add a const wchar_t* to fstream would make the
1446 implementation non conforming.</p>
1449 <p><b>Rationale:</b></p>
1450 <p>This is not a defect in the Standard. It might be an
1451 interesting extension for the next Standard. </p>
1456 <hr>
1457 <h3><a name="107"></a>107. Valarray constructor is strange</h3>
1458 <p><b>Section:</b> 26.5.2 [template.valarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1459 <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1460 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.valarray">issues</a> in [template.valarray].</p>
1461 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1462 <p><b>Discussion:</b></p>
1463 <p>The order of the arguments is (elem, size) instead of the normal
1464 (size, elem) in the rest of the library. Since elem often has an
1465 integral or floating point type, both types are convertible to each
1466 other and reversing them leads to a well formed program.</p>
1469 <p><b>Proposed resolution:</b></p>
1470 <p>Inverting the arguments could silently break programs. Introduce
1471 the two signatures (const T&amp;, size_t) and (size_t, const T&amp;),
1472 but make the one we do not want private so errors result in a
1473 diagnosed access violation. This technique can also be applied to STL
1474 containers.</p>
1477 <p><b>Rationale:</b></p>
1478 <p>The LWG believes that while the order of arguments is unfortunate,
1479 it does not constitute a defect in the standard. The LWG believes that
1480 the proposed solution will not work for valarray&lt;size_t&gt; and
1481 perhaps other cases.</p>
1486 <hr>
1487 <h3><a name="111"></a>111. istreambuf_iterator::equal overspecified, inefficient</h3>
1488 <p><b>Section:</b> 24.5.3.5 [istreambuf.iterator::equal] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
1489 <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-10-15</p>
1490 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
1491 <p><b>Discussion:</b></p>
1492 <p>The member istreambuf_iterator&lt;&gt;::equal is specified to be
1493 unnecessarily inefficient. While this does not affect the efficiency
1494 of conforming implementations of iostreams, because they can
1495 "reach into" the iterators and bypass this function, it does
1496 affect users who use istreambuf_iterators. </p>
1498 <p>The inefficiency results from a too-scrupulous definition, which
1499 requires a "true" result if neither iterator is at eof. In
1500 practice these iterators can only usefully be compared with the
1501 "eof" value, so the extra test implied provides no benefit,
1502 but slows down users' code. </p>
1504 <p>The solution is to weaken the requirement on the function to return
1505 true only if both iterators are at eof. </p>
1508 <p><b>Proposed resolution:</b></p>
1509 <p>Replace 24.5.3.5 [istreambuf.iterator::equal],
1510 paragraph 1, </p>
1512 <blockquote>
1513 <p>-1- Returns: true if and only if both iterators are at end-of-stream, or neither is at
1514 end-of-stream, regardless of what streambuf object they use. </p>
1515 </blockquote>
1517 <p>with</p>
1519 <blockquote>
1520 <p>-1- Returns: true if and only if both iterators are at
1521 end-of-stream, regardless of what streambuf object they use. </p>
1522 </blockquote>
1526 <p><b>Rationale:</b></p>
1527 <p>It is not clear that this is a genuine defect. Additionally, the
1528 LWG was reluctant to make a change that would result in
1529 operator== not being a equivalence relation. One consequence of
1530 this change is that an algorithm that's passed the range [i, i)
1531 would no longer treat it as an empty range.</p>
1537 <hr>
1538 <h3><a name="113"></a>113. Missing/extra iostream sync semantics</h3>
1539 <p><b>Section:</b> 27.6.1.1 [istream], 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1540 <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-10-13</p>
1541 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream">issues</a> in [istream].</p>
1542 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1543 <p><b>Discussion:</b></p>
1544 <p>In 27.6.1.1, class basic_istream has a member function sync, described in 27.6.1.3,
1545 paragraph 36. </p>
1547 <p>Following the chain of definitions, I find that the various sync functions have defined
1548 semantics for output streams, but no semantics for input streams. On the other hand,
1549 basic_ostream has no sync function. </p>
1551 <p>The sync function should at minimum be added to basic_ostream, for internal
1552 consistency. </p>
1554 <p>A larger question is whether sync should have assigned semantics for input streams. </p>
1556 <p>Classic iostreams said streambuf::sync flushes pending output and attempts to return
1557 unread input characters to the source. It is a protected member function. The filebuf
1558 version (which is public) has that behavior (it backs up the read pointer). Class
1559 strstreambuf does not override streambuf::sync, and so sync can't be called on a
1560 strstream. </p>
1562 <p>If we can add corresponding semantics to the various sync functions, we should. If not,
1563 we should remove sync from basic_istream.</p>
1566 <p><b>Rationale:</b></p>
1567 <p>A sync function is not needed in basic_ostream because the flush function provides the
1568 desired functionality.</p>
1570 <p>As for the other points, the LWG finds the standard correct as written.</p>
1576 <hr>
1577 <h3><a name="116"></a>116. bitset cannot be constructed with a const char*</h3>
1578 <p><b>Section:</b> 23.3.5 [template.bitset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
1579 <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-11-06</p>
1580 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#template.bitset">issues</a> in [template.bitset].</p>
1581 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
1582 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#778">778</a></p>
1583 <p><b>Discussion:</b></p>
1587 <p>The following code does not compile with the EDG compiler:</p>
1589 <blockquote>
1590 <pre>#include &lt;bitset&gt;
1591 using namespace std;
1592 bitset&lt;32&gt; b("111111111");</pre>
1593 </blockquote>
1595 <p>If you cast the ctor argument to a string, i.e.:</p>
1597 <blockquote>
1598 <pre>bitset&lt;32&gt; b(string("111111111"));</pre>
1599 </blockquote>
1601 <p>then it will compile. The reason is that bitset has the following templatized
1602 constructor:</p>
1604 <blockquote>
1605 <pre>template &lt;class charT, class traits, class Allocator&gt;
1606 explicit bitset (const basic_string&lt;charT, traits, Allocator&gt;&amp; str, ...);</pre>
1607 </blockquote>
1609 <p>According to the compiler vendor, Steve Adamcyk at EDG, the user
1610 cannot pass this template constructor a <tt>const char*</tt> and
1611 expect a conversion to <tt>basic_string</tt>. The reason is
1612 "When you have a template constructor, it can get used in
1613 contexts where type deduction can be done. Type deduction basically
1614 comes up with exact matches, not ones involving conversions."
1615 </p>
1617 <p>I don't think the intention when this constructor became
1618 templatized was for construction from a <tt>const char*</tt> to no
1619 longer work.</p>
1622 <p><b>Proposed resolution:</b></p>
1623 <p>Add to 23.3.5 [template.bitset] a bitset constructor declaration</p>
1625 <blockquote>
1626 <pre>explicit bitset(const char*);</pre>
1627 </blockquote>
1629 <p>and in Section 23.3.5.1 [bitset.cons] add:</p>
1631 <blockquote>
1632 <pre>explicit bitset(const char* str);</pre>
1633 <p>Effects: <br>
1634 &nbsp;&nbsp;&nbsp; Calls <tt>bitset((string) str, 0, string::npos);</tt></p>
1635 </blockquote>
1638 <p><b>Rationale:</b></p>
1639 <p>Although the problem is real, the standard is designed that way so
1640 it is not a defect. Education is the immediate workaround. A future
1641 standard may wish to consider the Proposed Resolution as an
1642 extension.</p>
1648 <hr>
1649 <h3><a name="121"></a>121. Detailed definition for ctype&lt;wchar_t&gt; specialization</h3>
1650 <p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1651 <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
1652 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
1653 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1654 <p><b>Discussion:</b></p>
1655 <p>Section 22.1.1.1.1 has the following listed in Table 51: ctype&lt;char&gt; ,
1656 ctype&lt;wchar_t&gt;. </p>
1658 <p>Also Section 22.2.1.1 [locale.ctype] says: </p>
1660 <blockquote>
1661 <p>The instantiations required in Table 51 (22.1.1.1.1) namely ctype&lt;char&gt; and
1662 ctype&lt;wchar_t&gt; , implement character classing appropriate to the implementation's
1663 native character set. </p>
1664 </blockquote>
1666 <p>However, Section 22.2.1.3 [facet.ctype.special]
1667 only has a detailed description of the ctype&lt;char&gt; specialization, not the
1668 ctype&lt;wchar_t&gt; specialization. </p>
1671 <p><b>Proposed resolution:</b></p>
1672 <p>Add the ctype&lt;wchar_t&gt; detailed class description to Section
1673 22.2.1.3 [facet.ctype.special]. </p>
1676 <p><b>Rationale:</b></p>
1677 <p>Specialization for wchar_t is not needed since the default is acceptable.</p>
1683 <hr>
1684 <h3><a name="131"></a>131. list::splice throws nothing</h3>
1685 <p><b>Section:</b> 23.2.4.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1686 <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
1687 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
1688 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1689 <p><b>Discussion:</b></p>
1690 <p>What happens if a splice operation causes the size() of a list to grow
1691 beyond max_size()?</p>
1694 <p><b>Rationale:</b></p>
1695 <p>Size() cannot grow beyond max_size().&nbsp; </p>
1701 <hr>
1702 <h3><a name="135"></a>135. basic_iostream doubly initialized</h3>
1703 <p><b>Section:</b> 27.6.1.5.1 [iostream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1704 <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
1705 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1706 <p><b>Discussion:</b></p>
1707 <p>-1- Effects Constructs an object of class basic_iostream, assigning
1708 initial values to the base classes by calling
1709 basic_istream&lt;charT,traits&gt;(sb) (lib.istream) and
1710 basic_ostream&lt;charT,traits&gt;(sb) (lib.ostream)</p>
1712 <p>The called for basic_istream and basic_ostream constructors call
1713 init(sb). This means that the basic_iostream's virtual base class is
1714 initialized twice.</p>
1717 <p><b>Proposed resolution:</b></p>
1718 <p>Change 27.6.1.5.1, paragraph 1 to:</p>
1720 <p>-1- Effects Constructs an object of class basic_iostream, assigning
1721 initial values to the base classes by calling
1722 basic_istream&lt;charT,traits&gt;(sb) (lib.istream).</p>
1725 <p><b>Rationale:</b></p>
1726 <p>The LWG agreed that the <tt> init()</tt> function is called
1727 twice, but said that this is harmless and so not a defect in the
1728 standard.</p>
1733 <hr>
1734 <h3><a name="138"></a>138. Class ctype_byname&lt;char&gt; redundant and misleading</h3>
1735 <p><b>Section:</b> 22.2.1.4 [locale.codecvt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
1736 <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-03-18</p>
1737 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt">issues</a> in [locale.codecvt].</p>
1738 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
1739 <p><b>Discussion:</b></p>
1740 <p>Section 22.2.1.4 [locale.codecvt] specifies that
1741 ctype_byname&lt;char&gt; must be a specialization of the ctype_byname
1742 template.</p>
1744 <p>It is common practice in the standard that specializations of class templates are only
1745 mentioned where the interface of the specialization deviates from the interface of the
1746 template that it is a specialization of. Otherwise, the fact whether or not a required
1747 instantiation is an actual instantiation or a specialization is left open as an
1748 implementation detail. </p>
1750 <p>Clause 22.2.1.4 deviates from that practice and for that reason is misleading. The
1751 fact, that ctype_byname&lt;char&gt; is specified as a specialization suggests that there
1752 must be something "special" about it, but it has the exact same interface as the
1753 ctype_byname template. Clause 22.2.1.4 does not have any explanatory value, is at best
1754 redundant, at worst misleading - unless I am missing anything. </p>
1756 <p>Naturally, an implementation will most likely implement ctype_byname&lt;char&gt; as a
1757 specialization, because the base class ctype&lt;char&gt; is a specialization with an
1758 interface different from the ctype template, but that's an implementation detail and need
1759 not be mentioned in the standard. </p>
1762 <p><b>Rationale:</b></p>
1763 <p> The standard as written is mildly misleading, but the correct fix
1764 is to deal with the underlying problem in the ctype_byname base class,
1765 not in the specialization. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p>
1770 <hr>
1771 <h3><a name="140"></a>140. map&lt;Key, T&gt;::value_type does not satisfy the assignable requirement</h3>
1772 <p><b>Section:</b> 23.3.1 [map] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
1773 <b>Submitter:</b> Mark Mitchell <b>Date:</b> 1999-04-14</p>
1774 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#map">issues</a> in [map].</p>
1775 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
1776 <p><b>Discussion:</b></p>
1777 <blockquote>
1778 <p>23.1 [container.requirements]<br>
1779 <br>
1780 expression&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return type
1781 &nbsp;&nbsp;&nbsp;&nbsp; pre/post-condition<br>
1782 -------------&nbsp;&nbsp;&nbsp;&nbsp; ----------- &nbsp;&nbsp;&nbsp;&nbsp;
1783 -------------------<br>
1784 X::value_type&nbsp;&nbsp;&nbsp; T
1785 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1786 T is assignable<br>
1787 <br>
1788 23.3.1 [map]<br>
1789 <br>
1790 A map satisfies all the requirements of a container.<br>
1791 <br>
1792 For a map&lt;Key, T&gt; ... the value_type is pair&lt;const Key, T&gt;.</p>
1793 </blockquote>
1795 <p>There's a contradiction here. In particular, `pair&lt;const Key,
1796 T&gt;' is not assignable; the `const Key' cannot be assigned
1797 to. So,&nbsp; map&lt;Key, T&gt;::value_type does not satisfy the
1798 assignable requirement imposed by a container.</p>
1800 <p><i>[See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#103">103</a> for the slightly related issue of
1801 modification of set keys.]</i></p>
1805 <p><b>Rationale:</b></p>
1806 <p>The LWG believes that the standard is inconsistent, but that this
1807 is a design problem rather than a strict defect. May wish to
1808 reconsider for the next standard.</p>
1813 <hr>
1814 <h3><a name="143"></a>143. C .h header wording unclear</h3>
1815 <p><b>Section:</b> D.5 [depr.c.headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1816 <b>Submitter:</b> Christophe de Dinechin <b>Date:</b> 1999-05-04</p>
1817 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1818 <p><b>Discussion:</b></p>
1819 <p>[depr.c.headers] paragraph 2 reads:</p>
1821 <blockquote>
1823 <p>Each C header, whose name has the form name.h, behaves as if each
1824 name placed in the Standard library namespace by the corresponding
1825 cname header is also placed within the namespace scope of the
1826 namespace std and is followed by an explicit using-declaration
1827 (_namespace.udecl_)</p>
1829 </blockquote>
1831 <p>I think it should mention the global name space somewhere...&nbsp;
1832 Currently, it indicates that name placed in std is also placed in
1833 std...</p>
1835 <p>I don't know what is the correct wording. For instance, if struct
1836 tm is defined in time.h, ctime declares std::tm. However, the current
1837 wording seems ambiguous regarding which of the following would occur
1838 for use of both ctime and time.h:</p>
1840 <blockquote>
1841 <pre>// version 1:
1842 namespace std {
1843 struct tm { ... };
1845 using std::tm;
1847 // version 2:
1848 struct tm { ... };
1849 namespace std {
1850 using ::tm;
1853 // version 3:
1854 struct tm { ... };
1855 namespace std {
1856 struct tm { ... };
1857 }</pre>
1858 </blockquote>
1860 <p>I think version 1 is intended.</p>
1862 <p><i>[Kona: The LWG agreed that the wording is not clear. It also
1863 agreed that version 1 is intended, version 2 is not equivalent to
1864 version 1, and version 3 is clearly not intended. The example below
1865 was constructed by Nathan Myers to illustrate why version 2 is not
1866 equivalent to version 1.</i></p>
1868 <p><i>Although not equivalent, the LWG is unsure if (2) is enough of
1869 a problem to be prohibited. Points discussed in favor of allowing
1870 (2):</i></p>
1872 <blockquote>
1873 <ul>
1874 <li><i>It may be a convenience to implementors.</i></li>
1875 <li><i>The only cases that fail are structs, of which the C library
1876 contains only a few.</i></li>
1877 </ul>
1878 </blockquote>
1880 <p><i>]</i></p>
1882 <p><b>Example:</b></p>
1884 <blockquote>
1886 <pre>#include &lt;time.h&gt;
1887 #include &lt;utility&gt;
1889 int main() {
1890 std::tm * t;
1891 make_pair( t, t ); // okay with version 1 due to Koenig lookup
1892 // fails with version 2; make_pair not found
1893 return 0;
1894 }</pre>
1896 </blockquote>
1899 <p><b>Proposed resolution:</b></p>
1901 <p>Replace D.5 [depr.c.headers] paragraph 2 with:</p>
1903 <blockquote>
1905 <p> Each C header, whose name has the form name.h, behaves as if each
1906 name placed in the Standard library namespace by the corresponding
1907 cname header is also placed within the namespace scope of the
1908 namespace std by name.h and is followed by an explicit
1909 using-declaration (_namespace.udecl_) in global scope.</p>
1911 </blockquote>
1915 <p><b>Rationale:</b></p>
1916 <p> The current wording in the standard is the result of a difficult
1917 compromise that averted delay of the standard. Based on discussions
1918 in Tokyo it is clear that there is no still no consensus on stricter
1919 wording, so the issue has been closed. It is suggested that users not
1920 write code that depends on Koenig lookup of C library functions.</p>
1925 <hr>
1926 <h3><a name="145"></a>145. adjustfield lacks default value</h3>
1927 <p><b>Section:</b> 27.4.4.1 [basic.ios.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1928 <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-05-12</p>
1929 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.cons">issues</a> in [basic.ios.cons].</p>
1930 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
1931 <p><b>Discussion:</b></p>
1932 <p>There is no initial value for the adjustfield defined, although
1933 many people believe that the default adjustment were right. This is a
1934 common misunderstanding. The standard only defines that, if no
1935 adjustment is specified, all the predefined inserters must add fill
1936 characters before the actual value, which is "as if" the
1937 right flag were set. The flag itself need not be set.</p>
1939 <p>When you implement a user-defined inserter you cannot rely on right
1940 being the default setting for the adjustfield. Instead, you must be
1941 prepared to find none of the flags set and must keep in mind that in
1942 this case you should make your inserter behave "as if" the
1943 right flag were set. This is surprising to many people and complicates
1944 matters more than necessary.</p>
1946 <p>Unless there is a good reason why the adjustfield should not be
1947 initialized I would suggest to give it the default value that
1948 everybody expects anyway.</p>
1952 <p><b>Rationale:</b></p>
1953 <p>This is not a defect. It is deliberate that the default is no bits
1954 set. Consider Arabic or Hebrew, for example. See 22.2.2.2.2 [facet.num.put.virtuals] paragraph 19, Table 61 - Fill padding.</p>
1959 <hr>
1960 <h3><a name="149"></a>149. Insert should return iterator to first element inserted</h3>
1961 <p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
1962 <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-06-28</p>
1963 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
1964 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
1965 <p><b>Discussion:</b></p>
1966 <p>Suppose that c and c1 are sequential containers and i is an
1967 iterator that refers to an element of c. Then I can insert a copy of
1968 c1's elements into c ahead of element i by executing </p>
1970 <blockquote>
1972 <pre>c.insert(i, c1.begin(), c1.end());</pre>
1974 </blockquote>
1976 <p>If c is a vector, it is fairly easy for me to find out where the
1977 newly inserted elements are, even though i is now invalid: </p>
1979 <blockquote>
1981 <pre>size_t i_loc = i - c.begin();
1982 c.insert(i, c1.begin(), c1.end());</pre>
1984 </blockquote>
1986 <p>and now the first inserted element is at c.begin()+i_loc and one
1987 past the last is at c.begin()+i_loc+c1.size().<br>
1988 <br>
1989 But what if c is a list? I can still find the location of one past the
1990 last inserted element, because i is still valid. To find the location
1991 of the first inserted element, though, I must execute something like </p>
1993 <blockquote>
1995 <pre>for (size_t n = c1.size(); n; --n)
1996 --i;</pre>
1998 </blockquote>
2000 <p>because i is now no longer a random-access iterator.<br>
2001 <br>
2002 Alternatively, I might write something like </p>
2004 <blockquote>
2006 <pre>bool first = i == c.begin();
2007 list&lt;T&gt;::iterator j = i;
2008 if (!first) --j;
2009 c.insert(i, c1.begin(), c1.end());
2010 if (first)
2011 j = c.begin();
2012 else
2013 ++j;</pre>
2015 </blockquote>
2017 <p>which, although wretched, requires less overhead.<br>
2018 <br>
2019 But I think the right solution is to change the definition of insert
2020 so that instead of returning void, it returns an iterator that refers
2021 to the first element inserted, if any, and otherwise is a copy of its
2022 first argument.&nbsp; </p>
2025 <p><b>Rationale:</b></p>
2026 <p>The LWG believes this was an intentional design decision and so is
2027 not a defect. It may be worth revisiting for the next standard.</p>
2032 <hr>
2033 <h3><a name="157"></a>157. Meaningless error handling for <tt>pword()</tt> and <tt>iword()</tt></h3>
2034 <p><b>Section:</b> 27.4.2.5 [ios.base.storage] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2035 <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2036 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.storage">issues</a> in [ios.base.storage].</p>
2037 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2038 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#41">41</a></p>
2039 <p><b>Discussion:</b></p>
2040 <p>According to paragraphs 2 and 4 of 27.4.2.5 [ios.base.storage], the
2041 functions <tt>iword()</tt> and <tt>pword()</tt> "set the
2042 <tt>badbit</tt> (which might throw an exception)" on
2043 failure. ... but what does it mean for <tt>ios_base</tt> to set the
2044 <tt>badbit</tt>? The state facilities of the IOStream library are
2045 defined in <tt>basic_ios</tt>, a derived class! It would be possible
2046 to attempt a down cast but then it would be necessary to know the
2047 character type used...</p>
2050 <p><b>Rationale:</b></p>
2056 <hr>
2057 <h3><a name="162"></a>162. Really "formatted input functions"?</h3>
2058 <p><b>Section:</b> 27.6.1.2.3 [istream::extractors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2059 <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2060 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
2061 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2062 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
2063 <p><b>Discussion:</b></p>
2064 <p>It appears to be somewhat nonsensical to consider the functions
2065 defined in the paragraphs 1 to 5 to be "Formatted input
2066 function" but since these functions are defined in a section
2067 labeled "Formatted input functions" it is unclear to me
2068 whether these operators are considered formatted input functions which
2069 have to conform to the "common requirements" from 27.6.1.2.1
2070 [istream.formatted.reqmts]: If this is the case, all manipulators, not
2071 just
2072 <tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is set
2073 (... but setting <tt>noskipws</tt> using the manipulator syntax would
2074 also skip whitespace :-)</p>
2076 <p>See also issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#166">166</a> for the same problem in formatted
2077 output</p>
2080 <p><b>Rationale:</b></p>
2086 <hr>
2087 <h3><a name="163"></a>163. Return of <tt>gcount()</tt> after a call to <tt>gcount</tt></h3>
2088 <p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2089 <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2090 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
2091 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2092 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
2093 <p><b>Discussion:</b></p>
2094 <p>It is not clear which functions are to be considered unformatted
2095 input functions. As written, it seems that all functions in 27.6.1.3
2096 [istream.unformatted] are unformatted input functions. However, it does
2098 really make much sense to construct a sentry object for
2099 <tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is unclear what
2100 happens to the <tt>gcount()</tt> if eg. <tt>gcount()</tt>,
2101 <tt>putback()</tt>, <tt>unget()</tt>, or <tt>sync()</tt> is called:
2102 These functions don't extract characters, some of them even
2103 "unextract" a character. Should this still be reflected in
2104 <tt>gcount()</tt>? Of course, it could be read as if after a call to
2105 <tt>gcount()</tt> <tt>gcount()</tt> return <tt>0</tt> (the last
2106 unformatted input function, <tt>gcount()</tt>, didn't extract any
2107 character) and after a call to <tt>putback()</tt> <tt>gcount()</tt>
2108 returns <tt>-1</tt> (the last unformatted input function
2109 <tt>putback()</tt> did "extract" back into the
2110 stream). Correspondingly for <tt>unget()</tt>. Is this what is
2111 intended? If so, this should be clarified. Otherwise, a corresponding
2112 clarification should be used.</p>
2115 <p><b>Rationale:</b></p>
2121 <hr>
2122 <h3><a name="166"></a>166. Really "formatted output functions"?</h3>
2123 <p><b>Section:</b> 27.6.2.6.3 [ostream.inserters] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2124 <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2125 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2126 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
2127 <p><b>Discussion:</b></p>
2128 <p>From 27.6.2.6.1 [ostream.formatted.reqmts] it appears that all the functions
2129 defined in 27.6.2.6.3 [ostream.inserters] have to construct a
2130 <tt>sentry</tt> object. Is this really intended?</p>
2132 <p>This is basically the same problem as issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#162">162</a> but
2133 for output instead of input.</p>
2136 <p><b>Rationale:</b></p>
2142 <hr>
2143 <h3><a name="177"></a>177. Complex operators cannot be explicitly instantiated</h3>
2144 <p><b>Section:</b> 26.3.6 [complex.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2145 <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p>
2146 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.ops">issues</a> in [complex.ops].</p>
2147 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2148 <p><b>Discussion:</b></p>
2149 <p>A user who tries to explicitly instantiate a complex non-member operator will
2150 get compilation errors. Below is a simplified example of the reason why. The
2151 problem is that iterator_traits cannot be instantiated on a non-pointer type
2152 like float, yet when the compiler is trying to decide which operator+ needs to
2153 be instantiated it must instantiate the declaration to figure out the first
2154 argument type of a reverse_iterator operator.</p>
2155 <pre>namespace std {
2156 template &lt;class Iterator&gt;
2157 struct iterator_traits
2159 typedef typename Iterator::value_type value_type;
2162 template &lt;class T&gt; class reverse_iterator;
2164 // reverse_iterator operator+
2165 template &lt;class T&gt;
2166 reverse_iterator&lt;T&gt; operator+
2167 (typename iterator_traits&lt;T&gt;::difference_type, const reverse_iterator&lt;T&gt;&amp;);
2169 template &lt;class T&gt; struct complex {};
2171 // complex operator +
2172 template &lt;class T&gt;
2173 complex&lt;T&gt; operator+ (const T&amp; lhs, const complex&lt;T&gt;&amp; rhs)
2174 { return complex&lt;T&gt;();}
2177 // request for explicit instantiation
2178 template std::complex&lt;float&gt; std::operator+&lt;float&gt;(const float&amp;,
2179 const std::complex&lt;float&gt;&amp;);</pre>
2180 <p>See also c++-stdlib reflector messages: lib-6814, 6815, 6816.</p>
2183 <p><b>Rationale:</b></p>
2184 <p>Implementors can make minor changes and the example will
2185 work. Users are not affected in any case.</p> <p>According to John
2186 Spicer, It is possible to explicitly instantiate these operators using
2187 different syntax: change "std::operator+&lt;float&gt;" to
2188 "std::operator+".</p>
2190 <p>The proposed resolution of issue 120 is that users will not be able
2191 to explicitly instantiate standard library templates. If that
2192 resolution is accepted then library implementors will be the only ones
2193 that will be affected by this problem, and they must use the indicated
2194 syntax.</p>
2199 <hr>
2200 <h3><a name="178"></a>178. Should clog and cerr initially be tied to cout?</h3>
2201 <p><b>Section:</b> 27.3.1 [narrow.stream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2202 <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p>
2203 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#narrow.stream.objects">issues</a> in [narrow.stream.objects].</p>
2204 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2205 <p><b>Discussion:</b></p>
2207 Section 27.3.1 says "After the object cerr is initialized,
2208 cerr.flags() &amp; unitbuf is nonzero. Its state is otherwise the same as
2209 required for ios_base::init (lib.basic.ios.cons). It doesn't say
2210 anything about the the state of clog. So this means that calling
2211 cerr.tie() and clog.tie() should return 0 (see Table 89 for
2212 ios_base::init effects).
2213 </p>
2215 Neither of the popular standard library implementations
2216 that I tried does this, they both tie cerr and clog
2217 to &amp;cout. I would think that would be what users expect.
2218 </p>
2221 <p><b>Rationale:</b></p>
2222 <p>The standard is clear as written.</p>
2223 <p>27.3.1/5 says that "After the object cerr is initialized, cerr.flags()
2224 &amp; unitbuf is nonzero. Its state is otherwise the same as required for
2225 ios_base::init (27.4.4.1)." Table 89 in 27.4.4.1, which gives the
2226 postconditions of basic_ios::init(), says that tie() is 0. (Other issues correct
2227 ios_base::init to basic_ios::init().)</p>
2232 <hr>
2233 <h3><a name="188"></a>188. valarray helpers missing augmented assignment operators</h3>
2234 <p><b>Section:</b> 26.5.2.6 [valarray.cassign] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2235 <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 1999-08-15</p>
2236 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2237 <p><b>Discussion:</b></p>
2238 <p>26.5.2.6 defines augmented assignment operators
2239 valarray&lt;T&gt;::op=(const T&amp;), but fails to provide
2240 corresponding versions for the helper classes. Thus making the
2241 following illegal:</p>
2242 <blockquote>
2243 <pre>#include &lt;valarray&gt;
2245 int main()
2247 std::valarray&lt;double&gt; v(3.14, 1999);
2249 v[99] *= 2.0; // Ok
2251 std::slice s(0, 50, 2);
2253 v[s] *= 2.0; // ERROR
2254 }</pre>
2255 </blockquote>
2256 <p>I can't understand the intent of that omission. It makes the
2257 valarray library less intuitive and less useful.</p>
2260 <p><b>Rationale:</b></p>
2261 <p>Although perhaps an unfortunate
2262 design decision, the omission is not a defect in the current
2263 standard.&nbsp; A future standard may wish to add the missing
2264 operators.</p>
2269 <hr>
2270 <h3><a name="191"></a>191. Unclear complexity for algorithms such as binary search</h3>
2271 <p><b>Section:</b> 25.3.3 [alg.binary.search] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2272 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1999-10-10</p>
2273 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.binary.search">issues</a> in [alg.binary.search].</p>
2274 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2275 <p><b>Discussion:</b></p>
2276 <p>The complexity of binary_search() is stated as "At most
2277 log(last-first) + 2 comparisons", which seems to say that the
2278 algorithm has logarithmic complexity. However, this algorithms is
2279 defined for forward iterators. And for forward iterators, the need to
2280 step element-by-element results into linear complexity. But such a
2281 statement is missing in the standard. The same applies to
2282 lower_bound(), upper_bound(), and equal_range().&nbsp;<br>
2283 <br>
2284 However, strictly speaking the standard contains no bug here. So this
2285 might considered to be a clarification or improvement.
2286 </p>
2289 <p><b>Rationale:</b></p>
2290 <p>The complexity is expressed in terms of comparisons, and that
2291 complexity can be met even if the number of iterators accessed is
2292 linear. Paragraph 1 already says exactly what happens to
2293 iterators.</p>
2298 <hr>
2299 <h3><a name="192"></a>192. a.insert(p,t) is inefficient and overconstrained</h3>
2300 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2301 <b>Submitter:</b> Ed Brey <b>Date:</b> 1999-06-06</p>
2302 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
2303 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2304 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p>
2305 <p><b>Discussion:</b></p>
2306 <p>As defined in 23.1.2, paragraph 7 (table 69), a.insert(p,t) suffers from
2307 several problems:</p>
2308 <table border="1" cellpadding="5">
2309 <tbody><tr>
2310 <td><b>expression</b></td>
2311 <td><b>return type</b></td>
2312 <td><b>pre/post-condition</b></td>
2313 <td><b>complexity</b></td>
2314 </tr>
2315 <tr>
2316 <td><tt>a.insert(p,t)</tt></td>
2317 <td><tt>iterator</tt></td>
2318 <td>inserts t if and only if there is no element with key equivalent to the key of
2319 t in containers with unique keys; always inserts t in containers with equivalent
2320 keys. always returns the iterator pointing to the element with key equivalent to
2321 the key of t . iterator p is a hint pointing to where the insert should start to search.</td>
2322 <td>logarithmic in general, but amortized constant if t is inserted right after p .</td>
2323 </tr>
2324 </tbody></table>
2325 <p>1. For a container with unique keys, only logarithmic complexity is
2326 guaranteed if no element is inserted, even though constant complexity is always
2327 possible if p points to an element equivalent to t.</p>
2328 <p>2. For a container with equivalent keys, the amortized constant complexity
2329 guarantee is only useful if no key equivalent to t exists in the container.
2330 Otherwise, the insertion could occur in one of multiple locations, at least one
2331 of which would not be right after p.</p>
2332 <p>3. By guaranteeing amortized constant complexity only when t is inserted
2333 after p, it is impossible to guarantee constant complexity if t is inserted at
2334 the beginning of the container. Such a problem would not exist if amortized
2335 constant complexity was guaranteed if t is inserted before p, since there is
2336 always some p immediately before which an insert can take place.</p>
2337 <p>4. For a container with equivalent keys, p does not allow specification of
2338 where to insert the element, but rather only acts as a hint for improving
2339 performance. This negates the added functionality that p would provide if it
2340 specified where within a sequence of equivalent keys the insertion should occur.
2341 Specifying the insert location provides more control to the user, while
2342 providing no disadvantage to the container implementation.</p>
2345 <p><b>Proposed resolution:</b></p>
2346 <p>In 23.1.2 [associative.reqmts] paragraph 7, replace the row in table 69
2347 for a.insert(p,t) with the following two rows:</p>
2348 <table border="1" cellpadding="5">
2349 <tbody><tr>
2350 <td><b>expression</b></td>
2351 <td><b>return type</b></td>
2352 <td><b>pre/post-condition</b></td>
2353 <td><b>complexity</b></td>
2354 </tr>
2355 <tr>
2356 <td><tt>a_uniq.insert(p,t)</tt></td>
2357 <td><tt>iterator</tt></td>
2358 <td>inserts t if and only if there is no element with key equivalent to the
2359 key of t. returns the iterator pointing to the element with key equivalent
2360 to the key of t.</td>
2361 <td>logarithmic in general, but amortized constant if t is inserted right
2362 before p or p points to an element with key equivalent to t.</td>
2363 </tr>
2364 <tr>
2365 <td><tt>a_eq.insert(p,t)</tt></td>
2366 <td><tt>iterator</tt></td>
2367 <td>inserts t and returns the iterator pointing to the newly inserted
2368 element. t is inserted right before p if doing so preserves the container
2369 ordering.</td>
2370 <td>logarithmic in general, but amortized constant if t is inserted right
2371 before p.</td>
2372 </tr>
2373 </tbody></table>
2377 <p><b>Rationale:</b></p>
2378 <p>Too big a change.&nbsp; Furthermore, implementors report checking
2379 both before p and after p, and don't want to change this behavior.</p>
2385 <hr>
2386 <h3><a name="194"></a>194. rdbuf() functions poorly specified</h3>
2387 <p><b>Section:</b> 27.4.4 [ios] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2388 <b>Submitter:</b> Steve Clamage <b>Date:</b> 1999-09-07</p>
2389 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2390 <p><b>Discussion:</b></p>
2391 <p>In classic iostreams, base class ios had an rdbuf function that returned a
2392 pointer to the associated streambuf. Each derived class had its own rdbuf
2393 function that returned a pointer of a type reflecting the actual type derived
2394 from streambuf. Because in ARM C++, virtual function overrides had to have the
2395 same return type, rdbuf could not be virtual.</p>
2396 <p>In standard iostreams, we retain the non-virtual rdbuf function design, and
2397 in addition have an overloaded rdbuf function that sets the buffer pointer.
2398 There is no need for the second function to be virtual nor to be implemented in
2399 derived classes.</p>
2400 <p>Minor question: Was there a specific reason not to make the original rdbuf
2401 function virtual?</p>
2402 <p>Major problem: Friendly compilers warn about functions in derived classes
2403 that hide base-class overloads. Any standard implementation of iostreams will
2404 result in such a warning on each of the iostream classes, because of the
2405 ill-considered decision to overload rdbuf only in a base class.</p>
2406 <p>In addition, users of the second rdbuf function must use explicit
2407 qualification or a cast to call it from derived classes. An explicit
2408 qualification or cast to basic_ios would prevent access to any later overriding
2409 version if there was one.</p>
2410 <p>What I'd like to do in an implementation is add a using- declaration for the
2411 second rdbuf function in each derived class. It would eliminate warnings about
2412 hiding functions, and would enable access without using explicit qualification.
2413 Such a change I don't think would change the behavior of any valid program, but
2414 would allow invalid programs to compile:</p>
2415 <blockquote>
2416 <pre> filebuf mybuf;
2417 fstream f;
2418 f.rdbuf(mybuf); // should be an error, no visible rdbuf</pre>
2419 </blockquote>
2420 <p>I'd like to suggest this problem as a defect, with the proposed resolution to
2421 require the equivalent of a using-declaration for the rdbuf function that is not
2422 replaced in a later derived class. We could discuss whether replacing the
2423 function should be allowed.</p>
2426 <p><b>Rationale:</b></p>
2427 <p>For historical reasons, the standard is correct as written. There is a subtle difference between the base
2428 class <tt> rdbuf()</tt> and derived class <tt>rdbuf()</tt>. The derived
2429 class <tt> rdbuf()</tt> always returns the original streambuf, whereas the base class
2430 <tt> rdbuf()</tt> will return the "current streambuf" if that has been changed by the variant you mention.</p>
2432 <p>Permission is not required to add such an extension. See
2433 17.4.4.4 [member.functions].</p>
2438 <hr>
2439 <h3><a name="196"></a>196. Placement new example has alignment problems</h3>
2440 <p><b>Section:</b> 18.5.1.3 [new.delete.placement] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2441 <b>Submitter:</b> Herb Sutter <b>Date:</b> 1998-12-15</p>
2442 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.placement">issues</a> in [new.delete.placement].</p>
2443 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2444 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a></p>
2445 <p><b>Discussion:</b></p>
2446 <p>The example in 18.5.1.3 [new.delete.placement] paragraph 4 reads: </p>
2448 <blockquote>
2450 <p>[Example: This can be useful for constructing an object at a known address:<br>
2451 <br>
2452 <tt>&nbsp;&nbsp; char place[sizeof(Something)];<br>
2453 &nbsp;&nbsp; Something* p = new (place) Something();<br>
2454 <br>
2455 </tt>end example] </p>
2457 </blockquote>
2459 <p>This example has potential alignment problems. </p>
2462 <p><b>Rationale:</b></p>
2468 <hr>
2469 <h3><a name="197"></a>197. max_size() underspecified</h3>
2470 <p><b>Section:</b> 20.1.2 [allocator.requirements], 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2471 <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1999-10-21</p>
2472 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
2473 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
2474 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2475 <p><b>Discussion:</b></p>
2476 <p>Must the value returned by max_size() be unchanged from call to call? </p>
2478 <p>Must the value returned from max_size() be meaningful? </p>
2480 <p>Possible meanings identified in lib-6827: </p>
2482 <p>1) The largest container the implementation can support given "best
2483 case" conditions - i.e. assume the run-time platform is "configured to
2484 the max", and no overhead from the program itself. This may possibly
2485 be determined at the point the library is written, but certainly no
2486 later than compile time.<br>
2487 <br>
2488 2) The largest container the program could create, given "best case"
2489 conditions - i.e. same platform assumptions as (1), but take into
2490 account any overhead for executing the program itself. (or, roughly
2491 "storage=storage-sizeof(program)"). This does NOT include any resource
2492 allocated by the program. This may (or may not) be determinable at
2493 compile time.<br>
2494 <br>
2495 3) The largest container the current execution of the program could
2496 create, given knowledge of the actual run-time platform, but again,
2497 not taking into account any currently allocated resource. This is
2498 probably best determined at program start-up.<br>
2499 <br>
2500 4) The largest container the current execution program could create at
2501 the point max_size() is called (or more correctly at the point
2502 max_size() returns :-), given it's current environment (i.e. taking
2503 into account the actual currently available resources). This,
2504 obviously, has to be determined dynamically each time max_size() is
2505 called. </p>
2508 <p><b>Proposed resolution:</b></p>
2511 <p><b>Rationale:</b></p>
2512 <p>max_size() isn't useful for very many things, and the existing
2513 wording is sufficiently clear for the few cases that max_size() can
2514 be used for. None of the attempts to change the existing wording
2515 were an improvement.</p>
2517 <p>It is clear to the LWG that the value returned by max_size() can't
2518 change from call to call.</p>
2525 <hr>
2526 <h3><a name="203"></a>203. basic_istream::sentry::sentry() is uninstantiable with ctype&lt;user-defined type&gt;</h3>
2527 <p><b>Section:</b> 27.6.1.1.3 [istream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2528 <b>Submitter:</b> Matt McClure and Dietmar Kühl <b>Date:</b> 2000-01-01</p>
2529 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::sentry">issues</a> in [istream::sentry].</p>
2530 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2531 <p><b>Discussion:</b></p>
2532 <p>27.6.1.1.2 Paragraph 4 states:</p>
2533 <blockquote>
2534 <p>To decide if the character c is a whitespace character, the constructor
2535 performs ''as if'' it executes the following code fragment:&nbsp;</p>
2536 <pre>const ctype&lt;charT&gt;&amp; ctype = use_facet&lt;ctype&lt;charT&gt; &gt;(is.getloc());
2537 if (ctype.is(ctype.space,c)!=0)
2538 // c is a whitespace character.</pre>
2539 </blockquote>
2541 <p> But Table 51 in 22.1.1.1.1 only requires an implementation to
2542 provide specializations for ctype&lt;char&gt; and
2543 ctype&lt;wchar_t&gt;. If sentry's constructor is implemented using
2544 ctype, it will be uninstantiable for a user-defined character type
2545 charT, unless the implementation has provided non-working (since it
2546 would be impossible to define a correct ctype&lt;charT&gt; specialization
2547 for an arbitrary charT) definitions of ctype's virtual member
2548 functions.</p>
2551 It seems the intent the standard is that sentry should behave, in
2552 every respect, not just during execution, as if it were implemented
2553 using ctype, with the burden of providing a ctype specialization
2554 falling on the user. But as it is written, nothing requires the
2555 translation of sentry's constructor to behave as if it used the above
2556 code, and it would seem therefore, that sentry's constructor should be
2557 instantiable for all character types.
2558 </p>
2560 <p>
2561 Note: If I have misinterpreted the intent of the standard with
2562 respect to sentry's constructor's instantiability, then a note should
2563 be added to the following effect:
2564 </p>
2566 <blockquote><p>
2567 An implementation is forbidden from using the above code if it renders
2568 the constructor uninstantiable for an otherwise valid character
2569 type.
2570 </p></blockquote>
2572 <p>In any event, some clarification is needed.</p>
2576 <p><b>Rationale:</b></p>
2577 <p>It is possible but not easy to instantiate on types other than char
2578 or wchar_t; many things have to be done first. That is by intention
2579 and is not a defect.</p>
2584 <hr>
2585 <h3><a name="204"></a>204. distance(first, last) when "last" is before "first"</h3>
2586 <p><b>Section:</b> 24.3.4 [iterator.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2587 <b>Submitter:</b> Rintala Matti <b>Date:</b> 2000-01-28</p>
2588 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2589 <p><b>Discussion:</b></p>
2590 <p>Section 24.3.4 describes the function distance(first, last) (where first and
2591 last are iterators) which calculates "the number of increments or
2592 decrements needed to get from 'first' to 'last'".</p>
2593 <p>The function should work for forward, bidirectional and random access
2594 iterators, and there is a requirement 24.3.4.5 which states that "'last'
2595 must be reachable from 'first'".</p>
2596 <p>With random access iterators the function is easy to implement as "last
2597 - first".</p>
2598 <p>With forward iterators it's clear that 'first' must point to a place before
2599 'last', because otherwise 'last' would not be reachable from 'first'.</p>
2600 <p>But what about bidirectional iterators? There 'last' is reachable from
2601 'first' with the -- operator even if 'last' points to an earlier position than
2602 'first'. However, I cannot see how the distance() function could be implemented
2603 if the implementation does not know which of the iterators points to an earlier
2604 position (you cannot use ++ or -- on either iterator if you don't know which
2605 direction is the "safe way to travel").</p>
2606 <p>The paragraph 24.3.4.1 states that "for ... bidirectional iterators they
2607 use ++ to provide linear time implementations". However, the ++ operator is
2608 not mentioned in the reachability requirement. Furthermore 24.3.4.4 explicitly
2609 mentions that distance() returns the number of increments _or decrements_,
2610 suggesting that it could return a negative number also for bidirectional
2611 iterators when 'last' points to a position before 'first'.</p>
2612 <p>Is a further requirement is needed to state that for forward and
2613 bidirectional iterators "'last' must be reachable from 'first' using the ++
2614 operator". Maybe this requirement might also apply to random access
2615 iterators so that distance() would work the same way for every iterator
2616 category?</p>
2619 <p><b>Rationale:</b></p>
2620 <p>"Reachable" is defined in the standard in 24.1 [iterator.requirements] paragraph 6.
2621 The definition is only in terms of operator++(). The LWG sees no defect in
2622 the standard.</p>
2627 <hr>
2628 <h3><a name="205"></a>205. numeric_limits unclear on how to determine floating point types</h3>
2629 <p><b>Section:</b> 18.2.1.2 [numeric.limits.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2630 <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-01-28</p>
2631 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.limits.members">issues</a> in [numeric.limits.members].</p>
2632 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2633 <p><b>Discussion:</b></p>
2634 <p>In several places in 18.2.1.2 [numeric.limits.members], a member is
2635 described as "Meaningful for all floating point types."
2636 However, no clear method of determining a floating point type is
2637 provided.</p>
2639 <p>In 18.2.1.5 [numeric.special], paragraph 1 states ". . . (for
2640 example, epsilon() is only meaningful if is_integer is
2641 false). . ." which suggests that a type is a floating point type
2642 if is_specialized is true and is_integer is false; however, this is
2643 unclear.</p>
2645 <p>When clarifying this, please keep in mind this need of users: what
2646 exactly is the definition of floating point? Would a fixed point or
2647 rational representation be considered one? I guess my statement here
2648 is that there could also be types that are neither integer or
2649 (strictly) floating point.</p>
2652 <p><b>Rationale:</b></p>
2653 <p>It is up to the implementor of a user define type to decide if it is a
2654 floating point type.</p>
2659 <hr>
2660 <h3><a name="207"></a>207. ctype&lt;char&gt; members return clause incomplete</h3>
2661 <p><b>Section:</b> 22.2.1.3.2 [facet.ctype.char.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2662 <b>Submitter:</b> Robert Klarer <b>Date:</b> 1999-11-02</p>
2663 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.ctype.char.members">issues</a> in [facet.ctype.char.members].</p>
2664 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2665 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a></p>
2666 <p><b>Discussion:</b></p>
2668 The <tt>widen</tt> and <tt>narrow</tt> member functions are described
2669 in 22.2.1.3.2, paragraphs 9-11. In each case we have two overloaded
2670 signatures followed by a <b>Returns</b> clause. The <b>Returns</b>
2671 clause only describes one of the overloads.
2672 </p>
2675 <p><b>Proposed resolution:</b></p>
2676 <p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members]
2677 paragraph 10 from:</p>
2678 <p>&nbsp;&nbsp;&nbsp; Returns: do_widen(low, high, to).</p>
2680 <p>to:</p>
2681 <p>&nbsp;&nbsp;&nbsp; Returns: do_widen(c) or do_widen(low, high, to),
2682 respectively.</p>
2684 <p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members] paragraph 11
2685 from:</p>
2686 <p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(low, high, to).</p>
2688 <p>to:</p>
2689 <p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(c) or do_narrow(low, high, to),
2690 respectively.</p>
2693 <p><b>Rationale:</b></p>
2694 <p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a>, which addresses the same
2695 paragraphs.</p>
2702 <hr>
2703 <h3><a name="213"></a>213. Math function overloads ambiguous</h3>
2704 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2705 <b>Submitter:</b> Nico Josuttis <b>Date:</b> 2000-02-26</p>
2706 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
2707 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
2708 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2709 <p><b>Discussion:</b></p>
2710 <p>Due to the additional overloaded versions of numeric functions for
2711 float and long double according to Section 26.5, calls such as int x;
2712 std::pow (x, 4) are ambiguous now in a standard conforming
2713 implementation. Current implementations solve this problem very
2714 different (overload for all types, don't overload for float and long
2715 double, use preprocessor, follow the standard and get
2716 ambiguities).</p> <p>This behavior should be standardized or at least
2717 identified as implementation defined.</p>
2720 <p><b>Rationale:</b></p>
2721 <p>These math issues are an
2722 understood and accepted consequence of the design. They have
2723 been discussed several times in the past. Users must write casts
2724 or write floating point expressions as arguments.</p>
2729 <hr>
2730 <h3><a name="215"></a>215. Can a map's key_type be const?</h3>
2731 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2732 <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-02-29</p>
2733 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
2734 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2735 <p><b>Discussion:</b></p>
2736 <p>A user noticed that this doesn't compile with the Rogue Wave library because
2737 the rb_tree class declares a key_allocator, and allocator&lt;const int&gt; is
2738 not legal, I think:</p>
2739 <blockquote>
2740 <pre>map &lt; const int, ... &gt; // legal?</pre>
2741 </blockquote>
2742 <p>which made me wonder whether it is legal for a map's key_type to be const. In
2743 email from Matt Austern he said:</p>
2744 <blockquote>
2745 <p>I'm not sure whether it's legal to declare a map with a const key type. I
2746 hadn't thought about that question until a couple weeks ago. My intuitive
2747 feeling is that it ought not to be allowed, and that the standard ought to say
2748 so. It does turn out to work in SGI's library, though, and someone in the
2749 compiler group even used it. Perhaps this deserves to be written up as an issue
2750 too.</p>
2751 </blockquote>
2754 <p><b>Rationale:</b></p>
2755 <p>The "key is assignable" requirement from table 69 in
2756 23.1.2 [associative.reqmts] already implies the key cannot be const.</p>
2761 <hr>
2762 <h3><a name="216"></a>216. setbase manipulator description flawed</h3>
2763 <p><b>Section:</b> 27.6.3 [std.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2764 <b>Submitter:</b> Hyman Rosen <b>Date:</b> 2000-02-29</p>
2765 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#std.manip">issues</a> in [std.manip].</p>
2766 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2767 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a></p>
2768 <p><b>Discussion:</b></p>
2769 <p>27.6.3 [std.manip] paragraph 5 says:</p>
2770 <blockquote>
2771 <pre>smanip setbase(int base);</pre>
2772 <p> Returns: An object s of unspecified type such that if out is an
2773 (instance of) basic_ostream then the expression out&lt;&lt;s behaves
2774 as if f(s) were called, in is an (instance of) basic_istream then the
2775 expression in&gt;&gt;s behaves as if f(s) were called. Where f can be
2776 defined as:</p>
2777 <pre>ios_base&amp; f(ios_base&amp; str, int base)
2779 // set basefield
2780 str.setf(n == 8 ? ios_base::oct :
2781 n == 10 ? ios_base::dec :
2782 n == 16 ? ios_base::hex :
2783 ios_base::fmtflags(0), ios_base::basefield);
2784 return str;
2785 }</pre>
2786 </blockquote>
2787 <p>There are two problems here. First, f takes two parameters, so the
2788 description needs to say that out&lt;&lt;s and in&gt;&gt;s behave as if f(s,base)
2789 had been called. Second, f is has a parameter named base, but is written as if
2790 the parameter was named n.</p>
2791 <p>Actually, there's a third problem. The paragraph has grammatical errors.
2792 There needs to be an "and" after the first comma, and the "Where
2793 f" sentence fragment needs to be merged into its preceding sentence. You
2794 may also want to format the function a little better. The formatting above is
2795 more-or-less what the Standard contains.</p>
2798 <p><b>Rationale:</b></p>
2799 <p>The resolution of this defect is subsumed by the proposed resolution for
2800 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a>.</p>
2802 <p><i>[Tokyo: The LWG agrees that this is a defect and notes that it
2803 occurs additional places in the section, all requiring fixes.]</i></p>
2812 <hr>
2813 <h3><a name="218"></a>218. Algorithms do not use binary predicate objects for default comparisons</h3>
2814 <p><b>Section:</b> 25.3 [alg.sorting] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2815 <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p>
2816 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.sorting">issues</a> in [alg.sorting].</p>
2817 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2818 <p><b>Discussion:</b></p>
2819 <p>Many of the algorithms take an argument, pred, of template parameter type
2820 BinaryPredicate or an argument comp of template parameter type Compare. These
2821 algorithms usually have an overloaded version that does not take the predicate
2822 argument. In these cases pred is usually replaced by the use of operator== and
2823 comp is replaced by the use of operator&lt;.</p>
2824 <p>This use of hard-coded operators is inconsistent with other parts of the
2825 library, particularly the containers library, where equality is established
2826 using equal_to&lt;&gt; and ordering is established using less&lt;&gt;. Worse,
2827 the use of operator&lt;, would cause the following innocent-looking code to have
2828 undefined behavior:</p>
2829 <blockquote>
2830 <pre>vector&lt;string*&gt; vec;
2831 sort(vec.begin(), vec.end());</pre>
2832 </blockquote>
2833 <p>The use of operator&lt; is not defined for pointers to unrelated objects. If
2834 std::sort used less&lt;&gt; to compare elements, then the above code would be
2835 well-defined, since less&lt;&gt; is explicitly specialized to produce a total
2836 ordering of pointers.</p>
2839 <p><b>Rationale:</b></p>
2840 <p>This use of operator== and operator&lt; was a very deliberate, conscious, and
2841 explicitly made design decision; these operators are often more efficient. The
2842 predicate forms are available for users who don't want to rely on operator== and
2843 operator&lt;.</p>
2848 <hr>
2849 <h3><a name="219"></a>219. find algorithm missing version that takes a binary predicate argument</h3>
2850 <p><b>Section:</b> 25.1.2 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
2851 <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p>
2852 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find">issues</a> in [alg.find].</p>
2853 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Future">NAD Future</a> status.</p>
2854 <p><b>Discussion:</b></p>
2855 <p>The find function always searches for a value using operator== to compare the
2856 value argument to each element in the input iterator range. This is inconsistent
2857 with other find-related functions such as find_end and find_first_of, which
2858 allow the caller to specify a binary predicate object to be used for determining
2859 equality. The fact that this can be accomplished using a combination of find_if
2860 and bind_1st or bind_2nd does not negate the desirability of a consistent,
2861 simple, alternative interface to find.</p>
2864 <p><b>Proposed resolution:</b></p>
2865 <blockquote>
2866 <p>In section 25.1.2 [alg.find], add a second prototype for find
2867 (between the existing prototype and the prototype for find_if), as
2868 follows:</p>
2869 <pre> template&lt;class InputIterator, class T, class BinaryPredicate&gt;
2870 InputIterator find(InputIterator first, InputIterator last,
2871 const T&amp; value, BinaryPredicate bin_pred);</pre>
2872 <p>Change the description of the return from:</p>
2873 <blockquote>
2874 <p>Returns: The first iterator i in the range [first, last) for which the following corresponding
2875 conditions hold: *i == value, pred(*i) != false. Returns last if no such iterator is found.</p>
2876 </blockquote>
2877 <p>&nbsp;to:</p>
2878 <blockquote>
2879 <p>Returns: The first iterator i in the range [first, last) for which the following&nbsp;
2880 corresponding condition holds: *i == value, bin_pred(*i,value) != false, pred(*)
2881 != false. Return last if no such iterator is found.</p>
2882 </blockquote>
2883 </blockquote>
2886 <p><b>Rationale:</b></p>
2887 <p>This is request for a pure extension, so it is not a defect in the
2888 current standard.&nbsp; As the submitter pointed out, "this can
2889 be accomplished using a combination of find_if and bind_1st or
2890 bind_2nd".</p>
2895 <hr>
2896 <h3><a name="236"></a>236. ctype&lt;char&gt;::is() member modifies facet</h3>
2897 <p><b>Section:</b> 22.2.1.3.2 [facet.ctype.char.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
2898 <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p>
2899 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.ctype.char.members">issues</a> in [facet.ctype.char.members].</p>
2900 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
2901 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#28">28</a></p>
2902 <p><b>Discussion:</b></p>
2903 <p>The description of the <tt>is()</tt> member in paragraph 4 of 22.2.1.3.2 [facet.ctype.char.members] is broken: According to this description, the
2904 second form of the <tt>is()</tt> method modifies the masks in the
2905 <tt>ctype</tt> object. The correct semantics if, of course, to obtain
2906 an array of masks. The corresponding method in the general case,
2907 ie. the <tt>do_is()</tt> method as described in 22.2.1.1.2 [locale.ctype.virtuals] paragraph 1 does the right thing.</p>
2910 <p><b>Proposed resolution:</b></p>
2911 <p>Change paragraph 4 from</p>
2912 <blockquote><p>
2913 The second form, for all *p in the range [low, high), assigns
2914 vec[p-low] to table()[(unsigned char)*p].
2915 </p></blockquote>
2916 <p>to become</p>
2917 <blockquote><p>
2918 The second form, for all *p in the range [low, high), assigns
2919 table()[(unsigned char)*p] to vec[p-low].
2920 </p></blockquote>
2923 <p><b>Rationale:</b></p>
2929 <hr>
2930 <h3><a name="244"></a>244. Must <tt>find</tt>'s third argument be CopyConstructible?</h3>
2931 <p><b>Section:</b> 25.1.2 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2932 <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p>
2933 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find">issues</a> in [alg.find].</p>
2934 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2935 <p><b>Discussion:</b></p>
2936 <p>Is the following implementation of <tt>find</tt> acceptable?</p>
2938 <pre> template&lt;class Iter, class X&gt;
2939 Iter find(Iter begin, Iter end, const X&amp; x)
2941 X x1 = x; // this is the crucial statement
2942 while (begin != end &amp;&amp; *begin != x1)
2943 ++begin;
2944 return begin;
2946 </pre>
2948 <p>If the answer is yes, then it is implementation-dependent as to
2949 whether the following fragment is well formed:</p>
2951 <pre> vector&lt;string&gt; v;
2953 find(v.begin(), v.end(), "foo");
2954 </pre>
2956 <p>At issue is whether there is a requirement that the third argument
2957 of find be CopyConstructible. There may be no problem here, but
2958 analysis is necessary.</p>
2961 <p><b>Rationale:</b></p>
2962 <p>There is no indication in the standard that find's third argument
2963 is required to be Copy Constructible. The LWG believes that no such
2964 requirement was intended. As noted above, there are times when a user
2965 might reasonably pass an argument that is not Copy Constructible.</p>
2970 <hr>
2971 <h3><a name="245"></a>245. Which operations on <tt>istream_iterator</tt> trigger input operations?</h3>
2972 <p><b>Section:</b> 24.5.1 [istream.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2973 <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p>
2974 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.iterator">active issues</a> in [istream.iterator].</p>
2975 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.iterator">issues</a> in [istream.iterator].</p>
2976 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
2977 <p><b>Discussion:</b></p>
2978 <p>I do not think the standard specifies what operation(s) on istream
2979 iterators trigger input operations. So, for example:</p>
2981 <pre> istream_iterator&lt;int&gt; i(cin);
2983 int n = *i++;
2984 </pre>
2986 <p>I do not think it is specified how many integers have been read
2987 from cin. The number must be at least 1, of course, but can it be 2?
2988 More?</p>
2991 <p><b>Rationale:</b></p>
2992 <p>The standard is clear as written: the stream is read every time
2993 operator++ is called, and it is also read either when the iterator is
2994 constructed or when operator* is called for the first time. In the
2995 example above, exactly two integers are read from cin.</p>
2997 <p>There may be a problem with the interaction between istream_iterator
2998 and some STL algorithms, such as find. There are no guarantees about
2999 how many times find may invoke operator++.</p>
3004 <hr>
3005 <h3><a name="246"></a>246. <tt>a.insert(p,t)</tt> is incorrectly specified</h3>
3006 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
3007 <b>Submitter:</b> Mark Rodgers <b>Date:</b> 2000-05-19</p>
3008 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
3009 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
3010 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p>
3011 <p><b>Discussion:</b></p>
3012 <p>Closed issue 192 raised several problems with the specification of
3013 this function, but was rejected as Not A Defect because it was too big
3014 a change with unacceptable impacts on existing implementations.
3015 However, issues remain that could be addressed with a smaller change
3016 and with little or no consequent impact.</p>
3018 <ol>
3019 <li><p> The specification is inconsistent with the original
3020 proposal and with several implementations.</p>
3022 <p>The initial implementation by Hewlett Packard only ever looked
3023 immediately <i>before</i> p, and I do not believe there was any
3024 intention to standardize anything other than this behavior.
3025 Consequently, current implementations by several leading
3026 implementors also look immediately before p, and will only insert
3027 after p in logarithmic time. I am only aware of one implementation
3028 that does actually look after p, and it looks before p as well. It
3029 is therefore doubtful that existing code would be relying on the
3030 behavior defined in the standard, and it would seem that fixing
3031 this defect as proposed below would standardize existing
3032 practice.</p></li>
3034 <li><p>
3035 The specification is inconsistent with insertion for sequence
3036 containers.</p>
3038 <p>This is difficult and confusing to teach to newcomers. All
3039 insert operations that specify an iterator as an insertion location
3040 should have a consistent meaning for the location represented by
3041 that iterator.</p></li>
3043 <li><p> As specified, there is no way to hint that the insertion
3044 should occur at the beginning of the container, and the way to hint
3045 that it should occur at the end is long winded and unnatural.</p>
3047 <p>For a container containing n elements, there are n+1 possible
3048 insertion locations and n+1 valid iterators. For there to be a
3049 one-to-one mapping between iterators and insertion locations, the
3050 iterator must represent an insertion location immediately before
3051 the iterator.</p></li>
3053 <li><p> When appending sorted ranges using insert_iterators,
3054 insertions are guaranteed to be sub-optimal.</p>
3056 <p>In such a situation, the optimum location for insertion is
3057 always immediately after the element previously inserted. The
3058 mechanics of the insert iterator guarantee that it will try and
3059 insert after the element after that, which will never be correct.
3060 However, if the container first tried to insert before the hint,
3061 all insertions would be performed in amortized constant
3062 time.</p></li>
3063 </ol>
3066 <p><b>Proposed resolution:</b></p>
3067 <p>In 23.1.2 [lib.associative.reqmts] paragraph 7, table 69, make
3068 the following changes in the row for a.insert(p,t):</p>
3070 <p><i>assertion/note pre/post condition:</i>
3071 <br>Change the last sentence from</p>
3072 <blockquote><p>
3073 "iterator p is a hint pointing to where the insert should
3074 start to search."
3075 </p></blockquote>
3076 <p>to</p>
3077 <blockquote><p>
3078 "iterator p is a hint indicating that immediately before p
3079 may be a correct location where the insertion could occur."
3080 </p></blockquote>
3082 <p><i>complexity:</i><br>
3083 Change the words "right after" to "immediately before".</p>
3086 <p><b>Rationale:</b></p>
3092 <hr>
3093 <h3><a name="249"></a>249. Return Type of <tt>auto_ptr::operator=</tt></h3>
3094 <p><b>Section:</b> D.9.1 [auto.ptr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3095 <b>Submitter:</b> Joseph Gottman <b>Date:</b> 2000-06-30</p>
3096 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#auto.ptr">issues</a> in [auto.ptr].</p>
3097 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3098 <p><b>Discussion:</b></p>
3099 <p>According to section 20.4.5, the function
3100 <tt>auto_ptr::operator=()</tt> returns a reference to an auto_ptr.
3101 The reason that <tt>operator=()</tt> usually returns a reference is to
3102 facilitate code like</p>
3104 <pre> int x,y,z;
3105 x = y = z = 1;
3106 </pre>
3108 <p>However, given analogous code for <tt>auto_ptr</tt>s,</p>
3109 <pre> auto_ptr&lt;int&gt; x, y, z;
3110 z.reset(new int(1));
3111 x = y = z;
3112 </pre>
3114 <p>the result would be that <tt>z</tt> and <tt>y</tt> would both be set to
3115 NULL, instead of all the <tt>auto_ptr</tt>s being set to the same value.
3116 This makes such cascading assignments useless and counterintuitive for
3117 <tt>auto_ptr</tt>s.</p>
3120 <p><b>Proposed resolution:</b></p>
3121 <p>Change <tt>auto_ptr::operator=()</tt> to return <tt>void</tt> instead
3122 of an <tt>auto_ptr</tt> reference.</p>
3125 <p><b>Rationale:</b></p>
3126 <p>The return value has uses other than cascaded assignments: a user can
3127 call an auto_ptr member function, pass the auto_ptr to a
3128 function, etc. Removing the return value could break working user
3129 code.</p>
3134 <hr>
3135 <h3><a name="257"></a>257. STL functional object and iterator inheritance.</h3>
3136 <p><b>Section:</b> 20.5.3 [base], 24.3.2 [iterator.basic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3137 <b>Submitter:</b> Robert Dick <b>Date:</b> 2000-08-17</p>
3138 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#base">issues</a> in [base].</p>
3139 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3140 <p><b>Discussion:</b></p>
3142 According to the November 1997 Draft Standard, the results of deleting an
3143 object of a derived class through a pointer to an object of its base class are
3144 undefined if the base class has a non-virtual destructor. Therefore, it is
3145 potentially dangerous to publicly inherit from such base classes.
3146 </p>
3148 <p>Defect:
3149 <br>
3150 The STL design encourages users to publicly inherit from a number of classes
3151 which do nothing but specify interfaces, and which contain non-virtual
3152 destructors.
3153 </p>
3155 <p>Attribution:
3156 <br>
3157 Wil Evers and William E. Kempf suggested this modification for functional
3158 objects.
3159 </p>
3162 <p><b>Proposed resolution:</b></p>
3164 When a base class in the standard library is useful only as an interface
3165 specifier, i.e., when an object of the class will never be directly
3166 instantiated, specify that the class contains a protected destructor. This
3167 will prevent deletion through a pointer to the base class without performance,
3168 or space penalties (on any implementation I'm aware of).
3169 </p>
3172 As an example, replace...
3173 </p>
3175 <pre> template &lt;class Arg, class Result&gt;
3176 struct unary_function {
3177 typedef Arg argument_type;
3178 typedef Result result_type;
3180 </pre>
3183 ... with...
3184 </p>
3186 <pre> template &lt;class Arg, class Result&gt;
3187 struct unary_function {
3188 typedef Arg argument_type;
3189 typedef Result result_type;
3190 protected:
3191 ~unary_function() {}
3193 </pre>
3196 Affected definitions:
3197 <br>
3198 &nbsp;20.3.1 [lib.function.objects] -- unary_function, binary_function
3199 <br>
3200 &nbsp;24.3.2 [lib.iterator.basic] -- iterator
3201 </p>
3204 <p><b>Rationale:</b></p>
3206 The standard is clear as written; this is a request for change, not a
3207 defect in the strict sense. The LWG had several different objections
3208 to the proposed change. One is that it would prevent users from
3209 creating objects of type <tt>unary_function</tt> and
3210 <tt>binary_function</tt>. Doing so can sometimes be legitimate, if users
3211 want to pass temporaries as traits or tag types in generic code.
3212 </p>
3218 <hr>
3219 <h3><a name="267"></a>267. interaction of strstreambuf::overflow() and seekoff()</h3>
3220 <p><b>Section:</b> D.7.1.3 [depr.strstreambuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3221 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-10-05</p>
3222 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.strstreambuf.virtuals">issues</a> in [depr.strstreambuf.virtuals].</p>
3223 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3224 <p><b>Discussion:</b></p>
3226 It appears that the interaction of the strstreambuf members overflow()
3227 and seekoff() can lead to undefined behavior in cases where defined
3228 behavior could reasonably be expected. The following program
3229 demonstrates this behavior:
3230 </p>
3232 <pre> #include &lt;strstream&gt;
3234 int main ()
3236 std::strstreambuf sb;
3237 sb.sputc ('c');
3239 sb.pubseekoff (-1, std::ios::end, std::ios::in);
3240 return !('c' == sb.sgetc ());
3242 </pre>
3245 D.7.1.1, p1 initializes strstreambuf with a call to basic_streambuf&lt;&gt;(),
3246 which in turn sets all pointers to 0 in 27.5.2.1, p1.
3247 </p>
3250 27.5.2.2.5, p1 says that basic_streambuf&lt;&gt;::sputc(c) calls
3251 overflow(traits::to_int_type(c)) if a write position isn't available (it
3252 isn't due to the above).
3253 </p>
3256 D.7.1.3, p3 says that strstreambuf::overflow(off, ..., ios::in) makes at
3257 least one write position available (i.e., it allows the function to make
3258 any positive number of write positions available).
3259 </p>
3262 D.7.1.3, p13 computes newoff = seekhigh - eback(). In D.7.1, p4 we see
3263 seekhigh = epptr() ? epptr() : egptr(), or seekhigh = epptr() in this
3264 case. newoff is then epptr() - eback().
3265 </p>
3268 D.7.1.4, p14 sets gptr() so that gptr() == eback() + newoff + off, or
3269 gptr() == epptr() + off holds.
3270 </p>
3273 If strstreambuf::overflow() made exactly one write position available
3274 then gptr() will be set to just before epptr(), and the program will
3275 return 0. Buf if the function made more than one write position
3276 available, epptr() and gptr() will both point past pptr() and the
3277 behavior of the program is undefined.
3278 </p>
3281 <p><b>Proposed resolution:</b></p>
3284 <p>Change the last sentence of D.7.1 [depr.strstreambuf] paragraph 4 from</p>
3286 <blockquote><p>
3287 Otherwise, seeklow equals gbeg and seekhigh is either pend, if
3288 pend is not a null pointer, or gend.
3289 </p></blockquote>
3291 <p>to become</p>
3293 <blockquote><p>
3294 Otherwise, seeklow equals gbeg and seekhigh is either gend if
3295 0 == pptr(), or pbase() + max where max is the maximum value of
3296 pptr() - pbase() ever reached for this stream.
3297 </p></blockquote>
3299 <p><i>[
3300 pre-Copenhagen: Dietmar provided wording for proposed resolution.
3301 ]</i></p>
3304 <p><i>[
3305 post-Copenhagen: Fixed a typo: proposed resolution said to fix
3306 4.7.1, not D.7.1.
3307 ]</i></p>
3312 <p><b>Rationale:</b></p>
3313 <p>This is related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a>: it's not clear what it
3314 means to seek beyond the current area. Without resolving issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a> we can't resolve this. As with issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#65">65</a>,
3315 the library working group does not wish to invest time nailing down
3316 corner cases in a deprecated feature.</p>
3322 <hr>
3323 <h3><a name="269"></a>269. cstdarg and unnamed parameters</h3>
3324 <p><b>Section:</b> 18.7 [support.exception] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3325 <b>Submitter:</b> J. Stephen Adamczyk <b>Date:</b> 2000-10-10</p>
3326 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.exception">issues</a> in [support.exception].</p>
3327 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3328 <p><b>Discussion:</b></p>
3330 One of our customers asks whether this is valid C++:
3331 </p>
3333 <pre> #include &lt;cstdarg&gt;
3335 void bar(const char *, va_list);
3337 void
3338 foo(const char *file, const char *, ...)
3340 va_list ap;
3341 va_start(ap, file);
3342 bar(file, ap);
3343 va_end(ap);
3345 </pre>
3348 The issue being whether it is valid to use cstdarg when the final
3349 parameter before the "..." is unnamed. cstdarg is, as far
3350 as I can tell, inherited verbatim from the C standard. and the
3351 definition there (7.8.1.1 in the ISO C89 standard) refers to "the
3352 identifier of the rightmost parameter". What happens when there
3353 is no such identifier?
3354 </p>
3357 My personal opinion is that this should be allowed, but some tweak
3358 might be required in the C++ standard.
3359 </p>
3362 <p><b>Rationale:</b></p>
3364 Not a defect, the C and C++ standards are clear. It is impossible to
3365 use varargs if the parameter immediately before "..." has no
3366 name, because that is the parameter that must be passed to va_start.
3367 The example given above is broken, because va_start is being passed
3368 the wrong parameter.
3369 </p>
3372 There is no support for extending varargs to provide additional
3373 functionality beyond what's currently there. For reasons of C/C++
3374 compatibility, it is especially important not to make gratuitous
3375 changes in this part of the C++ standard. The C committee has already
3376 been requested not to touch this part of the C standard unless
3377 necessary.
3378 </p>
3383 <hr>
3384 <h3><a name="277"></a>277. Normative encouragement in allocator requirements unclear</h3>
3385 <p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3386 <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-11-07</p>
3387 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
3388 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
3389 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3390 <p><b>Discussion:</b></p>
3392 In 20.1.5, paragraph 5, the standard says that "Implementors are
3393 encouraged to supply libraries that can accept allocators that
3394 encapsulate more general memory models and that support non-equal
3395 instances." This is intended as normative encouragement to
3396 standard library implementors. However, it is possible to interpret
3397 this sentence as applying to nonstandard third-party libraries.
3398 </p>
3401 <p><b>Proposed resolution:</b></p>
3403 In 20.1.5, paragraph 5, change "Implementors" to
3404 "Implementors of the library described in this International
3405 Standard".
3406 </p>
3409 <p><b>Rationale:</b></p>
3410 <p>The LWG believes the normative encouragement is already
3411 sufficiently clear, and that there are no important consequences
3412 even if it is misunderstood.</p>
3418 <hr>
3419 <h3><a name="279"></a>279. const and non-const iterators should have equivalent typedefs</h3>
3420 <p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3421 <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-11-27</p>
3422 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
3423 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
3424 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3425 <p><b>Discussion:</b></p>
3428 This came from an email from Steve Cleary to Fergus in reference to
3429 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed
3430 this in Toronto and believes it should be a separate issue.
3431 </p>
3434 Steve said: "We may want to state that the const/non-const iterators must have
3435 the same difference type, size_type, and category."
3436 </p>
3439 (Comment from Judy)
3440 I'm not sure if the above sentence should be true for all
3441 const and non-const iterators in a particular container, or if it means
3442 the container's iterator can't be compared with the container's
3443 const_iterator unless the above it true. I suspect the former.
3444 </p>
3447 <p><b>Proposed resolution:</b></p>
3449 In <b>Section:</b> 23.1 [container.requirements],
3450 table 65, in the assertion/note pre/post condition for X::const_iterator,
3451 add the following:
3452 </p>
3454 <blockquote>
3456 typeid(X::const_iterator::difference_type) == typeid(X::iterator::difference_type)
3457 </p>
3460 typeid(X::const_iterator::size_type) == typeid(X::iterator::size_type)
3461 </p>
3464 typeid(X::const_iterator::category) == typeid(X::iterator::category)
3465 </p>
3466 </blockquote>
3469 <p><b>Rationale:</b></p>
3470 <p>Going through the types one by one: Iterators don't have a
3471 <tt>size_type</tt>. We already know that the difference types are
3472 identical, because the container requirements already say that the
3473 difference types of both X::iterator and X::const_iterator are both
3474 X::difference_type. The standard does not require that X::iterator
3475 and X::const_iterator have the same iterator category, but the LWG
3476 does not see this as a defect: it's possible to imagine cases in which
3477 it would be useful for the categories to be different.</p>
3479 <p>It may be desirable to require X::iterator and X::const_iterator to
3480 have the same value type, but that is a new issue. (Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#322">322</a>.)</p>
3487 <hr>
3488 <h3><a name="287"></a>287. conflicting ios_base fmtflags</h3>
3489 <p><b>Section:</b> 27.4.2.2 [fmtflags.state] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3490 <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
3491 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fmtflags.state">issues</a> in [fmtflags.state].</p>
3492 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3493 <p><b>Discussion:</b></p>
3495 The Effects clause for ios_base::setf(fmtflags fmtfl) says
3496 "Sets fmtfl in flags()". What happens if the user first calls
3497 ios_base::scientific and then calls ios_base::fixed or vice-versa?
3498 This is an issue for all of the conflicting flags, i.e. ios_base::left
3499 and ios_base::right or ios_base::dec, ios_base::hex and ios_base::oct.
3500 </p>
3503 I see three possible solutions:
3504 </p>
3506 <ol>
3507 <li>Set ios_base::failbit whenever the user specifies a conflicting
3508 flag with one previously explicitly set. If the constructor is
3509 supposed to set ios_base::dec (see discussion below), then
3510 the user setting hex or oct format after construction will not
3511 set failbit. </li>
3512 <li>The last call to setf "wins", i.e. it clears any conflicting
3513 previous setting.</li>
3514 <li>All the flags that the user specifies are set, but when actually
3515 interpreting them, fixed always override scientific, right always
3516 overrides left, dec overrides hex which overrides oct.</li>
3517 </ol>
3520 Most existing implementations that I tried seem to conform to resolution #3,
3521 except that when using the iomanip manipulator hex or oct then that always
3522 overrides dec, but calling setf(ios_base::hex) doesn't.
3523 </p>
3526 There is a sort of related issue, which is that although the ios_base
3527 constructor says that each ios_base member has an indeterminate value
3528 after construction, all the existing implementations I tried explicitly set
3529 ios_base::dec.
3530 </p>
3533 <p><b>Proposed resolution:</b></p>
3536 <p><b>Rationale:</b></p>
3538 <tt>adjustfield</tt>, <tt>basefield</tt>, and <tt>floatfield</tt>
3539 are each multi-bit fields. It is possible to set multiple bits within
3540 each of those fields. (For example, <tt>dec</tt> and
3541 <tt>oct</tt>). These fields are used by locale facets. The LWG
3542 reviewed the way in which each of those three fields is used, and
3543 believes that in each case the behavior is well defined for any
3544 possible combination of bits. See for example Table 58, in 22.2.2.2.2
3545 [facet.num.put.virtuals], noting the requirement in paragraph 6 of that
3546 section.
3547 </p>
3549 Users are advised to use manipulators, or else use the two-argument
3550 version of <tt>setf</tt>, to avoid unexpected behavior.
3551 </p>
3557 <hr>
3558 <h3><a name="289"></a>289. &lt;cmath&gt; requirements missing C float and long double versions</h3>
3559 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3560 <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
3561 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
3562 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
3563 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3564 <p><b>Discussion:</b></p>
3566 In ISO/IEC 9899:1990 Programming Languages C we find the following
3567 concerning &lt;math.h&gt;:
3568 </p>
3570 <blockquote><p>
3571 7.13.4 Mathematics &lt;math.h&gt;
3572 <br>
3573 The names of all existing functions declared in the &lt;math.h&gt;
3574 header, suffixed with f or l, are reserved respectively for
3575 corresponding functions with float and long double arguments
3576 are return values.
3577 </p></blockquote>
3580 For example, <tt>float&nbsp;sinf(float)</tt>
3581 is reserved.
3582 </p>
3585 In the C99 standard, &lt;math.h&gt; must contain declarations
3586 for these functions.
3587 </p>
3590 So, is it acceptable for an implementor to add these prototypes to the
3591 C++ versions of the math headers? Are they required?
3592 </p>
3595 <p><b>Proposed resolution:</b></p>
3597 Add these Functions to Table 80, section 26.5 and to Table 99,
3598 section C.2:
3599 </p>
3601 <pre> acosf asinf atanf atan2f ceilf cosf coshf
3602 expf fabsf floorf fmodf frexpf ldexpf
3603 logf log10f modff powf sinf sinhf sqrtf
3604 tanf tanhf
3605 acosl asinl atanl atan2l ceill cosl coshl
3606 expl fabsl floorl fmodl frexpl ldexpl
3607 logl log10l modfl powl sinl sinhl sqrtl
3608 tanl tanhl
3609 </pre>
3612 There should probably be a note saying that these functions
3613 are optional and, if supplied, should match the description in
3614 the 1999 version of the C standard. In the next round
3615 of C++ standardization they can then become mandatory.
3616 </p>
3619 <p><b>Rationale:</b></p>
3620 <p>The C90 standard, as amended, already permits (but does not
3621 require) these functions, and the C++ standard incorporates the
3622 C90 standard by reference. C99 is not an issue, because it is
3623 never referred to by the C++ standard.</p>
3629 <hr>
3630 <h3><a name="293"></a>293. Order of execution in transform algorithm</h3>
3631 <p><b>Section:</b> 25.2.4 [alg.transform] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3632 <b>Submitter:</b> Angelika Langer <b>Date:</b> 2001-01-04</p>
3633 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.transform">issues</a> in [alg.transform].</p>
3634 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3635 <p><b>Discussion:</b></p>
3636 <p>This issue is related to issue 242. In case that the resolution
3637 proposed for issue 242 is accepted, we have have the following
3638 situation: The 4 numeric algorithms (accumulate and consorts) as well
3639 as transform would allow a certain category of side effects. The
3640 numeric algorithms specify that they invoke the functor "for
3641 every iterator i in the range [first, last) in order". transform,
3642 in contrast, would not give any guarantee regarding order of
3643 invocation of the functor, which means that the functor can be invoked
3644 in any arbitrary order.
3645 </p>
3647 <p>Why would that be a problem? Consider an example: say the
3648 transformator that is a simple enumerator ( or more generally
3649 speaking, "is order-sensitive" ). Since a standard
3650 compliant implementation of transform is free to invoke the enumerator
3651 in no definite order, the result could be a garbled enumeration.
3652 Strictly speaking this is not a problem, but it is certainly at odds
3653 with the prevalent understanding of transform as an algorithms that
3654 assigns "a new _corresponding_ value" to the output
3655 elements.
3656 </p>
3658 <p>All implementations that I know of invoke the transformator in
3659 definite order, namely starting from first and proceeding to last -
3660 1. Unless there is an optimization conceivable that takes advantage of
3661 the indefinite order I would suggest to specify the order, because it
3662 eliminate the uncertainty that users would otherwise have regarding
3663 the order of execution of their potentially order-sensitive function
3664 objects.
3665 </p>
3668 <p><b>Proposed resolution:</b></p>
3669 <p>In section 25.2.3 - Transform [lib.alg.transform] change:</p>
3670 <blockquote><p>
3671 -1- Effects: Assigns through every iterator i in the range [result,
3672 result + (last1 - first1)) a new corresponding
3673 value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
3674 (i - result), *(first2 + (i - result))).
3675 </p></blockquote>
3676 <p>to:</p>
3677 <blockquote><p>
3678 -1- Effects: Computes values by invoking the operation op or binary_op
3679 for every iterator in the range [first1, last1) in order. Assigns through
3680 every iterator i in the range [result, result + (last1 - first1)) a new
3681 corresponding
3682 value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
3683 (i - result), *(first2 + (i - result))).
3684 </p></blockquote>
3687 <p><b>Rationale:</b></p>
3688 <p>For Input Iterators an order is already guaranteed, because
3689 only one order is possible. If a user who passes a Forward
3690 Iterator to one of these algorithms really needs a specific
3691 order of execution, it's possible to achieve that effect by
3692 wrapping it in an Input Iterator adaptor.</p>
3698 <hr>
3699 <h3><a name="296"></a>296. Missing descriptions and requirements of pair operators</h3>
3700 <p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3701 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-14</p>
3702 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
3703 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3704 <p><b>Discussion:</b></p>
3705 <p>The synopsis of the header <tt>&lt;utility&gt;</tt> in 20.2 [utility]
3706 lists the complete set of equality and relational operators for <tt>pair</tt>
3707 but the section describing the template and the operators only describes
3708 <tt>operator==()</tt> and <tt>operator&lt;()</tt>, and it fails to mention
3709 any requirements on the template arguments. The remaining operators are
3710 not mentioned at all.
3711 </p>
3714 <p><b>Rationale:</b></p>
3715 <p>20.2.1 [operators] paragraph 10 already specifies the semantics.
3716 That paragraph says that, if declarations of operator!=, operator&gt;,
3717 operator&lt;=, and operator&gt;= appear without definitions, they are
3718 defined as specified in 20.2.1 [operators]. There should be no user
3719 confusion, since that paragraph happens to immediately precede the
3720 specification of <tt>pair</tt>.</p>
3726 <hr>
3727 <h3><a name="302"></a>302. Need error indication from codecvt&lt;&gt;::do_length</h3>
3728 <p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3729 <b>Submitter:</b> Gregory Bumgardner <b>Date:</b> 2001-01-25</p>
3730 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
3731 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3732 <p><b>Discussion:</b></p>
3734 The effects of <tt>codecvt&lt;&gt;::do_length()</tt> are described in
3735 22.2.1.5.2, paragraph 10. As implied by that paragraph, and clarified
3736 in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#75">75</a>, <tt>codecvt&lt;&gt;::do_length()</tt> must
3737 process the source data and update the <tt>stateT</tt> argument just
3738 as if the data had been processed by <tt>codecvt&lt;&gt;::in()</tt>.
3739 However, the standard does not specify how <tt>do_length()</tt> would
3740 report a translation failure, should the source sequence contain
3741 untranslatable or illegal character sequences.
3742 </p>
3745 The other conversion methods return an "error" result value
3746 to indicate that an untranslatable character has been encountered, but
3747 <tt>do_length()</tt> already has a return value (the number of source
3748 characters that have been processed by the method).
3749 </p>
3752 <p><b>Proposed resolution:</b></p>
3754 This issue cannot be resolved without modifying the interface. An exception
3755 cannot be used, as there would be no way to determine how many characters
3756 have been processed and the state object would be left in an indeterminate
3757 state.
3758 </p>
3761 A source compatible solution involves adding a fifth argument to length()
3762 and do_length() that could be used to return position of the offending
3763 character sequence. This argument would have a default value that would
3764 allow it to be ignored:
3765 </p>
3767 <pre> int length(stateT&amp; state,
3768 const externT* from,
3769 const externT* from_end,
3770 size_t max,
3771 const externT** from_next = 0);
3773 virtual
3774 int do_length(stateT&amp; state,
3775 const externT* from,
3776 const externT* from_end,
3777 size_t max,
3778 const externT** from_next);
3779 </pre>
3782 Then an exception could be used to report any translation errors and
3783 the from_next argument, if used, could then be used to retrieve the
3784 location of the offending character sequence.
3785 </p>
3788 <p><b>Rationale:</b></p>
3789 <p>The standard is already clear: the return value is the number of
3790 "valid complete characters". If it encounters an invalid sequence of
3791 external characters, it stops.</p>
3797 <hr>
3798 <h3><a name="304"></a>304. Must <tt>*a</tt> return an lvalue when <tt>a</tt> is an input iterator?</h3>
3799 <p><b>Section:</b> 24.1 [iterator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3800 <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-02-05</p>
3801 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iterator.requirements">active issues</a> in [iterator.requirements].</p>
3802 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iterator.requirements">issues</a> in [iterator.requirements].</p>
3803 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3804 <p><b>Discussion:</b></p>
3806 We all "know" that input iterators are allowed to produce
3807 values when dereferenced of which there is no other in-memory copy.
3808 </p>
3811 But: Table 72, with a careful reading, seems to imply that this can only be
3812 the case if the value_type has no members (e.g. is a built-in type).
3813 </p>
3815 <p>The problem occurs in the following entry:</p>
3817 <pre> a-&gt;m pre: (*a).m is well-defined
3818 Equivalent to (*a).m
3819 </pre>
3822 <tt>*a.m</tt> can be well-defined if <tt>*a</tt> is not a reference
3823 type, but since <tt>operator-&gt;()</tt> must return a pointer for
3824 <tt>a-&gt;m</tt> to be well-formed, it needs something to return a
3825 pointer <i>to</i>. This seems to indicate that <tt>*a</tt> must be
3826 buffered somewhere to make a legal input iterator.
3827 </p>
3829 <p>I don't think this was intentional.</p>
3832 <p><b>Rationale:</b></p>
3833 <p>The current standard is clear and consistent. Input iterators that
3834 return rvalues are in fact implementable. They may in some cases
3835 require extra work, but it is still possible to define an operator-&gt;
3836 in such cases: it doesn't have to return a T*, but may return a
3837 proxy type. No change to the standard is justified.</p>
3843 <hr>
3844 <h3><a name="313"></a>313. set_terminate and set_unexpected question</h3>
3845 <p><b>Section:</b> 18.7.3.3 [terminate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3846 <b>Submitter:</b> Judy Ward <b>Date:</b> 2001-04-03</p>
3847 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#terminate">issues</a> in [terminate].</p>
3848 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3849 <p><b>Discussion:</b></p>
3851 According to section 18.7.3.3 of the standard, std::terminate() is
3852 supposed to call the terminate_handler in effect immediately after
3853 evaluating the throw expression.
3854 </p>
3857 Question: what if the terminate_handler in effect is itself
3858 std::terminate?
3859 </p>
3861 <p>For example:</p>
3863 <pre> #include &lt;exception&gt;
3865 int main () {
3866 std::set_terminate(std::terminate);
3867 throw 5;
3868 return 0;
3870 </pre>
3873 Is the implementation allowed to go into an infinite loop?
3874 </p>
3877 I think the same issue applies to std::set_unexpected.
3878 </p>
3881 <p><b>Proposed resolution:</b></p>
3884 <p><b>Rationale:</b></p>
3885 <p>Infinite recursion is to be expected: users who set the terminate
3886 handler to <tt>terminate</tt> are explicitly asking for <tt>terminate</tt>
3887 to call itself.</p>
3893 <hr>
3894 <h3><a name="314"></a>314. Is the stack unwound when terminate() is called?</h3>
3895 <p><b>Section:</b> 18.7.3.3 [terminate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3896 <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-04-11</p>
3897 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#terminate">issues</a> in [terminate].</p>
3898 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3899 <p><b>Discussion:</b></p>
3902 The standard appears to contradict itself about whether the stack is
3903 unwound when the implementation calls terminate().
3904 </p>
3906 <p>From 18.7.3.3p2:</p>
3907 <blockquote><p>
3908 Calls the terminate_handler function in effect immediately
3909 after evaluating the throw-expression (lib.terminate.handler),
3910 if called by the implementation [...]
3911 </p></blockquote>
3913 <p>So the stack is guaranteed not to be unwound.</p>
3915 <p>But from 15.3p9:</p>
3916 <blockquote><p>
3917 [...]whether or not the stack is unwound before this call
3918 to terminate() is implementation-defined (except.terminate).
3919 </p></blockquote>
3922 And 15.5.1 actually defines that in most cases the stack is unwound.
3923 </p>
3926 <p><b>Proposed resolution:</b></p>
3929 <p><b>Rationale:</b></p>
3930 <p>There is definitely no contradiction between the core and library
3931 clauses; nothing in the core clauses says that stack unwinding happens
3932 after <tt>terminate</tt> is called. 18.7.3.3p2 does not say anything
3933 about when terminate() is called; it merely specifies which
3934 <tt>terminate_handler</tt> is used.</p>
3940 <hr>
3941 <h3><a name="323"></a>323. abs() overloads in different headers</h3>
3942 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
3943 <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-06-04</p>
3944 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
3945 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
3946 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
3947 <p><b>Discussion:</b></p>
3948 <p>Currently the standard mandates the following overloads of
3949 abs():</p>
3951 <pre> abs(long), abs(int) in &lt;cstdlib&gt;
3953 abs(float), abs(double), abs(long double) in &lt;cmath&gt;
3955 template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp;) in &lt;complex&gt;
3957 template&lt;class T&gt; valarray&lt;T&gt; abs(const valarray&lt;T&gt;&amp;); in &lt;valarray&gt;
3958 </pre>
3961 The problem is that having only some overloads visible of a function
3962 that works on "implicitly inter-convertible" types is dangerous in
3963 practice. The headers that get included at any point in a translation
3964 unit can change unpredictably during program
3965 development/maintenance. The wrong overload might be unintentionally
3966 selected.
3967 </p>
3970 Currently, there is nothing that mandates the simultaneous visibility
3971 of these overloads. Indeed, some vendors have begun fastidiously
3972 reducing dependencies among their (public) headers as a QOI issue: it
3973 helps people to write portable code by refusing to compile unless all
3974 the correct headers are #included.
3975 </p>
3977 <p>The same issue may exist for other functions in the library.</p>
3979 <p>Redmond: PJP reports that C99 adds two new kinds of abs: complex,
3980 and int_max_abs.</p>
3982 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#343">343</a>.</p>
3984 <p><i>[
3985 Bellevue:
3986 ]</i></p>
3989 <blockquote>
3990 The situation is not sufficiently severe to warrant a change.
3991 </blockquote>
3996 <p><b>Rationale:</b></p>
3997 <p>The programs that could potentially be broken by this situation are
3998 already fragile, and somewhat contrived: For example, a user-defined
3999 class that has conversion overloads both to <tt>long</tt> and
4000 to <tt>float</tt>. If <tt>x</tt> is a value of such a class, then
4001 <tt>abs(x)</tt> would give the <tt>long</tt> version if the user
4002 included &lt;cstdlib&gt;, the <tt>float</tt> version if the user
4003 included &lt;cmath&gt;, and would be diagnosed as ambiguous at
4004 compile time if the user included both headers. The LWG couldn't
4005 find an example of a program whose meaning would be changed (as
4006 opposed to changing it from well-formed to ill-formed) simply by
4007 adding another standard header.</p>
4009 <p>Since the harm seems minimal, and there don't seem to be any simple
4010 and noninvasive solutions, this is being closed as NAD. It is
4011 marked as "Future" for two reasons. First, it might be useful to
4012 define an <tt>&lt;all&gt;</tt> header that would include all
4013 Standard Library headers. Second, we should at least make sure that
4014 future library extensions don't make this problem worse.</p>
4020 <hr>
4021 <h3><a name="326"></a>326. Missing typedef in moneypunct_byname</h3>
4022 <p><b>Section:</b> 22.2.6.4 [locale.moneypunct.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4023 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-05</p>
4024 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4025 <p><b>Discussion:</b></p>
4026 <p>The definition of the moneypunct facet contains the typedefs char_type
4027 and string_type. Only one of these names, string_type, is defined in
4028 the derived facet, moneypunct_byname.</p>
4031 <p><b>Proposed resolution:</b></p>
4032 <p>For consistency with the numpunct facet, add a typedef for
4033 char_type to the definition of the moneypunct_byname facet in
4034 22.2.6.4 [locale.moneypunct.byname].</p>
4037 <p><b>Rationale:</b></p>
4038 <p>The absence of the typedef is irrelevant. Users can still access
4039 the typedef, because it is inherited from the base class.</p>
4045 <hr>
4046 <h3><a name="330"></a>330. Misleading "exposition only" value in class locale definition</h3>
4047 <p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4048 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-15</p>
4049 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
4050 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4051 <p><b>Discussion:</b></p>
4053 The "exposition only" value of the std::locale::none constant shown in
4054 the definition of class locale is misleading in that it on many
4055 systems conflicts with the value assigned to one if the LC_XXX
4056 constants (specifically, LC_COLLATE on AIX, LC_ALL on HP-UX, LC_CTYPE
4057 on Linux and SunOS). This causes incorrect behavior when such a
4058 constant is passed to one of the locale member functions that accept a
4059 locale::category argument and interpret it as either the C LC_XXX
4060 constant or a bitmap of locale::category values. At least three major
4061 implementations adopt the suggested value without a change and
4062 consequently suffer from this problem.
4063 </p>
4066 For instance, the following code will (presumably) incorrectly copy facets
4067 belonging to the collate category from the German locale on AIX:
4068 </p>
4070 <pre> std::locale l (std::locale ("C"), "de_DE", std::locale::none);
4071 </pre>
4074 <p><b>Rationale:</b></p>
4075 <p>The LWG agrees that it may be difficult to implement locale member
4076 functions in such a way that they can take either <tt>category</tt>
4077 arguments or the LC_ constants defined in &lt;cctype&gt;. In light of
4078 this requirement (22.1.1.1.1 [locale.category], paragraph 2), and in light
4079 of the requirement in the preceding paragraph that it is possible to
4080 combine <tt>category</tt> bitmask elements with bitwise operations,
4081 defining the <tt>category</tt> elements is delicate,
4082 particularly if an implementor is constrained to work with a
4083 preexisting C library. (Just using the existing LC_ constants would
4084 not work in general.) There's no set of "exposition only" values that
4085 could give library implementors proper guidance in such a delicate
4086 matter. The non-normative example we're giving is no worse than
4087 any other choice would be.</p>
4089 <p>See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>.</p>
4095 <hr>
4096 <h3><a name="332"></a>332. Consider adding increment and decrement operators to std::fpos&lt; T &gt; </h3>
4097 <p><b>Section:</b> 27.4.3 [fpos] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4098 <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-27</p>
4099 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#fpos">issues</a> in [fpos].</p>
4100 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4101 <p><b>Discussion:</b></p>
4103 Increment and decrement operators are missing from
4104 Table 88 -- Position type requirements in 27.4.3 [fpos].
4105 </p>
4108 <p><b>Proposed resolution:</b></p>
4110 Table 88 (section 27.4.3) -- Position type requirements
4111 be updated to include increment and decrement operators.
4112 </p>
4114 <pre>expression return type operational note
4116 ++p fpos&amp; p += O(1)
4117 p++ fpos { P tmp = p;
4118 ++p;
4119 return tmp; }
4120 --p fpos&amp; p -= O(1)
4121 p-- fpos { P tmp = p;
4122 --p;
4123 return tmp; }
4124 </pre>
4128 <p><b>Rationale:</b></p>
4129 <p>The LWG believes this is a request for extension, not a defect
4130 report. Additionally, nobody saw a clear need for this extension;
4131 <tt>fpos</tt> is used only in very limited ways.</p>
4137 <hr>
4138 <h3><a name="344"></a>344. grouping + showbase</h3>
4139 <p><b>Section:</b> 22.2.2 [category.numeric] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4140 <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-10-13</p>
4141 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4142 <p><b>Discussion:</b></p>
4144 When both grouping and showbase are active and the basefield is octal,
4145 does the leading 0 participate in the grouping or not? For example,
4146 should one format as: 0,123,456 or 0123,456?
4147 </p>
4149 An analogy can be drawn with hexadecimal. It appears that 0x123,456 is
4150 preferred over 0x,123,456. However, this analogy is not universally
4151 accepted to apply to the octal base. The standard is not clear on how
4152 to format (or parse) in this manner.
4153 </p>
4155 <p><b>Proposed resolution:</b></p>
4157 Insert into 22.2.3.1.2 [facet.numpunct.virtuals] paragraph 3, just before the last
4158 sentence:
4159 </p>
4160 <blockquote><p>
4161 The leading hexadecimal base specifier "0x" does not participate in
4162 grouping. The leading '0' octal base specifier may participate in
4163 grouping. It is unspecified if the leading '0' participates in
4164 formatting octal numbers. In parsing octal numbers, the implementation
4165 is encouraged to accept both the leading '0' participating in the
4166 grouping, and not participating (e.g. 0123,456 or 0,123,456).
4167 </p></blockquote>
4169 <p><b>Rationale:</b></p>
4171 The current behavior may be unspecified, but it's not clear that it
4172 matters. This is an obscure corner case, since grouping is usually
4173 intended for the benefit of humans and oct/hex prefixes are usually
4174 intended for the benefit of machines. There is not a strong enough
4175 consensus in the LWG for action.
4176 </p>
4181 <hr>
4182 <h3><a name="348"></a>348. Minor issue with std::pair operator&lt;</h3>
4183 <p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
4184 <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-10-23</p>
4185 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
4186 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
4187 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a></p>
4188 <p><b>Discussion:</b></p>
4192 The current wording of 20.2.2 [lib.pairs] p6 precludes the use of
4193 operator&lt; on any pair type which contains a pointer.
4194 </p>
4197 <p><b>Proposed resolution:</b></p>
4198 <p>In 20.2.3 [pairs] paragraph 6, replace:</p>
4199 <pre> Returns: x.first &lt; y.first || (!(y.first &lt; x.first) &amp;&amp; x.second &lt;
4200 y.second).
4201 </pre>
4202 <p>With:</p>
4203 <pre> Returns: std::less&lt;T1&gt;()( x.first, y.first ) ||
4204 (!std::less&lt;T1&gt;()( y.first, x.first) &amp;&amp;
4205 std::less&lt;T2&gt;()( x.second, y.second ) )
4206 </pre>
4210 <p><b>Rationale:</b></p>
4211 <p>This is an instance of a much more general problem. If we want
4212 operator&lt; to translate to std::less for pairs of pointers, where
4213 do we draw the line? The same issue applies to individual
4214 pointers, smart pointer wrappers, std::vector&lt;T*&gt;, and so
4215 on.</p>
4217 <p>Andy Koenig suggests that the real issue here is that we aren't
4218 distinguishing adequately between two different orderings, a
4219 "useful ordering" and a "canonical ordering" that's used just
4220 because we sometimes need <i>some</i> ordering without caring much
4221 which ordering it is. Another example of the later is typeinfo's
4222 <tt>before</tt>.</p>
4229 <hr>
4230 <h3><a name="350"></a>350. allocator&lt;&gt;::address</h3>
4231 <p><b>Section:</b> 20.6.5.1 [allocator.members], 20.1.2 [allocator.requirements], 17.4.1.1 [contents] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
4232 <b>Submitter:</b> Nathan Myers <b>Date:</b> 2001-10-25</p>
4233 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.members">issues</a> in [allocator.members].</p>
4234 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
4235 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a></p>
4236 <p><b>Discussion:</b></p>
4237 <p>See c++std-lib-9006 and c++std-lib-9007. This issue is taken
4238 verbatim from -9007.</p>
4241 The core language feature allowing definition of operator&amp;() applied
4242 to any non-builtin type makes that operator often unsafe to use in
4243 implementing libraries, including the Standard Library. The result
4244 is that many library facilities fail for legal user code, such as
4245 the fragment</p>
4246 <pre> class A { private: A* operator&amp;(); };
4247 std::vector&lt;A&gt; aa;
4249 class B { };
4250 B* operator&amp;(B&amp;) { return 0; }
4251 std::vector&lt;B&gt; ba;
4252 </pre>
4255 In particular, the requirements table for Allocator (Table 32) specifies
4256 no semantics at all for member address(), and allocator&lt;&gt;::address is
4257 defined in terms of unadorned operator &amp;.
4258 </p>
4262 <p><b>Proposed resolution:</b></p>
4264 In 20.6.1.1, Change the definition of allocator&lt;&gt;::address from:</p>
4265 <blockquote><p>
4266 Returns: &amp;x
4267 </p></blockquote>
4269 <p>to:</p>
4272 Returns: The value that the built in operator&amp;(x) would return if not
4273 overloaded.
4274 </p>
4277 In 20.1.6, Table 32, add to the Notes column of the a.address(r) and
4278 a.address(s) lines, respectively:
4279 </p>
4281 <pre> allocator&lt;T&gt;::address(r)
4282 allocator&lt;T&gt;::address(s)
4283 </pre>
4285 <p>In addition, in clause 17.4.1.1, add a statement:</p>
4287 <blockquote><p>
4288 The Standard Library does not apply operator&amp; to any type for which
4289 operator&amp; may be overloaded.
4290 </p></blockquote>
4294 <p><b>Rationale:</b></p>
4295 <p>The LWG believes both examples are ill-formed. The contained type
4296 is required to be CopyConstructible (20.1.1 [utility.arg.requirements]), and that
4297 includes the requirement that &amp;t return the usual types and
4298 values. Since allocators are intended to be used in conjunction with
4299 containers, and since the CopyConstructible requirements appear to
4300 have been written to deal with the concerns of this issue, the LWG
4301 feels it is NAD unless someone can come up with a well-formed example
4302 exhibiting a problem.</p>
4304 <p>It may well be that the CopyConstructible requirements are too
4305 restrictive and that either the container requirements or the
4306 CopyConstructive requirements should be relaxed, but that's a far
4307 larger issue. Marking this issue as "future" as a pointer to that
4308 larger issue.</p>
4314 <hr>
4315 <h3><a name="351"></a>351. unary_negate and binary_negate: struct or class?</h3>
4316 <p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
4317 <b>Submitter:</b> Dale Riley <b>Date:</b> 2001-11-12</p>
4318 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#function.objects">issues</a> in [function.objects].</p>
4319 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
4320 <p><b>Discussion:</b></p>
4322 In 20.5 [function.objects] the header &lt;functional&gt; synopsis declares
4323 the unary_negate and binary_negate function objects as struct.
4324 However in 20.5.10 [negators] the unary_negate and binary_negate
4325 function objects are defined as class. Given the context, they are
4326 not "basic function objects" like negate, so this is either a typo or
4327 an editorial oversight.
4328 </p>
4330 <p><i>[Taken from comp.std.c++]</i></p>
4334 <p><b>Proposed resolution:</b></p>
4335 <p>Change the synopsis to reflect the useage in 20.5.10 [negators]</p>
4337 <p><i>[Curaçao: Since the language permits "struct", the LWG
4338 views this as NAD. They suggest, however, that the Project Editor
4339 might wish to make the change as editorial.]</i></p>
4347 <hr>
4348 <h3><a name="353"></a>353. <tt>std::pair</tt> missing template assignment</h3>
4349 <p><b>Section:</b> 20.2.3 [pairs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
4350 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-12-02</p>
4351 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
4352 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
4353 <p><b>Discussion:</b></p>
4355 The class template <tt>std::pair</tt> defines a template ctor (20.2.2, p4) but
4356 no template assignment operator. This may lead to inefficient code since
4357 assigning an object of <tt>pair&lt;C, D&gt;</tt> to <tt>pair&lt;A, B&gt;</tt>
4358 where the types <tt>C</tt> and <tt>D</tt> are distinct from but convertible to
4359 <tt>A</tt> and <tt>B</tt>, respectively, results in a call to the template copy
4360 ctor to construct an unnamed temporary of type <tt>pair&lt;A, B&gt;</tt>
4361 followed by an ordinary (perhaps implicitly defined) assignment operator,
4362 instead of just a straight assignment.
4363 </p>
4366 <p><b>Proposed resolution:</b></p>
4368 Add the following declaration to the definition of <tt>std::pair</tt>:
4369 </p>
4370 <pre> template&lt;class U, class V&gt;
4371 pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
4372 </pre>
4374 And also add a paragraph describing the effects of the function template to the
4375 end of 20.2.2:
4376 </p>
4377 <pre> template&lt;class U, class V&gt;
4378 pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
4379 </pre>
4381 <b>Effects</b>: <tt>first = p.first;</tt>
4382 <tt>second = p.second;</tt>
4383 <b>Returns</b>: <tt>*this</tt>
4384 </p>
4386 <p><i>[Curaçao: There is no indication this is was anything other than
4387 a design decision, and thus NAD.&nbsp; May be appropriate for a future
4388 standard.]</i></p>
4391 <p><i>[
4392 Pre Bellevue: It was recognized that this was taken care of by
4393 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a>,
4394 and thus moved from NAD Future to NAD Editorial.
4395 ]</i></p>
4402 <hr>
4403 <h3><a name="356"></a>356. Meaning of ctype_base::mask enumerators</h3>
4404 <p><b>Section:</b> 22.2.1 [category.ctype] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4405 <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-01-23</p>
4406 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#category.ctype">issues</a> in [category.ctype].</p>
4407 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4408 <p><b>Discussion:</b></p>
4410 <p>What should the following program print?</p>
4412 <pre> #include &lt;locale&gt;
4413 #include &lt;iostream&gt;
4415 class my_ctype : public std::ctype&lt;char&gt;
4417 typedef std::ctype&lt;char&gt; base;
4418 public:
4419 my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
4421 std::copy(base::classic_table(), base::classic_table() + base::table_size,
4422 my_table);
4423 my_table[(unsigned char) '_'] = (base::mask) (base::print | base::space);
4425 private:
4426 mask my_table[base::table_size];
4429 int main()
4431 my_ctype ct;
4432 std::cout &lt;&lt; "isspace: " &lt;&lt; ct.is(std::ctype_base::space, '_') &lt;&lt; " "
4433 &lt;&lt; "isalpha: " &lt;&lt; ct.is(std::ctype_base::alpha, '_') &lt;&lt; std::endl;
4435 </pre>
4437 <p>The goal is to create a facet where '_' is treated as whitespace.</p>
4439 <p>On gcc 3.0, this program prints "isspace: 1 isalpha: 0". On
4440 Microsoft C++ it prints "isspace: 1 isalpha: 1".</p>
4443 I believe that both implementations are legal, and the standard does not
4444 give enough guidance for users to be able to use std::ctype's
4445 protected interface portably.</p>
4448 The above program assumes that ctype_base::mask enumerators like
4449 <tt>space</tt> and <tt>print</tt> are disjoint, and that the way to
4450 say that a character is both a space and a printing character is to or
4451 those two enumerators together. This is suggested by the "exposition
4452 only" values in 22.2.1 [category.ctype], but it is nowhere specified in
4453 normative text. An alternative interpretation is that the more
4454 specific categories subsume the less specific. The above program
4455 gives the results it does on the Microsoft compiler because, on that
4456 compiler, <tt>print</tt> has all the bits set for each specific
4457 printing character class.
4458 </p>
4460 <p>From the point of view of std::ctype's public interface, there's no
4461 important difference between these two techniques. From the point of
4462 view of the protected interface, there is. If I'm defining a facet
4463 that inherits from std::ctype&lt;char&gt;, I'm the one who defines the
4464 value that table()['a'] returns. I need to know what combination of
4465 mask values I should use. This isn't so very esoteric: it's exactly
4466 why std::ctype has a protected interface. If we care about users
4467 being able to write their own ctype facets, we have to give them a
4468 portable way to do it.
4469 </p>
4472 Related reflector messages:
4473 lib-9224, lib-9226, lib-9229, lib-9270, lib-9272, lib-9273, lib-9274,
4474 lib-9277, lib-9279.
4475 </p>
4477 <p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> is related, but not identical. The
4478 proposed resolution if issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> says that
4479 ctype_base::mask must be a bitmask type. It does not say that the
4480 ctype_base::mask elements are bitmask elements, so it doesn't
4481 directly affect this issue.</p>
4483 <p>More comments from Benjamin Kosnik, who believes that
4484 that C99 compatibility essentially requires what we're
4485 calling option 1 below.</p>
4487 <blockquote>
4488 <pre>I think the C99 standard is clear, that isspace -&gt; !isalpha.
4489 --------
4491 #include &lt;locale&gt;
4492 #include &lt;iostream&gt;
4494 class my_ctype : public std::ctype&lt;char&gt;
4496 private:
4497 typedef std::ctype&lt;char&gt; base;
4498 mask my_table[base::table_size];
4500 public:
4501 my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
4503 std::copy(base::classic_table(), base::classic_table() + base::table_size,
4504 my_table);
4505 mask both = base::print | base::space;
4506 my_table[static_cast&lt;mask&gt;('_')] = both;
4510 int main()
4512 using namespace std;
4513 my_ctype ct;
4514 cout &lt;&lt; "isspace: " &lt;&lt; ct.is(ctype_base::space, '_') &lt;&lt; endl;
4515 cout &lt;&lt; "isprint: " &lt;&lt; ct.is(ctype_base::print, '_') &lt;&lt; endl;
4517 // ISO C99, isalpha iff upper | lower set, and !space.
4518 // 7.5, p 193
4519 // -&gt; looks like g++ behavior is correct.
4520 // 356 -&gt; bitmask elements are required for ctype_base
4521 // 339 -&gt; bitmask type required for mask
4522 cout &lt;&lt; "isalpha: " &lt;&lt; ct.is(ctype_base::alpha, '_') &lt;&lt; endl;
4524 </pre>
4525 </blockquote>
4529 <p><b>Proposed resolution:</b></p>
4530 <p>Informally, we have three choices:</p>
4531 <ol>
4532 <li>Require that the enumerators are disjoint (except for alnum and
4533 graph)</li>
4534 <li>Require that the enumerators are not disjoint, and specify which
4535 of them subsume which others. (e.g. mandate that lower includes alpha
4536 and print)</li>
4537 <li>Explicitly leave this unspecified, which the result that the above
4538 program is not portable.</li>
4539 </ol>
4541 <p>Either of the first two options is just as good from the standpoint
4542 of portability. Either one will require some implementations to
4543 change.</p>
4546 <p><b>Rationale:</b></p>
4547 <p>The LWG agrees that this is a real ambiguity, and that both
4548 interpretations are conforming under the existing standard. However,
4549 there's no evidence that it's causing problems for real users. Users
4550 who want to define ctype facets portably can test the ctype_base masks
4551 to see which interpretation is being used.</p>
4557 <hr>
4558 <h3><a name="357"></a>357. &lt;cmath&gt; float functions cannot return HUGE_VAL</h3>
4559 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
4560 <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-02-26</p>
4561 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
4562 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
4563 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
4564 <p><b>Discussion:</b></p>
4566 The float versions of the math functions have no meaningful value to return
4567 for a range error. The long double versions have a value they can return,
4568 but it isn't necessarily the most reasonable value.
4569 </p>
4572 Section 26.5 [lib.c.math], paragraph 5, says that C++ "adds float and long
4573 double overloaded versions of these functions, with the same semantics,"
4574 referring to the math functions from the C90 standard.
4575 </p>
4578 The C90 standard, in section 7.5.1, paragraph 3, says that functions return
4579 "the value of the macro HUGE_VAL" when they encounter a range error.
4580 Section 7.5, paragraph 2, defines HUGE_VAL as a macro that "expands to a
4581 positive double expression, not necessarily representable as a float."
4582 </p>
4585 Therefore, the float versions of the math functions have no way to
4586 signal a range error. <i>[Curaçao: The LWG notes that this isn't
4587 strictly correct, since errno is set.]</i> The semantics require that they
4588 return HUGE_VAL, but they cannot because HUGE_VAL might not be
4589 representable as a float.
4590 </p>
4593 The problem with long double functions is less severe because HUGE_VAL is
4594 representable as a long double. On the other hand, it might not be a "huge"
4595 long double value, and might fall well within the range of normal return
4596 values for a long double function. Therefore, it does not make sense for a
4597 long double function to return a double (HUGE_VAL) for a range error.
4598 </p>
4601 <p><b>Proposed resolution:</b></p>
4602 <p>Curaçao: C99 was faced with a similar problem, which they fixed by
4603 adding HUGE_VALF and HUGE_VALL in addition to HUGE_VAL.</p>
4605 <p>C++ must also fix, but it should be done in the context of the
4606 general C99 based changes to C++, not via DR. Thus the LWG in Curaçao
4607 felt the resolution should be NAD, FUTURE, but the issue is being held
4608 open for one more meeting to ensure LWG members not present during the
4609 discussion concur.</p>
4612 <p><b>Rationale:</b></p>
4613 <p>Will be fixed as part of more general work in the TR.</p>
4619 <hr>
4620 <h3><a name="361"></a>361. num_get&lt;&gt;::do_get (..., void*&amp;) checks grouping</h3>
4621 <p><b>Section:</b> 22.2.2.2.2 [facet.num.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4622 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p>
4623 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.put.virtuals">issues</a> in [facet.num.put.virtuals].</p>
4624 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4625 <p><b>Discussion:</b></p>
4627 22.2.2.2.2, p12 specifies that <tt>thousands_sep</tt> is to be inserted only
4628 for integral types (issue 282 suggests that this should be done for
4629 all arithmetic types).
4630 </p>
4633 22.2.2.1.2, p12 requires that grouping be checked for all extractors
4634 including that for <tt>void*</tt>.
4635 </p>
4638 I don't think that's right. <tt>void*</tt> values should not be checked for
4639 grouping, should they? (Although if they should, then <tt>num_put</tt> needs
4640 to write them out, otherwise their extraction will fail.)
4641 </p>
4644 <p><b>Proposed resolution:</b></p>
4646 Change the first sentence of 22.2.2.2.2, p12 from
4647 </p>
4648 <blockquote><p>
4649 Digit grouping is checked. That is, the positions of discarded
4650 separators is examined for consistency with
4651 use_facet&lt;numpunct&lt;charT&gt; &gt;(loc).grouping().
4652 If they are not consistent then ios_base::failbit is assigned
4653 to err.
4654 </p></blockquote>
4656 <p>to</p>
4657 <blockquote><p>
4658 Except for conversions to void*, digit grouping is checked...
4659 </p></blockquote>
4663 <p><b>Rationale:</b></p>
4664 <p>This would be a change: as it stands, the standard clearly
4665 specifies that grouping applies to void*. A survey of existing
4666 practice shows that most existing implementations do that, as they
4667 should.</p>
4673 <hr>
4674 <h3><a name="366"></a>366. Excessive const-qualification</h3>
4675 <p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4676 <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p>
4677 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.output">issues</a> in [input.output].</p>
4678 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4679 <p><b>Discussion:</b></p>
4681 The following member functions are declared const, yet return non-const
4682 pointers. We believe they are should be changed, because they allow code
4683 that may surprise the user. See document N1360 for details and
4684 rationale.
4685 </p>
4687 <p><i>[Santa Cruz: the real issue is that we've got const member
4688 functions that return pointers to non-const, and N1360 proposes
4689 replacing them by overloaded pairs. There isn't a consensus about
4690 whether this is a real issue, since we've never said what our
4691 constness policy is for iostreams. N1360 relies on a distinction
4692 between physical constness and logical constness; that distinction, or
4693 those terms, does not appear in the standard.]</i></p>
4698 <p><b>Proposed resolution:</b></p>
4699 <p>In 27.4.4 and 27.4.4.2</p>
4700 <p>Replace</p>
4701 <pre> basic_ostream&lt;charT,traits&gt;* tie() const;
4702 </pre>
4703 <p>with</p>
4704 <pre> basic_ostream&lt;charT,traits&gt;* tie();
4705 const basic_ostream&lt;charT,traits&gt;* tie() const;
4706 </pre>
4708 <p>and replace</p>
4709 <pre> basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
4710 </pre>
4711 <p>with</p>
4712 <pre> basic_streambuf&lt;charT,traits&gt;* rdbuf();
4713 const basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
4714 </pre>
4716 <p>In 27.5.2 and 27.5.2.3.1</p>
4717 <p>Replace</p>
4718 <pre> char_type* eback() const;
4719 </pre>
4720 <p>with</p>
4721 <pre> char_type* eback();
4722 const char_type* eback() const;
4723 </pre>
4725 <p>Replace</p>
4726 <pre> char_type gptr() const;
4727 </pre>
4728 <p>with</p>
4729 <pre> char_type* gptr();
4730 const char_type* gptr() const;
4731 </pre>
4733 <p>Replace</p>
4734 <pre> char_type* egptr() const;
4735 </pre>
4736 <p>with</p>
4737 <pre> char_type* egptr();
4738 const char_type* egptr() const;
4739 </pre>
4741 <p>In 27.5.2 and 27.5.2.3.2</p>
4742 <p>Replace</p>
4743 <pre> char_type* pbase() const;
4744 </pre>
4745 <p>with</p>
4746 <pre> char_type* pbase();
4747 const char_type* pbase() const;
4748 </pre>
4750 <p>Replace</p>
4751 <pre> char_type* pptr() const;
4752 </pre>
4753 <p>with</p>
4754 <pre> char_type* pptr();
4755 const char_type* pptr() const;
4756 </pre>
4758 <p>Replace</p>
4759 <pre> char_type* epptr() const;
4760 </pre>
4761 <p>with</p>
4762 <pre> char_type* epptr();
4763 const char_type* epptr() const;
4764 </pre>
4766 <p>In 27.7.2, 27.7.2.2, 27.7.3 27.7.3.2, 27.7.4, and 27.7.6</p>
4767 <p>Replace</p>
4768 <pre> basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
4769 </pre>
4770 <p>with</p>
4771 <pre> basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf();
4772 const basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
4773 </pre>
4775 <p>In 27.8.1.5, 27.8.1.7, 27.8.1.8, 27.8.1.10, 27.8.1.11, and 27.8.1.13</p>
4776 <p>Replace</p>
4777 <pre> basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
4778 </pre>
4779 <p>with</p>
4780 <pre> basic_filebuf&lt;charT,traits&gt;* rdbuf();
4781 const basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
4782 </pre>
4785 <p><b>Rationale:</b></p>
4786 <p>The existing specification is a bit sloppy, but there's no
4787 particular reason to change this other than tidiness, and there are
4788 a number of ways in which streams might have been designed
4789 differently if we were starting today. There's no evidence that the
4790 existing constness policy is harming users. We might consider
4791 a different constness policy as part of a full stream redesign.</p>
4797 <hr>
4798 <h3><a name="367"></a>367. remove_copy/remove_copy_if and Input Iterators</h3>
4799 <p><b>Section:</b> 25.2.8 [alg.remove] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4800 <b>Submitter:</b> Anthony Williams <b>Date:</b> 2002-05-13</p>
4801 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.remove">issues</a> in [alg.remove].</p>
4802 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4803 <p><b>Discussion:</b></p>
4805 remove_copy and remove_copy_if (25.2.8 [alg.remove]) permit their
4806 input range to be marked with Input Iterators. However, since two
4807 operations are required against the elements to copy (comparison and
4808 assigment), when the input range uses Input Iterators, a temporary
4809 copy must be taken to avoid dereferencing the iterator twice. This
4810 therefore requires the value type of the InputIterator to be
4811 CopyConstructible. If the iterators are at least Forward Iterators,
4812 then the iterator can be dereferenced twice, or a reference to the
4813 result maintained, so the temporary is not required.
4814 </p>
4817 <p><b>Proposed resolution:</b></p>
4819 Add "If InputIterator does not meet the requirements of forward
4820 iterator, then the value type of InputIterator must be copy
4821 constructible. Otherwise copy constructible is not required." to
4822 25.2.8 [alg.remove] paragraph 6.
4823 </p>
4826 <p><b>Rationale:</b></p>
4827 <p>The assumption is that an input iterator can't be dereferenced
4828 twice. There's no basis for that assumption in the Standard.</p>
4834 <hr>
4835 <h3><a name="368"></a>368. basic_string::replace has two "Throws" paragraphs</h3>
4836 <p><b>Section:</b> 21.3.6.6 [string::replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
4837 <b>Submitter:</b> Beman Dawes <b>Date:</b> 2002-06-03</p>
4838 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
4839 <p><b>Discussion:</b></p>
4841 21.3.6.6 [string::replace] basic_string::replace, second
4842 signature, given in paragraph 1, has two "Throws" paragraphs (3 and
4844 </p>
4847 In addition, the second "Throws" paragraph (5) includes specification
4848 (beginning with "Otherwise, the function replaces ...") that should be
4849 part of the "Effects" paragraph.
4850 </p>
4853 <p><b>Proposed resolution:</b></p>
4856 <p><b>Rationale:</b></p>
4857 <p>This is editorial. Both "throws" statements are true. The bug is
4858 just that the second one should be a sentence, part of the "Effects"
4859 clause, not a separate "Throws". The project editor has been
4860 notified.</p>
4866 <hr>
4867 <h3><a name="372"></a>372. Inconsistent description of stdlib exceptions</h3>
4868 <p><b>Section:</b> 17.4.4.8 [res.on.exception.handling], 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4869 <b>Submitter:</b> Randy Maddox <b>Date:</b> 2002-07-22</p>
4870 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#res.on.exception.handling">issues</a> in [res.on.exception.handling].</p>
4871 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4872 <p><b>Discussion:</b></p>
4874 <p>Paragraph 3 under clause 17.4.4.8 [res.on.exception.handling], Restrictions on
4875 Exception Handling, states that "Any other functions defined in the
4876 C++ Standard Library that do not have an exception-specification may
4877 throw implementation-defined exceptions unless otherwise specified."
4878 This statement is followed by a reference to footnote 178 at the
4879 bottom of that page which states, apparently in reference to the C++
4880 Standard Library, that "Library implementations are encouraged (but
4881 not required) to report errors by throwing exceptions from (or derived
4882 from) the standard exceptions."</p>
4884 <p>These statements appear to be in direct contradiction to clause
4885 18.6.1 [type.info], which states "The class exception defines the
4886 base class for the types of objects thrown as exceptions by the C++
4887 Standard library components ...".</p>
4889 <p>Is this inconsistent?</p>
4893 <p><b>Proposed resolution:</b></p>
4896 <p><b>Rationale:</b></p>
4897 <p>Clause 17 is setting the overall library requirements, and it's
4898 clear and consistent. This sentence from Clause 18 is descriptive,
4899 not setting a requirement on any other class.
4900 </p>
4906 <hr>
4907 <h3><a name="374"></a>374. moneypunct::frac_digits returns int not unsigned</h3>
4908 <p><b>Section:</b> 22.2.6.3.1 [locale.moneypunct.members], 22.2.6.3.2 [locale.moneypunct.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4909 <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-08</p>
4910 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4911 <p><b>Discussion:</b></p>
4913 In section 22.2.6.3.1 [locale.moneypunct.members], frac_digits() returns type
4914 "int". This implies that frac_digits() might return a negative value,
4915 but a negative value is nonsensical. It should return "unsigned".
4916 </p>
4919 Similarly, in section 22.2.6.3.2 [locale.moneypunct.virtuals], do_frac_digits()
4920 should return "unsigned".
4921 </p>
4925 <p><b>Proposed resolution:</b></p>
4928 <p><b>Rationale:</b></p>
4929 <p>Regardless of whether the return value is int or unsigned, it's
4930 always conceivable that frac_digits might return a nonsensical
4931 value. (Is 4294967295 really any better than -1?) The clients of
4932 moneypunct, the get and put facets, can and do perform range
4933 checks.</p>
4939 <hr>
4940 <h3><a name="377"></a>377. basic_string::insert and length_error</h3>
4941 <p><b>Section:</b> 21.3.6.4 [string::insert] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
4942 <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-16</p>
4943 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::insert">issues</a> in [string::insert].</p>
4944 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
4945 <p><b>Discussion:</b></p>
4947 Section 21.3.6.4 [string::insert], paragraph 4, contains the following,
4948 "Then throws length_error if size() &gt;= npos - rlen."
4949 </p>
4952 Related to DR 83, this sentence should probably be removed.
4953 </p>
4956 <p><b>Proposed resolution:</b></p>
4959 <p><b>Rationale:</b></p><p>This requirement is redundant but correct. No change is
4960 needed.</p>
4965 <hr>
4966 <h3><a name="378"></a>378. locale immutability and locale::operator=()</h3>
4967 <p><b>Section:</b> 22.1.1 [locale] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
4968 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p>
4969 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale">issues</a> in [locale].</p>
4970 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
4971 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a></p>
4972 <p><b>Discussion:</b></p>
4974 I think there is a problem with 22.1.1, p6 which says that
4975 </p>
4976 <pre> -6- An instance of locale is immutable; once a facet reference
4977 is obtained from it, that reference remains usable as long
4978 as the locale value itself exists.
4979 </pre>
4981 and 22.1.1.2, p4:
4982 </p>
4983 <pre> const locale&amp; operator=(const locale&amp; other) throw();
4985 -4- Effects: Creates a copy of other, replacing the current value.
4986 </pre>
4988 How can a reference to a facet obtained from a locale object remain
4989 valid after an assignment that clearly must replace all the facets
4990 in the locale object? Imagine a program such as this
4991 </p>
4992 <pre> std::locale loc ("de_DE");
4993 const std::ctype&lt;char&gt; &amp;r0 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
4994 loc = std::locale ("en_US");
4995 const std::ctype&lt;char&gt; &amp;r1 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
4996 </pre>
4998 Is r0 really supposed to be preserved and destroyed only when loc goes
4999 out of scope?
5000 </p>
5003 <p><b>Proposed resolution:</b></p>
5004 <p><i>[Summer '04 mid-meeting mailing: Martin and Dietmar believe this
5005 is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a> and recommend that it be
5006 closed.
5007 ]</i></p>
5014 <hr>
5015 <h3><a name="385"></a>385. Does call by value imply the CopyConstructible requirement?</h3>
5016 <p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5017 <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-10-23</p>
5018 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
5019 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5020 <p><b>Discussion:</b></p>
5022 Many function templates have parameters that are passed by value;
5023 a typical example is <tt>find_if</tt>'s <i>pred</i> parameter in
5024 25.1.2 [alg.find]. Are the corresponding template parameters
5025 (<tt>Predicate</tt> in this case) implicitly required to be
5026 CopyConstructible, or does that need to be spelled out explicitly?
5027 </p>
5030 This isn't quite as silly a question as it might seem to be at first
5031 sight. If you call <tt>find_if</tt> in such a way that template
5032 argument deduction applies, then of course you'll get call by value
5033 and you need to provide a copy constructor. If you explicitly provide
5034 the template arguments, however, you can force call by reference by
5035 writing something like <tt>find_if&lt;my_iterator,
5036 my_predicate&amp;&gt;</tt>. The question is whether implementation
5037 are required to accept this, or whether this is ill-formed because
5038 my_predicate&amp; is not CopyConstructible.
5039 </p>
5042 The scope of this problem, if it is a problem, is unknown. Function
5043 object arguments to generic algorithms in clauses 25 [algorithms]
5044 and 26 [numerics] are obvious examples. A review of the whole
5045 library is necessary.
5046 </p>
5047 <p><i>[
5048 This is really two issues. First, predicates are typically passed by
5049 value but we don't say they must be Copy Constructible. They should
5050 be. Second: is specialization allowed to transform value arguments
5051 into references? References aren't copy constructible, so this should
5052 not be allowed.
5053 ]</i></p>
5055 <p><i>[
5056 2007-01-12, Howard: First, despite the note above, references <b>are</b>
5057 copy constructible. They just aren't assignable. Second, this is very
5058 closely related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a> and should be consistent with that.
5059 That issue already says that implementations are allowed to copy
5060 function objects. If one passes in a reference, it is copyable, but
5061 susceptible to slicing if one passes in a reference to a base. Third,
5062 with rvalue reference in the language one only needs to satisfy
5063 MoveConstructible to pass an rvalue "by value". Though the function
5064 might still copy the function object internally (requiring
5065 CopyConstructible). Finally (and fwiw), if we wanted to, it is easy to
5066 code all of the std::algorithms such that they do not copy function
5067 objects internally. One merely passes them by reference internally if
5068 desired (this has been fully implemented and shipped for several years).
5069 If this were mandated, it would reverse <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a>, allowing
5070 function objects to reliably maintain state. E.g. the example in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#92">92</a> would reliably remove only the third element.
5071 ]</i></p>
5075 <p><b>Proposed resolution:</b></p>
5077 Recommend NAD.
5078 </p>
5081 <p><b>Rationale:</b></p>
5083 Generic algorithms will be marked with concepts and these will imply a requirement
5084 of MoveConstructible (not CopyConstructible). The signature of the function will
5085 then precisely describe and enforce the precise requirements.
5086 </p>
5092 <hr>
5093 <h3><a name="388"></a>388. Use of complex as a key in associative containers</h3>
5094 <p><b>Section:</b> 26.3 [complex.numbers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5095 <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p>
5096 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.numbers">issues</a> in [complex.numbers].</p>
5097 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5098 <p><b>Discussion:</b></p>
5100 Practice with std::complex&lt;&gt; and the associative containers
5101 occasionally reveals artificial and distracting issues with constructs
5102 resembling: std::set&lt;std::complex&lt;double&gt; &gt; s;
5103 </p>
5106 The main reason for the above to fail is the absence of an approriate
5107 definition for std::less&lt;std::complex&lt;T&gt; &gt;. That in turn comes from
5108 the definition of the primary template std::less&lt;&gt; in terms of
5109 operator&lt;.
5110 </p>
5113 The usual argument goes as follows: Since there is no ordering over
5114 the complex field compatible with field operations it makes little
5115 sense to define a function operator&lt; operating on the datatype
5116 std::complex&lt;T&gt;. That is fine. However, that reasoning does not carry
5117 over to std::less&lt;T&gt; which is used, among other things, by associative
5118 containers as an ordering useful to meet complexity requirements.
5119 </p>
5121 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>.</p>
5123 <p><i>[
5124 Pre Bellevue: Reopened at the request of Alisdair.
5125 ]</i></p>
5128 <p><i>[
5129 Bellevue:
5130 ]</i></p>
5133 <blockquote>
5134 This is a request for a design change, and not a defect in the standard.
5135 It is in scope to consider, but the group feels that it is not a change
5136 that we need to do. Is there a total ordering for floating point values,
5137 including NaN? There is not a clear enough solution or big enough
5138 problem for us to solve. Solving this problem would require solving the
5139 problem for floating point, which is equally unclear. The LWG noted that
5140 users who want to put objects into an associative container for which
5141 operator&lt; isn't defined can simply provide their own comparison function
5142 object. NAD
5143 </blockquote>
5146 <p><b>Proposed resolution:</b></p>
5147 <p>Informally: Add a specialization of std::less for std::complex.</p>
5150 <p><b>Rationale:</b></p>
5151 <p>Discussed in Santa Cruz. An overwhelming majority of the LWG
5152 believes this should not be treated a DR: it's a request for a design
5153 change, not a defect in the existing standard. Most people (10-3)
5154 believed that we probably don't want this change, period: as with
5155 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>, it's hard to know where to draw the line.
5156 The LWG noted that users who want to put objects into an associative
5157 container for which <tt>operator&lt;</tt> isn't defined can simply
5158 provide their own comparison function object.</p>
5164 <hr>
5165 <h3><a name="390"></a>390. CopyConstructible requirements too strict</h3>
5166 <p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
5167 <b>Submitter:</b> Doug Gregor <b>Date:</b> 2002-10-24</p>
5168 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
5169 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
5170 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
5171 <p><b>Discussion:</b></p>
5173 The CopyConstructible requirements in Table 30 state that for an
5174 object t of type T (where T is CopyConstructible), the expression &amp;t
5175 returns the address of t (with type T*). This requirement is overly
5176 strict, in that it disallows types that overload operator&amp; to not
5177 return a value of type T*. This occurs, for instance, in the <a href="http://www.boost.org/libs/lambda">Boost.Lambda</a> library, where
5178 operator&amp; is overloaded for a Boost.Lambda function object to return
5179 another function object.
5180 </p>
5182 <p>Example:</p>
5184 <pre> std::vector&lt;int&gt; u, v;
5185 int x;
5186 // ...
5187 std::transform(u.begin(), u.end(), std::back_inserter(v), _1 * x);
5188 </pre>
5191 _1 * x returns an unnamed function object with operator&amp; overloaded to
5192 not return T* , therefore rendering the std::transform call ill-formed.
5193 However, most standard library implementations will compile this code
5194 properly, and the viability of such binder libraries is severely hindered
5195 by the unnecessary restriction in the CopyConstructible requirements.
5196 </p>
5199 For reference, the address of an object can be retrieved without using
5200 the address-of operator with the following function template:
5201 </p>
5203 <pre> template &lt;typename T&gt; T* addressof(T&amp; v)
5205 return reinterpret_cast&lt;T*&gt;(
5206 &amp;const_cast&lt;char&amp;&gt;(reinterpret_cast&lt;const volatile char &amp;&gt;(v)));
5208 </pre>
5211 Note: this relates directly to library issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a>, which
5212 will need to be reexamined if the CopyConstructible requirements
5213 change.
5214 </p>
5217 <p><b>Proposed resolution:</b></p>
5219 Remove the last two rows of Table 30, eliminating the requirements
5220 that &amp;t and &amp;u return the address of t and u, respectively.
5221 </p>
5224 <p><b>Rationale:</b></p>
5225 <p>This was a deliberate design decision. Perhaps it should be
5226 reconsidered for C++0x. </p>
5232 <hr>
5233 <h3><a name="392"></a>392. 'equivalence' for input iterators</h3>
5234 <p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5235 <b>Submitter:</b> Corwin Joy <b>Date:</b> 2002-12-11</p>
5236 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
5237 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5238 <p><b>Discussion:</b></p>
5241 In section 24.1.1 [input.iterators] table 72 -
5242 'Input Iterator Requirements' we have as a postcondition of *a:
5243 "If a==b and (a, b) is in the domain of == then *a is equivalent to *b".
5244 </p>
5247 In section 24.5.3.5 [istreambuf.iterator::equal] it states that
5248 "istreambuf_iterator::equal returns true if and only if both iterators
5249 are at end-of-stream, or neither is at end-of-stream, <i>regardless of
5250 what streambuf object they use</i>." (My emphasis).
5251 </p>
5254 The defect is that either 'equivalent' needs to be more precisely
5255 defined or the conditions for equality in 24.5.3.5 [istreambuf.iterator::equal]
5256 are incorrect. (Or both).
5257 </p>
5259 <p>Consider the following example:</p>
5260 <pre> #include &lt;iostream&gt;
5261 #include &lt;fstream&gt;
5262 #include &lt;iterator&gt;
5263 using namespace std;
5265 int main() {
5266 ifstream file1("file1.txt"), file2("file2.txt");
5267 istreambuf_iterator&lt;char&gt; f1(file1), f2(file2);
5268 cout &lt;&lt; "f1 == f2 : " &lt;&lt; boolalpha &lt;&lt; (f1 == f2) &lt;&lt; endl;
5269 cout &lt;&lt; "f1 = " &lt;&lt; *f1 &lt;&lt; endl;
5270 cout &lt;&lt; "f2 = " &lt;&lt; *f2 &lt;&lt; endl;
5271 return 0;
5273 </pre>
5275 <p>Now assuming that neither f1 or f2 are at the end-of-stream then
5276 f1 == f2 by 24.5.3.5 [istreambuf.iterator::equal].</p>
5278 <p>However, it is unlikely that *f1 will give the same value as *f2 except
5279 by accident.</p>
5281 <p>So what does *f1 'equivalent' to *f2 mean? I think the standard should
5282 be clearer on this point, or at least be explicit that this does not
5283 mean that *f1 and *f2 are required to have the same value in the case
5284 of input iterators.</p>
5287 <p><b>Proposed resolution:</b></p>
5290 <p><b>Rationale:</b></p><p>The two iterators aer not in the domain of ==</p>
5297 <hr>
5298 <h3><a name="393"></a>393. do_in/do_out operation on state unclear</h3>
5299 <p><b>Section:</b> 22.2.1.4.2 [locale.codecvt.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
5300 <b>Submitter:</b> Alberto Barbati <b>Date:</b> 2002-12-24</p>
5301 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.virtuals">issues</a> in [locale.codecvt.virtuals].</p>
5302 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
5303 <p><b>Discussion:</b></p>
5305 this DR follows the discussion on the previous thread "codecvt::do_in
5306 not consuming external characters". It's just a clarification issue
5307 and not a request for a change.
5308 </p>
5310 Can do_in()/do_out() produce output characters without consuming input
5311 characters as a result of operation on state?
5312 </p>
5315 <p><b>Proposed resolution:</b></p>
5317 Add a note at the end of 22.2.1.4.2 [locale.codecvt.virtuals],
5318 paragraph 3:
5319 </p>
5322 [Note: As a result of operations on state, it can return ok or partial
5323 and set from_next == from and to_next != to. --end note]
5324 </p>
5327 <p><b>Rationale:</b></p>
5329 The submitter believes that standard already provides an affirmative
5330 answer to the question. However, the current wording has induced a few
5331 library implementors to make the incorrect assumption that
5332 do_in()/do_out() always consume at least one internal character when
5333 they succeed.
5334 </p>
5337 The submitter also believes that the proposed resolution is not in
5338 conflict with the related issue 76. Moreover, by explicitly allowing
5339 operations on state to produce characters, a codecvt implementation
5340 may effectively implement N-to-M translations without violating the
5341 "one character at a time" principle described in such issue. On a side
5342 note, the footnote in the proposed resolution of issue 76 that
5343 informally rules out N-to-M translations for basic_filebuf should be
5344 removed if this issue is accepted as valid.
5345 </p>
5348 <p><i>[
5349 Kona (2007): The proposed resolution is to add a note. Since this is
5350 non-normative, the issue is editorial, but we believe that the note is
5351 correct. Proposed Disposition: NAD, Editorial
5352 ]</i></p>
5359 <hr>
5360 <h3><a name="399"></a>399. volations of unformatted input function requirements</h3>
5361 <p><b>Section:</b> 27.6.1.3 [istream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5362 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p>
5363 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.unformatted">issues</a> in [istream.unformatted].</p>
5364 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5365 <p><b>Discussion:</b></p>
5367 The Effects clauses for the two functions below violate the
5368 general requirements on unformatted input functions outlined
5369 in 27.6.1.3: they do not begin by constructing a sentry object.
5370 Instead, they begin by calling widen ('\n'), which may throw
5371 an exception. The exception is then allowed to propagate from
5372 the unformatted input function irrespective of the setting of
5373 exceptions().
5374 </p>
5376 Note that in light of 27.6.1.1, p3 and p4, the fact that the
5377 functions allow exceptions thrown from widen() to propagate
5378 may not strictly speaking be a defect (but the fact that the
5379 functions do not start by constructing a sentry object still
5380 is). However, since an exception thrown from ctype&lt;charT&gt;
5381 ::widen() during any other input operation (say, from within
5382 a call to num_get&lt;charT&gt;::get()) will be caught and cause
5383 badbit to be set, these two functions should not be treated
5384 differently for the sake of consistency.
5385 </p>
5388 <p><b>Proposed resolution:</b></p>
5391 <p><b>Rationale:</b></p>
5393 Not a defect. The standard is consistent, and the behavior required
5394 by the standard is unambiguous. Yes, it's theoretically possible for
5395 widen to throw. (Not that this will happen for the default ctype
5396 facet or for most real-world replacement ctype facets.) Users who
5397 define ctype facets that can throw, and who care about this behavior,
5398 can use alternative signatures that don't call widen.
5399 </p>
5406 <hr>
5407 <h3><a name="424"></a>424. normative notes</h3>
5408 <p><b>Section:</b> 17.3.1.1 [structure.summary] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
5409 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
5410 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
5411 <p><b>Discussion:</b></p>
5414 The text in 17.3.1.1, p1 says:
5415 <br>
5417 "Paragraphs labelled "Note(s):" or "Example(s):" are informative, other
5418 paragraphs are normative."
5419 <br>
5421 The library section makes heavy use of paragraphs labeled "Notes(s),"
5422 some of which are clearly intended to be normative (see list 1), while
5423 some others are not (see list 2). There are also those where the intent
5424 is not so clear (see list 3).
5425 <br><br>
5427 List 1 -- Examples of (presumably) normative Notes:
5428 <br>
5430 20.6.5.1 [allocator.members], p3,<br>
5431 20.6.5.1 [allocator.members], p10,<br>
5432 21.3.2 [string.cons], p11,<br>
5433 22.1.1.2 [locale.cons], p11,<br>
5434 23.2.2.3 [deque.modifiers], p2,<br>
5435 25.3.7 [alg.min.max], p3,<br>
5436 26.3.6 [complex.ops], p15,<br>
5437 27.5.2.4.3 [streambuf.virt.get], p7.<br>
5438 <br>
5440 List 2 -- Examples of (presumably) informative Notes:
5441 <br>
5443 18.5.1.3 [new.delete.placement], p3,<br>
5444 21.3.6.6 [string::replace], p14,<br>
5445 22.2.1.4.2 [locale.codecvt.virtuals], p3,<br>
5446 25.1.1 [alg.foreach], p4,<br>
5447 26.3.5 [complex.member.ops], p1,<br>
5448 27.4.2.5 [ios.base.storage], p6.<br>
5449 <br>
5451 List 3 -- Examples of Notes that are not clearly either normative
5452 or informative:
5453 <br>
5455 22.1.1.2 [locale.cons], p8,<br>
5456 22.1.1.5 [locale.statics], p6,<br>
5457 27.5.2.4.5 [streambuf.virt.put], p4.<br>
5458 <br>
5460 None of these lists is meant to be exhaustive.
5461 </p>
5463 <p><i>[Definitely a real problem. The big problem is there's material
5464 that doesn't quite fit any of the named paragraph categories
5465 (e.g. <b>Effects</b>). Either we need a new kind of named
5466 paragraph, or we need to put more material in unnamed paragraphs
5467 jsut after the signature. We need to talk to the Project Editor
5468 about how to do this.
5469 ]</i></p>
5472 <p><i>[
5473 Bellevue: Specifics of list 3: First 2 items correct in std (22.1.1.2,
5474 22.1.1.5) Third item should be non-normative (27.5.2.4.5), which Pete
5475 will handle editorially.
5476 ]</i></p>
5480 <p><b>Proposed resolution:</b></p>
5481 <p><i>[Pete: I changed the paragraphs marked "Note" and "Notes" to use "Remark" and "Remarks".
5482 Fixed as editorial. This change has been in the WD since the post-Redmond mailing, in 2004.
5483 Recommend NAD.]</i></p>
5485 <p><i>[
5486 Batavia: We feel that the references in List 2 above should be changed from <i>Remarks</i>
5487 to <i>Notes</i>. We also feel that those items in List 3 need to be double checked for
5488 the same change. Alan and Pete to review.
5489 ]</i></p>
5495 <hr>
5496 <h3><a name="429"></a>429. typo in basic_ios::clear(iostate)</h3>
5497 <p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
5498 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
5499 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
5500 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
5501 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#412">412</a></p>
5502 <p><b>Discussion:</b></p>
5505 The Effects clause in 27.4.4.3, p5 describing the effects of a call to
5506 the ios_base member function clear(iostate state) says that the function
5507 only throws if the respective bits are already set prior to the function
5508 call. That's obviously not the intent. If it was, a call to clear(badbit)
5509 on an object for which (rdstate() == goodbit &amp;&amp; exceptions() == badbit)
5510 holds would not result in an exception being thrown.
5512 </p>
5514 <p><b>Proposed resolution:</b></p>
5517 The text ought to be changed from
5518 <br>
5520 "If (rdstate() &amp; exceptions()) == 0, returns. ..."
5521 <br>
5524 <br>
5526 "If (state &amp; exceptions()) == 0, returns. ..."
5527 </p>
5530 <p><b>Rationale:</b></p>
5537 <hr>
5538 <h3><a name="433"></a>433. Contradiction in specification of unexpected()</h3>
5539 <p><b>Section:</b> 18.7.2.4 [unexpected] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5540 <b>Submitter:</b> Vyatcheslav Sysoltsev <b>Date:</b> 2003-09-29</p>
5541 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5542 <p><b>Discussion:</b></p>
5544 Clause 15.5.2 [except.unexpected] paragraph 1 says that "void unexpected();
5545 is called (18.7.2) immediately after completing the stack unwinding
5546 for the former function", but 18.7.2.4 (Effects) says that "void
5547 unexpected(); . . . Calls the unexpected_handler function in effect
5548 immediately after evaluating the throwexpression (18.7.2.2),". Isn't
5549 here a contradiction: 15.5.2 requires stack have been unwound when in
5550 void unexpected() and therefore in unexpected_handler but 18.7.2.4
5551 claims that unexpected_handler is called "in effect immediately" after
5552 evaluation of throw expression is finished, so there is no space left
5553 for stack to be unwound therefore? I think the phrase "in effect
5554 immediately" should be removed from the standard because it brings
5555 ambiguity in understanding.
5556 </p>
5559 <p><b>Proposed resolution:</b></p>
5562 <p><b>Rationale:</b></p>
5563 <p>There is no contradiction. The phrase "in effect immediately" is
5564 just to clarify which handler is to be called.</p>
5570 <hr>
5571 <h3><a name="437"></a>437. Formatted output of function pointers is confusing</h3>
5572 <p><b>Section:</b> 27.6.2.6.2 [ostream.inserters.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5573 <b>Submitter:</b> Ivan Godard <b>Date:</b> 2003-10-24</p>
5574 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.arithmetic">issues</a> in [ostream.inserters.arithmetic].</p>
5575 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5576 <p><b>Discussion:</b></p>
5578 Given:
5579 </p>
5580 <pre>void f(int) {}
5581 void(*g)(int) = f;
5582 cout &lt;&lt; g;
5583 </pre>
5586 (with the expected #include and usings), the value printed is a rather
5587 surprising "true". Rather useless too.
5588 </p>
5590 <p>The standard defines:</p>
5592 <pre>ostream&amp; operator&lt;&lt;(ostream&amp;, void*);</pre>
5594 <p>which picks up all data pointers and prints their hex value, but does
5595 not pick up function pointers because there is no default conversion
5596 from function pointer to void*. Absent that, we fall back to legacy
5597 conversions from C and the function pointer is converted to bool.
5598 </p>
5600 <p>There should be an analogous inserter that prints the address of a
5601 function pointer.</p>
5604 <p><b>Proposed resolution:</b></p>
5607 <p><b>Rationale:</b></p>
5608 <p>This is indeed a wart, but there is no good way to solve it. C
5609 doesn't provide a portable way of outputting the address of a
5610 function point either.</p>
5616 <hr>
5617 <h3><a name="439"></a>439. Should facets be copyable?</h3>
5618 <p><b>Section:</b> 22.2 [locale.categories] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5619 <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-02</p>
5620 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.categories">active issues</a> in [locale.categories].</p>
5621 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.categories">issues</a> in [locale.categories].</p>
5622 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5623 <p><b>Discussion:</b></p>
5624 <p>The following facets classes have no copy constructors described in
5625 the standard, which, according to the standard, means that they are
5626 supposed to use the compiler-generated defaults. Default copy
5627 behavior is probably inappropriate. We should either make these
5628 classes uncopyable or else specify exactly what their constructors do.</p>
5630 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#421">421</a>.</p>
5632 <pre> ctype_base
5633 ctype
5634 ctype_byname
5635 ctype&lt;char&gt;
5636 ctype_byname&lt;char&gt;
5637 codecvt_base
5638 codecvt
5639 codecvt_byname
5640 num_get
5641 num_put
5642 numpunct
5643 numpunct_byname
5644 collate
5645 collate_byname
5646 time_base
5647 time_get
5648 time_get_byname
5649 time_put
5650 time_put_byname
5651 money_get
5652 money_put
5653 money_base
5654 moneypunct
5655 moneypunct_byname
5656 messages_base
5657 messages
5658 messages_byname
5659 </pre>
5663 <p><b>Proposed resolution:</b></p>
5666 <p><b>Rationale:</b></p>
5667 <p>The copy constructor in the base class is private.</p>
5673 <hr>
5674 <h3><a name="440"></a>440. Should std::complex use unqualified transcendentals?</h3>
5675 <p><b>Section:</b> 26.3.8 [complex.transcendentals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5676 <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-05</p>
5677 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5678 <p><b>Discussion:</b></p>
5680 Operations like <tt>pow</tt> and <tt>exp</tt> on
5681 <tt>complex&lt;T&gt;</tt> are typically implemented in terms of
5682 operations like <tt>sin</tt> and <tt>cos</tt> on <tt>T</tt>.
5683 Should implementations write this as <tt>std::sin</tt>, or as plain
5684 unqualified <tt>sin</tt>?
5685 </p>
5687 <p>The issue, of course, is whether we want to use
5688 argument-dependent lookup in the case where <tt>T</tt> is a
5689 user-defined type. This is similar to the issue of valarray
5690 transcendentals, as discussed in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>.</p>
5692 <p>This issue differs from valarray transcendentals in two important
5693 ways. First, "the effect of instantiating the template
5694 <tt>complex</tt> for types other than float, double or long double is
5695 unspecified." (26.3.1 [complex.synopsis]) Second, the standard does not
5696 dictate implementation, so there is no guarantee that a particular
5697 real math function is used in the implementation of a particular
5698 complex function.</p>
5702 <p><b>Proposed resolution:</b></p>
5705 <p><b>Rationale:</b></p>
5706 <p>If you instantiate std::complex for user-defined types, all bets
5707 are off.</p>
5713 <hr>
5714 <h3><a name="447"></a>447. Wrong template argument for time facets</h3>
5715 <p><b>Section:</b> 22.1.1.1.1 [locale.category] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
5716 <b>Submitter:</b> Pete Becker <b>Date:</b> 2003-12-26</p>
5717 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.category">issues</a> in [locale.category].</p>
5718 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
5719 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#327">327</a></p>
5720 <p><b>Discussion:</b></p>
5722 22.1.1.1.1/4, table 52, "Required Instantiations", lists, among others:
5723 </p>
5724 <pre> time_get&lt;char,InputIterator&gt;
5725 time_get_byname&lt;char,InputIterator&gt;
5726 time_get&lt;wchar_t,OutputIterator&gt;
5727 time_get_byname&lt;wchar_t,OutputIterator&gt;
5728 </pre>
5731 The second argument to the last two should be InputIterator, not
5732 OutputIterator.
5733 </p>
5736 <p><b>Proposed resolution:</b></p>
5738 Change the second template argument to InputIterator.
5739 </p>
5742 <p><b>Rationale:</b></p>
5749 <hr>
5750 <h3><a name="450"></a>450. set::find is inconsistent with associative container requirements</h3>
5751 <p><b>Section:</b> 23.3.3 [set] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
5752 <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
5753 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#set">issues</a> in [set].</p>
5754 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
5755 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a></p>
5756 <p><b>Discussion:</b></p>
5757 <p>map/multimap have:</p>
5759 <pre> iterator find(const key_type&amp; x) const;
5760 const_iterator find(const key_type&amp; x) const;
5761 </pre>
5764 which is consistent with the table of associative container requirements.
5765 But set/multiset have:
5766 </p>
5767 <pre> iterator find(const key_type&amp;) const;
5768 </pre>
5771 set/multiset should look like map/multimap, and honor the requirements
5772 table, in this regard.
5773 </p>
5776 <p><b>Proposed resolution:</b></p>
5779 <p><b>Rationale:</b></p>
5786 <hr>
5787 <h3><a name="451"></a>451. Associative erase should return an iterator</h3>
5788 <p><b>Section:</b> 23.1.2 [associative.reqmts], 23.3 [associative] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
5789 <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
5790 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
5791 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
5792 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a></p>
5793 <p><b>Discussion:</b></p>
5794 <p>map/multimap/set/multiset have:</p>
5795 <pre> void erase(iterator);
5796 void erase(iterator, iterator);
5797 </pre>
5799 <p>But there's no good reason why these can't return an iterator, as for
5800 vector/deque/list:</p>
5801 <pre> iterator erase(iterator);
5802 iterator erase(iterator, iterator);
5803 </pre>
5807 <p><b>Proposed resolution:</b></p>
5809 Informally: The table of associative container requirements, and the
5810 relevant template classes, should return an iterator designating the
5811 first element beyond the erased subrange.
5812 </p>
5815 <p><b>Rationale:</b></p>
5822 <hr>
5823 <h3><a name="452"></a>452. locale::combine should be permitted to generate a named locale</h3>
5824 <p><b>Section:</b> 22.1.1.3 [locale.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5825 <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
5826 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.members">issues</a> in [locale.members].</p>
5827 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5828 <p><b>Discussion:</b></p>
5829 <pre>template&lt;class Facet&gt;
5830 locale::combine(const locale&amp;) const;
5831 </pre>
5833 is obliged to create a locale that has no name. This is overspecification
5834 and overkill. The resulting locale should follow the usual rules -- it
5835 has a name if the locale argument has a name and Facet is one of the
5836 standard facets.
5837 </p>
5839 <p><i>[
5840 Sydney and post-Sydney (see c++std-lib-13439, c++std-lib-13440,
5841 c++std-lib-13443): agreed that it's overkill to say that the locale
5842 is obligated to be nameless. However, we also can't require it to
5843 have a name. At the moment, locale names are based on categories
5844 and not on individual facets. If a locale contains two different
5845 facets of different names from the same category, then this would
5846 not fit into existing naming schemes. We need to give
5847 implementations more freedom. Bill will provide wording.
5848 ]</i></p>
5853 <p><b>Rationale:</b></p>
5854 <p>After further discussion the LWG decided to close this as NAD.
5855 The fundamental problem is that names right now are per-category,
5856 not per-facet. The <tt>combine</tt> member function works at the
5857 wrong level of granularity.</p>
5863 <hr>
5864 <h3><a name="462"></a>462. Destroying objects with static storage duration</h3>
5865 <p><b>Section:</b> 3.6.3 [basic.start.term], 18.3 [cstdint] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
5866 <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-03-23</p>
5867 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
5868 <p><b>Discussion:</b></p>
5870 3.6.3 Termination spells out in detail the interleaving of static
5871 destructor calls and calls to functions registered with atexit. To
5872 match this behavior requires intimate cooperation between the code
5873 that calls destructors and the exit/atexit machinery. The former
5874 is tied tightly to the compiler; the latter is a primitive mechanism
5875 inherited from C that traditionally has nothing to do with static
5876 construction and destruction. The benefits of intermixing destructor
5877 calls with atexit handler calls is questionable at best, and <i>very</i>
5878 difficult to get right, particularly when mixing third-party C++
5879 libraries with different third-party C++ compilers and C libraries
5880 supplied by still other parties.
5881 </p>
5884 I believe the right thing to do is defer all static destruction
5885 until after all atexit handlers are called. This is a change in
5886 behavior, but one that is likely visible only to perverse test
5887 suites. At the very least, we should <i>permit</i> deferred destruction
5888 even if we don't require it.
5889 </p>
5891 <p><i>[If this is to be changed, it should probably be changed by CWG.
5892 At this point, however, the LWG is leaning toward NAD. Implementing
5893 what the standard says is hard work, but it's not impossible and
5894 most vendors went through that pain years ago. Changing this
5895 behavior would be a user-visible change, and would break at least
5896 one real application.]</i></p>
5899 <p><i>[
5900 Batavia: Send to core with our recommendation that we should permit deferred
5901 destruction but not require it.
5902 ]</i></p>
5905 <p><i>[
5906 Howard: The course of action recommended in Batavia would undo LWG
5907 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#3">3</a> and break current code implementing the "phoenix
5908 singleton". Search the net for "phoenix singleton atexit" to get a feel
5909 for the size of the adverse impact this change would have. Below is
5910 sample code which implements the phoenix singleton and would break if
5911 <tt>atexit</tt> is changed in this way:
5912 ]</i></p>
5915 <blockquote><pre>#include &lt;cstdlib&gt;
5916 #include &lt;iostream&gt;
5917 #include &lt;type_traits&gt;
5918 #include &lt;new&gt;
5920 class A
5922 bool alive_;
5923 A(const A&amp;);
5924 A&amp; operator=(const A&amp;);
5925 public:
5926 A() : alive_(true) {std::cout &lt;&lt; "A()\n";}
5927 ~A() {alive_ = false; std::cout &lt;&lt; "~A()\n";}
5928 void use()
5930 if (alive_)
5931 std::cout &lt;&lt; "A is alive\n";
5932 else
5933 std::cout &lt;&lt; "A is dead\n";
5937 void deallocate_resource();
5939 // This is the phoenix singleton pattern
5940 A&amp; get_resource(bool create = true)
5942 static std::aligned_storage&lt;sizeof(A), std::alignment_of&lt;A&gt;::value&gt;::type buf;
5943 static A* a;
5944 if (create)
5946 if (a != (A*)&amp;buf)
5948 a = ::new (&amp;buf) A;
5949 std::atexit(deallocate_resource);
5952 else
5954 a-&gt;~A();
5955 a = (A*)&amp;buf + 1;
5957 return *a;
5960 void deallocate_resource()
5962 get_resource(false);
5965 void use_A(const char* message)
5967 A&amp; a = get_resource();
5968 std::cout &lt;&lt; "Using A " &lt;&lt; message &lt;&lt; "\n";
5969 a.use();
5972 struct B
5974 ~B() {use_A("from ~B()");}
5977 B b;
5979 int main()
5981 use_A("from main()");
5983 </pre></blockquote>
5986 The correct output is:
5987 </p>
5989 <blockquote><pre>A()
5990 Using A from main()
5991 A is alive
5992 ~A()
5994 Using A from ~B()
5995 A is alive
5996 ~A()
5997 </pre></blockquote>
5999 <p><i>[
6000 Bellevue: Confirmed no interaction with <tt>quick_exit</tt>.
6001 Strong feeling against mandating the change. Leaning towards NAD rather than permitting the change,
6002 as this would make common implementations of pheonix-singleton pattern implementation defined, as noted by Howard.
6003 Bill agrees issue is no longer serious, and accepts NAD.
6004 ]</i></p>
6009 <p><b>Proposed resolution:</b></p>
6011 </p>
6017 <hr>
6018 <h3><a name="466"></a>466. basic_string ctor should prevent null pointer error</h3>
6019 <p><b>Section:</b> 21.3.1 [string.require] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6020 <b>Submitter:</b> Daniel Frey <b>Date:</b> 2004-06-10</p>
6021 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.require">issues</a> in [string.require].</p>
6022 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6023 <p><b>Discussion:</b></p>
6025 Today, my colleagues and me wasted a lot of time. After some time, I
6026 found the problem. It could be reduced to the following short example:
6027 </p>
6029 <pre> #include &lt;string&gt;
6030 int main() { std::string( 0 ); }
6031 </pre>
6033 <p>The problem is that the tested compilers (GCC 2.95.2, GCC 3.3.1 and
6034 Comeau online) compile the above without errors or warnings! The
6035 programs (at least for the GCC) resulted in a SEGV.</p>
6037 <p>I know that the standard explicitly states that the ctor of string
6038 requires a char* which is not zero. STLs could easily detect the above
6039 case with a private ctor for basic_string which takes a single 'int'
6040 argument. This would catch the above code at compile time and would not
6041 ambiguate any other legal ctors.</p>
6043 <p><i>[Redmond: No great enthusiasm for doing this. If we do,
6044 however, we want to do it for all places that take <tt>charT*</tt>
6045 pointers, not just the single-argument constructor. The other
6046 question is whether we want to catch this at compile time (in which
6047 case we catch the error of a literal 0, but not an expression whose
6048 value is a null pointer), at run time, or both.]</i></p>
6053 <p><b>Proposed resolution:</b></p>
6056 <p><b>Rationale:</b></p>
6058 Recommend NAD. Relegate this functionality to debugging implementations.
6059 </p>
6065 <hr>
6066 <h3><a name="470"></a>470. accessing containers from their elements' special functions</h3>
6067 <p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6068 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
6069 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#containers">active issues</a> in [containers].</p>
6070 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#containers">issues</a> in [containers].</p>
6071 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6072 <p><b>Discussion:</b></p>
6075 The standard doesn't prohibit the destructors (or any other special
6076 functions) of containers' elements invoked from a member function
6077 of the container from "recursively" calling the same (or any other)
6078 member function on the same container object, potentially while the
6079 container is in an intermediate state, or even changing the state
6080 of the container object while it is being modified. This may result
6081 in some surprising (i.e., undefined) behavior.
6082 </p>
6084 <p>Read email thread starting with c++std-lib-13637 for more.</p>
6088 <p><b>Proposed resolution:</b></p>
6090 <p>Add to Container Requirements the following new paragraph:</p>
6092 <pre> Unless otherwise specified, the behavior of a program that
6093 invokes a container member function f from a member function
6094 g of the container's value_type on a container object c that
6095 called g from its mutating member function h, is undefined.
6096 I.e., if v is an element of c, directly or indirectly calling
6097 c.h() from v.g() called from c.f(), is undefined.
6098 </pre>
6100 <p><i>[Redmond: This is a real issue, but it's probably a clause 17
6101 issue, not clause 23. We get the same issue, for example, if we
6102 try to destroy a stream from one of the stream's callback functions.]</i></p>
6107 <p><b>Rationale:</b></p>
6109 Recommend NAD. We agree this is an issue, but not a defect.
6110 We believe that there is no wording we can put in the standard
6111 that will cover all cases without introducing unfortunate
6112 corner cases.
6113 </p>
6119 <hr>
6120 <h3><a name="472"></a>472. Missing "Returns" clause in std::equal_range</h3>
6121 <p><b>Section:</b> 25.3.3.3 [equal.range] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
6122 <b>Submitter:</b> Prateek R Karandikar <b>Date:</b> 2004-06-30</p>
6123 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#equal.range">issues</a> in [equal.range].</p>
6124 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
6125 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a></p>
6126 <p><b>Discussion:</b></p>
6128 There is no "Returns:" clause for std::equal_range, which returns non-void.
6129 </p>
6132 <p><b>Proposed resolution:</b></p>
6135 <p><b>Rationale:</b></p>
6136 <p>Fixed as part of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>.</p>
6143 <hr>
6144 <h3><a name="476"></a>476. Forward Iterator implied mutability</h3>
6145 <p><b>Section:</b> 24.1.3 [forward.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6146 <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-09</p>
6147 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#forward.iterators">issues</a> in [forward.iterators].</p>
6148 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6149 <p><b>Discussion:</b></p>
6151 <p>24.1/3 says:</p>
6152 <blockquote><p>
6153 Forward iterators satisfy all the requirements of the input and
6154 output iterators and can be used whenever either kind is specified
6155 </p></blockquote>
6158 The problem is that satisfying the requirements of output iterator
6159 means that you can always assign *something* into the result of
6160 dereferencing it. That makes almost all non-mutable forward
6161 iterators non-conforming. I think we need to sever the refinement
6162 relationship between forward iterator and output iterator.
6163 </p>
6165 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#200">200</a>. But this is not a dup.</p>
6169 <p><b>Proposed resolution:</b></p>
6172 <p><b>Rationale:</b></p>
6173 <p>Yes, 24.1/3 does say that. But it's introductory material. The
6174 precise specification is in 24.1.3, and the requrements table there is
6175 right. We don't need to fine-tune introductory wording. (Especially
6176 since this wording is likely to be changed as part of the iterator
6177 overhaul.)</p>
6183 <hr>
6184 <h3><a name="477"></a>477. Operator-&gt; for const forward iterators</h3>
6185 <p><b>Section:</b> 24.1.3 [forward.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
6186 <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-11</p>
6187 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#forward.iterators">issues</a> in [forward.iterators].</p>
6188 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
6189 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
6190 <p><b>Discussion:</b></p>
6192 The Forward Iterator requirements table contains the following:
6193 </p>
6194 <pre> expression return type operational precondition
6195 semantics
6196 ========== ================== =========== ==========================
6197 a-&gt;m U&amp; if X is mutable, (*a).m pre: (*a).m is well-defined.
6198 otherwise const U&amp;
6200 r-&gt;m U&amp; (*r).m pre: (*r).m is well-defined.
6201 </pre>
6204 The first line is exactly right. The second line is wrong. Basically
6205 it implies that the const-ness of the iterator affects the const-ness
6206 of referenced members. But Paragraph 11 of [lib.iterator.requirements] says:
6207 </p>
6209 <blockquote><p>
6210 In the following sections, a and b denote values of type const X, n
6211 denotes a value of the difference type Distance, u, tmp, and m
6212 denote identifiers, r denotes a value of X&amp;, t denotes a value of
6213 value type T, o denotes a value of some type that is writable to
6214 the output iterator.
6215 </p></blockquote>
6217 <p>AFAICT if we need the second line at all, it should read the same
6218 as the first line.</p>
6220 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
6223 <p><b>Proposed resolution:</b></p>
6226 <p><b>Rationale:</b></p>
6227 <p>The LWG agrees that this is a real problem. Marked as a DUP
6228 because the LWG chose to adopt the solution proposed in
6229 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
6230 </p>
6236 <hr>
6237 <h3><a name="479"></a>479. Container requirements and placement new</h3>
6238 <p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
6239 <b>Submitter:</b> Herb Sutter <b>Date:</b> 2004-08-01</p>
6240 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
6241 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
6242 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
6243 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a></p>
6244 <p><b>Discussion:</b></p>
6245 <p>Nothing in the standard appears to make this program ill-formed:</p>
6247 <pre> struct C {
6248 void* operator new( size_t s ) { return ::operator new( s ); }
6249 // NOTE: this hides in-place and nothrow new
6252 int main() {
6253 vector&lt;C&gt; v;
6254 v.push_back( C() );
6256 </pre>
6258 <p>Is that intentional? We should clarify whether or not we intended
6259 to require containers to support types that define their own special
6260 versions of <tt>operator new</tt>.</p>
6262 <p><i>[
6263 Lillehammer: A container will definitely never use this overridden
6264 operator new, but whether it will fail to compile is unclear from the
6265 standard. Are containers supposed to use qualified or unqualified
6266 placement new? 20.4.1.1 is somewhat relevant, but the standard
6267 doesn't make it completely clear whether containers have to use
6268 Allocator::construct(). If containers don't use it, the details of how
6269 containers use placement new are unspecified. That is the real bug,
6270 but it needs to be fixed as part of the allocator overhaul. Weak
6271 support that the eventual solution should make this code well formed.
6272 ]</i></p>
6277 <p><b>Proposed resolution:</b></p>
6285 <hr>
6286 <h3><a name="480"></a>480. unary_function and binary_function should have protected nonvirtual destructors</h3>
6287 <p><b>Section:</b> 20.5.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6288 <b>Submitter:</b> Joe Gottman <b>Date:</b> 2004-08-19</p>
6289 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#base">issues</a> in [base].</p>
6290 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6291 <p><b>Discussion:</b></p>
6292 <p>The classes std::unary_function and std::binary_function are both
6293 designed to be inherited from but contain no virtual functions. This
6294 makes it too easy for a novice programmer to write code like
6295 binary_function&lt;int, int, int&gt; *p = new plus&lt;int&gt;; delete p;</p>
6297 <p>There are two common ways to prevent this source of undefined
6298 behavior: give the base class a public virtual destructor, or give it
6299 a protected nonvirtual destructor. Since unary_function and
6300 binary_function have no other virtual functions, (note in particular
6301 the absence of an operator()() ), it would cost too much to give them
6302 public virtual destructors. Therefore, they should be given protected
6303 nonvirtual destructors.</p>
6306 <p><b>Proposed resolution:</b></p>
6307 <p>Change Paragraph 20.3.1 of the Standard from</p>
6308 <pre> template &lt;class Arg, class Result&gt;
6309 struct unary_function {
6310 typedef Arg argument_type;
6311 typedef Result result_type;
6314 template &lt;class Arg1, class Arg2, class Result&gt;
6315 struct binary_function {
6316 typedef Arg1 first_argument_type;
6317 typedef Arg2 second_argument_type;
6318 typedef Result result_type;
6320 </pre>
6322 <p>to</p>
6323 <pre> template &lt;class Arg, class Result&gt;
6324 struct unary_function {
6325 typedef Arg argument_type;
6326 typedef Result result_type;
6327 protected:
6328 ~unary_function() {}
6331 template &lt;class Arg1, class Arg2, class Result&gt;
6332 struct binary_function {
6333 typedef Arg1 first_argument_type;
6334 typedef Arg2 second_argument_type;
6335 typedef Result result_type;
6336 protected:
6337 ~binary_function() {}
6339 </pre>
6342 <p><b>Rationale:</b></p>
6343 <p>The LWG doesn't believe the existing definition causes anybody any
6344 concrete harm.</p>
6350 <hr>
6351 <h3><a name="481"></a>481. unique's effects on the range [result, last)</h3>
6352 <p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6353 <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-08-30</p>
6354 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
6355 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6356 <p><b>Discussion:</b></p>
6358 The standard says that unique(first, last) "eliminates all but the
6359 first element from every consecutive group of equal elements" in
6360 [first, last) and returns "the end of the resulting range". So a
6361 postcondition is that [first, result) is the same as the old [first,
6362 last) except that duplicates have been eliminated.
6363 </p>
6365 <p>What postconditions are there on the range [result, last)? One
6366 might argue that the standard says nothing about those values, so
6367 they can be anything. One might also argue that the standard
6368 doesn't permit those values to be changed, so they must not be.
6369 Should the standard say something explicit one way or the other?</p>
6373 <p><b>Proposed resolution:</b></p>
6375 </p>
6378 <p><b>Rationale:</b></p>
6379 <p>We don't want to make many guarantees about what's in [result,
6380 end). Maybe we aren't being quite explicit enough about not being
6381 explicit, but it's hard to think that's a major problem.</p>
6387 <hr>
6388 <h3><a name="482"></a>482. Swapping pairs</h3>
6389 <p><b>Section:</b> 20.2.3 [pairs], 20.3 [tuple] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
6390 <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-09-14</p>
6391 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#pairs">issues</a> in [pairs].</p>
6392 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
6393 <p><b>Discussion:</b></p>
6394 <p>(Based on recent comp.std.c++ discussion)</p>
6396 <p>Pair (and tuple) should specialize std::swap to work in terms of
6397 std::swap on their components. For example, there's no obvious reason
6398 why swapping two objects of type pair&lt;vector&lt;int&gt;,
6399 list&lt;double&gt; &gt; should not take O(1).</p>
6401 <p><i>[Lillehammer: We agree it should be swappable. Howard will
6402 provide wording.]</i></p>
6405 <p><i>[
6406 Post Oxford: We got <tt>swap</tt> for <tt>pair</tt> but accidently
6407 missed <tt>tuple</tt>. <tt>tuple::swap</tt> is being tracked by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#522">522</a>.
6408 ]</i></p>
6413 <p><b>Proposed resolution:</b></p>
6415 Wording provided in
6416 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>.
6417 </p>
6419 <p><b>Rationale:</b></p>
6421 Recommend NAD, fixed by
6422 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>.
6423 </p>
6429 <hr>
6430 <h3><a name="483"></a>483. Heterogeneous equality and EqualityComparable</h3>
6431 <p><b>Section:</b> 25.1 [alg.nonmodifying], 25.2 [alg.modifying.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
6432 <b>Submitter:</b> Peter Dimov <b>Date:</b> 2004-09-20</p>
6433 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
6434 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a></p>
6435 <p><b>Discussion:</b></p>
6436 <p>c++std-lib-14262</p>
6438 <p>[lib.alg.find] requires T to be EqualityComparable:</p>
6440 <pre>template &lt;class InputIterator, class T&gt;
6441 InputIterator find(InputIterator first, InputIterator last,
6442 const T&amp; value);
6443 </pre>
6446 However the condition being tested, as specified in the Effects
6447 clause, is actually *i == value, where i is an InputIterator.
6448 </p>
6451 The two clauses are in agreement only if the type of *i is T, but this
6452 isn't necessarily the case. *i may have a heterogeneous comparison
6453 operator that takes a T, or a T may be convertible to the type of *i.
6454 </p>
6456 <p>Further discussion (c++std-lib-14264): this problem affects a
6457 number of algorithsm in clause 25, not just <tt>find</tt>. We
6458 should try to resolve this problem everywhere it appears.</p>
6461 <p><b>Proposed resolution:</b></p>
6463 <p>[lib.alg.find]:</p>
6464 <blockquote><p>
6465 Remove [lib.alg.find]/1.
6466 </p></blockquote>
6468 <p>[lib.alg.count]:</p>
6469 <blockquote><p>
6470 Remove [lib.alg.count]/1.
6471 </p></blockquote>
6473 <p>[lib.alg.search]:</p>
6474 <blockquote><p>
6475 Remove "Type T is EqualityComparable (20.1.1), " from [lib.alg.search]/4.
6476 </p></blockquote>
6478 <p>[lib.alg.replace]:</p>
6480 <blockquote>
6482 Remove [lib.alg.replace]/1.
6483 Replace [lb.alg.replace]/2 with:
6484 </p>
6486 <blockquote><p>
6487 For every iterator i in the range [first, last) for which *i == value
6488 or pred(*i) holds perform *i = new_value.
6489 </p></blockquote>
6492 Remove the first sentence of /4.
6493 Replace the beginning of /5 with:
6494 </p>
6496 <blockquote><p>
6497 For every iterator i in the range [result, result + (last -
6498 first)), assign to *i either...
6499 </p></blockquote>
6501 <p>(Note the defect here, current text says assign to i, not *i).</p>
6502 </blockquote>
6504 <p>[lib.alg.fill]:</p>
6506 <blockquote>
6508 Remove "Type T is Assignable (23.1), " from /1.
6509 Replace /2 with:
6510 </p>
6512 <blockquote><p>
6513 For every iterator i in the range [first, last) or [first, first + n),
6514 perform *i = value.
6515 </p></blockquote>
6516 </blockquote>
6518 <p>[lib.alg.remove]:</p>
6519 <blockquote><p>
6520 Remove /1.
6521 Remove the first sentence of /6.
6522 </p></blockquote>
6526 <p><b>Rationale:</b></p>
6527 <p>Duplicate of (a subset of) issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a>.</p>
6534 <hr>
6535 <h3><a name="486"></a>486. min/max CopyConstructible requirement is too strict</h3>
6536 <p><b>Section:</b> 25.3.7 [alg.min.max] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
6537 <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-10-13</p>
6538 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#alg.min.max">active issues</a> in [alg.min.max].</p>
6539 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.min.max">issues</a> in [alg.min.max].</p>
6540 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
6541 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a></p>
6542 <p><b>Discussion:</b></p>
6543 <p>A straightforward implementation of these algorithms does not need to
6544 copy T.</p>
6547 <p><b>Proposed resolution:</b></p>
6548 <p>drop the the words "and CopyConstructible" from paragraphs 1 and 4</p>
6551 <p><b>Rationale:</b></p>
6558 <hr>
6559 <h3><a name="487"></a>487. Allocator::construct is too limiting</h3>
6560 <p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6561 <b>Submitter:</b> Dhruv Matani <b>Date:</b> 2004-10-17</p>
6562 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
6563 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
6564 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6565 <p><b>Discussion:</b></p>
6567 The standard's version of allocator::construct(pointer,
6568 const_reference) severely limits what you can construct using this
6569 function. Say you can construct a socket from a file descriptor. Now,
6570 using this syntax, I first have to manually construct a socket from
6571 the fd, and then pass the constructed socket to the construct()
6572 function so it will just to an uninitialized copy of the socket I
6573 manually constructed. Now it may not always be possible to copy
6574 construct a socket eh! So, I feel that the changes should go in the
6575 allocator::construct(), making it:
6576 </p>
6577 <pre> template&lt;typename T&gt;
6578 struct allocator{
6579 template&lt;typename T1&gt;
6580 void construct(pointer T1 const&amp; rt1);
6582 </pre>
6585 Now, the ctor of the class T which matches the one that takes a T1 can
6586 be called! Doesn't that sound great?
6587 </p>
6590 <p><b>Proposed resolution:</b></p>
6593 <p><b>Rationale:</b></p>
6594 <p>NAD. STL uses copying all the time, and making it possible for
6595 allocators to construct noncopyable objects is useless in the
6596 absence of corresponding container changes. We might consider this
6597 as part of a larger redesign of STL.</p>
6603 <hr>
6604 <h3><a name="489"></a>489. std::remove / std::remove_if wrongly specified</h3>
6605 <p><b>Section:</b> 25.2.8 [alg.remove] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6606 <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
6607 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.remove">issues</a> in [alg.remove].</p>
6608 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6609 <p><b>Discussion:</b></p>
6610 <p>In Section 25.2.7 [lib.alg.remove], paragraphs 1 to 5 describe the
6611 behavior of the mutating sequence operations std::remove and
6612 std::remove_if. However, the wording does not reflect the intended
6613 behavior [Note: See definition of intended behavior below] of these
6614 algorithms, as it is known to the C++ community [1].
6615 </p>
6619 <p>1) Analysis of current wording:</p>
6622 <p>25.2.7 [lib.alg.remove], paragraph 2:</p>
6624 <p>Current wording says:
6625 "Effects: Eliminates all the elements referred to by iterator i in the
6626 range [first, last) for which the following corresponding conditions
6627 hold: *i == value, pred(*i) != false."</p>
6630 This sentences expresses specifically that all elements denoted by the
6631 (original) range [first, last) for which the corresponding condition
6632 hold will be eliminated. Since there is no formal definition of the term
6633 "eliminate" provided, the meaning of "eliminate" in everyday language
6634 implies that as postcondition, no element in the range denoted by
6635 [first, last) will hold the corresponding condition on reiteration over
6636 the range [first, last).
6637 </p>
6640 However, this is neither the intent [Note: See definition of intended
6641 behavior below] nor a general possible approach. It can be easily proven
6642 that if all elements of the original range[first, last) will hold the
6643 condition, it is not possible to substitute them by an element for which
6644 the condition will not hold.
6645 </p>
6648 <p>25.2.7 [lib.alg.remove], paragraph 3:</p>
6651 Current wording says:
6652 "Returns: The end of the resulting range."
6653 </p>
6656 The resulting range is not specified. In combination with 25.2.7
6657 [lib.alg.remove], paragraph 2, the only reasonable interpretation of
6658 this so-called resulting range is the range [first,last) - thus
6659 returning always the ForwardIterator 'last' parameter.
6660 </p>
6664 25.2.7 [lib.alg.remove], paragraph 4:
6665 </p>
6668 Current wording says:
6669 "Notes: Stable: the relative order of the elements that are not removed
6670 is the same as their relative order in the original range"
6671 </p>
6674 This sentences makes use of the term "removed", which is neither
6675 specified, nor used in a previous paragraph (which uses the term
6676 "eliminate"), nor unamgiuously separated from the name of the algorithm.
6677 </p>
6680 <p>2) Description of intended behavior:</p>
6683 For the rest of this Defect Report, it is assumed that the intended
6684 behavior was that all elements of the range [first, last) which do not
6685 hold the condition *i == value (std::remove) or pred(*i) != false
6686 (std::remove_if)], call them s-elements [Note: s...stay], will be placed
6687 into a contiguous subrange of [first, last), denoted by the iterators
6688 [first, return value). The number of elements in the resulting range
6689 [first, return value) shall be equal to the number of s-elements in the
6690 original range [first, last). The relative order of the elements in the
6691 resulting subrange[first, return value) shall be the same as the
6692 relative order of the corresponding elements in the original range. It
6693 is undefined whether any elements in the resulting subrange [return
6694 value, last) will hold the corresponding condition, or not.
6695 </p>
6698 All implementations known to the author of this Defect Report comply
6699 with this intent. Since the intent of the behavior (contrary to the
6700 current wording) is also described in various utility references serving
6701 the C++ community [1], it is not expected that fixing the paragraphs
6702 will influence current code - unless the code relies on the behavior as
6703 it is described by current wording and the implementation indeed
6704 reflects the current wording, and not the intent.
6705 </p>
6709 <p>3) Proposed fixes:</p>
6712 <p>Change 25.2.7 [lib.alg.remove], paragraph 2 to:</p>
6715 "Effect: Places all the elements referred to by iterator i in the range
6716 [first, last) for which the following corresponding conditions hold :
6717 !(*i == value), pred(*i) == false into the subrange [first, k) of the
6718 original range, where k shall denote a value of type ForwardIterator. It
6719 is undefined whether any elements in the resulting subrange [k, last)
6720 will hold the corresponding condition, or not."
6721 </p>
6723 <p>Comments to the new wording:</p>
6726 a) "Places" has no special meaning, and the everyday language meaning
6727 should fit.
6728 b) The corresponding conditions were negated compared to the current
6729 wording, becaue the new wording requires it.
6730 c) The wording "of the original range" might be redundant, since any
6731 subrange starting at 'first' and containing no more elements than the
6732 original range is implicitly a subrange of the original range [first,
6733 last).
6734 d) The iterator k was introduced instead of "return value" in order to
6735 avoid a cyclic dependency on 25.2.7/3. The wording ", where k shall
6736 denote a value of type ForwardIterator" might be redundant, because it
6737 follows implicitly by 25.2.7/3.
6738 e) "Places" does, in the author's opinion, explicitly forbid duplicating
6739 any element holding the corresponding condition in the original range
6740 [first, last) within the resulting range [first, k). If there is doubt
6741 this term might be not unambiguous regarding this, it is suggested that
6742 k is specified more closely by the following wording: "k shall denote a
6743 value of type ForwardIterator [Note: see d)] so that k - first is equal
6744 to the number of elements in the original range [first, last) for which
6745 the corresponding condition did hold". This could also be expressed as a
6746 separate paragraph "Postcondition:"
6747 f) The senctence "It is undefined whether any elements in the resulting
6748 subrange [k, last) will hold the corresponding condition, or not." was
6749 added consciously so the term "Places" does not imply if the original
6750 range [first, last) contains n elements holding the corresponding
6751 condition, the identical range[first, last) will also contain exactly n
6752 elements holding the corresponding condition after application of the
6753 algorithm.
6754 </p>
6757 Change 25.2.7 [lib.alg.remove], paragraph 3 to:
6759 "Returns: The iterator k."
6760 </p>
6763 Change 25.2.7 [lib.alg.remove], paragraph 4 to:
6765 "Notes: Stable: the relative order of the elements that are placed into
6766 the subrange [first, return value) shall be the same as their relative
6767 order was in the original range [first, last) prior to application of
6768 the algorithm."
6769 </p>
6772 Comments to the new wording:
6773 </p>
6776 a) the wording "was ... prior to application of the algorithm" is used
6777 to explicitly distinguish the original range not only by means of
6778 iterators, but also by a 'chronological' factor from the resulting range
6779 [first, return value). It might be redundant.
6780 </p>
6783 [1]:
6784 The wording of these references is not always unambiguous, and provided
6785 examples partially contradict verbal description of the algorithms,
6786 because the verbal description resembles the problematic wording of
6787 ISO/IEC 14882:2003.
6788 </p>
6791 <p><b>Proposed resolution:</b></p>
6794 <p><b>Rationale:</b></p>
6795 <p>The LWG believes that the standard is sufficiently clear, and that
6796 there is no evidence of any real-world confusion about this point.</p>
6802 <hr>
6803 <h3><a name="490"></a>490. std::unique wrongly specified</h3>
6804 <p><b>Section:</b> 25.2.9 [alg.unique] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6805 <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
6806 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.unique">issues</a> in [alg.unique].</p>
6807 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
6808 <p><b>Discussion:</b></p>
6809 <p>In Section 25.2.8 [lib.alg.unique], paragraphs 1 to 3 describe the
6810 behavior of the mutating sequence operation std::unique. However, the
6811 wording does not reflect the intended behavior [Note: See definition of
6812 intended behavior below] of these algorithms, as it is known to the C++
6813 community [1].</p>
6817 <p>1) Analysis of current wording:</p>
6820 <p>25.2.8 [lib.alg.unique], paragraph 1:</p>
6823 Current wording says:
6824 "Effects: Eliminates all but the first element from every consecutive
6825 group of equal elements referred to by the iterator i in the range
6826 [first, last) for which the following corresponding conditions hold: *i
6827 == *(i - 1) or pred(*i, *(i -1)) != false"
6828 </p>
6831 This sentences expresses specifically that all elements denoted by the
6832 (original) range [first, last) which are not but the first element from
6833 a consecutive group of equal elements (where equality is defined as *i
6834 == *(i - 1) or pred(*i, *(i - 1)) ! = false) [Note: See DR 202], call
6835 them r-elements [Note: r...remove], will be eliminated. Since there is
6836 no formal definition of the term "eliminate" provided, it is undefined
6837 how this "elimination" takes place. But the meaning of "eliminate" in
6838 everyday language seems to disallow explicitly that after application of
6839 the algorithm, any r-element will remain at any position of the range
6840 [first, last) [2].
6841 </p>
6844 Another defect in the current wording concerns the iterators used to
6845 compare two elements for equality: The current wording contains the
6846 expression "(i - 1)", which is not covered by 25/9 [Note: See DR
6847 submitted by Thomas Mang regarding invalid iterator arithmetic
6848 expressions].
6849 </p>
6853 25.2.8 [lib.alg.unique], paragraph 2:
6854 </p>
6855 <p>Current wording says:
6856 "Returns: The end of the resulting range."</p>
6859 The resulting range is not specified. In combination with 25.2.8
6860 [lib.alg.unique], paragraph 1, one reasonable interpretation (in the
6861 author's opinion even the only possible interpretation) of this
6862 so-called resulting range is the range [first, last) - thus returning
6863 always the ForwardIterator 'last' parameter.
6864 </p>
6866 <p>2) Description of intended behavior:</p>
6869 For the rest of this Defect Report, it is assumed that the intended
6870 behavior was that all elements denoted by the original range [first,
6871 last) which are the first element from a consecutive group of elements
6872 for which the corresponding conditions: *(i-1) == *i (for the version of
6873 unique without a predicate argument) or pred(*(i-1), *i) ! = false (for
6874 the version of unique with a predicate argument) [Note: If such a group
6875 of elements consists of only a single element, this is also considered
6876 the first element] [Note: See resolutions of DR 202], call them
6877 s-elements [Note: s...stay], will be placed into a contiguous subrange
6878 of [first, last), denoted by the iterators [first, return value). The
6879 number of elements in the resulting range [first, return value) shall be
6880 equal to the number of s-elements in the original range [first, last).
6881 Invalid iterator arithmetic expressions are expected to be resolved as
6882 proposed in DR submitted by Thomas Mang regarding invalid iterator
6883 arithmetic expressions. It is also assumed by the author that the
6884 relative order of the elements in the resulting subrange [first, return
6885 value) shall be the same as the relative order of the corresponding
6886 elements (the s-elements) in the original range [Note: If this was not
6887 intended behavior, the additional proposed paragraph about stable order
6888 will certainly become obsolete].
6889 Furthermore, the resolutions of DR 202 are partially considered.
6890 </p>
6893 All implementations known to the author of this Defect Report comply
6894 with this intent [Note: Except possible effects of DR 202]. Since this
6895 intent of the behavior (contrary to the current wording) is also
6896 described in various utility references serving the C++ community [1],
6897 it is not expected that fixing the paragraphs will influence current
6898 code [Note: Except possible effects of DR 202] - unless the code relies
6899 on the behavior as it is described by current wording and the
6900 implementation indeed reflects the current wording, and not the intent.
6901 </p>
6905 <p>3) Proposed fixes:</p>
6908 Change 25.2.8 [lib.alg.unique], paragraph 1 to:
6909 </p>
6912 "Effect: Places the first element from every consecutive group of
6913 elements, referred to by the iterator i in the range [first, last), for
6914 which the following conditions hold: *(i-1) == *i (for the version of
6915 unique without a predicate argument) or pred(*(i -1), *i) != false (for
6916 the version of unique with a predicate argument), into the subrange
6917 [first, k) of the original range, where k shall denote a value of type
6918 ForwardIterator."
6919 </p>
6921 <p>Comments to the new wording:</p>
6924 a) The new wording was influenced by the resolutions of DR 202. If DR
6925 202 is resolved in another way, the proposed wording need also
6926 additional review.
6927 b) "Places" has no special meaning, and the everyday language meaning
6928 should fit.
6929 c) The expression "(i - 1)" was left, but is expected that DR submitted
6930 by Thomas Mang regarding invalid iterator arithmetic expressions will
6931 take this into account.
6932 d) The wording "(for the version of unique without a predicate
6933 argument)" and "(for the version of unique with a predicate argument)"
6934 was added consciously for clarity and is in resemblence with current
6935 23.2.2.4 [lib.list.ops], paragraph 19. It might be considered redundant.
6936 e) The wording "of the original range" might be redundant, since any
6937 subrange starting at first and containing no more elements than the
6938 original range is implicitly a subrange of the original range [first,
6939 last).
6940 f) The iterator k was introduced instead of "return value" in order to
6941 avoid a cyclic dependency on 25.2.8 [lib.alg.unique], paragraph 2. The
6942 wording ", where k shall denote a value of type ForwardIterator" might
6943 be redundant, because it follows implicitly by 25.2.8 [lib.alg.unique],
6944 paragraph 2.
6945 g) "Places" does, in the author's opinion, explicitly forbid duplicating
6946 any s-element in the original range [first, last) within the resulting
6947 range [first, k). If there is doubt this term might be not unambiguous
6948 regarding this, it is suggested that k is specified more closely by the
6949 following wording: "k shall denote a value of type ForwardIterator
6950 [Note: See f)] so that k - first is equal to the number of elements in
6951 the original range [first, last) being the first element from every
6952 consecutive group of elements for which the corresponding condition did
6953 hold". This could also be expressed as a separate paragraph
6954 "Postcondition:".
6955 h) If it is considered that the wording is unclear whether it declares
6956 the element of a group which consists of only a single element
6957 implicitly to be the first element of this group [Note: Such an
6958 interpretation could eventually arise especially in case last - first ==
6959 1] , the following additional sentence is proposed: "If such a group of
6960 elements consists of only a single element, this element is also
6961 considered the first element."
6962 </p>
6965 Change 25.2.8 [lib.alg.unique], paragraph 2 to:
6966 "Returns: The iterator k."
6967 </p>
6970 Add a separate paragraph "Notes:" as 25.2.8 [lib.alg.unique], paragraph
6971 2a or 3a, or a separate paragraph "Postcondition:" before 25.2.8
6972 [lib.alg.unique], paragraph 2 (wording inside {} shall be eliminated if
6973 the preceding expressions are used, or the preceding expressions shall
6974 be eliminated if wording inside {} is used):
6975 </p>
6978 "Notes:{Postcondition:} Stable: the relative order of the elements that
6979 are placed into the subrange [first, return value {k}) shall be the same
6980 as their relative order was in the original range [first, last) prior to
6981 application of the algorithm."
6982 </p>
6984 <p>Comments to the new wording:</p>
6987 a) It is assumed by the author that the algorithm was intended to be
6988 stable.
6989 In case this was not the intent, this paragraph becomes certainly
6990 obsolete.
6991 b) The wording "was ... prior to application of the algorithm" is used
6992 to explicitly distinguish the original range not only by means of
6993 iterators, but also by a 'chronological' factor from the resulting range
6994 [first, return value). It might be redundant.
6995 </p>
6998 25.2.8 [lib.alg.unique], paragraph 3:
6999 </p>
7000 <p>See DR 239.</p>
7003 4) References to other DRs:
7004 </p>
7007 See DR 202, but which does not address any of the problems described in
7008 this Defect Report [Note: This DR is supposed to complement DR 202].
7009 See DR 239.
7010 See DR submitted by Thomas Mang regarding invalid iterator arithmetic
7011 expressions.
7012 </p>
7015 [1]:
7016 The wording of these references is not always unambiguous, and provided
7017 examples partially contradict verbal description of the algorithms,
7018 because the verbal description resembles the problematic wording of
7019 ISO/IEC 14882:2003.
7020 </p>
7023 [2]:
7024 Illustration of conforming implementations according to current wording:
7025 </p>
7028 One way the author of this DR considers how this "elimination" could be
7029 achieved by a conforming implementation according to current wording is
7030 by substituting each r-element by _any_ s-element [Note: s...stay; any
7031 non-r-element], since all r-elements are "eliminated".
7032 </p>
7035 In case of a sequence consisting of elements being all 'equal' [Note:
7036 See DR 202], substituting each r-element by the single s-element is the
7037 only possible solution according to current wording.
7038 </p>
7041 <p><b>Proposed resolution:</b></p>
7044 <p><b>Rationale:</b></p>
7045 <p>The LWG believes the standard is sufficiently clear. No
7046 implementers get it wrong, and changing it wouldn't cause any code to
7047 change, so there is no real-world harm here.</p>
7053 <hr>
7054 <h3><a name="491"></a>491. std::list&lt;&gt;::unique incorrectly specified</h3>
7055 <p><b>Section:</b> 23.2.4.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7056 <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
7057 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.ops">issues</a> in [list.ops].</p>
7058 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7059 <p><b>Discussion:</b></p>
7060 <p>In Section 23.2.4.4 [list.ops], paragraphs 19 to 21 describe the
7061 behavior of the std::list&lt;T, Allocator&gt;::unique operation. However, the
7062 current wording is defective for various reasons.</p>
7067 1) Analysis of current wording:
7068 </p>
7070 <p>23.2.4.4 [list.ops], paragraph 19:</p>
7073 Current wording says:
7074 "Effects: Eliminates all but the first element from every consecutive
7075 group of equal elements referred to by the iterator i in the range
7076 [first + 1, last) for which *i == *(i - 1) (for the version of unique
7077 with no argument) or pred(*i, *(i -1)) (for the version of unique with a
7078 predicate argument) holds."</p>
7081 This sentences makes use of the undefined term "Eliminates". Although it
7082 is, to a certain degree, reasonable to consider the term "eliminate"
7083 synonymous with "erase", using "Erase" in the first place, as the
7084 wording of 23.2.4.4 [list.ops], paragraph 15 does, would be clearer.</p>
7087 The range of the elements referred to by iterator i is "[first + 1,
7088 last)". However, neither "first" nor "last" is defined.</p>
7091 The sentence makes three times use of iterator arithmetic expressions (
7092 "first + 1", "*i == *(i - 1)", "pred(*i, *(i -1))" ) which is not
7093 defined for bidirectional iterator [see DR submitted by Thomas Mang
7094 regarding invalid iterator arithmetic expressions].</p>
7097 The same problems as pointed out in DR 202 (equivalence relation / order
7098 of arguments for pred()) apply to this paragraph.</p>
7101 23.2.4.4 [list.ops], paragraph 20:
7102 </p>
7105 Current wording says:
7106 "Throws: Nothing unless an exception in thrown by *i == *(i-1) or
7107 pred(*i, *(i - 1))"</p>
7110 The sentence makes two times use of invalid iterator arithmetic
7111 expressions ( "*i == *(i - 1)", "pred(*i, *(i -1))" ).
7112 </p>
7114 [Note: Minor typos: "in" / missing dot at end of sentence.]
7115 </p>
7118 23.2.4.4 [list.ops], paragraph 21:</p>
7121 Current wording says:
7122 "Complexity: If the range (last - first) is not empty, exactly (last -
7123 first) - 1 applications of the corresponding predicate, otherwise no
7124 application of the predicate.</p>
7127 See DR 315 regarding "(last - first)" not yielding a range.</p>
7130 Invalid iterator arithmetic expression "(last - first) - 1" left .</p>
7133 <p>2) Description of intended behavior:</p>
7136 For the rest of this Defect Report, it is assumed that "eliminate" is
7137 supposed to be synonymous to "erase", that "first" is equivalent to an
7138 iterator obtained by a call to begin(), "last" is equivalent to an
7139 iterator obtained by a call to end(), and that all invalid iterator
7140 arithmetic expressions are resolved as described in DR submitted by
7141 Thomas Mang regarding invalid iterator arithmetic expressions.</p>
7144 Furthermore, the resolutions of DR 202 are considered regarding
7145 equivalence relation and order of arguments for a call to pred.</p>
7148 All implementations known to the author of this Defect Report comply
7149 with these assumptions, apart from the impact of the alternative
7150 resolution of DR 202. Except for the changes implied by the resolutions
7151 of DR 202, no impact on current code is expected.</p>
7154 3) Proposed fixes:</p>
7157 Change 23.2.4.4 [list.ops], paragraph 19 to:</p>
7160 "Effect: Erases all but the first element from every consecutive group
7161 of elements, referred to by the iterator i in the range [begin(),
7162 end()), for which the following conditions hold: *(i-1) == *i (for the
7163 version of unique with no argument) or pred(*(i-1), *i) != false (for
7164 the version of unique with a predicate argument)."</p>
7167 Comments to the new wording:</p>
7170 a) The new wording was influenced by DR 202 and the resolutions
7171 presented there. If DR 202 is resolved in another way, the proposed
7172 wording need also additional review.
7173 b) "Erases" refers in the author's opinion unambiguously to the member
7174 function "erase". In case there is doubt this might not be unamgibuous,
7175 a direct reference to the member function "erase" is suggested [Note:
7176 This would also imply a change of 23.2.4.4 [list.ops], paragraph
7177 15.].
7178 c) The expression "(i - 1)" was left, but is expected that DR submitted
7179 by Thomas Mang regarding invalid iterator arithmetic expressions will
7180 take this into account.
7181 d) The wording "(for the version of unique with no argument)" and "(for
7182 the version of unique with a predicate argument)" was kept consciously
7183 for clarity.
7184 e) "begin()" substitutes "first", and "end()" substitutes "last". The
7185 range need adjustment from "[first + 1, last)" to "[begin(), end())" to
7186 ensure a valid range in case of an empty list.
7187 f) If it is considered that the wording is unclear whether it declares
7188 the element of a group which consists of only a single element
7189 implicitly to be the first element of this group [Note: Such an
7190 interpretation could eventually arise especially in case size() == 1] ,
7191 the following additional sentence is proposed: "If such a group of
7192 elements consists of only a single element, this element is also
7193 considered the first element."</p>
7196 Change 23.2.4.4 [list.ops], paragraph 20 to:</p>
7199 "Throws: Nothing unless an exception is thrown by *(i-1) == *i or
7200 pred(*(i-1), *i)."</p>
7203 Comments to the new wording:</p>
7206 a) The wording regarding the conditions is identical to proposed
7207 23.2.4.4 [list.ops], paragraph 19. If 23.2.4.4 [list.ops],
7208 paragraph 19 is resolved in another way, the proposed wording need also
7209 additional review.
7210 b) The expression "(i - 1)" was left, but is expected that DR submitted
7211 by Thomas Mang regarding invalid iterator arithmetic expressions will
7212 take this into account.
7213 c) Typos fixed.</p>
7216 Change 23.2.4.4 [list.ops], paragraph 21 to:</p>
7219 "Complexity: If empty() == false, exactly size() - 1 applications of the
7220 corresponding predicate, otherwise no applications of the corresponding
7221 predicate."</p>
7224 Comments to the new wording:</p>
7227 a) The new wording is supposed to also replace the proposed resolution
7228 of DR 315, which suffers from the problem of undefined "first" / "last".
7229 </p>
7232 5) References to other DRs:</p>
7234 <p>See DR 202.
7235 See DR 239.
7236 See DR 315.
7237 See DR submitted by Thomas Mang regarding invalid iterator arithmetic
7238 expressions.</p>
7242 <p><b>Proposed resolution:</b></p>
7245 <p><b>Rationale:</b></p>
7246 <p>"All implementations known to the author of this Defect Report
7247 comply with these assumption", and "no impact on current code is
7248 expected", i.e. there is no evidence of real-world confusion or
7249 harm.</p>
7255 <hr>
7256 <h3><a name="493"></a>493. Undefined Expression in Input Iterator Note Title</h3>
7257 <p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7258 <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-12-13</p>
7259 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
7260 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7261 <p><b>Discussion:</b></p>
7262 <p>1) In 24.1.1/3, the following text is currently present.</p>
7264 <p>"Note: For input iterators, a==b does not imply ++a=++b (Equality does
7265 not guarantee the substitution property or referential transparency)."</p>
7267 <p>However, when in Table 72, part of the definition of ++r is given as:</p>
7269 <p>"pre: r is dereferenceable.
7270 post: any copies of the previous value of r are no longer required
7271 either to be dereferenceable ..."</p>
7273 <p>While a==b does not imply that b is a copy of a, this statement should
7274 perhaps still be made more clear.</p>
7276 <p>2) There are no changes to intended behaviour</p>
7279 3) This Note should be altered to say "Note: For input iterators a==b,
7280 when its behaviour is defined ++a==++b may still be false (Equality does
7281 not guarantee the substitution property or referential transparency).</p>
7285 <p><b>Proposed resolution:</b></p>
7288 <p><b>Rationale:</b></p>
7289 <p>This is descriptive text, not normative, and the meaning is clear.</p>
7295 <hr>
7296 <h3><a name="494"></a>494. Wrong runtime complexity for associative container's insert and delete</h3>
7297 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7298 <b>Submitter:</b> Hans B os <b>Date:</b> 2004-12-19</p>
7299 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
7300 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7301 <p><b>Discussion:</b></p>
7302 <p>According to [lib.associative.reqmts] table 69, the runtime comlexity
7303 of insert(p, t) and erase(q) can be done in amortized constant time.</p>
7305 <p>It was my understanding that an associative container could be
7306 implemented as a balanced binary tree.</p>
7308 <p>For inser(p, t), you 'll have to iterate to p's next node to see if t
7309 can be placed next to p. Furthermore, the insertion usually takes
7310 place at leaf nodes. An insert next to the root node will be done at
7311 the left of the root next node</p>
7313 <p>So when p is the root node you 'll have to iterate from the root to
7314 its next node, which takes O(log(size)) time in a balanced tree.</p>
7316 <p>If you insert all values with insert(root, t) (where root is the
7317 root of the tree before insertion) then each insert takes O(log(size))
7318 time. The amortized complexity per insertion will be O(log(size))
7319 also.</p>
7321 <p>For erase(q), the normal algorithm for deleting a node that has no
7322 empty left or right subtree, is to iterate to the next (or previous),
7323 which is a leaf node. Then exchange the node with the next and delete
7324 the leaf node. Furthermore according to DR 130, erase should return
7325 the next node of the node erased. Thus erasing the root node,
7326 requires iterating to the next node.</p>
7328 <p>Now if you empty a map by deleting the root node until the map is
7329 empty, each operation will take O(log(size)), and the amortized
7330 complexity is still O(log(size)).</p>
7332 <p>The operations can be done in amortized constant time if iterating
7333 to the next node can be done in (non amortized) constant time. This
7334 can be done by putting all nodes in a double linked list. This
7335 requires two extra links per node. To me this is a bit overkill since
7336 you can already efficiently insert or erase ranges with erase(first,
7337 last) and insert(first, last).</p>
7341 <p><b>Proposed resolution:</b></p>
7344 <p><b>Rationale:</b></p>
7345 <p>Only "amortized constant" in special circumstances, and we believe
7346 that's implementable. That is: doing this N times will be O(N), not
7347 O(log N).</p>
7353 <hr>
7354 <h3><a name="499"></a>499. Std. doesn't seem to require stable_sort() to be stable!</h3>
7355 <p><b>Section:</b> 25.3.1.2 [stable.sort] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
7356 <b>Submitter:</b> Prateek Karandikar <b>Date:</b> 2005-04-12</p>
7357 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
7358 <p><b>Discussion:</b></p>
7359 <blockquote><p>
7360 17.3.1.1 Summary</p>
7363 1 The Summary provides a synopsis of the category, and introduces the
7364 first-level subclauses. Each subclause also provides a summary, listing
7365 the headers specified in the subclause and the library entities
7366 provided in each header.
7367 </p>
7369 2 Paragraphs labelled "Note(s):" or "Example(s):" are informative,
7370 other paragraphs are normative.
7371 </p></blockquote>
7373 <p>So this means that a "Notes" paragraph wouldn't be normative. </p>
7375 <blockquote><p>
7376 25.3.1.2 stable_sort
7377 </p>
7378 <pre>template&lt;class RandomAccessIterator&gt;
7379 void stable_sort(RandomAccessIterat or first, RandomAccessIterator last);
7381 template&lt;class RandomAccessIterator, class Compare&gt;
7382 void stable_sort(RandomAccessIterat or first, RandomAccessIterator last, Compare comp);
7383 </pre>
7385 1 Effects: Sorts the elements in the range [first, last).
7386 </p>
7388 2 Complexity: It does at most N(log N)^2 (where N == last - first)
7389 comparisons; if enough extra memory is available, it is N log N.
7390 </p>
7392 3 Notes: Stable: the relative order of the equivalent elements is
7393 preserved.
7394 </p></blockquote>
7397 The Notes para is informative, and nowhere else is stability mentioned above.
7398 </p>
7401 Also, I just searched for the word "stable" in my copy of the Standard.
7402 and the phrase "Notes: Stable: the relative order of the elements..."
7403 is repeated several times in the Standard library clauses for
7404 describing various functions. How is it that stability is talked about
7405 in the informative paragraph? Or am I missing something obvious?
7406 </p>
7409 <p><b>Proposed resolution:</b></p>
7411 </p>
7414 <p><b>Rationale:</b></p>
7416 This change has already been made.
7417 </p>
7423 <hr>
7424 <h3><a name="500"></a>500. do_length cannot be implemented correctly</h3>
7425 <p><b>Section:</b> 22.2.1.5 [locale.codecvt.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7426 <b>Submitter:</b> Krzysztof &#379;elechowski <b>Date:</b> 2005-05-24</p>
7427 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.codecvt.byname">issues</a> in [locale.codecvt.byname].</p>
7428 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7429 <p><b>Discussion:</b></p>
7430 <ol>
7431 <li>codecvt::do_length is of type int;</li>
7432 <li>it is assumed to be sort-of returning from_next - from of type ptrdiff_t;</li>
7433 <li>ptrdiff_t cannot be cast to an int without data loss.</li>
7434 </ol>
7436 Contradiction.
7437 </p>
7440 <p><b>Proposed resolution:</b></p>
7442 </p>
7448 <hr>
7449 <h3><a name="501"></a>501. Proposal: strengthen guarantees of lib.comparisons</h3>
7450 <p><b>Section:</b> 20.5.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7451 <b>Submitter:</b> Me &lt;anti_spam_email2003@yahoo.com&gt; <b>Date:</b> 2005-06-07</p>
7452 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#base">issues</a> in [base].</p>
7453 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7454 <p><b>Discussion:</b></p>
7455 <blockquote><p>
7456 "For templates greater, less, greater_equal, and less_equal,
7457 the specializations for any pointer type yield a total order, even if
7458 the built-in operators &lt;, &gt;, &lt;=, &gt;= do not."
7459 </p></blockquote>
7462 The standard should do much better than guarantee that these provide a
7463 total order, it should guarantee that it can be used to test if memory
7464 overlaps, i.e. write a portable memmove. You can imagine a platform
7465 where the built-in operators use a uint32_t comparison (this tests for
7466 overlap on this platform) but the less&lt;T*&gt; functor is allowed to be
7467 defined to use a int32_t comparison. On this platform, if you use
7468 std::less with the intent of making a portable memmove, comparison on
7469 an array that straddles the 0x7FFFFFFF/0x8000000 boundary can give
7470 incorrect results.
7471 </p>
7474 <p><b>Proposed resolution:</b></p>
7476 Add a footnote to 20.5.3/8 saying:
7477 </p>
7479 <blockquote><p>
7480 Given a p1 and p2 such that p1 points to N objects of type T and p2
7481 points to M objects of type T. If [p1,p1+N) does not overlap [p2,p2+M),
7482 less returns the same value when comparing all pointers in [p1,p1+N) to
7483 all pointers in [p2,p2+M). Otherwise, there is a value Q and a value R
7484 such that less returns the same value when comparing all pointers in
7485 [p1,p1+Q) to all pointers in [p2,p2+R) and an opposite value when
7486 comparing all pointers in [p1+Q,p1+N) to all pointers in [p2+R,p2+M).
7487 For the sake of completeness, the null pointer value (4.10) for T is
7488 considered to be an array of 1 object that doesn't overlap with any
7489 non-null pointer to T. less_equal, greater, greater_equal, equal_to,
7490 and not_equal_to give the expected results based on the total ordering
7491 semantics of less. For T of void, treat it as having similar semantics
7492 as T of char i.e. less&lt;cv T*&gt;(a, b) gives the same results as less&lt;cv
7493 void*&gt;(a, b) which gives the same results as less&lt;cv char*&gt;((cv
7494 char*)(cv void*)a, (cv char*)(cv void*)b).
7495 </p></blockquote>
7498 I'm also thinking there should be a footnote to 20.5.3/1 saying that if
7499 A and B are similar types (4.4/4), comp&lt;A&gt;(a,b) returns the same value
7500 as comp&lt;B&gt;(a,b) (where comp is less, less_equal, etc.). But this might
7501 be problematic if there is some really funky operator overloading going
7502 on that does different things based on cv (that should be undefined
7503 behavior if somebody does that though). This at least should be
7504 guaranteed for all POD types (especially pointers) that use the
7505 built-in comparison operators.
7506 </p>
7510 <p><b>Rationale:</b></p>
7512 less is already required to provide a strict weak ordering which is good enough
7513 to detect overlapping memory situations.
7514 </p>
7520 <hr>
7521 <h3><a name="504"></a>504. Integer types in pseudo-random number engine requirements</h3>
7522 <p><b>Section:</b> 26.4.1 [rand.req], TR1 5.1.1 [tr.rand.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
7523 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7524 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req">issues</a> in [rand.req].</p>
7525 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
7526 <p><b>Discussion:</b></p>
7528 In [tr.rand.req], Paragraph 2 states that "... s is a value of integral type,
7529 g is an ... object returning values of unsigned integral type ..."
7530 </p>
7533 <p><b>Proposed resolution:</b></p>
7535 In 5.1.1 [tr.rand.req], Paragraph 2 replace
7536 </p>
7538 <blockquote><p>
7539 ... s is a value of integral type, g is an lvalue of a type other than X that
7540 defines a zero-argument function object returning values of <del>unsigned integral</del> type
7541 <ins><tt>unsigned long int</tt></ins>,
7543 </p></blockquote>
7546 In 5.1.1 [tr.rand.seq], Table 16, replace in the line for X(s)
7547 </p>
7549 <blockquote><p>
7550 creates an engine with the initial internal state
7551 determined by <ins><tt>static_cast&lt;unsigned long&gt;(</tt></ins><tt><i>s</i></tt><ins><tt>)</tt></ins>
7552 </p></blockquote>
7554 <p><i>[
7555 Mont Tremblant: Both s and g should be unsigned long.
7556 This should refer to the constructor signatures. Jens provided wording post Mont Tremblant.
7557 ]</i></p>
7560 <p><i>[
7561 Berlin: N1932 adopts the proposed resolution: see 26.3.1.3/1e and Table 3 row 2. Moved
7562 to Ready.
7563 ]</i></p>
7568 <p><b>Rationale:</b></p>
7570 Jens: Just requiring X(unsigned long) still makes it possible
7571 for an evil library writer to also supply a X(int) that does something
7572 unexpected. The wording above requires that X(s) always performs
7573 as if X(unsigned long) would have been called. I believe that is
7574 sufficient and implements our intentions from Mont Tremblant. I
7575 see no additional use in actually requiring a X(unsigned long)
7576 signature. u.seed(s) is covered by its reference to X(s), same
7577 arguments.
7578 </p>
7581 <p><i>[
7582 Portland: Subsumed by N2111.
7583 ]</i></p>
7589 <hr>
7590 <h3><a name="506"></a>506. Requirements of Distribution parameter for variate_generator</h3>
7591 <p><b>Section:</b> 26.4 [rand], TR1 5.1.3 [tr.rand.var] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7592 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7593 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
7594 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7595 <p><b>Discussion:</b></p>
7597 Paragraph 3 requires that template argument U (which corresponds to template
7598 parameter Engine) satisfy all uniform random number generator requirements.
7599 However, there is no analogous requirement regarding the template argument
7600 that corresponds to template parameter Distribution. We believe there should
7601 be, and that it should require that this template argument satisfy all random
7602 distribution requirements.
7603 </p>
7606 <p><b>Proposed resolution:</b></p>
7608 Consequence 1: Remove the precondition clauses [tr.rand.var]/16 and /18.
7609 </p>
7611 Consequence 2: Add max() and min() functions to those distributions that
7612 do not already have them.
7613 </p>
7615 <p><i>[
7616 Mont Tremblant: Jens reccommends NAD, min/max not needed everywhere.
7617 Marc supports having min and max to satisfy generic programming interface.
7618 ]</i></p>
7623 <p><b>Rationale:</b></p>
7624 <p>Berlin: N1932 makes this moot: variate_generator has been eliminated.</p>
7630 <hr>
7631 <h3><a name="509"></a>509. Uniform_int template parameters</h3>
7632 <p><b>Section:</b> 26.4.8.1 [rand.dist.uni], TR1 5.1.7.1 [tr.rand.dist.iunif] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7633 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7634 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist.uni">issues</a> in [rand.dist.uni].</p>
7635 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7636 <p><b>Discussion:</b></p>
7638 In [tr.rand.dist.iunif] the uniform_int distribution currently has a single
7639 template parameter, IntType, used as the input_type and as the result_type
7640 of the distribution. We believe there is no reason to conflate these types
7641 in this way.
7642 </p>
7645 <p><b>Proposed resolution:</b></p>
7647 We recommend that there be a second template parameter to
7648 reflect the distribution's input_type, and that the existing first template
7649 parameter continue to reflect (solely) the result_type:
7650 </p>
7651 <blockquote><pre>template&lt; class IntType = int, UIntType = unsigned int &gt;
7652 class uniform_int
7654 public:
7655 // types
7656 typedef UIntType input_type;
7657 typedef IntType result_type;
7658 </pre></blockquote>
7660 <p><i>[
7661 Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
7662 eliminated.
7663 ]</i></p>
7671 <hr>
7672 <h3><a name="510"></a>510. Input_type for bernoulli_distribution</h3>
7673 <p><b>Section:</b> 26.4.8.2 [rand.dist.bern], TR1 5.1.7.2 [tr.rand.dist.bern] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7674 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7675 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7676 <p><b>Discussion:</b></p>
7678 In [tr.rand.dist.bern] the distribution currently requires;
7679 </p>
7680 <blockquote><pre>typedef int input_type;
7681 </pre></blockquote>
7684 <p><b>Proposed resolution:</b></p>
7686 We believe this is an unfortunate choice, and recommend instead:
7687 </p>
7688 <blockquote><pre>typedef unsigned int input_type;
7689 </pre></blockquote>
7691 <p><i>[
7692 Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
7693 eliminated.
7694 ]</i></p>
7702 <hr>
7703 <h3><a name="511"></a>511. Input_type for binomial_distribution</h3>
7704 <p><b>Section:</b> 26.4.8 [rand.dist], TR1 5.1.7.5 [tr.rand.dist.bin] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7705 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7706 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist">issues</a> in [rand.dist].</p>
7707 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7708 <p><b>Discussion:</b></p>
7710 Unlike all other distributions in TR1, this binomial_distribution has an
7711 implementation-defined input_type. We believe this is an unfortunate choice,
7712 because it hinders users from writing portable code. It also hinders the
7713 writing of compliance tests. We recommend instead:
7714 </p>
7715 <blockquote><pre>typedef RealType input_type;
7716 </pre></blockquote>
7718 While this choice is somewhat arbitrary (as it was for some of the other
7719 distributions), we make this particular choice because (unlike all other
7720 distributions) otherwise this template would not publish its RealType
7721 argument and so users could not write generic code that accessed this
7722 second template parameter. In this respect, the choice is consistent with
7723 the other distributions in TR1.
7724 </p>
7726 We have two reasons for recommending that a real type be specified instead.
7727 One reason is based specifically on characteristics of binomial distribution
7728 implementations, while the other is based on mathematical characteristics of
7729 probability distribution functions in general.
7730 </p>
7732 Implementations of binomial distributions commonly use Stirling approximations
7733 for values in certain ranges. It is far more natural to use real values to
7734 represent these approximations than it would be to use integral values to do
7735 so. In other ranges, implementations reply on the Bernoulli distribution to
7736 obtain values. While TR1's bernoulli_distribution::input_type is specified as
7737 int, we believe this would be better specified as double.
7738 </p>
7740 This brings us to our main point: The notion of a random distribution rests
7741 on the notion of a cumulative distribution function, which in turn mathematically
7742 depends on a continuous dependent variable. Indeed, such a distribution function
7743 would be meaningless if it depended on discrete values such as integers - and this
7744 remains true even if the distribution function were to take discrete steps.
7745 </p>
7747 Although this note is specifically about binomial_distribution::input_type,
7748 we intend to recommend that all of the random distributions input_types be
7749 specified as a real type (either a RealType template parameter, or double,
7750 as appropriate).
7751 </p>
7753 Of the nine distributions in TR1, four already have this characteristic
7754 (uniform_real, exponential_distribution, normal_distribution, and
7755 gamma_distribution). We have already argued the case for the binomial the
7756 remaining four distributions.
7757 </p>
7759 In the case of uniform_int, we believe that the calculations to produce an
7760 integer result in a specified range from an integer in a different specified
7761 range is best done using real arithmetic. This is because it involves a
7762 product, one of whose terms is the ratio of the extents of the two ranges.
7763 Without real arithmetic, the results become less uniform: some numbers become
7764 more (or less) probable that they should be. This is, of course, undesireable
7765 behavior in a uniform distribution.
7766 </p>
7768 Finally, we believe that in the case of the bernoulli_distribution (briefly
7769 mentioned earlier), as well as the cases of the geometric_distribution and the
7770 poisson_distribution, it would be far more natural to have a real input_type.
7771 This is because the most natural computation involves the random number
7772 delivered and the distribution's parameter p (in the case of bernoulli_distribution,
7773 for example, the computation is a comparison against p), and p is already specified
7774 in each case as having some real type.
7775 </p>
7778 <p><b>Proposed resolution:</b></p>
7779 <blockquote><pre>typedef RealType input_type;
7780 </pre></blockquote>
7782 <p><i>[
7783 Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been
7784 eliminated.
7785 ]</i></p>
7792 <hr>
7793 <h3><a name="512"></a>512. Seeding subtract_with_carry_01 from a single unsigned long</h3>
7794 <p><b>Section:</b> 26.4.3 [rand.eng], TR1 5.1.4.4 [tr.rand.eng.sub1] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
7795 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7796 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng">issues</a> in [rand.eng].</p>
7797 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
7798 <p><b>Discussion:</b></p>
7800 Paragraph 8 specifies the algorithm by which a subtract_with_carry_01 engine
7801 is to be seeded given a single unsigned long. This algorithm is seriously
7802 flawed in the case where the engine parameter w (also known as word_size)
7803 exceeds 31 [bits]. The key part of the paragraph reads:
7804 </p>
7805 <blockquote><p>
7806 sets x(-r) ... x(-1) to (lcg(1)*2**(-w)) mod 1
7807 </p></blockquote>
7809 and so forth.
7810 </p>
7812 Since the specified linear congruential engine, lcg, delivers numbers with
7813 a maximum of 2147483563 (just a shade under 31 bits), then when w is, for
7814 example, 48, each of the x(i) will be less than 2**-17. The consequence
7815 is that roughly the first 400 numbers delivered will be conspicuously
7816 close to either zero or one.
7817 </p>
7819 Unfortunately, this is not an innocuous flaw: One of the predefined engines
7820 in [tr.rand.predef], namely ranlux64_base_01, has w = 48 and would exhibit
7821 this poor behavior, while the original N1378 proposal states that these
7822 pre-defined engines are intended to be of "known good properties."
7823 </p>
7826 <p><b>Proposed resolution:</b></p>
7828 In 5.1.4.4 [tr.rand.eng.sub1], replace the "effects" clause for
7829 void seed(unsigned long value = 19780503) by
7830 </p>
7832 <blockquote><p>
7833 <i>Effects:</i> If <tt>value == 0</tt>, sets value to <tt>19780503</tt>. In any
7834 case, <del>with a linear congruential generator <tt>lcg</tt>(i) having parameters
7835 <tt><i>m<sub>lcg</sub></i> = 2147483563</tt>, <tt><i>a<sub>lcg</sub></i> = 40014</tt>,
7836 <tt><i>c<sub>lcg</sub></i> = 0</tt>, and <tt><i>lcg</i>(0) = value</tt>,</del>
7837 sets <ins>carry<tt>(-1)</tt> and</ins> <tt>x(-r) &#8230; x(-1)</tt>
7838 <ins>as if executing</ins></p>
7840 <blockquote><pre><ins>
7841 linear_congruential&lt;unsigned long, 40014, 0, 2147483563&gt; lcg(value);
7842 seed(lcg);
7843 </ins></pre></blockquote>
7846 <del>to <tt>(<i>lcg</i>(1) · 2<sup>-<i>w</i></sup>) mod 1
7847 &#8230; (<i>lcg</i>(<i>r</i>) · 2<sup>-<i>w</i></sup>) mod 1</tt>,
7848 respectively. If <tt><i>x</i>(-1) == 0</tt>, sets carry<tt>(-1) = 2<sup>-<i>w</i></sup></tt>,
7849 else sets carry<tt>(-1) = 0</tt>.</del></p>
7850 </blockquote>
7852 <p><i>[
7853 Jens provided revised wording post Mont Tremblant.
7854 ]</i></p>
7857 <p><i>[
7858 Berlin: N1932 adopts the originally-proposed resolution of the issue.
7859 Jens's supplied wording is a clearer description of what is
7860 intended. Moved to Ready.
7861 ]</i></p>
7866 <p><b>Rationale:</b></p>
7868 Jens: I'm using an explicit type here, because fixing the
7869 prose would probably not qualify for the (with issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#504">504</a> even
7870 stricter) requirements we have for seed(Gen&amp;).
7871 </p>
7873 <p><i>[
7874 Portland: Subsumed by N2111.
7875 ]</i></p>
7882 <hr>
7883 <h3><a name="513"></a>513. Size of state for subtract_with_carry_01</h3>
7884 <p><b>Section:</b> 26.4.3 [rand.eng], TR1 5.1.4.4 [tr.rand.eng.sub1] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
7885 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7886 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng">issues</a> in [rand.eng].</p>
7887 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
7888 <p><b>Discussion:</b></p>
7890 Paragraph 3 begins:
7891 </p>
7892 <blockquote><p>
7893 The size of the state is r.
7894 </p></blockquote>
7896 However, this is not quite consistent with the remainder of the paragraph
7897 which specifies a total of nr+1 items in the textual representation of
7898 the state. We recommend the sentence be corrected to match:
7899 </p>
7900 <blockquote><p>
7901 The size of the state is nr+1.
7902 </p></blockquote>
7904 To give meaning to the coefficient n, it may be also desirable to move
7905 n's definition from later in the paragraph. Either of the following
7906 seem reasonable formulations:
7907 </p>
7908 <blockquote><p>
7909 With n=..., the size of the state is nr+1.
7910 </p></blockquote>
7911 <blockquote><p>
7912 The size of the state is nr+1, where n=... .
7913 </p></blockquote>
7917 <p><b>Proposed resolution:</b></p>
7918 <p><i>[
7919 Jens: I plead for "NAD" on the grounds that "size of state" is only
7920 used as an argument for big-O complexity notation, thus
7921 constant factors and additions don't count.
7922 ]</i></p>
7925 <p><i>[
7926 Berlin: N1932 adopts the proposed NAD.
7927 ]</i></p>
7935 <hr>
7936 <h3><a name="514"></a>514. Size of state for subtract_with_carry</h3>
7937 <p><b>Section:</b> 26.4.3.3 [rand.eng.sub], TR1 5.1.4.3 [tr.rand.eng.sub] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
7938 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7939 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
7940 <p><b>Discussion:</b></p>
7942 Paragraph 2 begins:
7943 </p>
7944 <blockquote><p>
7945 The size of the state is r.
7946 </p></blockquote>
7948 However, the next sentence specifies a total of r+1 items in the textual
7949 representation of the state, r specific x's as well as a specific carry.
7950 This makes a total of r+1 items that constitute the size of the state,
7951 rather than r.
7952 </p>
7955 <p><b>Proposed resolution:</b></p>
7957 We recommend the sentence be corrected to match:
7958 </p>
7959 <blockquote><p>
7960 The size of the state is r+1.
7961 </p></blockquote>
7963 <p><i>[
7964 Jens: I plead for "NAD" on the grounds that "size of state" is only
7965 used as an argument for big-O complexity notation, thus
7966 constant factors and additions don't count.
7967 ]</i></p>
7970 <p><i>[
7971 Berlin: N1932 adopts the proposed NAD.
7972 ]</i></p>
7980 <hr>
7981 <h3><a name="515"></a>515. Random number engine traits</h3>
7982 <p><b>Section:</b> 26.4.2 [rand.synopsis], TR1 5.1.2 [tr.rand.synopsis] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7983 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7984 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.synopsis">issues</a> in [rand.synopsis].</p>
7985 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
7986 <p><b>Discussion:</b></p>
7988 To accompany the concept of a pseudo-random number engine as defined in Table 17,
7989 we propose and recommend an adjunct template, engine_traits, to be declared in
7990 [tr.rand.synopsis] as:
7991 </p>
7992 <blockquote><pre>template&lt; class PSRE &gt;
7993 class engine_traits;
7994 </pre></blockquote>
7996 This template's primary purpose would be as an aid to generic programming involving
7997 pseudo-random number engines. Given only the facilities described in tr1, it would
7998 be very difficult to produce any algorithms involving the notion of a generic engine.
7999 The intent of this proposal is to provide, via engine_traits&lt;&gt;, sufficient
8000 descriptive information to allow an algorithm to employ a pseudo-random number engine
8001 without regard to its exact type, i.e., as a template parameter.
8002 </p>
8004 For example, today it is not possible to write an efficient generic function that
8005 requires any specific number of random bits. More specifically, consider a
8006 cryptographic application that internally needs 256 bits of randomness per call:
8007 </p>
8008 <blockquote><pre>template&lt; class Eng, class InIter, class OutIter &gt;
8009 void crypto( Eng&amp; e, InIter in, OutIter out );
8010 </pre></blockquote>
8012 Without knowning the number of bits of randomness produced per call to a provided
8013 engine, the algorithm has no means of determining how many times to call the engine.
8014 </p>
8016 In a new section [tr.rand.eng.traits], we proposed to define the engine_traits
8017 template as:
8018 </p>
8019 <blockquote><pre>template&lt; class PSRE &gt;
8020 class engine_traits
8022 static std::size_t bits_of_randomness = 0u;
8023 static std::string name() { return "unknown_engine"; }
8024 // TODO: other traits here
8026 </pre></blockquote>
8028 Further, each engine described in [tr.rand.engine] would be accompanied by a
8029 complete specialization of this new engine_traits template.
8030 </p>
8034 <p><b>Proposed resolution:</b></p>
8035 <p><i>[
8036 Berlin: Walter: While useful for implementation per TR1, N1932 has no need for this
8037 feature. Recommend close as NAD.
8038 ]</i></p>
8042 <p><b>Rationale:</b></p>
8044 Recommend NAD,
8045 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1932.pdf">N1932</a>,
8046 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>
8047 covers this. Already in WP.
8048 </p>
8054 <hr>
8055 <h3><a name="516"></a>516. Seeding subtract_with_carry_01 using a generator</h3>
8056 <p><b>Section:</b> 26.4.3 [rand.eng], TR1 5.1.4.4 [tr.rand.eng.sub1] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8057 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
8058 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng">issues</a> in [rand.eng].</p>
8059 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8060 <p><b>Discussion:</b></p>
8062 Paragraph 6 says:
8063 </p>
8064 <blockquote><p>
8065 ... obtained by successive invocations of g, ...
8066 </p></blockquote>
8068 We recommend instead:
8069 </p>
8070 <blockquote><p>
8071 ... obtained by taking successive invocations of g mod 2**32, ...
8072 </p></blockquote>
8074 as the context seems to require only 32-bit quantities be used here.
8075 </p>
8078 <p><b>Proposed resolution:</b></p>
8080 Berlin: N1932 adopts the proposed resultion: see 26.3.3.4/7. Moved to Ready.
8081 </p>
8083 <p><i>[
8084 Portland: Subsumed by N2111.
8085 ]</i></p>
8092 <hr>
8093 <h3><a name="517"></a>517. Should include name in external representation</h3>
8094 <p><b>Section:</b> 26.4.1 [rand.req], TR1 5.1.1 [tr.rand.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8095 <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
8096 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req">issues</a> in [rand.req].</p>
8097 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
8098 <p><b>Discussion:</b></p>
8100 The last two rows of Table 16 deal with the i/o requirements of an engine,
8101 specifying that the textual representation of an engine's state,
8102 appropriately formatted, constitute the engine's external representation.
8103 </p>
8105 This seems adequate when an engine's type is known. However, it seems
8106 inadequate in the context of generic code, where it becomes useful and
8107 perhaps even necessary to determine an engine's type via input.
8108 </p>
8110 </p>
8113 <p><b>Proposed resolution:</b></p>
8115 We therefore recommend that, in each of these two rows of Table 16, the
8116 text "textual representation" be expanded so as to read "engine name
8117 followed by the textual representation."
8118 </p>
8120 <p><i>[
8121 Berlin: N1932 considers this NAD. This is a QOI issue.
8122 ]</i></p>
8130 <hr>
8131 <h3><a name="525"></a>525. type traits definitions not clear</h3>
8132 <p><b>Section:</b> 20.4.4 [meta.unary], TR1 4.5 [tr.meta.unary] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8133 <b>Submitter:</b> Robert Klarer <b>Date:</b> 2005-07-11</p>
8134 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8135 <p><b>Discussion:</b></p>
8137 It is not completely clear how the primary type traits deal with
8138 cv-qualified types. And several of the secondary type traits
8139 seem to be lacking a definition.
8140 </p>
8142 <p><i>[
8143 Berlin: Howard to provide wording.
8144 ]</i></p>
8148 <p><b>Proposed resolution:</b></p>
8150 Wording provided in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2028.html">N2028</a>.
8152 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a>
8153 provides more detail for motivation.
8154 </p>
8157 <p><b>Rationale:</b></p>
8158 Solved by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a>
8159 in the WP.
8165 <hr>
8166 <h3><a name="526"></a>526. Is it undefined if a function in the standard changes in parameters?</h3>
8167 <p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8168 <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2005-09-14</p>
8169 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
8170 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
8171 <p><b>Discussion:</b></p>
8173 Problem: There are a number of places in the C++ standard library where
8174 it is possible to write what appear to be sensible ways of calling
8175 functions, but which can cause problems in some (or all)
8176 implementations, as they cause the values given to the function to be
8177 changed in a way not specified in standard (and therefore not coded to
8178 correctly work). These fall into two similar categories.
8179 </p>
8182 1) Parameters taken by const reference can be changed during execution
8183 of the function
8184 </p>
8187 Examples:
8188 </p>
8191 Given std::vector&lt;int&gt; v:
8192 </p>
8194 v.insert(v.begin(), v[2]);
8195 </p>
8197 v[2] can be changed by moving elements of vector
8198 </p>
8202 Given std::list&lt;int&gt; l:
8203 </p>
8205 l.remove(*l.begin());
8206 </p>
8208 Will delete the first element, and then continue trying to access it.
8209 This is particularily vicious, as it will appear to work in almost all
8210 cases.
8211 </p>
8214 2) A range is given which changes during the execution of the function:
8215 Similarly,
8216 </p>
8219 v.insert(v.begin(), v.begin()+4, v.begin()+6);
8220 </p>
8223 This kind of problem has been partly covered in some cases. For example
8224 std::copy(first, last, result) states that result cannot be in the range
8225 [first, last). However, does this cover the case where result is a
8226 reverse_iterator built from some iterator in the range [first, last)?
8227 Also, std::copy would still break if result was reverse_iterator(last +
8228 1), yet this is not forbidden by the standard
8229 </p>
8232 Solution:
8233 </p>
8236 One option would be to try to more carefully limit the requirements of
8237 each function. There are many functions which would have to be checked.
8238 However as has been shown in the std::copy case, this may be difficult.
8239 A simpler, more global option would be to somewhere insert text similar to:
8240 </p>
8243 If the execution of any function would change either any values passed
8244 by reference or any value in any range passed to a function in a way not
8245 defined in the definition of that function, the result is undefined.
8246 </p>
8249 Such code would have to at least cover chapters 23 and 25 (the sections
8250 I read through carefully). I can see no harm on applying it to much of
8251 the rest of the standard.
8252 </p>
8255 Some existing parts of the standard could be improved to fit with this,
8256 for example the requires for 25.2.1 (Copy) could be adjusted to:
8257 </p>
8260 Requires: For each non-negative integer n &lt; (last - first), assigning to
8261 *(result + n) must not alter any value in the range [first + n, last).
8262 </p>
8265 However, this may add excessive complication.
8266 </p>
8269 One other benefit of clearly introducing this text is that it would
8270 allow a number of small optimisations, such as caching values passed
8271 by const reference.
8272 </p>
8275 Matt Austern adds that this issue also exists for the <tt>insert</tt> and
8276 <tt>erase</tt> members of the ordered and unordered associative containers.
8277 </p>
8279 <p><i>[
8280 Berlin: Lots of controversey over how this should be solved. Lots of confusion
8281 as to whether we're talking about self referencing iterators or references.
8282 Needs a good survey as to the cases where this matters, for which
8283 implementations, and how expensive it is to fix each case.
8284 ]</i></p>
8289 <p><b>Proposed resolution:</b></p>
8292 <p><b>Rationale:</b></p>
8294 Recommend NAD.
8295 </p>
8296 <ul>
8297 <li><tt>vector::insert(iter, value)</tt> is required to work because the standard
8298 doesn't give permission for it not to work.</li>
8299 <li><tt>list::remove(value)</tt> is required to work because the standard
8300 doesn't give permission for it not to work.</li>
8301 <li><tt>vector::insert(iter, iter, iter)</tt> is not required to work because
8302 23.1.1 [sequence.reqmts], p4 says so.</li>
8303 <li><tt>copy</tt> has to work, except where 25.2.1 [alg.copy] says
8304 it doesn't have to work. While a language lawyer can tear this wording apart,
8305 it is felt that the wording is not prone to accidental interpretation.</li>
8306 <li>The current working draft provide exceptions for the unordered associative
8307 containers similar to the containers requirements which exempt the member
8308 template insert functions from self referencing.</li>
8309 </ul>
8315 <hr>
8316 <h3><a name="528"></a>528. <tt>const_iterator</tt> <tt>iterator</tt> issue when they are the same type</h3>
8317 <p><b>Section:</b> 23.4 [unord], TR1 6.3.4 [tr.unord.unord] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8318 <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2005-10-12</p>
8319 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord">active issues</a> in [unord].</p>
8320 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord">issues</a> in [unord].</p>
8321 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
8322 <p><b>Discussion:</b></p>
8324 while implementing the resolution of issue 6.19 I'm noticing the
8325 following: according to 6.3.4.3/2 (and 6.3.4.5/2), for unordered_set and
8326 unordered_multiset:
8327 </p>
8329 <blockquote><p>
8330 "The iterator and const_iterator types are both const types. It is
8331 unspecified whether they are the same type"
8332 </p></blockquote>
8335 Now, according to the resolution of 6.19, we have overloads of insert
8336 with hint and erase (single and range) both for iterator and
8337 const_iterator, which, AFAICS, can be meaningful at the same time *only*
8338 if iterator and const_iterator *are* in fact different types.
8339 </p>
8341 Then, iterator and const_iterator are *required* to be different types?
8342 Or that is an unintended consequence? Maybe the overloads for plain
8343 iterators should be added only to unordered_map and unordered_multimap?
8344 Or, of course, I'm missing something?
8345 </p>
8349 <p><b>Proposed resolution:</b></p>
8351 Add to 6.3.4.3p2 (and 6.3.4.5p2):
8352 </p>
8354 2 ... The iterator and const_iterator types are both <del>const</del>
8355 <ins>constant</ins> iterator types.
8356 It is unspecified whether they are the same type.
8357 </p>
8360 Add a new subsection to 17.4.4 [lib.conforming]:
8361 </p>
8363 <blockquote>
8365 An implementation shall not supply an overloaded function
8366 signature specified in any library clause if such a signature
8367 would be inherently ambiguous during overload resolution
8368 due to two library types referring to the same type.
8369 </p>
8371 [Note: For example, this occurs when a container's iterator
8372 and const_iterator types are the same. -- end note]
8373 </p>
8374 </blockquote>
8376 <p><i>[
8377 Post-Berlin: Beman supplied wording.
8378 ]</i></p>
8383 <p><b>Rationale:</b></p>
8384 Toronto: The first issue has been fixed by N2350 (the insert and erase members
8385 are collapsed into one signature). Alisdair to open a separate issue on the
8386 chapter 17 wording.
8392 <hr>
8393 <h3><a name="529"></a>529. The standard encourages redundant and confusing preconditions</h3>
8394 <p><b>Section:</b> 17.4.3.9 [res.on.required] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8395 <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-10-25</p>
8396 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8397 <p><b>Discussion:</b></p>
8399 17.4.3.8/1 says:
8400 </p>
8402 <blockquote><p>
8403 Violation of the preconditions specified in a function's
8404 Required behavior: paragraph results in undefined behavior unless the
8405 function's Throws: paragraph specifies throwing an exception when the
8406 precondition is violated.
8407 </p></blockquote>
8410 This implies that a precondition violation can lead to defined
8411 behavior. That conflicts with the only reasonable definition of
8412 precondition: that a violation leads to undefined behavior. Any other
8413 definition muddies the waters when it comes to analyzing program
8414 correctness, because precondition violations may be routinely done in
8415 correct code (e.g. you can use std::vector::at with the full
8416 expectation that you'll get an exception when your index is out of
8417 range, catch the exception, and continue). Not only is it a bad
8418 example to set, but it encourages needless complication and redundancy
8419 in the standard. For example:
8420 </p>
8422 <blockquote><pre> 21 Strings library
8423 21.3.3 basic_string capacity
8425 void resize(size_type n, charT c);
8427 5 Requires: n &lt;= max_size()
8428 6 Throws: length_error if n &gt; max_size().
8429 7 Effects: Alters the length of the string designated by *this as follows:
8430 </pre></blockquote>
8433 The Requires clause is entirely redundant and can be dropped. We
8434 could make that simplifying change (and many others like it) even
8435 without changing 17.4.3.8/1; the wording there just seems to encourage
8436 the redundant and error-prone Requires: clause.
8437 </p>
8439 <p><i>[
8440 Batavia: Alan and Pete to work.
8441 ]</i></p>
8444 <p><i>[
8445 Bellevue: NAD Editorial, this group likes
8446 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2121.html">N2121</a>,
8447 Pete agrees, accepting it is Pete's business.
8448 General agreement that precondition violations are synonymous with UB.
8449 ]</i></p>
8453 <p><b>Proposed resolution:</b></p>
8455 1. Change 17.4.3.8/1 to read:
8456 </p>
8458 <blockquote><p>
8459 Violation of the preconditions specified in a function's
8460 <i>Required behavior:</i> paragraph results in undefined behavior
8461 <del>unless the function's <i>Throws:</i> paragraph specifies throwing
8462 an exception when the precondition is violated</del>.
8463 </p></blockquote>
8466 2. Go through and remove redundant Requires: clauses. Specifics to be
8467 provided by Dave A.
8468 </p>
8470 <p><i>[
8471 Berlin: The LWG requests a detailed survey of part 2 of the proposed resolution.
8472 ]</i></p>
8475 <p><i>[
8476 Alan provided the survey
8477 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2121.html">N2121</a>.
8478 ]</i></p>
8486 <hr>
8487 <h3><a name="532"></a>532. Tuple comparison</h3>
8488 <p><b>Section:</b> 20.3.1.6 [tuple.rel], TR1 6.1.3.5 [tr.tuple.rel] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
8489 <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-11-29</p>
8490 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
8491 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a></p>
8492 <p><b>Discussion:</b></p>
8494 Where possible, tuple comparison operators &lt;,&lt;=,=&gt;, and &gt; ought to be
8495 defined in terms of std::less rather than operator&lt;, in order to
8496 support comparison of tuples of pointers.
8497 </p>
8500 <p><b>Proposed resolution:</b></p>
8502 change 6.1.3.5/5 from:
8503 </p>
8505 <blockquote><p>
8506 Returns: The result of a lexicographical comparison between t and
8507 u. The result is defined as: (bool)(get&lt;0&gt;(t) &lt; get&lt;0&gt;(u)) ||
8508 (!(bool)(get&lt;0&gt;(u) &lt; get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for
8509 some tuple r is a tuple containing all but the first element of
8510 r. For any two zero-length tuples e and f, e &lt; f returns false.
8511 </p></blockquote>
8515 </p>
8517 <blockquote>
8519 Returns: The result of a lexicographical comparison between t and
8520 u. For any two zero-length tuples e and f, e &lt; f returns false.
8521 Otherwise, the result is defined as: cmp( get&lt;0&gt;(t), get&lt;0&gt;(u)) ||
8522 (!cmp(get&lt;0&gt;(u), get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for some
8523 tuple r is a tuple containing all but the first element of r, and
8524 cmp(x,y) is an unspecified function template defined as follows.
8525 </p>
8527 Where T is the type of x and U is the type of y:
8528 </p>
8531 if T and U are pointer types and T is convertible to U, returns
8532 less&lt;U&gt;()(x,y)
8533 </p>
8536 otherwise, if T and U are pointer types, returns less&lt;T&gt;()(x,y)
8537 </p>
8540 otherwise, returns (bool)(x &lt; y)
8541 </p>
8542 </blockquote>
8544 <p><i>[
8545 Berlin: This issue is much bigger than just tuple (pair, containers,
8546 algorithms). Dietmar will survey and work up proposed wording.
8547 ]</i></p>
8552 <p><b>Rationale:</b></p>
8554 Recommend NAD. This will be fixed with the next revision of concepts.
8555 </p>
8561 <hr>
8562 <h3><a name="536"></a>536. Container iterator constructor and explicit convertibility</h3>
8563 <p><b>Section:</b> 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
8564 <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2005-12-17</p>
8565 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#container.requirements">active issues</a> in [container.requirements].</p>
8566 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#container.requirements">issues</a> in [container.requirements].</p>
8567 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
8568 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a></p>
8569 <p><b>Discussion:</b></p>
8571 The iterator constructor X(i,j) for containers as defined in 23.1.1 and
8572 23.2.2 does only require that i and j be input iterators but
8573 nothing is said about their associated value_type. There are three
8574 sensible
8575 options:
8576 </p>
8577 <ol>
8578 <li>iterator's value_type is exactly X::value_type (modulo cv).</li>
8579 <li>iterator's value_type is *implicitly* convertible to X::value_type.</li>
8580 <li>iterator's value_type is *explicitly* convertible to X::value_type.</li>
8581 </ol>
8583 The issue has practical implications, and stdlib vendors have
8584 taken divergent approaches to it: Dinkumware follows 2,
8585 libstdc++ follows 3.
8586 </p>
8588 The same problem applies to the definition of insert(p,i,j) for
8589 sequences and insert(i,j) for associative contianers, as well as
8590 assign.
8591 </p>
8593 <p><i>[
8594 The following added by Howard and the example code was originally written by
8595 Dietmar.
8596 ]</i></p>
8599 Valid code below?
8600 </p>
8602 <blockquote><pre>#include &lt;vector&gt;
8603 #include &lt;iterator&gt;
8604 #include &lt;iostream&gt;
8606 struct foo
8608 explicit foo(int) {}
8611 int main()
8613 std::vector&lt;int&gt; v_int;
8614 std::vector&lt;foo&gt; v_foo1(v_int.begin(), v_int.end());
8615 std::vector&lt;foo&gt; v_foo2((std::istream_iterator&lt;int&gt;(std::cin)),
8616 std::istream_iterator&lt;int&gt;());
8618 </pre></blockquote>
8619 <p><i>[
8620 Berlin: Some support, not universal, for respecting the explicit qualifier.
8621 ]</i></p>
8626 <p><b>Proposed resolution:</b></p>
8633 <hr>
8634 <h3><a name="544"></a>544. minor NULL problems in C.2</h3>
8635 <p><b>Section:</b> C.2 [diff.library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8636 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-11-25</p>
8637 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8638 <p><b>Discussion:</b></p>
8640 According to C.2.2.3, p1, "the macro NULL, defined in any of &lt;clocale&gt;,
8641 &lt;cstddef&gt;, &lt;cstdio&gt;, &lt;cstdlib&gt;, &lt;cstring&gt;, &lt;ctime&gt;,
8642 or &lt;cwchar&gt;." This is consistent with the C standard.
8643 </p>
8645 However, Table 95 in C.2 fails to mention &lt;clocale&gt; and &lt;cstdlib&gt;.
8646 </p>
8648 In addition, C.2, p2 claims that "The C++ Standard library provides
8649 54 standard macros from the C library, as shown in Table 95." While
8650 table 95 does have 54 entries, since a couple of them (including the
8651 NULL macro) are listed more than once, the actual number of macros
8652 defined by the C++ Standard Library may not be 54.
8653 </p>
8656 <p><b>Proposed resolution:</b></p>
8658 I propose we add &lt;clocale&gt; and &lt;cstdlib&gt; to Table 96 and remove the
8659 number of macros from C.2, p2 and reword the sentence as follows:
8660 </p>
8661 <blockquote><p>
8662 The C++ Standard library <del>provides 54 standard macros from</del>
8663 <ins>defines a number macros corresponding to those defined by</ins> the C
8664 <ins>Standard</ins> library, as shown in Table 96.
8665 </p></blockquote>
8667 <p><i>[
8668 Portland: Resolution is considered editorial. It will be incorporated into the WD.
8669 ]</i></p>
8677 <hr>
8678 <h3><a name="547"></a>547. division should be floating-point, not integer</h3>
8679 <p><b>Section:</b> 26.4 [rand], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8680 <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
8681 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
8682 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
8683 <p><b>Discussion:</b></p>
8685 Paragraph 10 describes how a variate generator uses numbers produced by an
8686 engine to pass to a generator. The sentence that concerns me is: "Otherwise, if
8687 the value for engine_value_type::result_type is true and the value for
8688 Distribution::input_type is false [i.e. if the engine produces integers and the
8689 engine wants floating-point values], then the numbers in s_eng are divided by
8690 engine().max() - engine().min() + 1 to obtain the numbers in s_e." Since the
8691 engine is producing integers, both the numerator and the denominator are
8692 integers and we'll be doing integer division, which I don't think is what we
8693 want. Shouldn't we be performing a conversion to a floating-point type first?
8694 </p>
8697 <p><b>Proposed resolution:</b></p>
8700 <p><b>Rationale:</b></p>
8702 Recommend NAD as the affected section is now gone and so the issue is moot.
8703 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>.
8704 </p>
8710 <hr>
8711 <h3><a name="548"></a>548. May random_device block?</h3>
8712 <p><b>Section:</b> 26.4.6 [rand.device], TR1 5.1.6 [tr.rand.device] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8713 <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
8714 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
8715 <p><b>Discussion:</b></p>
8717 Class random_device "produces non-deterministic random numbers", using some
8718 external source of entropy. In most real-world systems, the amount of available
8719 entropy is limited. Suppose that entropy has been exhausted. What is an
8720 implementation permitted to do? In particular, is it permitted to block
8721 indefinitely until more random bits are available, or is the implementation
8722 required to detect failure immediately? This is not an academic question. On
8723 Linux a straightforward implementation would read from /dev/random, and "When
8724 the entropy pool is empty, reads to /dev/random will block until additional
8725 environmental noise is gathered." Programmers need to know whether random_device
8726 is permitted to (or possibly even required to?) behave the same way.
8727 </p>
8729 <p><i>[
8730 Berlin: Walter: N1932 considers this NAD. Does the standard specify whether std::cin
8731 may block?
8732 ]</i></p>
8736 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
8737 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
8738 for some further discussion.
8739 </p>
8742 <p><b>Proposed resolution:</b></p>
8744 Adopt the proposed resolution in
8745 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a> (NAD).
8746 </p>
8752 <hr>
8753 <h3><a name="549"></a>549. Undefined variable in binomial_distribution</h3>
8754 <p><b>Section:</b> 26.4.8 [rand.dist], TR1 5.1.7.5 [tr.rand.dist.bin] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8755 <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
8756 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist">issues</a> in [rand.dist].</p>
8757 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8758 <p><b>Discussion:</b></p>
8760 Paragraph 1 says that "A binomial distributon random distribution produces
8761 integer values i&gt;0 with p(i) = (n choose i) * p*i * (1-p)^(t-i), where t and
8762 p are the parameters of the distribution. OK, that tells us what t, p, and i
8763 are. What's n?
8764 </p>
8767 <p><b>Proposed resolution:</b></p>
8769 Berlin: Typo: "n" replaced by "t" in N1932: see 26.3.7.2.2/1.
8770 </p>
8772 <p><i>[
8773 Portland: Subsumed by N2111.
8774 ]</i></p>
8781 <hr>
8782 <h3><a name="553"></a>553. very minor editorial change intptr_t / uintptr_t</h3>
8783 <p><b>Section:</b> 18.3.1 [cstdint.syn], TR1 8.22.1 [tr.c99.cstdint.syn] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8784 <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-01-30</p>
8785 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8786 <p><b>Discussion:</b></p>
8788 In the synopsis, some types are identified as optional: int8_t, int16_t,
8789 and so on, consistently with C99, indeed.
8790 </p>
8792 On the other hand, intptr_t and uintptr_t, are not marked as such and
8793 probably should, consistently with C99, 7.18.1.4.
8794 </p>
8797 <p><b>Proposed resolution:</b></p>
8799 Change 18.3.1 [cstdint.syn]:
8800 </p>
8802 <blockquote><pre>...
8803 typedef <i>signed integer type</i> intptr_t; <ins><i>// optional</i></ins>
8805 typedef <i>unsigned integer type</i> uintptr_t; <ins><i>// optional</i></ins>
8807 </pre></blockquote>
8811 <p><b>Rationale:</b></p>
8812 Recommend NAD and fix as editorial with the proposed resolution.
8818 <hr>
8819 <h3><a name="554"></a>554. Problem with lwg DR 184 numeric_limits&lt;bool&gt;</h3>
8820 <p><b>Section:</b> 18.2.1.5 [numeric.special] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8821 <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-29</p>
8822 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.special">issues</a> in [numeric.special].</p>
8823 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
8824 <p><b>Discussion:</b></p>
8826 I believe we have a bug in the resolution of:
8827 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">lwg 184</a>
8828 (WP status).
8829 </p>
8832 The resolution spells out each member of <tt>numeric_limits&lt;bool&gt;</tt>.
8833 The part I'm having a little trouble with is:
8834 </p>
8835 <blockquote><pre>static const bool traps = false;
8836 </pre></blockquote>
8839 Should this not be implementation defined? Given:
8840 </p>
8842 <blockquote><pre>int main()
8844 bool b1 = true;
8845 bool b2 = false;
8846 bool b3 = b1/b2;
8848 </pre></blockquote>
8851 If this causes a trap, shouldn't <tt>numeric_limits&lt;bool&gt;::traps</tt> be
8852 <tt>true</tt>?
8853 </p>
8856 <p><b>Proposed resolution:</b></p>
8858 Change 18.2.1.5p3:
8859 </p>
8861 <blockquote><p>
8862 -3- The specialization for <tt>bool</tt> shall be provided as follows: </p>
8863 <blockquote><pre>namespace std {
8864 template &lt;&gt; class numeric_limits&lt;bool&gt; {
8866 static const bool traps = <del>false</del> <ins><i>implementation-defined</i></ins>;
8870 </pre></blockquote>
8871 </blockquote>
8873 <p><i>[
8874 Redmond: NAD because traps refers to values, not operations. There is no bool
8875 value that will trap.
8876 ]</i></p>
8884 <hr>
8885 <h3><a name="555"></a>555. TR1, 8.21/1: typo</h3>
8886 <p><b>Section:</b> TR1 8.21 [tr.c99.boolh] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
8887 <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-02</p>
8888 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
8889 <p><b>Discussion:</b></p>
8891 This one, if nobody noticed it yet, seems really editorial:
8892 s/cstbool/cstdbool/
8893 </p>
8896 <p><b>Proposed resolution:</b></p>
8898 Change 8.21p1:
8899 </p>
8900 <blockquote><p>
8901 -1- The header behaves as if it defines the additional macro defined in
8902 <tt>&lt;cst<ins>d</ins>bool&gt;</tt> by including the header <tt>&lt;cstdbool&gt;</tt>.
8903 </p></blockquote>
8905 <p><i>[
8906 Redmond: Editorial.
8907 ]</i></p>
8915 <hr>
8916 <h3><a name="557"></a>557. TR1: div(_Longlong, _Longlong) vs div(intmax_t, intmax_t)</h3>
8917 <p><b>Section:</b> 18.3 [cstdint], TR1 8.22 [tr.c99.cstdint] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
8918 <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-06</p>
8919 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#cstdint">issues</a> in [cstdint].</p>
8920 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
8921 <p><b>Discussion:</b></p>
8923 I'm seeing a problem with such overloads: when, _Longlong == intmax_t ==
8924 long long we end up, essentially, with the same arguments and different
8925 return types (lldiv_t and imaxdiv_t, respectively). Similar issue with
8926 abs(_Longlong) and abs(intmax_t), of course.
8927 </p>
8929 Comparing sections 8.25 and 8.11, I see an important difference,
8930 however: 8.25.3 and 8.25.4 carefully describe div and abs for _Longlong
8931 types (rightfully, because not moved over directly from C99), whereas
8932 there is no equivalent in 8.11: the abs and div overloads for intmax_t
8933 types appear only in the synopsis and are not described anywhere, in
8934 particular no mention in 8.11.2 (at variance with 8.25.2).
8935 </p>
8937 I'm wondering whether we really, really, want div and abs for intmax_t...
8938 </p>
8942 <p><b>Proposed resolution:</b></p>
8946 <p><i>[
8947 Portland: no consensus.
8948 ]</i></p>
8951 <p><b>Rationale:</b></p>
8952 <p><i>[
8953 Batavia, Bill: The <tt>&lt;cstdint&gt;</tt> synopsis in TR1 8.11.1 [tr.c99.cinttypes.syn] contains:
8954 ]</i></p>
8956 <blockquote><pre>intmax_t imaxabs(intmax_t i);
8957 intmax_t abs(intmax_t i);
8959 imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
8960 imaxdiv_t div(intmax_t numer, intmax_t denom);
8961 </pre></blockquote>
8963 <p><i>[
8964 and in TR1 8.11.2 [tr.c99.cinttypes.def]:
8965 ]</i></p>
8968 <blockquote><p>
8969 The header defines all functions, types, and macros the same as C99
8970 subclause 7.8.
8971 </p></blockquote>
8973 <p><i>[
8974 This is as much definition as we give for most other C99 functions,
8975 so nothing need change. We might, however, choose to add the footnote:
8976 ]</i></p>
8979 <blockquote><p>
8980 [<i>Note:</i> These overloads for <tt>abs</tt> and <tt>div</tt> may well be equivalent to
8981 those that take <tt>long long</tt> arguments. If so, the implementation is
8982 responsible for avoiding conflicting declarations. -- <i>end note</i>]
8983 </p></blockquote>
8985 <p><i>[
8986 Bellevue: NAD Editorial. Pete must add a footnote, as described below.
8987 ]</i></p>
8990 <blockquote>
8991 <p><i>[
8992 Looks like a real problem. Dietmar suggests div() return a template
8993 type. Matt: looks like imaxdiv_t is loosly defined. Can it be a typedef
8994 for lldiv_t when _Longlong == intmax_t? PJP seems to agree. We would
8995 need a non-normative note declaring that the types lldiv_t and imaxdiv_t
8996 may not be unique if intmax_t==_longlong.
8997 ]</i></p>
8999 </blockquote>
9006 <hr>
9007 <h3><a name="558"></a>558. lib.input.iterators Defect</h3>
9008 <p><b>Section:</b> 24.1.1 [input.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9009 <b>Submitter:</b> David Abrahams <b>Date:</b> 2006-02-09</p>
9010 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#input.iterators">issues</a> in [input.iterators].</p>
9011 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9012 <p><b>Discussion:</b></p>
9013 <blockquote>
9015 24.1.1 Input iterators [lib.input.iterators]
9016 </p>
9018 1 A class or a built-in type X satisfies the requirements of an
9019 input iterator for the value type T if the following expressions are
9020 valid, where U is the type of any specified member of type T, as
9021 shown in Table 73.
9022 </p>
9023 </blockquote>
9025 There is no capital U used in table 73. There is a lowercase u, but
9026 that is clearly not meant to denote a member of type T. Also, there's
9027 no description in 24.1.1 of what lowercase a means. IMO the above
9028 should have been...Hah, a and b are already covered in 24.1/11, so maybe it
9029 should have just been:
9030 </p>
9033 <p><b>Proposed resolution:</b></p>
9035 Change 24.1.1p1:
9036 </p>
9037 <blockquote><p>
9038 -1- A class or a built-in type <tt>X</tt> satisfies the requirements of an
9039 input iterator for the value type <tt>T</tt> if the following expressions
9040 are valid<del>, where <tt>U</tt> is the type of any specified member of type
9041 <tt>T</tt>,</del> as shown in Table 73.
9042 </p></blockquote>
9044 <p><i>[
9045 Portland: Editorial.
9046 ]</i></p>
9054 <hr>
9055 <h3><a name="560"></a>560. User-defined allocators without default constructor</h3>
9056 <p><b>Section:</b> 20.1.2 [allocator.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9057 <b>Submitter:</b> Sergey P. Derevyago <b>Date:</b> 2006-02-17</p>
9058 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#allocator.requirements">active issues</a> in [allocator.requirements].</p>
9059 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#allocator.requirements">issues</a> in [allocator.requirements].</p>
9060 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
9061 <p><b>Discussion:</b></p>
9062 <h4>1. The essence of the problem.</h4>
9064 User-defined allocators without default constructor are not explicitly
9065 supported by the standard but they can be supported just like std::vector
9066 supports elements without default constructor.
9067 </p>
9069 As a result, there exist implementations that work well with such allocators
9070 and implementations that don't.
9071 </p>
9073 <h4>2. The cause of the problem.</h4>
9075 1) The standard doesn't explicitly state this intent but it should. In
9076 particular, 20.1.5p5 explicitly state the intent w.r.t. the allocator
9077 instances that compare non-equal. So it can similarly state the intent w.r.t.
9078 the user-defined allocators without default constructor.
9079 </p>
9081 2) Some container operations are obviously underspecified. In particular,
9082 21.3.7.1p2 tells:
9083 </p>
9084 <blockquote><pre>template&lt;class charT, class traits, class Allocator&gt;
9085 basic_string&lt;charT,traits,Allocator&gt; operator+(
9086 const charT* lhs,
9087 const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs
9089 </pre>
9091 Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs) + rhs</tt>.
9092 </p>
9093 </blockquote>
9095 That leads to the basic_string&lt;charT,traits,Allocator&gt;(lhs, Allocator()) call.
9096 Obviously, the right requirement is:
9097 </p>
9098 <blockquote><p>
9099 Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs, rhs.get_allocator()) + rhs</tt>.
9100 </p></blockquote>
9102 It seems like a lot of DRs can be submitted on this "Absent call to
9103 get_allocator()" topic.
9104 </p>
9106 <h4>3. Proposed actions.</h4>
9108 1) Explicitly state the intent to allow for user-defined allocators without
9109 default constructor in 20.1.5 Allocator requirements.
9110 </p>
9112 2) Correct all the places, where a correct allocator object is available
9113 through the get_allocator() call but default Allocator() gets passed instead.
9114 </p>
9115 <h4>4. Code sample.</h4>
9117 Let's suppose that the following memory pool is available:
9118 </p>
9119 <blockquote><pre>class mem_pool {
9120 // ...
9121 void* allocate(size_t size);
9122 void deallocate(void* ptr, size_t size);
9124 </pre></blockquote>
9126 So the following allocator can be implemented via this pool:
9127 </p>
9128 <blockquote><pre>class stl_allocator {
9129 mem_pool&amp; pool;
9131 public:
9132 explicit stl_allocator(mem_pool&amp; mp) : pool(mp) {}
9133 stl_allocator(const stl_allocator&amp; sa) : pool(sa.pool) {}
9134 template &lt;class U&gt;
9135 stl_allocator(const stl_allocator&lt;U&gt;&amp; sa) : pool(sa.get_pool()) {}
9136 ~stl_allocator() {}
9138 pointer allocate(size_type n, std::allocator&lt;void&gt;::const_pointer = 0)
9140 return (n!=0) ? static_cast&lt;pointer&gt;(pool.allocate(n*sizeof(T))) : 0;
9143 void deallocate(pointer p, size_type n)
9145 if (n!=0) pool.deallocate(p, n*sizeof(T));
9148 // ...
9150 </pre></blockquote>
9152 Then the following code works well on some implementations and doesn't work on
9153 another:
9154 </p>
9155 <blockquote><pre>typedef basic_string&lt;char, char_traits&lt;char&gt;, stl_allocator&lt;char&gt; &gt;
9156 tl_string;
9157 mem_pool mp;
9158 tl_string s1("abc", stl_allocator&lt;int&gt;(mp));
9159 printf("(%s)\n", ("def"+s1).c_str());
9160 </pre></blockquote>
9162 In particular, on some implementations the code can't be compiled without
9163 default stl_allocator() constructor.
9164 </p>
9166 The obvious way to solve the compile-time problems is to intentionally define
9167 a NULL pointer dereferencing default constructor
9168 </p>
9169 <blockquote><pre>stl_allocator() : pool(*static_cast&lt;mem_pool*&gt;(0)) {}
9170 </pre></blockquote>
9172 in a hope that it will not be called. The problem is that it really gets
9173 called by operator+(const char*, const string&amp;) under the current 21.3.7.1p2
9174 wording.
9175 </p>
9178 <p><b>Proposed resolution:</b></p>
9180 </p>
9183 <p><b>Rationale:</b></p>
9185 Recommend NAD. <tt>operator+()</tt> with <tt>string</tt> already requires the desired
9186 semantics of copying the allocator from one of the strings (<i>lhs</i> when there is a choice).
9187 </p>
9193 <hr>
9194 <h3><a name="569"></a>569. Postcondition for basic_ios::clear(iostate) incorrectly stated</h3>
9195 <p><b>Section:</b> 27.4.4.3 [iostate.flags] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
9196 <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 2006-03-10</p>
9197 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostate.flags">issues</a> in [iostate.flags].</p>
9198 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
9199 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a></p>
9200 <p><b>Discussion:</b></p>
9202 Section: 27.4.4.3 [lib.iostate.flags]
9203 </p>
9205 Paragraph 4 says:
9206 </p>
9207 <blockquote>
9208 <blockquote><pre>void clear(iostate <i>state</i> = goodbit);
9209 </pre></blockquote>
9211 <i>Postcondition:</i> If <tt>rdbuf()!=0</tt> then <tt><i>state</i> == rdstate();</tt>
9212 otherwise <tt>rdstate()==<i>state</i>|ios_base::badbit</tt>.
9213 </p>
9214 </blockquote>
9217 The postcondition "rdstate()==state|ios_base::badbit" is parsed as
9218 "(rdstate()==state)|ios_base::badbit", which is probably what the
9219 committee meant.
9220 </p>
9225 <p><b>Rationale:</b></p>
9232 <hr>
9233 <h3><a name="571"></a>571. Update C90 references to C99?</h3>
9234 <p><b>Section:</b> 1.2 [intro.refs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9235 <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-04-08</p>
9236 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#intro.refs">issues</a> in [intro.refs].</p>
9237 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9238 <p><b>Discussion:</b></p>
9240 1.2 Normative references [intro.refs] of the WP currently refers to ISO/IEC
9241 9899:1990, Programming languages - C. Should that be changed to ISO/IEC
9242 9899:1999?
9243 </p>
9245 What impact does this have on the library?
9246 </p>
9249 <p><b>Proposed resolution:</b></p>
9251 In 1.2/1 [intro.refs] of the WP, change:
9252 </p>
9253 <blockquote>
9254 <ul>
9255 <li>ISO/IEC 9899:<del>1990</del><ins>1999 + TC1 + TC2</ins>, <i>Programming languages - C</i></li>
9256 </ul>
9257 </blockquote>
9261 <p><b>Rationale:</b></p>
9262 Recommend NAD, fixed editorially.
9268 <hr>
9269 <h3><a name="572"></a>572. Oops, we gave 507 WP status</h3>
9270 <p><b>Section:</b> 26.4 [rand], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9271 <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-04-11</p>
9272 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand">issues</a> in [rand].</p>
9273 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
9274 <p><b>Discussion:</b></p>
9276 In Berlin, as a working group, we voted in favor of N1932 which makes issue 507 moot:
9277 variate_generator has been eliminated. Then in full committee we voted to give
9278 this issue WP status (mistakenly).
9279 </p>
9282 <p><b>Proposed resolution:</b></p>
9284 Strike the proposed resolution of issue 507.
9285 </p>
9286 <p><i>[
9287 post-Portland: Walter and Howard recommend NAD. The proposed resolution of 507 no longer
9288 exists in the current WD.
9289 ]</i></p>
9293 <p><b>Rationale:</b></p>
9295 NAD. Will be moot once
9296 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2135.pdf">N2135</a>
9297 is adopted.
9298 </p>
9304 <hr>
9305 <h3><a name="579"></a>579. erase(iterator) for unordered containers should not return an iterator</h3>
9306 <p><b>Section:</b> 23.1.3 [unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9307 <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2006-06-13</p>
9308 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord.req">issues</a> in [unord.req].</p>
9309 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
9310 <p><b>Discussion:</b></p>
9313 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
9314 for full discussion.
9315 </p>
9318 <p><b>Proposed resolution:</b></p>
9320 Option 1:
9321 </p>
9324 The problem can be eliminated by omitting the requirement that <tt>a.erase(q)</tt> return an
9325 iterator. This is, however, in contrast with the equivalent requirements for other
9326 standard containers.
9327 </p>
9330 Option 2:
9331 </p>
9334 <tt>a.erase(q)</tt> can be made to compute the next iterator only when explicitly requested:
9335 the technique consists in returning a proxy object implicitly convertible to <tt>iterator</tt>, so
9336 that
9337 </p>
9339 <blockquote><pre>iterator q1=a.erase(q);
9340 </pre></blockquote>
9343 works as expected, while
9344 </p>
9346 <blockquote><pre>a.erase(q);
9347 </pre></blockquote>
9350 does not ever invoke the conversion-to-iterator operator, thus avoiding the associated
9351 computation. To allow this technique, some sections of TR1 along the line "return value
9352 is an iterator..." should be changed to "return value is an unspecified object implicitly
9353 convertible to an iterator..." Although this trick is expected to work transparently, it can
9354 have some collateral effects when the expression <tt>a.erase(q)</tt> is used inside generic
9355 code.
9356 </p>
9360 <p><b>Rationale:</b></p>
9362 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
9363 was discussed in Portland and the consensus was that there appears to be
9364 no need for either change proposed in the paper. The consensus opinion
9365 was that since the iterator could serve as its own proxy, there appears
9366 to be no need for the change. In general, "converts to" is undesirable
9367 because it interferes with template matching.
9368 </p>
9371 Post Toronto: There does not at this time appear to be consensus with the Portland consensus.
9372 </p>
9374 <p><i>[
9375 Bellevue:
9376 ]</i></p>
9379 <blockquote>
9380 The Bellevue review of this issue reached consensus with the Portland
9381 consensus, in contravention of the Toronto non-consensus. Common
9382 implementations have the iterator readily available, and most common
9383 uses depend on the iterator being returned.
9384 </blockquote>
9391 <hr>
9392 <h3><a name="583"></a>583. div() for unsigned integral types</h3>
9393 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9394 <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p>
9395 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
9396 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
9397 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
9398 <p><b>Discussion:</b></p>
9400 There is no div() function for unsigned integer types.
9401 </p>
9403 There are several possible resolutions. The simplest one is noted below. Other
9404 possibilities include a templated solution.
9405 </p>
9408 <p><b>Proposed resolution:</b></p>
9410 Add to 26.7 [lib.c.math] paragraph 8:
9411 </p>
9413 <blockquote><pre>struct udiv_t div(unsigned, unsigned);
9414 struct uldiv_t div(unsigned long, unsigned long);
9415 struct ulldiv_t div(unsigned long long, unsigned long long);
9416 </pre></blockquote>
9420 <p><b>Rationale:</b></p>
9421 Toronto: C99 does not have these unsigned versions because
9422 the signed version exist just to define the implementation-defined behavior
9423 of signed integer division. Unsigned integer division has no implementation-defined
9424 behavior and thus does not need this treatment.
9430 <hr>
9431 <h3><a name="584"></a>584. missing int pow(int,int) functionality</h3>
9432 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9433 <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p>
9434 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
9435 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
9436 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
9437 <p><b>Discussion:</b></p>
9439 There is no pow() function for any integral type.
9440 </p>
9443 <p><b>Proposed resolution:</b></p>
9445 Add something like:
9446 </p>
9448 <blockquote><pre>template&lt; typename T&gt;
9449 T power( T x, int n );
9450 // requires: n &gt;=0
9451 </pre></blockquote>
9454 <p><b>Rationale:</b></p>
9455 Toronto: We already have double pow(integral, integral) from 26.7 [c.math] p11.
9461 <hr>
9462 <h3><a name="587"></a>587. iststream ctor missing description</h3>
9463 <p><b>Section:</b> D.7.2.1 [depr.istrstream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9464 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-22</p>
9465 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9466 <p><b>Discussion:</b></p>
9469 The <code>iststream(char*, streamsize)</code> ctor is in the class
9470 synopsis in D.7.2 but its signature is missing in the description
9471 below (in D.7.2.1).
9473 </p>
9476 <p><b>Proposed resolution:</b></p>
9479 This seems like a simple editorial issue and the missing signature can
9480 be added to the one for <code>const char*</code> in paragraph 2.
9482 </p>
9484 <p><i>[
9485 post Oxford: Noted that it is already fixed in
9486 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
9487 ]</i></p>
9494 <hr>
9495 <h3><a name="590"></a>590. Type traits implementation latitude should be removed for C++0x</h3>
9496 <p><b>Section:</b> 20.4 [meta], TR1 4.9 [tr.meta.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9497 <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-08-10</p>
9498 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta">issues</a> in [meta].</p>
9499 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9500 <p><b>Discussion:</b></p>
9502 20.4.9 [lib.meta.req], Implementation requirements, provides latitude for type
9503 traits implementers that is not needed in C++0x. It includes the wording:
9504 </p>
9506 <blockquote><p>
9507 [<i>Note:</i> the latitude granted to implementers in this clause is temporary,
9508 and is expected to be removed in future revisions of this document. -- <i>end note</i>]
9509 </p></blockquote>
9512 Note:
9513 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">N2157: Minor Modifications to the type traits Wording</a>
9514 also has the intent of removing this wording from the WP.
9515 </p>
9519 <p><b>Proposed resolution:</b></p>
9521 Remove 20.4.9 [lib.meta.req] in its entirety from the WP.
9522 </p>
9524 <p><i>[
9525 post-Oxford: Recommend NAD Editorial. This resolution is now in the
9526 current working draft.
9527 ]</i></p>
9535 <hr>
9536 <h3><a name="591"></a>591. Misleading "built-in</h3>
9537 <p><b>Section:</b> 18.2.1.2 [numeric.limits.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9538 <b>Submitter:</b> whyglinux <b>Date:</b> 2006-08-08</p>
9539 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#numeric.limits.members">issues</a> in [numeric.limits.members].</p>
9540 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9541 <p><b>Discussion:</b></p>
9543 18.2.1.2 numeric_limits members [lib.numeric.limits.members]
9544 Paragraph 7:
9545 </p>
9546 <blockquote><p>
9547 "For built-in integer types, the number of non-sign bits in the
9548 representation."
9549 </p></blockquote>
9552 26.1 Numeric type requirements [lib.numeric.requirements]
9553 Footnote:
9554 </p>
9556 <blockquote><p>
9557 "In other words, value types. These include built-in arithmetic types,
9558 pointers, the library class complex, and instantiations of valarray for
9559 value types."
9560 </p></blockquote>
9563 Integer types (which are bool, char, wchar_t, and the signed and
9564 unsigned integer types) and arithmetic types (which are integer and
9565 floating types) are all built-in types and thus there are no
9566 non-built-in (that is, user-defined) integer or arithmetic types. Since
9567 the redundant "built-in" in the above 2 sentences can mislead that
9568 there may be built-in or user-defined integer and arithmetic types
9569 (which is not correct), the "built-in" should be removed.
9570 </p>
9573 <p><b>Proposed resolution:</b></p>
9575 18.2.1.2 numeric_limits members [lib.numeric.limits.members]
9576 Paragraph 7:
9577 </p>
9578 <blockquote><p>
9579 "For <del>built-in</del> integer types, the number of non-sign bits in the
9580 representation."
9581 </p></blockquote>
9584 26.1 Numeric type requirements [lib.numeric.requirements]
9585 Footnote:
9586 </p>
9588 <blockquote><p>
9589 "In other words, value types. These include <del>built-in</del> arithmetic types,
9590 pointers, the library class complex, and instantiations of valarray for
9591 value types."
9592 </p></blockquote>
9595 <p><b>Rationale:</b></p>
9597 Recommend NAD / Editorial. The proposed resolution is accepted as editorial.
9598 </p>
9604 <hr>
9605 <h3><a name="592"></a>592. Incorrect treatment of rdbuf()-&gt;close() return type</h3>
9606 <p><b>Section:</b> 27.8.1.9 [ifstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
9607 <b>Submitter:</b> Christopher Kohlhoff <b>Date:</b> 2006-08-17</p>
9608 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ifstream.members">issues</a> in [ifstream.members].</p>
9609 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
9610 <p><b>Discussion:</b></p>
9612 I just spotted a minor problem in 27.8.1.7
9613 [lib.ifstream.members] para 4 and also 27.8.1.13
9614 [lib.fstream.members] para 4. In both places it says:
9615 </p>
9616 <blockquote>
9617 <pre>void close();
9618 </pre>
9620 Effects: Calls rdbuf()-&gt;close() and, if that function returns false, ...
9621 </p>
9622 </blockquote>
9624 However, basic_filebuf::close() (27.8.1.2) returns a pointer to the
9625 filebuf on success, null on failure, so I think it is meant to
9626 say "if that function returns a null pointer". Oddly, it is
9627 correct for basic_ofstream.
9628 </p>
9631 <p><b>Proposed resolution:</b></p>
9633 Change 27.8.1.9 [ifstream.members], p5:
9634 </p>
9636 <blockquote><p>
9637 <i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
9638 <ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
9639 calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
9640 (27.4.4.3)).
9641 </p></blockquote>
9644 Change 27.8.1.17 [fstream.members], p5:
9645 </p>
9647 <blockquote><p>
9648 <i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
9649 <ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
9650 calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
9651 (27.4.4.3)).
9652 </p></blockquote>
9656 <p><i>[
9657 Kona (2007): Proposed Disposition: NAD, Editorial
9658 ]</i></p>
9664 <hr>
9665 <h3><a name="594"></a>594. Disadvantages of defining Swappable in terms of CopyConstructible and Assignable</h3>
9666 <p><b>Section:</b> 20.1.1 [utility.arg.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
9667 <b>Submitter:</b> Niels Dekker <b>Date:</b> 2006-11-02</p>
9668 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#utility.arg.requirements">active issues</a> in [utility.arg.requirements].</p>
9669 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#utility.arg.requirements">issues</a> in [utility.arg.requirements].</p>
9670 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
9671 <p><b>Discussion:</b></p>
9673 It seems undesirable to define the Swappable requirement in terms of
9674 CopyConstructible and Assignable requirements. And likewise, once the
9675 MoveConstructible and MoveAssignable requirements (N1860) have made it
9676 into the Working Draft, it seems undesirable to define the Swappable
9677 requirement in terms of those requirements. Instead, it appears
9678 preferable to have the Swappable requirement defined exclusively in
9679 terms of the existence of an appropriate swap function.
9680 </p>
9682 Section 20.1.4 [lib.swappable] of the current Working Draft (N2009)
9683 says:
9684 </p>
9685 <blockquote><p>
9686 The Swappable requirement is met by satisfying one or more of the
9687 following conditions:</p>
9688 <ul>
9689 <li>
9690 T is Swappable if T satisfies the CopyConstructible requirements
9691 (20.1.3) and the Assignable requirements (23.1);
9692 </li>
9693 <li>
9694 T is Swappable if a namespace scope function named swap exists in the
9695 same namespace as the definition of T, such that the expression
9696 swap(t,u) is valid and has the semantics described in Table 33.
9697 </li>
9698 </ul>
9699 </blockquote>
9700 I can think of three disadvantages of this definition:
9701 <ol>
9702 <li>
9703 If a client's type T satisfies the first condition (T is both
9704 CopyConstructible and Assignable), the client cannot stop T from
9705 satisfying the Swappable requirement without stopping T from
9706 satisfying the first condition.
9708 A client might want to stop T from satisfying the Swappable
9709 requirement, because swapping by means of copy construction and
9710 assignment might throw an exception, and she might find a throwing
9711 swap unacceptable for her type. On the other hand, she might not feel
9712 the need to fully implement her own swap function for this type. In
9713 this case she would want to be able to simply prevent algorithms that
9714 would swap objects of type T from being used, e.g., by declaring a
9715 swap function for T, and leaving this function purposely undefined.
9716 This would trigger a link error, if an attempt would be made to use
9717 such an algorithm for this type. For most standard library
9718 implementations, this practice would indeed have the effect of
9719 stopping T from satisfying the Swappable requirement.
9720 </p>
9721 </li>
9722 <li>
9723 A client's type T that does not satisfy the first condition can not be
9724 made Swappable by providing a specialization of std::swap for T.
9726 While I'm aware about the fact that people have mixed feelings about
9727 providing a specialization of std::swap, it is well-defined to do so.
9728 It sounds rather counter-intuitive to say that T is not Swappable, if
9729 it has a valid and semantically correct specialization of std::swap.
9730 Also in practice, providing such a specialization will have the same
9731 effect as satisfying the Swappable requirement.
9732 </p>
9733 </li>
9734 <li>
9735 For a client's type T that satisfies both conditions of the Swappable
9736 requirement, it is not specified which of the two conditions prevails.
9737 After reading section 20.1.4 [lib.swappable], one might wonder whether
9738 objects of T will be swapped by doing copy construction and
9739 assignments, or by calling the swap function of T.
9741 I'm aware that the intention of the Draft is to prefer calling the
9742 swap function of T over doing copy construction and assignments. Still
9743 in my opinion, it would be better to make this clear in the wording of
9744 the definition of Swappable.
9745 </p>
9746 </li>
9747 </ol>
9749 I would like to have the Swappable requirement defined in such a way
9750 that the following code fragment will correctly swap two objects of a
9751 type T, if and only if T is Swappable:
9752 </p>
9753 <pre> using std::swap;
9754 swap(t, u); // t and u are of type T.
9755 </pre>
9757 This is also the way Scott Meyers recommends calling a swap function,
9758 in Effective C++, Third Edition, item 25.
9759 </p>
9761 Most aspects of this issue have been dealt with in a discussion on
9762 comp.std.c++ about the Swappable requirement, from 13 September to 4
9763 October 2006, including valuable input by David Abrahams, Pete Becker,
9764 Greg Herlihy, Howard Hinnant and others.
9765 </p>
9767 <p><b>Proposed resolution:</b></p>
9769 Change section 20.1.4 [lib.swappable] as follows:
9770 </p>
9771 <blockquote><p>
9772 The Swappable requirement is met by satisfying
9773 <del>one or more of the following conditions:</del>
9774 <ins>the following condition:</ins></p>
9775 <ul>
9777 <li>
9778 <del>T is Swappable if T satisfies the CopyConstructible requirements
9779 (20.1.3) and the Assignable requirements (23.1);</del>
9780 </li>
9781 <li>
9782 <del>
9783 T is Swappable if a namespace scope function named swap exists in the
9784 same namespace as the definition of T, such that the expression
9785 swap(t,u) is valid and has the semantics described in Table 33.
9786 </del>
9787 T is Swappable if an unqualified function call swap(t,u) is valid
9788 within the namespace std, and has the semantics described in Table 33.
9789 </li>
9790 </ul>
9791 </blockquote>
9794 <p><b>Rationale:</b></p>
9796 Recommend NAD. Concepts, specifically
9797 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2082.pdf">N2082</a>
9799 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2084.pdf">N2084</a>,
9800 will essentially rewrite this section and provide the desired semantics.
9801 </p>
9807 <hr>
9808 <h3><a name="615"></a>615. Inconsistencies in Section 21.4</h3>
9809 <p><b>Section:</b> 21.5 [c.strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9810 <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-11</p>
9811 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.strings">issues</a> in [c.strings].</p>
9812 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9813 <p><b>Discussion:</b></p>
9815 In the current draft N2134, 21.4/1 says
9816 </p>
9818 "Tables 59,228) 60, 61, 62,and 63 229) 230) describe headers &lt;cctype&gt;,
9819 &lt;cwctype&gt;, &lt;cstring&gt;, &lt;cwchar&gt;, and &lt;cstdlib&gt; (character conversions),
9820 respectively."
9821 </p>
9823 Here footnote 229 applies to table 62, not table 63.
9824 </p>
9826 Also, footnote 230 lists the new functions in table 63, "atoll, strtoll,
9827 strtoull, strtof, and strtold added by TR1". However, strtof is not present
9828 in table 63.
9829 </p>
9832 <p><b>Proposed resolution:</b></p>
9834 </p>
9837 <p><b>Rationale:</b></p>
9839 Recommend NAD, editorial. Send to Pete.
9840 </p>
9846 <hr>
9847 <h3><a name="625"></a>625. mixed up <i>Effects</i> and <i>Returns</i> clauses</h3>
9848 <p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
9849 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
9850 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#library">issues</a> in [library].</p>
9851 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
9852 <p><b>Discussion:</b></p>
9855 Many member functions of <code>basic_string</code> are overloaded,
9856 with some of the overloads taking a <code>string</code> argument,
9857 others <code>value_type*</code>, others <code>size_type</code>, and
9858 others still <code>iterators</code>. Often, the requirements on one of
9859 the overloads are expressed in the form of <i>Effects</i>,
9860 <i>Throws</i>, and in the Working Paper
9861 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
9862 also <i>Remark</i> clauses, while those on the rest of the overloads
9863 via a reference to this overload and using a <i>Returns</i> clause.
9865 </p><p>
9866 </p>
9868 The difference between the two forms of specification is that per
9869 17.3.1.3 [structure.specifications], p3, an <i>Effects</i> clause specifies
9870 <i>"actions performed by the functions,"</i> i.e., its observable
9871 effects, while a <i>Returns</i> clause is <i>"a description of the
9872 return value(s) of a function"</i> that does not impose any
9873 requirements on the function's observable effects.
9876 </p>
9878 Since only <i>Notes</i> are explicitly defined to be informative and
9879 all other paragraphs are explicitly defined to be normative, like
9880 <i>Effects</i> and <i>Returns</i>, the new <i>Remark</i> clauses also
9881 impose normative requirements.
9884 </p>
9886 So by this strict reading of the standard there are some member
9887 functions of <code>basic_string</code> that are required to throw an
9888 exception under some conditions or use specific traits members while
9889 many other otherwise equivalent overloads, while obliged to return the
9890 same values, aren't required to follow the exact same requirements
9891 with regards to the observable effects.
9894 </p>
9896 Here's an example of this problem that was precipitated by the change
9897 from informative Notes to normative <i>Remark</i>s (presumably made to
9898 address <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#424">424</a>):
9901 </p>
9903 In the Working Paper, <code>find(string, size_type)</code> contains a
9904 <i>Remark</i> clause (which is just a <i>Note</i> in the current
9905 standard) requiring it to use <code>traits::eq()</code>.
9908 </p>
9910 <code>find(const charT *s, size_type pos)</code> is specified to
9911 return <code>find(string(s), pos)</code> by a <i>Returns</i> clause
9912 and so it is not required to use <code>traits::eq()</code>. However,
9913 the Working Paper has replaced the original informative <i>Note</i>
9914 about the function using <code>traits::length()</code> with a
9915 normative requirement in the form of a <i>Remark</i>. Calling
9916 <code>traits::length()</code> may be suboptimal, for example when the
9917 argument is a very long array whose initial substring doesn't appear
9918 anywhere in <code>*this</code>.
9921 </p>
9923 Here's another similar example, one that existed even prior to the
9924 introduction of <i>Remark</i>s:
9927 </p>
9929 <code> insert(size_type pos, string, size_type, size_type)</code> is
9930 required to throw <code>out_of_range</code> if <code>pos &gt;
9931 size()</code>.
9934 </p>
9936 <code>insert(size_type pos, string str)</code> is specified to return
9937 <code>insert(pos, str, 0, npos)</code> by a <i>Returns</i> clause and
9938 so its effects when <code>pos &gt; size()</code> are strictly speaking
9939 unspecified.
9944 I believe a careful review of the current <i>Effects</i> and
9945 <i>Returns</i> clauses is needed in order to identify all such
9946 problematic cases. In addition, a review of the Working Paper should
9947 be done to make sure that the newly introduced normative <i>Remark</i>
9948 clauses do not impose any undesirable normative requirements in place
9949 of the original informative <i>Notes</i>.
9951 </p>
9952 <p><i>[
9953 Batavia: Alan and Pete to work.
9954 ]</i></p>
9957 <p><i>[
9958 Bellevue: Marked as NAD Editorial.
9959 ]</i></p>
9964 <p><b>Proposed resolution:</b></p>
9966 </p>
9972 <hr>
9973 <h3><a name="626"></a>626. new <i>Remark</i> clauses not documented</h3>
9974 <p><b>Section:</b> 17.3.1.3 [structure.specifications] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
9975 <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
9976 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#structure.specifications">issues</a> in [structure.specifications].</p>
9977 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
9978 <p><b>Discussion:</b></p>
9981 The <i>Remark</i> clauses newly introduced into the Working Paper
9982 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
9983 are not mentioned in 17.3.1.3 [structure.specifications] where we list the
9984 meaning of <i>Effects</i>, <i>Requires</i>, and other clauses (with
9985 the exception of <i>Notes</i> which are documented as informative in
9986 17.3.1.1 [structure.summary], p2, and which they replace in many cases).
9988 </p>
9991 Propose add a bullet for <i>Remarks</i> along with a brief description.
9993 </p>
9994 <p><i>[
9995 Batavia: Alan and Pete to work.
9996 ]</i></p>
9999 <p><i>[
10000 Bellevue: Already resolved in current working paper.
10001 ]</i></p>
10005 <p><b>Proposed resolution:</b></p>
10007 </p>
10013 <hr>
10014 <h3><a name="627"></a>627. Low memory and exceptions</h3>
10015 <p><b>Section:</b> 18.5.1.1 [new.delete.single] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
10016 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2007-01-23</p>
10017 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#new.delete.single">issues</a> in [new.delete.single].</p>
10018 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
10019 <p><b>Discussion:</b></p>
10021 I recognize the need for nothrow guarantees in the exception reporting
10022 mechanism, but I strongly believe that implementors also need an escape hatch
10023 when memory gets really low. (Like, there's not enough heap to construct and
10024 copy exception objects, or not enough stack to process the throw.) I'd like to
10025 think we can put this escape hatch in 18.5.1.1 [new.delete.single],
10026 <tt>operator new</tt>, but I'm not sure how to do it. We need more than a
10027 footnote, but the wording has to be a bit vague. The idea is that if
10028 <tt>new</tt> can't allocate something sufficiently small, it has the right to
10029 <tt>abort</tt>/call <tt>terminate</tt>/call <tt>unexpected</tt>.
10030 </p>
10032 <p><i>[
10033 Bellevue: NAD. 1.4p2 specifies a program must behave correctly "within
10034 its resource limits", so no further escape hatch is necessary.
10035 ]</i></p>
10039 <p><b>Proposed resolution:</b></p>
10041 </p>
10047 <hr>
10048 <h3><a name="633"></a>633. Return clause mentions undefined "type()"</h3>
10049 <p><b>Section:</b> 20.5.15.2.5 [func.wrap.func.targ] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10050 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-03</p>
10051 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10052 <p><b>Discussion:</b></p>
10054 20.5.15.2.5 [func.wrap.func.targ], p4 says:
10055 </p>
10056 <blockquote><p>
10057 <i>Returns:</i> If <tt>type() == typeid(T)</tt>, a pointer to the stored
10058 function target; otherwise a null pointer.
10059 </p></blockquote>
10061 <ol>
10062 <li>
10063 There exists neither a type, a typedef <tt>type</tt>, nor member
10064 function <tt>type()</tt> in class template function nor in the global or
10065 <tt>std</tt> namespace.
10066 </li>
10067 <li>
10068 Assuming that <tt>type</tt> should have been <tt>target_type()</tt>,
10069 this description would lead to false results, if <tt>T = <i>cv</i>
10070 void</tt> due to returns clause 20.5.15.2.5 [func.wrap.func.targ], p1.
10071 </li>
10072 </ol>
10076 <p><b>Proposed resolution:</b></p>
10078 Change 20.5.15.2.5 [func.wrap.func.targ], p4:
10079 </p>
10081 <blockquote><p>
10082 <i>Returns:</i> If <tt><del>type()</del> <ins>target_type()</ins> == typeid(T) <ins>&amp;&amp; typeid(T) !=
10083 typeid(void)</ins></tt>, a pointer to the stored function target;
10084 otherwise a null pointer.
10085 </p></blockquote>
10087 <p><i>[
10088 Pete: Agreed. It's editorial, so I'll fix it.
10089 ]</i></p>
10097 <hr>
10098 <h3><a name="636"></a>636. 26.5.2.3 valarray::operator[]</h3>
10099 <p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10100 <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-11</p>
10101 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
10102 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10103 <p><b>Discussion:</b></p>
10105 The signature of the const operator[] has been changed to return a const
10106 reference.
10107 </p>
10109 The description in paragraph 1 still says that the operator returns by
10110 value.
10111 </p>
10112 <p><i>[
10113 Pete recommends editorial fix.
10114 ]</i></p>
10118 <p><b>Proposed resolution:</b></p>
10120 </p>
10126 <hr>
10127 <h3><a name="637"></a>637. [c.math]/10 inconsistent return values</h3>
10128 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10129 <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-13</p>
10130 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
10131 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
10132 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10133 <p><b>Discussion:</b></p>
10135 26.7 [c.math], paragraph 10 has long lists of added signatures for float and long double
10136 functions. All the signatures have float/long double return values, which is
10137 inconsistent with some of the double functions they are supposed to
10138 overload.
10139 </p>
10142 <p><b>Proposed resolution:</b></p>
10144 Change 26.7 [c.math], paragraph 10,
10145 </p>
10147 <blockquote><pre><del>float</del> <ins>int</ins> ilogb(float);
10148 <del>float</del> <ins>long</ins> lrint(float);
10149 <del>float</del> <ins>long</ins> lround(float);
10150 <del>float</del> <ins>long long</ins> llrint(float);
10151 <del>float</del> <ins>long long</ins> llround(float);
10153 <del>long double</del> <ins>int</ins> ilogb(long double);
10154 <del>long double</del> <ins>long</ins> lrint(long double);
10155 <del>long double</del> <ins>long</ins> lround(long double);
10156 <del>long double</del> <ins>long long</ins> llrint(long double);
10157 <del>long double</del> <ins>long long</ins> llround(long double);
10158 </pre></blockquote>
10164 <hr>
10165 <h3><a name="639"></a>639. Still problems with exceptions during streambuf IO</h3>
10166 <p><b>Section:</b> 27.6.1.2.3 [istream::extractors], 27.6.2.6.3 [ostream.inserters] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
10167 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-17</p>
10168 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream::extractors">issues</a> in [istream::extractors].</p>
10169 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
10170 <p><b>Discussion:</b></p>
10172 There already exist two active DR's for the wording of 27.6.1.2.3 [istream::extractors]/13
10173 from 14882:2003(E), namely <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#413">413</a>.
10174 </p>
10177 Even with these proposed corrections, already maintained in N2134,
10178 I have the feeling, that the current wording does still not properly
10179 handle the "exceptional" situation. The combination of para 14
10180 </p>
10182 <blockquote><p>
10183 "[..] Characters are extracted and inserted until
10184 any of the following occurs:
10185 </p>
10187 [..]
10188 </p>
10190 - an exception occurs (in which case the exception is caught)."
10191 </p></blockquote>
10194 and 15
10195 </p>
10197 <blockquote><p>
10198 "If the function inserts no characters, it calls setstate(failbit),
10199 which
10200 may throw ios_base::failure (27.4.4.3). If it inserted no characters
10201 because it caught an exception thrown while extracting characters
10202 from *this and failbit is on in exceptions() (27.4.4.3), then the
10203 caught
10204 exception is rethrown."
10205 </p></blockquote>
10208 both in N2134 seems to imply that any exception, which occurs
10209 *after* at least one character has been inserted is caught and lost
10211 ever. It seems that even if failbit is on in exceptions() rethrow is
10213 allowed due to the wording "If it inserted no characters because it
10214 caught an exception thrown while extracting".
10215 </p>
10218 Is this behaviour by design?
10219 </p>
10222 I would like to add that its output counterpart in 27.6.2.6.3 [ostream.inserters]/7-9
10223 (also
10224 N2134) does not demonstrate such an exception-loss-behaviour.
10225 On the other side, I wonder concerning several subtle differences
10226 compared to input::
10227 </p>
10229 1) Paragraph 8 says at its end:
10230 </p>
10232 <blockquote><p>
10233 "- an exception occurs while getting a character from sb."
10234 </p></blockquote>
10237 Note that there is nothing mentioned which would imply that such
10238 an exception will be caught compared to 27.6.1.2.3 [istream::extractors]/14.
10239 </p>
10242 2) Paragraph 9 says:
10243 </p>
10245 <blockquote><p>
10246 "If the function inserts no characters, it calls setstate(failbit)
10247 (which
10248 may throw ios_base::failure (27.4.4.3)). If an exception was thrown
10249 while extracting a character, the function sets failbit in error
10250 state,
10251 and if failbit is on in exceptions() the caught exception is
10252 rethrown."
10253 </p></blockquote>
10256 The sentence starting with "If an exception was thrown" seems to
10257 imply that such an exception *should* be caught before.
10258 </p>
10261 <p><b>Proposed resolution:</b></p>
10263 (a) In 27.6.1.2.3 [istream::extractors]/15 (N2134) change the sentence
10264 </p>
10266 <blockquote><p>
10267 If the function inserts no characters, it calls
10268 <tt>setstate(failbit)</tt>, which may throw <tt>ios_base::failure</tt>
10269 (27.4.4.3). If <del>it inserted no characters because it caught an
10270 exception thrown while extracting characters from <tt>*this</tt></del>
10271 <ins>an exception was thrown while extracting a character from
10272 <tt>*this</tt>, the function sets <tt>failbit</tt> in error state,</ins>
10273 and <tt>failbit</tt> is on in <tt>exceptions()</tt> (27.4.4.3), then the
10274 caught exception is rethrown.
10275 </p></blockquote>
10278 (b) In 27.6.2.6.3 [ostream.inserters]/8 (N2134) change the sentence:
10279 </p>
10281 <blockquote>
10283 Gets characters from <tt>sb</tt> and inserts them in <tt>*this</tt>.
10284 Characters are read from <tt>sb</tt> and inserted until any of the
10285 following occurs:
10286 </p>
10287 <ul>
10288 <li>end-of-file occurs on the input sequence;</li>
10289 <li>inserting in the output sequence fails (in which case the character to be inserted is not extracted);</li>
10290 <li>an exception occurs while getting a character from <tt>sb</tt> <ins>(in which
10291 case the exception is caught)</ins>.</li>
10292 </ul>
10293 </blockquote>
10297 <p><b>Rationale:</b></p>
10298 This extractor is described as a formatted input function so the
10299 exception behavior is already specified. There is additional behavior
10300 described in this section that applies to the case in which failbit is
10301 set. This doesn't contradict the usual exception behavior for formatted
10302 input functions because that applies to the case in which badbit is set.
10308 <hr>
10309 <h3><a name="641"></a>641. Editorial fix for 27.6.4 (N2134)</h3>
10310 <p><b>Section:</b> 27.6.4 [ext.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10311 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-18</p>
10312 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ext.manip">active issues</a> in [ext.manip].</p>
10313 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ext.manip">issues</a> in [ext.manip].</p>
10314 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10315 <p><b>Discussion:</b></p>
10317 The function <tt>f</tt> in para 4 (27.6.4 [ext.manip]) references an unknown <tt>strm</tt>
10318 in the following line:
10319 </p>
10321 <blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, strm, err, mon);
10322 </pre></blockquote>
10325 <p><b>Proposed resolution:</b></p>
10327 Change 27.6.4 [ext.manip], p4:
10328 </p>
10330 <blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, str<del>m</del>, err, mon);
10331 </pre></blockquote>
10333 <p><i>[
10334 Oxford: Editorial.
10335 ]</i></p>
10343 <hr>
10344 <h3><a name="642"></a>642. Invalidated fstream footnotes in N2134</h3>
10345 <p><b>Section:</b> 27.8.1.9 [ifstream.members], 27.8.1.13 [ofstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10346 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-20</p>
10347 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ifstream.members">issues</a> in [ifstream.members].</p>
10348 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10349 <p><b>Discussion:</b></p>
10351 The standard wording of N2134 has extended the 14882:2003(E)
10352 wording for the ifstream/ofstream/fstream open function to fix
10353 a long standing problem, see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#409">409</a>.
10354 </p>
10357 Now it's properly written as
10358 </p>
10360 <blockquote><p>
10361 "If that function does not return a null pointer calls clear(),
10362 otherwise
10363 calls setstate(failbit)[..]"
10364 </p></blockquote>
10367 instead of the previous
10368 </p>
10370 <blockquote><p>
10371 "If that function returns a null pointer, calls setstate(failbit)[..]
10372 </p></blockquote>
10375 While the old footnotes saying
10376 </p>
10378 <blockquote><p>
10379 "A successful open does not change the error state."
10380 </p></blockquote>
10383 where correct and important, they are invalid now for ifstream and
10384 ofstream (because clear *does* indeed modify the error state) and
10385 should be removed (Interestingly fstream itself never had these,
10386 although
10387 they where needed for that time).
10388 </p>
10391 <p><b>Proposed resolution:</b></p>
10393 In 27.8.1.9 [ifstream.members], remove footnote:
10394 </p>
10396 <blockquote><p>
10397 <del><sup>334)</sup> A successful open does not change the error state.</del>
10398 </p></blockquote>
10401 In 27.8.1.13 [ofstream.members], remove footnote:
10402 </p>
10404 <blockquote><p>
10405 <del><sup>335)</sup> A successful open does not change the error state.</del>
10406 </p></blockquote>
10413 <hr>
10414 <h3><a name="645"></a>645. Missing members in match_results</h3>
10415 <p><b>Section:</b> 28.10 [re.results] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10416 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
10417 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.results">issues</a> in [re.results].</p>
10418 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10419 <p><b>Discussion:</b></p>
10421 According to the description given in 28.10 [re.results]/2 the class template
10422 match_results "shall satisfy the requirements of a Sequence, [..],
10423 except that only operations defined for const-qualified Sequences
10424 are supported".
10425 Comparing the provided operations from 28.10 [re.results]/3 with the
10426 sequence/container tables 80 and 81 one recognizes the following
10427 missing operations:
10428 </p>
10431 1) The members
10432 </p>
10434 <blockquote><pre>const_iterator rbegin() const;
10435 const_iterator rend() const;
10436 </pre></blockquote>
10439 should exists because 23.1/10 demands these for containers
10440 (all sequences are containers) which support bidirectional
10441 iterators. Aren't these supported by match_result? This is not
10442 explicitely expressed, but it's somewhat implied by two arguments:
10443 </p>
10445 (a) Several typedefs delegate to
10446 <tt>iterator_traits&lt;BidirectionalIterator&gt;</tt>.
10447 </p>
10449 (b) The existence of <tt>const_reference operator[](size_type n) const</tt>
10450 implies even random-access iteration.
10451 I also suggest, that <tt>match_result</tt> should explicitly mention,
10452 which minimum iterator category is supported and if this does
10453 not include random-access the existence of <tt>operator[]</tt> is
10454 somewhat questionable.
10455 </p>
10457 2) The new "convenience" members
10458 </p>
10459 <blockquote><pre>const_iterator cbegin() const;
10460 const_iterator cend() const;
10461 const_iterator crbegin() const;
10462 const_iterator crend() const;
10463 </pre></blockquote>
10465 should be added according to tables 80/81.
10466 </p>
10469 <p><b>Proposed resolution:</b></p>
10471 Add the following members to the <tt>match_results</tt> synopsis after <tt>end()</tt> in 28.10 [re.results]
10472 para 3:
10473 </p>
10475 <blockquote><pre>const_iterator cbegin() const;
10476 const_iterator cend() const;
10477 </pre></blockquote>
10480 In section 28.10.3 [re.results.acc] change:
10481 </p>
10483 <blockquote>
10484 <pre>const_iterator begin() const;
10485 <ins>const_iterator cbegin() const;</ins>
10486 </pre>
10487 <blockquote>
10489 -7- <i>Returns:</i> A starting iterator that enumerates over all the sub-expressions stored in <tt>*this</tt>.
10490 </p>
10491 </blockquote>
10493 <pre>const_iterator end() const;
10494 <ins>const_iterator cend() const;</ins>
10495 </pre>
10496 <blockquote>
10498 -8- <i>Returns:</i> A terminating iterator that enumerates over all the sub-expressions stored in <tt>*this</tt>.
10499 </p>
10500 </blockquote>
10501 </blockquote>
10505 <p><i>[
10506 Kona (2007): Voted to adopt proposed wording in
10507 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>
10508 except removing the entry in the table container requirements. Moved to Review.
10509 ]</i></p>
10512 <p><i>[
10513 Bellevue: Proposed wording now in the WP.
10514 ]</i></p>
10520 <hr>
10521 <h3><a name="647"></a>647. Inconsistent regex_search params</h3>
10522 <p><b>Section:</b> 28.11.3 [re.alg.search] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10523 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
10524 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10525 <p><b>Discussion:</b></p>
10527 28.11.3 [re.alg.search]/5 declares
10528 </p>
10530 <blockquote><pre>template &lt;class iterator, class charT, class traits&gt;
10531 bool regex_search(iterator first, iterator last,
10532 const basic_regex&lt;charT, traits&gt;&amp; e,
10533 regex_constants::match_flag_type flags =
10534 regex_constants::match_default);
10535 </pre></blockquote>
10538 where it's not explained, which iterator category
10539 the parameter iterator belongs to. This is inconsistent
10540 to the preceding declaration in the synopsis section
10541 28.4 [re.syn], which says:
10542 </p>
10544 <blockquote><pre>template &lt;class BidirectionalIterator, class charT, class traits&gt;
10545 bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
10546 const basic_regex&lt;charT, traits&gt;&amp; e,
10547 regex_constants::match_flag_type flags =
10548 regex_constants::match_default);
10549 </pre></blockquote>
10552 <p><b>Proposed resolution:</b></p>
10554 In 28.11.3 [re.alg.search]/5 replace all three occurences of param "iterator" with
10555 "BidirectionalIterator"
10556 </p>
10558 <blockquote><pre>template &lt;class <del>iterator</del> <ins>BidirectionalIterator</ins>, class charT, class traits&gt;
10559 bool regex_search(<del>iterator</del> <ins>BidirectionalIterator</ins> first, <del>iterator</del> <ins>BidirectionalIterator</ins> last,
10560 const basic_regex&lt;charT, traits&gt;&amp; e,
10561 regex_constants::match_flag_type flags =
10562 regex_constants::match_default);
10563 </pre>
10565 -6- <i>Effects:</i> Behaves "as if" by constructing an object what of
10566 type <tt>match_results&lt;<del>iterator</del>
10567 <ins>BidirectionalIterator</ins>&gt;</tt> and then returning the result
10568 of <tt>regex_search(first, last, what, e, flags)</tt>.
10569 </p>
10570 </blockquote>
10573 <p><b>Rationale:</b></p>
10574 Applied to working paper while issue was still in New status.
10580 <hr>
10581 <h3><a name="648"></a>648. regex_iterator c'tor needs clarification/editorial fix</h3>
10582 <p><b>Section:</b> 28.12.1.1 [re.regiter.cnstr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10583 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p>
10584 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10585 <p><b>Discussion:</b></p>
10587 In 28.12.1.1 [re.regiter.cnstr]/2 the effects paragraph starts with:
10588 </p>
10590 <blockquote>
10592 <i>Effects:</i> Initializes begin and end to point to the beginning and the
10593 end of the target sequence, sets pregex to &amp;re, sets flags to f,[..]
10594 </p></blockquote>
10597 There are two issues with this description:
10598 </p>
10600 <ol>
10601 <li>
10602 The meaning of very first part of this quote is unclear, because
10603 there is no target sequence provided, instead there are given two
10604 parameters a and b, both of type BidirectionalIterator. The mentioned
10605 part does not explain what a and b represent.
10606 </li>
10607 <li>
10608 There does not exist any parameter f, but instead a parameter
10609 m in the constructor declaration, so this is actually an editorial
10610 fix.
10611 </li>
10612 </ol>
10615 <p><b>Proposed resolution:</b></p>
10617 In 28.12.1.1 [re.regiter.cnstr]/2 change the above quoted part by
10618 </p>
10620 <blockquote><p>
10621 <i>Effects:</i> Initializes <tt>begin</tt> and <tt>end</tt> to point to
10622 the beginning and the end of the target sequence <ins>designated by the
10623 iterator range <tt>[a, b)</tt></ins>, sets <tt>pregex</tt> to
10624 <tt>&amp;re</tt>, sets <tt>flags</tt> to <tt><del>f</del>
10625 <ins>m</ins></tt>, then calls <tt>regex_search(begin, end, match,
10626 *pregex, flags)</tt>. If this call returns <tt>false</tt> the
10627 constructor sets <tt>*this</tt> to the end-of-sequence iterator.
10628 </p></blockquote>
10634 <hr>
10635 <h3><a name="649"></a>649. Several typos in regex_token_iterator constructors</h3>
10636 <p><b>Section:</b> 28.12.2.1 [re.tokiter.cnstr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10637 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p>
10638 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.tokiter.cnstr">issues</a> in [re.tokiter.cnstr].</p>
10639 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10640 <p><b>Discussion:</b></p>
10642 In 28.12.2.1 [re.tokiter.cnstr]/1+2 both the constructor declaration
10643 and the following text shows some obvious typos:
10644 </p>
10646 1) The third constructor form is written as
10647 </p>
10648 <blockquote><pre>template &lt;std::size_t N&gt;
10649 regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
10650 const regex_type&amp; re,
10651 const int (&amp;submatches)[R],
10652 regex_constants::match_flag_type m =
10653 regex_constants::match_default);
10654 </pre></blockquote>
10657 where the dimensions of submatches are specified by an
10658 unknown value R, which should be N.
10659 </p>
10661 2) Paragraph 2 of the same section says in its last sentence:
10662 </p>
10664 <blockquote><p>
10665 The third constructor initializes the member <tt>subs</tt> to hold a
10666 copy of the sequence of integer values pointed to by the iterator range
10667 <tt>[&amp;submatches, &amp;submatches + R)</tt>.
10668 </p></blockquote>
10671 where again R must be replaced by N.
10672 </p>
10675 3) Paragraph 3 of the same section says in its first sentence:
10676 </p>
10678 <blockquote><p>
10679 Each constructor then sets <tt>N</tt> to <tt>0</tt>, and
10680 <tt>position</tt> to <tt>position_iterator(a, b, re, f)</tt>.
10681 </p></blockquote>
10684 where a non-existing parameter "f" is mentioned, which must be
10685 replaced
10686 by the parameter "m".
10687 </p>
10690 <p><b>Proposed resolution:</b></p>
10692 Change 28.12.2.1 [re.tokiter.cnstr]/1:
10693 </p>
10694 <blockquote><pre>template &lt;std::size_t N&gt;
10695 regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
10696 const regex_type&amp; re,
10697 const int (&amp;submatches)[<del>R</del> <ins>N</ins>],
10698 regex_constants::match_flag_type m =
10699 regex_constants::match_default);
10700 </pre></blockquote>
10703 Change 28.12.2.1 [re.tokiter.cnstr]/2:
10704 </p>
10706 <blockquote><p>
10707 <i>Effects:</i> The first constructor initializes the member
10708 <tt>subs</tt> to hold the single value <tt>submatch</tt>. The second
10709 constructor initializes the member <tt>subs</tt> to hold a copy of the
10710 argument <tt>submatches</tt>. The third constructor initializes the
10711 member <tt>subs</tt> to hold a copy of the sequence of integer values
10712 pointed to by the iterator range <tt>[&amp;submatches, &amp;submatches +
10713 <del>R</del> <ins>N</ins>)</tt>.
10714 </p></blockquote>
10717 Change 28.12.2.1 [re.tokiter.cnstr]/3:
10718 </p>
10720 <blockquote><p>
10721 Each constructor then sets <tt>N</tt> to <tt>0</tt>, and
10722 <tt>position</tt> to <tt>position_iterator(a, b, re, <del>f</del>
10723 <ins>m</ins>)</tt>. If <tt>position</tt> is not an end-of-sequence
10724 iterator the constructor sets <tt>result</tt> to the address of the
10725 current match. Otherwise if any of the values stored in <tt>subs</tt> is
10726 equal to <tt>-1</tt> the constructor sets <tt>*this</tt> to a suffix
10727 iterator that points to the range <tt>[a, b)</tt>, otherwise the
10728 constructor sets <tt>*this</tt> to an end-of-sequence iterator.
10729 </p></blockquote>
10736 <hr>
10737 <h3><a name="653"></a>653. Library reserved names</h3>
10738 <p><b>Section:</b> 1.2 [intro.refs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
10739 <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-03-08</p>
10740 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#intro.refs">issues</a> in [intro.refs].</p>
10741 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
10742 <p><b>Discussion:</b></p>
10744 </p>
10745 <blockquote>
10747 1.2 [intro.refs] Normative references
10748 </p>
10751 The following standards contain provisions which, through reference in
10752 this text, constitute provisions of this Interna- tional Standard. At
10753 the time of publication, the editions indicated were valid. All
10754 standards are subject to revision, and parties to agreements based on
10755 this International Standard are encouraged to investigate the
10756 possibility of applying the most recent editions of the standards
10757 indicated below. Members of IEC and ISO maintain registers of currently
10758 valid International Standards.
10759 </p>
10761 <ul>
10762 <li>Ecma International, ECMAScript Language Specification, Standard
10763 Ecma-262, third edition, 1999.</li>
10764 <li>ISO/IEC 2382 (all parts), Information technology - Vocabulary</li>
10765 <li>ISO/IEC 9899:1990, Programming languages - C</li>
10766 <li>ISO/IEC 9899/Amd.1:1995, Programming languages - C, AMENDMENT 1: C
10767 Integrity</li>
10768 <li>ISO/IEC 9899:1999, Programming languages - C</li>
10769 <li>ISO/IEC 9899:1999/Cor.1:2001 Programming languages - C</li>
10770 <li>ISO/IEC 9899:1999/Cor.2:2004 Programming languages - C</li>
10771 <li>ISO/IEC 9945:2003, Information Technology-Portable Operating System
10772 Interface (POSIX)</li>
10773 <li>ISO/IEC 10646-1:1993 Information technology - Universal Multiple-Octet
10774 Coded Character Set (UCS) - Part 1: Architecture and Basic Multilingual
10775 Plane</li>
10776 </ul>
10777 </blockquote>
10780 I'm not sure how many of those reserve naming patterns that might affect
10781 us, but I am equally sure I don't own a copy of any of these to check!
10782 </p>
10784 The point is to list the reserved naming patterns, rather than the
10785 individual names themselves - although we may want to list C keywords
10786 that are valid identifiers in C++ but likely to cause trouble in shared
10787 headers (e.g. restrict)
10788 </p>
10790 <p><i>[
10791 Kona (2007): Recommend NAD. No one has identified a specific defect, just the possibility of one.
10792 ]</i></p>
10795 <p><i>[
10796 Post-Kona: Alisdair request Open. A good example of the problem was a
10797 discussion of the system error proposal, where it was pointed out an all-caps
10798 identifier starting with a capital E conflicted with reserved macro names for
10799 both Posix and C. I had absolutely no idea of this rule, and suspect I was
10800 not the only one in the room.<br>
10801 <br>
10802 Resolution will require someone with access to all the listed documents to
10803 research their respective name reservation rules, or people with access to
10804 specific documents add their rules to this issue until the list is complete.
10805 ]</i></p>
10808 <p><i>[
10809 Bellevue: Wording is aleady present in various standards, and no-one has come forward with wording.
10810 Suggest a formal paper rather than a defect report is the correct way to proceed.
10811 ]</i></p>
10816 <p><b>Proposed resolution:</b></p>
10822 <hr>
10823 <h3><a name="656"></a>656. Typo in subtract_with_carry_engine declaration</h3>
10824 <p><b>Section:</b> 26.4.2 [rand.synopsis] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10825 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p>
10826 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.synopsis">issues</a> in [rand.synopsis].</p>
10827 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10828 <p><b>Discussion:</b></p>
10830 26.4.2 [rand.synopsis] the header <tt>&lt;random&gt;</tt> synopsis
10831 contains an unreasonable closing curly brace inside the
10832 <tt>subtract_with_carry_engine</tt> declaration.
10833 </p>
10836 <p><b>Proposed resolution:</b></p>
10838 Change the current declaration in 26.4.2 [rand.synopsis]
10839 </p>
10841 <blockquote><pre>template &lt;class UIntType, size_t w<del>}</del>, size_t s, size_t r&gt;
10842 class subtract_with_carry_engine;
10843 </pre></blockquote>
10846 <p><i>[
10847 Pete: Recommends editorial.
10848 ]</i></p>
10854 <hr>
10855 <h3><a name="657"></a>657. unclear requirement about header inclusion</h3>
10856 <p><b>Section:</b> 17.4.2.1 [using.headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
10857 <b>Submitter:</b> Gennaro Prota <b>Date:</b> 2007-03-14</p>
10858 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
10859 <p><b>Discussion:</b></p>
10861 17.4.2.1 [using.headers] states:
10862 </p>
10864 <blockquote><p>
10865 A translation unit shall include a header only outside of any
10866 external declaration or definition, [...]
10867 </p></blockquote>
10870 I see three problems with this requirement:
10871 </p>
10873 <ol type="a">
10874 <li><p>The C++ standard doesn't define what an "external declaration" or
10875 an "external definition" are (incidentally the C99 standard does, and
10876 has a sentence very similar to the above regarding header inclusion).
10877 </p><p>
10878 I think the intent is that the #include directive shall lexically
10879 appear outside *any* declaration; instead, when the issue was pointed
10880 out on comp.std.c++ at least one poster interpreted "external
10881 declaration" as "declaration of an identifier with external linkage".
10882 If this were the correct interpretation, then the two inclusions below
10883 would be legal:
10884 </p>
10885 <blockquote><pre> // at global scope
10886 static void f()
10888 # include &lt;cstddef&gt;
10891 static void g()
10893 # include &lt;stddef.h&gt;
10895 </pre></blockquote>
10897 (note that while the first example is unlikely to compile correctly,
10898 the second one may well do)
10899 </p></li>
10901 <li><p>as the sentence stands, violations will require a diagnostic; is
10902 this the intent? It was pointed out on comp.std.c++ (by several
10903 posters) that at least one way to ensure a diagnostic exists:
10904 </p>
10905 <blockquote><p>
10906 [If there is an actual file for each header,] one simple way
10907 to implement this would be to insert a reserved identifier
10908 such as __begin_header at the start of each standard header.
10909 This reserved identifier would be ignored for all other
10910 purposes, except that, at the appropriate point in phase 7, if
10911 it is found inside an external definition, a diagnostic is
10912 generated. There's many other similar ways to achieve the same
10913 effect.
10914 </p>
10915 <p> --James Kuyper, on comp.std.c++
10916 </p></blockquote></li>
10918 <li><p>is the term "header" meant to be limited to standard headers?
10919 Clause 17 is all about the library, but still the general question is
10920 interesting and affects one of the points in the explicit namespaces
10921 proposal (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1691.html">n1691</a>):
10922 </p>
10923 <blockquote><p>
10924 Those seeking to conveniently enable argument-dependent
10925 lookups for all operators within an explicit namespace
10926 could easily create a header file that does so:
10927 </p><pre> namespace mymath::
10929 #include "using_ops.hpp"
10931 </pre></blockquote>
10932 </li>
10933 </ol>
10936 <p><b>Proposed resolution:</b></p>
10938 </p>
10941 <p><b>Rationale:</b></p>
10942 We believe that the existing language does not cause any real confusion
10943 and any new formulation of the rules that we could come up with are
10944 unlikely to be better than what's already in the standard.
10950 <hr>
10951 <h3><a name="658"></a>658. Two unspecified function comparators in [function.objects]</h3>
10952 <p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
10953 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-19</p>
10954 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#function.objects">issues</a> in [function.objects].</p>
10955 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
10956 <p><b>Discussion:</b></p>
10958 The header <tt>&lt;functional&gt;</tt> synopsis in 20.5 [function.objects]
10959 contains the following two free comparison operator templates
10960 for the <tt>function</tt> class template
10961 </p>
10963 <blockquote><pre>template&lt;class Function1, class Function2&gt;
10964 void operator==(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
10965 template&lt;class Function1, class Function2&gt;
10966 void operator!=(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
10967 </pre></blockquote>
10970 which are nowhere described. I assume that they are relicts before the
10971 corresponding two private and undefined member templates in the function
10972 template (see 20.5.15.2 [func.wrap.func] and X [func.wrap.func.undef]) have been introduced. The original free
10973 function templates should be removed, because using an undefined entity
10974 would lead to an ODR violation of the user.
10975 </p>
10978 <p><b>Proposed resolution:</b></p>
10980 Remove the above mentioned two function templates from
10981 the header <tt>&lt;functional&gt;</tt> synopsis (20.5 [function.objects])
10982 </p>
10984 <blockquote><pre><del>template&lt;class Function1, class Function2&gt;
10985 void operator==(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
10986 template&lt;class Function1, class Function2&gt;
10987 void operator!=(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);</del>
10988 </pre></blockquote>
10992 <p><b>Rationale:</b></p>
10993 Fixed by
10994 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2292.html">N2292</a>
10995 Standard Library Applications for Deleted Functions.
11001 <hr>
11002 <h3><a name="662"></a>662. Inconsistent handling of incorrectly-placed thousands separators</h3>
11003 <p><b>Section:</b> 22.2.2.1.2 [facet.num.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11004 <b>Submitter:</b> Cosmin Truta <b>Date:</b> 2007-04-05</p>
11005 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#facet.num.get.virtuals">active issues</a> in [facet.num.get.virtuals].</p>
11006 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.virtuals">issues</a> in [facet.num.get.virtuals].</p>
11007 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11008 <p><b>Discussion:</b></p>
11010 From Section 22.2.2.1.2 [facet.num.get.virtuals], paragraphs 11 and 12, it is implied
11011 that the value read from a stream must be stored
11012 even if the placement of thousands separators does not conform to the
11013 <code>grouping()</code> specification from the <code>numpunct</code> facet.
11014 Since incorrectly-placed thousands separators are flagged as an extraction
11015 failure (by the means of <code>failbit</code>), we believe it is better not
11016 to store the value. A consistent strategy, in which any kind of extraction
11017 failure leaves the input item intact, is conceptually cleaner, is able to avoid
11018 corner-case traps, and is also more understandable from the programmer's point
11019 of view.
11020 </p>
11022 Here is a quote from <i>"The C++ Programming Language (Special Edition)"</i>
11023 by B.&nbsp;Stroustrup (Section&nbsp;D.4.2.3, pg.&nbsp;897):
11024 </p>
11025 <blockquote><p>
11026 <i>"If a value of the desired type could not be read, failbit is set in r.
11027 [...] An input operator will use r to determine how to set the state of its
11028 stream. If no error was encountered, the value read is assigned through v;
11029 otherwise, v is left unchanged."</i>
11030 </p></blockquote>
11032 This statement implies that <code>rdstate()</code> alone is sufficient to
11033 determine whether an extracted value is to be assigned to the input item
11034 <i>val</i> passed to <code>do_get</code>. However, this is in disagreement
11035 with the current C++ Standard. The above-mentioned assumption is true in all
11036 cases, except when there are mismatches in digit grouping. In the latter case,
11037 the parsed value is assigned to <i>val</i>, and, at the same time, <i>err</i>
11038 is assigned to <code>ios_base::failbit</code> (essentially "lying" about the
11039 success of the operation). Is this intentional? The current behavior raises
11040 both consistency and usability concerns.
11041 </p>
11043 Although digit grouping is outside the scope of <code>scanf</code> (on which
11044 the virtual methods of <code>num_get</code> are based), handling of grouping
11045 should be consistent with the overall behavior of scanf. The specification of
11046 <code>scanf</code> makes a distinction between input failures and matching
11047 failures, and yet both kinds of failures have no effect on the input items
11048 passed to <code>scanf</code>. A mismatch in digit grouping logically falls in
11049 the category of matching failures, and it would be more consistent, and less
11050 surprising to the user, to leave the input item intact whenever a failure is
11051 being signaled.
11052 </p>
11054 The extraction of <code>bool</code> is another example outside the scope of
11055 <code>scanf</code>, and yet consistent, even in the event of a successful
11056 extraction of a <code>long</code> but a failed conversion from
11057 <code>long</code> to <code>bool</code>.
11058 </p>
11060 Inconsistency is further aggravated by the fact that, when failbit is set,
11061 subsequent extraction operations are no-ops until <code>failbit</code> is
11062 explicitly cleared. Assuming that there is no explicit handling of
11063 <code>rdstate()</code> (as in <code>cin&gt;&gt;i&gt;&gt;j</code>) it is
11064 counter-intuitive to be able to extract an integer with mismatched digit
11065 grouping, but to be unable to extract another, properly-formatted integer
11066 that immediately follows.
11067 </p>
11069 Moreover, setting <code>failbit</code>, and selectively assigning a value to
11070 the input item, raises usability problems. Either the strategy of
11071 <code>scanf</code> (when there is no extracted value in case of failure), or
11072 the strategy of the <code>strtol</code> family (when there is always an
11073 extracted value, and there are well-defined defaults in case of a failure) are
11074 easy to understand and easy to use. On the other hand, if <code>failbit</code>
11075 alone cannot consistently make a difference between a failed extraction, and a
11076 successful but not-quite-correct extraction whose output happens to be the same
11077 as the previous value, the programmer must resort to implementation tricks.
11078 Consider the following example:
11079 </p>
11080 <pre> int i = old_i;
11081 cin &gt;&gt; i;
11082 if (cin.fail())
11083 // can the value of i be trusted?
11084 // what does it mean if i == old_i?
11085 // ...
11086 </pre>
11088 Last but not least, the current behvaior is not only confusing to the casual
11089 reader, but it has also been confusing to some book authors. Besides
11090 Stroustrup's book, other books (e.g. "Standard C++ IOStreams and Locales" by
11091 Langer and Kreft) are describing the same mistaken assumption. Although books
11092 are not to be used instead of the standard reference, the readers of these
11093 books, as well as the people who are generally familiar to <code>scanf</code>,
11094 are even more likely to misinterpret the standard, and expect the input items
11095 to remain intact when a failure occurs.
11096 </p>
11099 <p><b>Proposed resolution:</b></p>
11102 Change 22.2.2.1.2 [facet.num.get.virtuals]:
11103 </p>
11105 <blockquote>
11107 <b>Stage 3:</b> The result of stage 2 processing can be one of
11108 </p>
11109 <ul>
11110 <li>A sequence of <code>chars</code> has been accumulated in stage 2 that is converted (according to the rules of <code>scanf</code>) to a value of the type of <code><i>val</i></code>. <del>This value is stored in <code><i>val</i></code> and <code>ios_base::goodbit</code> is stored in <code><i>err</i></code>.</del></li>
11112 <li>The sequence of <code>chars</code> accumulated in stage 2 would have caused <code>scanf</code> to report an input failure. <code>ios_base::failbit</code> is assigned to <code><i>err</i></code>.</li>
11113 </ul>
11115 <ins>In the first case,</ins> <del>D</del><ins>d</ins>igit grouping is checked. That is, the positions of discarded separators is examined for consistency with <code>use_facet&lt;numpunct&lt;charT&gt; &gt;(<i>loc</i>).grouping()</code>. If they are not consistent then <code>ios_base::failbit</code> is assigned to <code><i>err</i></code>. <ins>Otherwise, the value that was converted in stage 2 is stored in <code><i>val</i></code> and <code>ios_base::goodbit</code> is stored in <code><i>err</i></code>.</ins>
11116 </p>
11117 </blockquote>
11120 <p><b>Rationale:</b></p>
11121 post-Toronto: Changed from New to NAD at the request of the author. The preferred solution of
11122 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2327.pdf">N2327</a>
11123 makes this resolution obsolete.
11129 <hr>
11130 <h3><a name="663"></a>663. Complexity Requirements</h3>
11131 <p><b>Section:</b> 17.3.1.3 [structure.specifications] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11132 <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
11133 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#structure.specifications">issues</a> in [structure.specifications].</p>
11134 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11135 <p><b>Discussion:</b></p>
11137 17.3.1.3 [structure.specifications] para 5 says
11138 </p>
11140 <blockquote><p>
11141 -5- Complexity requirements specified in the library&nbsp;
11142 clauses are upper bounds, and implementations that provide better
11143 complexity guarantees satisfy the requirements.
11144 </p></blockquote>
11147 The following
11148 objection has been raised:
11149 </p>
11151 <blockquote><p>
11152 The library clauses suggest general
11153 guidelines regarding complexity, but we have been unable to discover
11154 any absolute hard-and-fast formulae for these requirements.&nbsp; Unless
11155 or until the Library group standardizes specific hard-and-fast
11156 formulae, we regard all the complexity requirements as subject to a&nbsp;
11157 "fudge factor" without any intrinsic upper bound.
11158 </p></blockquote>
11161 [Plum ref&nbsp;
11162 _23213Y31 etc]
11163 </p>
11166 <p><b>Proposed resolution:</b></p>
11168 </p>
11171 <p><b>Rationale:</b></p>
11172 Kona (2007): No specific instances of underspecification have been
11173 identified, and big-O notation always involves constant factors.
11179 <hr>
11180 <h3><a name="683"></a>683. regex_token_iterator summary error</h3>
11181 <p><b>Section:</b> 28.12.2 [re.tokiter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
11182 <b>Submitter:</b> Eric Niebler <b>Date:</b> 2007-06-02</p>
11183 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.tokiter">issues</a> in [re.tokiter].</p>
11184 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
11185 <p><b>Discussion:</b></p>
11187 28.12.2 [re.tokiter], p3 says:
11188 </p>
11189 <blockquote>
11191 After it is constructed, the iterator finds and stores a value
11192 <tt>match_results&lt;BidirectionalIterator&gt;</tt> position and sets the
11193 internal count <tt>N</tt> to zero.
11194 </p>
11195 </blockquote>
11198 Should read:
11199 </p>
11201 <blockquote>
11203 After it is constructed, the iterator finds and stores a value
11204 <tt><del>match_results</del><ins>regex_iterator</ins>&lt;BidirectionalIterator<ins>, charT, traits</ins>&gt;</tt>
11205 position and sets the internal count <tt>N</tt> to zero.
11206 </p>
11207 </blockquote>
11209 <p><i>[
11210 John adds:
11211 ]</i></p>
11214 <blockquote><p>
11215 Yep, looks like a typo/administrative fix to me.
11216 </p></blockquote>
11220 <p><b>Proposed resolution:</b></p>
11222 </p>
11228 <hr>
11229 <h3><a name="684"></a>684. Unclear which members of match_results should be used in comparison</h3>
11230 <p><b>Section:</b> 28.10 [re.results] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
11231 <b>Submitter:</b> Nozomu Katoo <b>Date:</b> 2007-05-27</p>
11232 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re.results">issues</a> in [re.results].</p>
11233 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
11234 <p><b>Discussion:</b></p>
11236 In 28.4 [re.syn] of N2284, two template functions
11237 are declared here:
11238 </p>
11239 <blockquote><pre>// 28.10, class template match_results:
11240 &lt;<i>snip</i>&gt;
11241 // match_results comparisons
11242 template &lt;class BidirectionalIterator, class Allocator&gt;
11243 bool operator== (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
11244 const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11245 template &lt;class BidirectionalIterator, class Allocator&gt;
11246 bool operator!= (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
11247 const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11249 // 28.10.6, match_results swap:
11250 </pre></blockquote>
11253 But the details of these two bool operator functions (i.e., which members of
11254 <tt>match_results</tt> should be used in comparison) are not described in any
11255 following sections.
11256 </p>
11258 <p><i>[
11259 John adds:
11260 ]</i></p>
11263 <blockquote><p>
11264 That looks like a bug: <tt>operator==</tt> should return <tt>true</tt> only if
11265 the two objects refer to the same match - ie if one object was constructed as a
11266 copy of the other.
11267 </p></blockquote>
11269 <p><i>[
11270 Kona (2007): Bill and Pete to add minor wording to that proposed in
11271 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>.
11272 ]</i></p>
11276 <p><b>Proposed resolution:</b></p>
11278 Add a new section after 28.10.6 [re.results.swap], which reads:
11279 </p>
11281 28.10.7 match_results non-member functions.
11282 </p>
11284 <blockquote>
11285 <pre>template&lt;class BidirectionalIterator, class Allocator&gt;
11286 bool operator==(const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
11287 const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11288 </pre>
11289 <blockquote>
11291 <i>Returns:</i> <tt>true</tt> only if the two objects refer to the same match.
11292 </p>
11293 </blockquote>
11294 </blockquote>
11296 <blockquote>
11297 <pre>template&lt;class BidirectionalIterator, class Allocator&gt;
11298 bool operator!=(const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
11299 const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11300 </pre>
11301 <blockquote>
11303 <i>Returns:</i> <tt>!(m1 == m2)</tt>.
11304 </p>
11305 </blockquote>
11306 </blockquote>
11308 <blockquote>
11309 <pre>template&lt;class BidirectionalIterator, class Allocator&gt;
11310 void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1,
11311 match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11312 </pre>
11313 <blockquote>
11315 <i>Returns:</i> <tt>m1.swap(m2)</tt>.
11316 </p>
11317 </blockquote>
11318 </blockquote>
11321 <p><i>[
11322 Bellevue: Proposed wording now in WP.
11323 ]</i></p>
11329 <hr>
11330 <h3><a name="686"></a>686. Unique_ptr and shared_ptr fail to specify non-convertibility to int for unspecified-bool-type</h3>
11331 <p><b>Section:</b> 20.6.11.2.4 [unique.ptr.single.observers], 20.6.12.2.5 [util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11332 <b>Submitter:</b> Beman Dawes <b>Date:</b> 2007-06-14</p>
11333 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11334 <p><b>Discussion:</b></p>
11336 The standard library uses the <tt>operator <i>unspecified-bool-type</i>() const</tt> idiom in
11337 five places. In three of those places (20.5.15.2.3 [func.wrap.func.cap], function capacity
11338 for example) the returned value is constrained to disallow
11339 unintended conversions to int. The standardese is
11340 </p>
11341 <blockquote><p>
11342 The return type shall not be convertible to <tt>int</tt>.
11343 </p></blockquote>
11345 This constraint is omitted for <tt>unique_ptr</tt> and <tt>shared_ptr</tt>. It should be added for those.
11346 </p>
11348 <p><i>[
11349 Bellevue:
11350 ]</i></p>
11353 <blockquote>
11354 Close as NAD. Accepting paper
11355 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2435.htm">N2435</a>
11356 makes it irrelevant.
11357 </blockquote>
11361 <p><b>Proposed resolution:</b></p>
11363 To the <i>Returns</i> paragraph for <tt>operator <i>unspecified-bool-type</i>()
11364 const</tt>
11365 of 20.6.11.2.4 [unique.ptr.single.observers] paragraph 11 and
11366 20.6.12.2.5 [util.smartptr.shared.obs] paragraph 16, add the sentence:
11367 </p>
11368 <blockquote><p>
11369 The return type shall not be convertible to <tt>int</tt>.
11370 </p></blockquote>
11373 <p><i>[
11374 Kona (2007): Uncertain if <tt>nullptr</tt> will address this issue.
11375 ]</i></p>
11381 <hr>
11382 <h3><a name="690"></a>690. abs(long long) should return long long</h3>
11383 <p><b>Section:</b> 26.7 [c.math] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
11384 <b>Submitter:</b> Niels Dekker <b>Date:</b> 2007-06-10</p>
11385 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p>
11386 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#c.math">issues</a> in [c.math].</p>
11387 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
11388 <p><b>Discussion:</b></p>
11390 Quoting the latest draft (n2135), 26.7 [c.math]:
11391 </p>
11393 <blockquote>
11395 The added signatures are:
11396 </p>
11397 <blockquote><pre>long abs(long); // labs()
11398 long abs(long long); // llabs()
11399 </pre></blockquote>
11400 </blockquote>
11402 Shouldn't <tt>abs(long long)</tt> have <tt>long long</tt> as return type?
11403 </p>
11406 <p><b>Proposed resolution:</b></p>
11408 Change 26.7 [c.math]:
11409 </p>
11410 <blockquote><pre><ins>long </ins>long abs(long long); // llabs()
11411 </pre></blockquote>
11414 <p><b>Rationale:</b></p>
11415 Had already been fixed in the WP by the time the LWG reviewed this.
11421 <hr>
11422 <h3><a name="697"></a>697. New <tt>&lt;system_error&gt;</tt> header leads to name clashes</h3>
11423 <p><b>Section:</b> 19.4 [syserr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
11424 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-06-24</p>
11425 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#syserr">active issues</a> in [syserr].</p>
11426 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#syserr">issues</a> in [syserr].</p>
11427 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD%20Editorial">NAD Editorial</a> status.</p>
11428 <p><b>Discussion:</b></p>
11430 The most recent state of
11431 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2241.html">N2241</a>
11432 as well as the current draft
11433 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
11434 (section 19.4 [syserr], p.2) proposes a
11436 enumeration type <tt>posix_errno</tt> immediatly in the namespace <tt>std</tt>. One of
11437 the enumerators has the name <tt>invalid_argument</tt>, or fully qualified:
11438 <tt>std::invalid_argument</tt>. This name clashes with the exception type
11439 <tt>std::invalid_argument</tt>, see 19.1 [std.exceptions]/p.3. This clash makes
11440 e.g. the following snippet invalid:
11441 </p>
11443 <blockquote><pre>#include &lt;system_error&gt;
11444 #include &lt;stdexcept&gt;
11446 void foo() { throw std::invalid_argument("Don't call us - we call you!"); }
11447 </pre></blockquote>
11450 I propose that this enumeration type (and probably the remaining parts
11452 <tt>&lt;system_error&gt;</tt> as well) should be moved into one additional inner
11453 namespace, e.g. <tt>sys</tt> or <tt>system</tt> to reduce foreseeable future clashes
11455 to the great number of members that <tt>std::posix_errno</tt> already contains
11456 (Btw.: Why has the already proposed <tt>std::sys</tt> sub-namespace from
11457 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2066.html">N2066</a>
11458 been rejected?). A further clash <em>candidate</em> seems to be
11459 <tt>std::protocol_error</tt>
11460 (a reasonable name for an exception related to a std network library,
11461 I guess).
11462 </p>
11465 Another possible resolution would rely on the proposed strongly typed
11466 enums,
11467 as described in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2213.pdf">N2213</a>.
11468 But maybe the forbidden implicit conversion to integral types would
11469 make
11470 these enumerators less attractive in this special case?
11471 </p>
11474 <p><b>Proposed resolution:</b></p>
11476 Fixed by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2422.htm#Issue7">issue 7 of N2422</a>.
11477 </p>
11484 <hr>
11485 <h3><a name="707"></a>707. null pointer constant for <tt>exception_ptr</tt></h3>
11486 <p><b>Section:</b> 18.7.5 [propagation] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11487 <b>Submitter:</b> Jens Maurer <b>Date:</b> 2007-07-20</p>
11488 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#propagation">active issues</a> in [propagation].</p>
11489 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#propagation">issues</a> in [propagation].</p>
11490 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11491 <p><b>Discussion:</b></p>
11494 From the Toronto Core wiki:
11495 </p>
11498 What do you mean by "null pointer constant"? How do you guarantee that
11499 <tt>exception_ptr() == 1</tt> doesn't work? Do you even want to prevent that?
11500 What's the semantics? What about <tt>void *p = 0; exception_ptr() == p</tt>?
11501 Maybe disallow those in the interface, but how do you do that with
11502 portable C++? Could specify just "make it work".
11503 </p>
11506 Peter's response:
11507 </p>
11510 null pointer constant as defined in 4.10 [conv.ptr]. Intent is "just make it
11511 work", can be implemented as assignment operator taking a unique pointer
11512 to member, as in the unspecified bool type idiom.
11513 </p>
11515 <p><i>[
11516 Bellevue:
11517 ]</i></p>
11520 <blockquote>
11522 Original implementation was possible using the "unspecified-null-pointer" idiom, similar to unspecified-bool.
11523 </p>
11525 Even simpler now with nullptr_t.
11526 </p>
11528 NAD Rationale : null pointer constant is a perfectly defined term, and
11529 while API is clearly implementable there is no need to spell out
11530 implementation details.
11531 </p>
11532 </blockquote>
11536 <p><b>Proposed resolution:</b></p>
11538 </p>
11544 <hr>
11545 <h3><a name="709"></a>709. <tt>char_traits::not_eof</tt> has wrong signature</h3>
11546 <p><b>Section:</b> 21.1.3 [char.traits.specializations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
11547 <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-08-13</p>
11548 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#char.traits.specializations">issues</a> in [char.traits.specializations].</p>
11549 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
11550 <p><b>Discussion:</b></p>
11552 The changes made for <tt>constexpr</tt> in 21.1.3 [char.traits.specializations] have
11553 not only changed the <tt>not_eof</tt> function from pass by const reference to
11554 pass by value, it has also changed the parameter type from <tt>int_type</tt> to
11555 <tt>char_type</tt>.
11556 </p>
11558 This doesn't work for type <tt>char</tt>, and is inconsistent with the
11559 requirements in Table 56, Traits requirements, 21.1.1 [char.traits.require].
11560 </p>
11563 Pete adds:
11564 </p>
11566 <blockquote><p>
11567 For what it's worth, that may not have been an intentional change.
11568 N2349, which detailed the changes for adding constant expressions to
11569 the library, has strikeout bars through the <tt>const</tt> and the <tt>&amp;</tt> that
11570 surround the <tt>char_type</tt> argument, but none through <tt>char_type</tt> itself.
11571 So the intention may have been just to change to pass by value, with
11572 text incorrectly copied from the standard.
11573 </p></blockquote>
11577 <p><b>Proposed resolution:</b></p>
11579 Change the signature in 21.1.3.1 [char.traits.specializations.char],
11580 21.1.3.2 [char.traits.specializations.char16_t], 21.1.3.3 [char.traits.specializations.char32_t],
11581 and 21.1.3.4 [char.traits.specializations.wchar.t] to
11582 </p>
11584 <blockquote><pre>static constexpr int_type not_eof(<del>char_type</del> <ins>int_type</ins> c);
11585 </pre></blockquote>
11589 <p><i>[
11590 Bellevue:
11591 ]</i></p>
11594 <blockquote>
11595 Resolution: NAD editorial - up to Pete's judgment
11596 </blockquote>
11601 <hr>
11602 <h3><a name="717"></a>717. Incomplete <tt>valarray::operator[]</tt> specification in [valarray.access]</h3>
11603 <p><b>Section:</b> 26.5.2.3 [valarray.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
11604 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-27</p>
11605 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.access">issues</a> in [valarray.access].</p>
11606 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
11607 <p><b>Discussion:</b></p>
11609 Since the return type of <tt>valarray</tt>'s <tt>operator[] const</tt> overload has been
11610 changed to <tt>const T&amp;</tt> as described in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a> several paragraphs of
11611 the section 26.5.2.3 [valarray.access] are now
11612 incompletely
11613 specified, because many requirements and guarantees should now also
11614 apply to the const overload. Most notably, the address and reference
11615 guarantees should be extended to the const overload case.
11616 </p>
11619 <p><b>Proposed resolution:</b></p>
11621 Change 26.5.2.3 [valarray.access]:
11622 </p>
11624 <blockquote>
11626 -1- <del>When applied to a constant array, the subscript operator returns a
11627 reference to the corresponding element of the array. When applied to a
11628 non-constant array, t</del><ins>T</ins>he subscript operator returns a
11629 reference to the corresponding element of the array.
11630 </p>
11633 -3- The expression <tt>&amp;a[i+j] == &amp;a[i] + j</tt> evaluates as <tt>true</tt> for all <tt>size_t i</tt>
11634 and <tt>size_t j</tt> such that <tt>i+j</tt> is less
11635 than the length of the <del>non-constant</del> array <tt>a</tt>.
11636 </p>
11639 -4- Likewise, the expression <tt>&amp;a[i] != &amp;b[j]</tt> evaluates
11640 as <tt>true</tt> for any two <del>non-constant</del> arrays <tt>a</tt> and
11641 <tt>b</tt> and for any <tt>size_t i</tt> and <tt>size_t j</tt> such that
11642 <tt>i</tt> is less than the length of <tt>a</tt> and <tt>j</tt> is less
11643 than the length of <tt>b</tt>. This property indicates an absence of
11644 aliasing and may be used to advantage by optimizing
11645 compilers.<sup>281)</sup>
11646 </p>
11649 -5- The reference returned by the subscript operator for a<ins>n</ins> <del>non-constant</del> array is guaranteed to be valid until
11650 the member function <tt>resize(size_t, T)</tt> (26.5.2.7) is called for that array or until the lifetime
11651 of that array ends, whichever happens first.
11652 </p>
11654 </blockquote>
11661 <hr>
11662 <h3><a name="725"></a>725. Optional sequence container requirements column label</h3>
11663 <p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
11664 <b>Submitter:</b> David Abrahams <b>Date:</b> 2007-09-16</p>
11665 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#sequence.reqmts">issues</a> in [sequence.reqmts].</p>
11666 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
11667 <p><b>Discussion:</b></p>
11669 Table 90: (Optional sequence container operations) states the
11670 "assertion note pre/post-condition" of <tt>operator[]</tt> to be
11671 </p>
11673 <blockquote><pre>*(a.begin() + n)
11674 </pre></blockquote>
11677 Surely that's meant to be "operational semantics?"
11678 </p>
11682 <p><b>Proposed resolution:</b></p>
11683 <blockquote>
11684 <table border="1">
11685 <caption>Table 90: Optional sequence container operations</caption>
11686 <tbody><tr>
11687 <th>expression</th> <th>return type</th> <th><del>assertion/note<br>pre/post-condition</del><br> <ins>operational semantics</ins></th> <th>container</th>
11688 </tr>
11689 </tbody></table>
11690 </blockquote>
11697 <hr>
11698 <h3><a name="729"></a>729. Problem in [rand.req.eng]/3</h3>
11699 <p><b>Section:</b> 26.4.1.3 [rand.req.eng] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11700 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11701 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.req.eng">issues</a> in [rand.req.eng].</p>
11702 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11703 <p><b>Discussion:</b></p>
11705 The 3rd table row in 26.4.1.3 [rand.req.eng]/3 requires random number engines to accept any
11706 arithmetic type as a seed, which is then casted to the engine's <tt>result_type</tt> and subsequently
11707 used for seeding the state of the engine. The requirement stated as "Creates an engine with
11708 initial state determined by <tt>static_cast&lt;X::result_type&gt;(s)</tt>" forces random number engines
11709 to either use a seeding method that completely depends on the <tt>result_type</tt> (see the discussion
11710 of seeding for the <tt>mersenne_twister_engine</tt> in point T2 above) or at least to throw away "bits
11711 of randomness" in the seed value if the <tt>result_type</tt> is smaller than the seed type. This seems
11712 to be inappropriate for many modern random number generators, in particular F2-linear or
11713 cryptographic ones, which operate on an internal bit array that in principle is independent of the
11714 type of numbers returned.
11715 </p>
11718 <b>Posible resolution:</b> I propose to change the wording to a version similar to "Creates an
11719 engine with initial state determined by <tt>static_cast&lt;UintType&gt;(s)</tt>, where <tt>UintType</tt> is an
11720 implementation specific unsigned integer type."
11721 </p>
11724 Additionally, the definition of s in 26.4.1.3 [rand.req.eng]/1 c) could be restricted to unsigned integer types.
11725 </p>
11728 Similarly, the type of the seed in 26.4.1.4 [rand.req.adapt]/3 e) could be left unspecified.
11729 </p>
11732 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11733 for further discussion.
11734 </p>
11736 <p><i>[
11737 Stephan Tolksdorf adds pre-Bellevue:
11738 ]</i></p>
11741 <blockquote>
11743 In reply to the discussion in
11744 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11745 regarding this issue:
11746 </p>
11748 The descriptions of all engines and engine adaptors given in sections
11749 26.4.3 [rand.eng] and 26.4.4 [rand.adapt] already specify the concrete
11750 types of the integer arguments for seeding. Hence, relaxing the general
11751 requirement in 26.4.1.3 [rand.req.eng] would not affect portability and
11752 reproducibility of the standard library. Furthermore, it is not clear to
11753 me what exactly the guarantee "with initial state determined by
11754 <tt>static_cast&lt;X::result_type&gt;(s)</tt>" is useful for. On the other hand,
11755 relaxing the requirement would allow developers to implement other
11756 random number engines that do not have to cast all arithmetic seed
11757 arguments to their result_types.
11758 </p>
11759 </blockquote>
11761 <p><i>[
11762 Bellevue:
11763 ]</i></p>
11766 <blockquote>
11767 Propose close NAD for the reasons given in N2424.
11768 </blockquote>
11773 <p><b>Proposed resolution:</b></p>
11775 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11776 for further discussion.
11777 </p>
11779 <p><i>[
11780 Stephan Tolksdorf adds pre-Bellevue:
11781 ]</i></p>
11784 <blockquote>
11786 Change row 3 of table 105 "Random number engine requirements" in 26.4.1.3 [rand.req.eng]/3
11787 </p>
11789 <blockquote>
11790 Creates an engine with initial state determined by
11791 <tt><del>static_cast&lt;X::result_type&gt;(</del>s<del>)</del></tt>
11792 </blockquote>
11795 Similarly, change 26.4.1.4 [rand.req.adapt]/3 e)
11796 </p>
11798 <blockquote>
11799 When <tt>X::X</tt> is invoked with <del>an <tt>X::result_type</tt></del> value <tt>s</tt>
11800 <ins>of arithmetic type (3.9.1)</ins>, ...
11801 </blockquote>
11803 </blockquote>
11810 <hr>
11811 <h3><a name="730"></a>730. Comment on [rand.req.adapt]/3 e)</h3>
11812 <p><b>Section:</b> 26.4.1.4 [rand.req.adapt] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11813 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11814 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11815 <p><b>Discussion:</b></p>
11817 If an engine adaptor is invoked with an argument of type <tt>seed_seq</tt>, then all base
11818 engines are specified to be seeded with this <tt>seed_seq</tt>. As <tt>seed_seq</tt>'s randomization method is
11819 qualified as constant, this procedure will ef fectively initialize all base engines with the same seed
11820 (though the resulting state might still dif fer to a certain degree if the engines are of different types).
11821 It is not clear whether this mode of operation is in general appropriate, hence -- as far as the
11822 stated requirements are of general nature and not just specific to the engine adaptors provided by
11823 the library -- it might be better to leave the behaviour unspecified, since the current definition of
11824 <tt>seed_seq</tt> does not allow for a generally satisfying specification.
11825 </p>
11828 <b>Posssible resolution:</b> [As above]
11829 </p>
11832 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11833 for further discussion.
11834 </p>
11836 <p><i>[
11837 Bellevue:
11838 ]</i></p>
11841 <blockquote>
11842 Close NAD for the reasons given in N2424.
11843 </blockquote>
11847 <p><b>Proposed resolution:</b></p>
11849 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11850 for the proposed resolution.
11851 </p>
11857 <hr>
11858 <h3><a name="731"></a>731. proposal for a customizable <tt>seed_seq</tt></h3>
11859 <p><b>Section:</b> 26.4.7.1 [rand.util.seedseq] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11860 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11861 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#rand.util.seedseq">active issues</a> in [rand.util.seedseq].</p>
11862 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.seedseq">issues</a> in [rand.util.seedseq].</p>
11863 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11864 <p><b>Discussion:</b></p>
11866 The proper way to seed random number engines seems to be the most frequently
11867 discussed issue of the 26.4 [rand] proposal. While the new <tt>seed_seq</tt> approach is already rather
11868 general and probably sufficient for most situations, it is unlikely to be optimal in every case (one
11869 problem was pointed out in point T5 above). In some situations it might, for instance, be better to
11870 seed the state with a cryptographic generator.
11871 </p>
11873 In my opinion this is a pretty strong argument for extending the standard with a simple facility to
11874 customize the seeding procedure. This could, for example, be done with the following minimal
11875 changes:
11876 </p>
11879 <b>Possible resolution:</b>
11880 </p>
11882 <ol type="a">
11883 <li>
11884 Turn the interface specification of 26.4.7.1 [rand.util.seedseq]/2 into a "SeedSeq" requirement, where the
11885 exact behaviour of the constructors and the randomize method are left unspecified and where the
11886 const qualification for randomize is removed. Classes implementing this interface are additionally
11887 required to specialize the traits class in c).
11888 </li>
11889 <li>
11890 Provide the class <tt>seed_seq</tt> as a default implementation of the SeedSeq interface.
11891 </li>
11892 <li>
11894 Supplement the <tt>seed_seq</tt> with a traits class
11895 </p>
11896 <blockquote><pre>template &lt;typename T&gt;
11897 struct is_seed_seq { static const bool value = false; }
11898 </pre></blockquote>
11899 <p>and the specialization</p>
11900 <blockquote><pre>template &lt;&gt;
11901 struct is_seed_seq&lt;seed_seq&gt; { static const bool value = true; }
11902 </pre></blockquote>
11903 <p>which users can supplement with further specializations.</p>
11904 </li>
11905 <li>
11906 Change 26.4.1.3 [rand.req.eng]/1 d) to "q is an lvalue of a type that fulfils the SeedSeq requirements", and
11907 modify the constructors and seed methods in 26.4.3 [rand.eng] appropriately (the actual implementation
11908 could be done using the SFINAE technique).
11909 </li>
11910 </ol>
11912 <p><i>[
11913 Bellevue:
11914 ]</i></p>
11917 <blockquote>
11918 See N2424. Close NAD but note that "conceptizing" the library may cause
11919 this problem to be solved by that route.
11920 </blockquote>
11923 <p><b>Proposed resolution:</b></p>
11925 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11926 for the proposed resolution.
11927 </p>
11933 <hr>
11934 <h3><a name="733"></a>733. Comment on [rand.req.dist]/9</h3>
11935 <p><b>Section:</b> 26.4.1.5 [rand.req.dist] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11936 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11937 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11938 <p><b>Discussion:</b></p>
11940 The requirement "P shall have a declaration of the form <tt>typedef X distribution_-
11941 type</tt>" effectively makes the use of inheritance for implementing distributions very inconvenient,
11942 because the child of a distribution class in general will not satisfy this requirement. In my opinion
11943 the benefits of having a typedef in the parameter class pointing back to the distribution class are
11944 not worth the hassle this requirement causes. [In my code base I never made use of the nested
11945 typedef but on several occasions could have profited from being able to use simple inheritance for
11946 the implementation of a distribution class.]
11947 </p>
11950 <b>Proposed resolution:</b> I propose to drop this requirement.
11951 </p>
11953 <p><i>[
11954 Bellevue:
11955 ]</i></p>
11958 <blockquote>
11959 Close NAD for the reasons given in N2424. In practice it is not inconvenient to meet these requirements.
11960 </blockquote>
11964 <p><b>Proposed resolution:</b></p>
11966 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11967 for the proposed resolution.
11968 </p>
11974 <hr>
11975 <h3><a name="735"></a>735. Unfortunate naming</h3>
11976 <p><b>Section:</b> 26.4.8.2.2 [rand.dist.bern.bin], 26.4.8.2.4 [rand.dist.bern.negbin] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
11977 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11978 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
11979 <p><b>Discussion:</b></p>
11981 In my opinion the choice of name for the <tt>t</tt> parameter of the <tt>binomial_distribution</tt>
11982 is very unfortunate. In virtually every internet reference, book and software implementation
11983 this parameter is called <tt>n</tt> instead, see for example Wikipedia, Mathworld, Evans et al. (1993)
11984 Statistical Distributions, 2nd E., Wiley, p. 38, the R statistical computing language, p. 926,
11985 Mathematica and Matlab.
11986 </p>
11989 Similarly, the choice of <tt>k</tt> for the parameter of the negative binomial distributions is rather unusual.
11990 The most common choice for the negative binomial distribution seems to be <tt>r</tt> instead.
11991 </p>
11994 Choosing unusual names for the parameters causes confusion among users and makes the
11995 interface unnecessarily inconvenient to use.
11996 </p>
11999 <b>Possible resolution:</b> For these reasons, I propose to change the name of the respective parameters
12000 to <tt>n</tt> and <tt>r</tt>.
12001 </p>
12003 <p><i>[
12004 Bellevue:
12005 ]</i></p>
12008 <blockquote>
12009 In N2424. NAD It has been around for a while. It is hardly universal,
12010 there is prior art, and this would confuse people.
12011 </blockquote>
12014 <p><b>Proposed resolution:</b></p>
12016 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12017 for the proposed resolution.
12018 </p>
12024 <hr>
12025 <h3><a name="736"></a>736. Comment on [rand.dist.samp.discrete]</h3>
12026 <p><b>Section:</b> 26.4.8.5.1 [rand.dist.samp.discrete] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12027 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12028 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist.samp.discrete">issues</a> in [rand.dist.samp.discrete].</p>
12029 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12030 <p><b>Discussion:</b></p>
12031 <ol type="a">
12032 <li>
12033 The specification for <tt>discrete_distribution</tt> requires the member <tt>probabilities()</tt>
12034 to return a vector of <i>standardized</i> probabilities, which forces the implementation every time to
12035 divide each probability by the sum of all probabilities, as the sum will in practice almost never be
12036 exactly 1.0. This is unnecessarily inef ficient as the implementation would otherwise not need to
12037 compute the standardized probabilities at all and could instead work with the non-standardized
12038 probabilities and the sum. If there was no standardization the user would just get back the
12039 probabilities that were previously supplied to the distribution object, which to me seems to be the
12040 more obvious solution.
12041 </li>
12042 <li>
12043 The behaviour of <tt>discrete_distribution</tt> is not specified in case the number of given
12044 probabilities is larger than the maximum number representable by the IntType.
12045 </li>
12046 </ol>
12049 <b>Possible resolution:</b> I propose to change the specification such that the non-standardized
12050 probabilities need to be returned and that an additional requirement is included for the number
12051 of probabilities to be smaller than the maximum of IntType.
12052 </p>
12054 <p><i>[
12055 Stephan Tolksdorf adds pre-Bellevue:
12056 ]</i></p>
12059 <blockquote>
12061 In reply to the discussion in
12062 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12063 of this issue:
12064 </p>
12066 Rescaled floating-point parameter vectors can not be expected to compare
12067 equal because of the limited precision of floating-point numbers.
12068 My proposal would at least guarantee that a parameter
12069 vector (of type double) passed into the distribution would compare equal
12070 with the one returned by the <tt>probabilities()</tt> method. Furthermore, I do
12071 not understand why "the changed requirement would lead to a significant
12072 increase in the amount of state in the distribution object". A typical
12073 implementation's state would increase by exactly one number: the sum of
12074 all probabilities. The textual representation for serialization would
12075 not need to grow at all. Finally, the proposed replacement "<tt>0 &lt; n &lt;=
12076 numeric_limits&lt;IntType&gt;::max() + 1</tt>" makes the implementation
12077 unnecessarily complicated, "<tt>0 &lt; n &lt;= numeric_limits&lt;IntType&gt;::max()</tt>"
12078 would be better.
12079 </p>
12080 </blockquote>
12082 <p><i>[
12083 Bellevue:
12084 ]</i></p>
12087 <blockquote>
12089 In N2424. We agree with the observation and the proposed resolution to
12090 part b). We recommend the wording n &gt; 0 be replaced with 0 &lt; n
12091 numeric_limits::max() + 1. However, we disagree with part a), as it
12092 would interfere with the definition of parameters' equality. Further,
12093 the changed requirement would lead to a significant increase in the
12094 amount of state of the distribution object.
12095 </p>
12098 As it stands now, it is convenient, and the changes proposed make it
12099 much less so.
12100 </p>
12103 NAD. Part a the current behavior is desirable. Part b, any constructor
12104 can fail, but the rules under which it can fail do not need to be listed
12105 here.
12106 </p>
12107 </blockquote>
12110 <p><b>Proposed resolution:</b></p>
12112 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12113 for the proposed resolution.
12114 </p>
12116 <p><i>[
12117 Stephan Tolksdorf adds pre-Bellevue:
12118 ]</i></p>
12121 <blockquote>
12123 In 26.4.8.5.1 [rand.dist.samp.discrete]:
12124 </p>
12127 Proposed wording a):
12128 </p>
12130 <blockquote>
12132 Changae in para. 2
12133 </p>
12135 <blockquote>
12136 Constructs a <tt>discrete_distribution</tt> object with <tt>n=1</tt> and <tt>p<sub>0</sub> <ins>= w<sub>0</sub></ins> = 1</tt>
12137 </blockquote>
12140 and change in para. 5
12141 </p>
12143 <blockquote>
12144 <i>Returns:</i> A <tt>vector&lt;double&gt;</tt> whose <tt>size</tt> member returns <tt>n</tt> and whose
12145 <tt>operator[]</tt> member returns <del><tt>p<sub>k</sub></tt></del>
12146 <ins>the weight <tt>w<sub>k</sub></tt> as a double value</ins>
12147 when invoked with argument <tt>k</tt> for <tt>k = 0,
12148 ..., n-1</tt>
12149 </blockquote>
12151 </blockquote>
12154 Proposed wording b):
12155 </p>
12157 <blockquote>
12159 Change in para. 3:
12160 </p>
12162 <blockquote>
12163 If <tt>firstW == lastW</tt>, let the sequence <tt>w</tt> have length <tt>n = 1</tt> and consist
12164 of the single value <tt>w<sub>0</sub> = 1</tt>. Otherwise, <tt>[firstW,lastW)</tt> shall form a
12165 sequence <tt>w</tt> of length <tt>n <del>&gt; 0</del></tt>
12166 <ins>such that <tt>0 &lt; n &lt;= numeric_limits&lt;IntType&gt;::max()</tt>,</ins>
12167 and <tt>*firstW</tt> shall yield a value <tt>w<sub>0</sub></tt>
12168 convertible to <tt>double</tt>. [<i>Note:</i> The values <tt>w<sub>k</sub></tt> are commonly known
12169 as the weights . <i>-- end note</i>]
12170 </blockquote>
12172 </blockquote>
12174 </blockquote>
12180 <hr>
12181 <h3><a name="737"></a>737. Comment on [rand.dist.samp.pconst]</h3>
12182 <p><b>Section:</b> 26.4.8.5.2 [rand.dist.samp.pconst] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12183 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12184 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#rand.dist.samp.pconst">active issues</a> in [rand.dist.samp.pconst].</p>
12185 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist.samp.pconst">issues</a> in [rand.dist.samp.pconst].</p>
12186 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12187 <p><b>Discussion:</b></p>
12188 <ol type="a">
12189 <li>
12190 The discussion in point T11 above regarding <tt>probabilities()</tt> similarly applies
12191 to the method <tt>densities()</tt> of <tt>piecewise_constant_distribution</tt>.
12192 </li>
12193 <li>
12195 The design of the constructor
12196 </p>
12197 <blockquote><pre>template &lt;class InputIteratorB, class InputIteratorW&gt;
12198 piecewise_constant_distribution( InputIteratorB firstB, InputIteratorB lastB,
12199 InputIteratorW firstW);
12200 </pre></blockquote>
12202 is unnecessarily unsafe, as there is no separate end-iterator given for the weights. I can't see
12203 any performance or convenience reasons that would justify the risks inherent in such a function
12204 interface, in particular the risk that input error might go unnoticed.
12205 </p>
12206 </li>
12207 </ol>
12210 <b>Possible resolution:</b> I propose to add an <tt>InputIteratorW lastW</tt> argument to the interface.
12211 </p>
12213 <p><i>[
12214 Stephan Tolksdorf adds pre-Bellevue:
12215 ]</i></p>
12217 <blockquote>
12218 In reply to the discussion in
12219 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12220 I'd like to make the same comments as for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#736">736</a>.
12221 </blockquote>
12223 <p><i>[
12224 Bellevue:
12225 ]</i></p>
12228 <blockquote>
12229 In N2424. There is already precedent elsewhere in the library. Follows existing convention. NAD.
12230 </blockquote>
12233 <p><b>Proposed resolution:</b></p>
12235 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12236 for the proposed resolution.
12237 </p>
12239 <p><i>[
12240 Stephan Tolksdorf adds pre-Bellevue:
12241 ]</i></p>
12244 <blockquote>
12246 In 26.4.8.5.2 [rand.dist.samp.pconst]:
12247 </p>
12250 Proposed wording a)
12251 </p>
12253 <blockquote>
12255 Change in para. 2
12256 </p>
12257 <blockquote>
12258 Constructs a <tt>piecewise_constant_distribution</tt> object with <tt>n = 1</tt>, <tt>p<sub>0</sub> <ins>= w<sub>0</sub></ins> = 1</tt>,
12259 <tt>b<sub>0</sub> = 0</tt>, and <tt>b<sub>1</sub> = 1</tt>
12260 </blockquote>
12263 and change in para. 5
12264 </p>
12266 <blockquote>
12267 A <tt>vector&lt;result_type&gt;</tt> whose <tt>size</tt> member returns <tt>n</tt> and whose <tt>operator[]</tt>
12268 member returns <del><tt>p<sub>k</sub></tt></del>
12269 <ins>the weight <tt>w<sub>k</sub></tt> as a double value</ins>
12270 when invoked with argument <tt>k</tt> for <tt>k = 0, ..., n-1</tt>
12271 </blockquote>
12273 </blockquote>
12276 Proposed wording b)
12277 </p>
12279 <blockquote>
12281 Change both occurrences of
12282 </p>
12284 <blockquote>
12285 "piecewise_constant_distribution(InputIteratorB firstB, InputIteratorB lastB,
12286 InputIteratorW firstW<ins>, InputIteratorW lastW</ins>)
12287 </blockquote>
12290 and change in para. 3
12291 </p>
12293 <blockquote>
12294 <del>the length of the sequence <tt>w</tt> starting from <tt>firstW</tt> shall be at least <tt>n</tt>,
12295 <tt>*firstW</tt> shall return a value <tt>w<sub>0</sub></tt> that is convertible to <tt>double</tt>, and any
12296 <tt>w<sub>k</sub></tt> for <tt>k &gt;= n</tt> shall be ignored by the distribution</del>
12297 <ins><tt>[firstW, lastW)</tt> shall form a sequence <tt>w</tt> of length <tt>n</tt> whose leading element
12298 <tt>w<sub>0</sub></tt> shall be convertible to <tt>double</tt></ins>
12299 </blockquote>
12301 </blockquote>
12304 </blockquote>
12311 <hr>
12312 <h3><a name="738"></a>738. Editorial issue in [rand.adapt.disc]/3</h3>
12313 <p><b>Section:</b> 26.4.4.1 [rand.adapt.disc] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
12314 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12315 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
12316 <p><b>Discussion:</b></p>
12318 Since the template parameter <tt>p</tt> and <tt>r</tt> are of type <tt>size_t</tt>, the member <tt>n</tt> in the class
12319 exposition should have type <tt>size_t</tt>, too.
12320 </p>
12323 <p><b>Proposed resolution:</b></p>
12325 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12326 for the proposed resolution.
12327 </p>
12333 <hr>
12334 <h3><a name="739"></a>739. Defect in [rand.util.canonical]/3</h3>
12335 <p><b>Section:</b> 26.4.7.2 [rand.util.canonical] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12336 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12337 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.util.canonical">issues</a> in [rand.util.canonical].</p>
12338 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12339 <p><b>Discussion:</b></p>
12341 The complexity of <tt>generate_canonical</tt> is specified to be "exactly k=max(1, ceil(b/log2
12342 R)) invocations of g". This terms involves a logarithm that is not rounded and hence can not (in
12343 general) be computed at compile time. As this function template is performance critical, I propose
12344 to replace ceil(b/log2 R) with ceil(b/floor(log2 R)).
12345 </p>
12348 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12349 for further discussion.
12350 </p>
12352 <p><i>[
12353 Bellevue:
12354 ]</i></p>
12357 <blockquote>
12358 In N2424. Close NAD as described there.
12359 </blockquote>
12363 <p><b>Proposed resolution:</b></p>
12365 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12366 for the proposed resolution.
12367 </p>
12373 <hr>
12374 <h3><a name="741"></a>741. Const-incorrect <tt>get_deleter</tt> function for <tt>shared_ptr</tt></h3>
12375 <p><b>Section:</b> 20.6.12.2.11 [util.smartptr.getdeleter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12376 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-09-27</p>
12377 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.getdeleter">issues</a> in [util.smartptr.getdeleter].</p>
12378 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12379 <p><b>Discussion:</b></p>
12381 The following issue was raised by Alf P. Steinbach in c.l.c++.mod:
12382 </p>
12385 According to the recent draft N2369, both the header memory synopsis
12386 of 20.6 [memory] and 20.6.12.2.11 [util.smartptr.getdeleter] declare:
12387 </p>
12389 <blockquote><pre>template&lt;class D, class T&gt; D* get_deleter(shared_ptr&lt;T&gt; const&amp; p);
12390 </pre></blockquote>
12393 This allows to retrieve the pointer to a mutable deleter of a <tt>const
12394 shared_ptr</tt> (if that owns one) and therefore contradicts the usual
12395 philosophy that associated functors are either read-only (e.g.
12396 <tt>key_comp</tt> or <tt>value_comp</tt> of <tt>std::map</tt>) or do at least reflect
12397 the mutability of the owner (as seen for the both overloads of
12398 <tt>unique_ptr::get_deleter</tt>).
12399 Even the next similar counter-part of <tt>get_deleter</tt> - the two
12400 overloads of <tt>function::target</tt> in the class template function
12401 synopsis 20.5.15.2 [func.wrap.func] or in 20.5.15.2.5 [func.wrap.func.targ] - do
12402 properly mirror the const-state of the owner.
12403 </p>
12405 <b>Possible proposed resolutions:</b>
12408 Replace the declarations of <tt>get_deleter</tt> in the header <tt>&lt;memory&gt;</tt>
12409 synopsis of 20.6 [memory] and in 20.6.12.2.11 [util.smartptr.getdeleter] by one of the
12410 following alternatives (A) or (B):
12411 </p>
12413 <ol type="A">
12414 <li>
12415 Provide <b>only</b> the immutable variant. This would reflect the
12416 current praxis of <tt>container::get_allocator()</tt>, <tt>map::key_comp()</tt>, or
12417 <tt>map::value_comp</tt>.
12419 <blockquote><pre>template&lt;class D, class T&gt; const D* get_deleter(shared_ptr&lt;T&gt; const&amp; p);
12420 </pre></blockquote>
12421 </li>
12422 <li>
12423 Just remove the function.
12424 </li>
12425 </ol>
12428 Alberto Ganesh Barbati adds:
12429 </p>
12431 <ol start="3" type="A">
12432 <li>
12434 Replace it with two functions:
12435 </p>
12436 <blockquote><pre>template &lt;class D, class T&gt; D get_deleter(shared_ptr&lt;T&gt; const&amp;);
12437 template &lt;class D, class T&gt; bool has_deleter(shared_ptr&lt;T&gt; const&amp;);
12438 </pre></blockquote>
12441 The first one would throw if <tt>D</tt> is the wrong type, while the latter would
12442 never throw. This approach would reflect the current praxis of
12443 <tt>use_facet/has_facet</tt>, with the twist of returning the deleter by value as
12444 <tt>container::get_allocator()</tt> do.
12445 </p>
12446 </li>
12447 </ol>
12450 Peter Dimov adds:
12451 </p>
12453 <blockquote>
12455 My favorite option is "not a defect". A, B and C break useful code.
12456 </p>
12457 </blockquote>
12459 <p><i>[
12460 Bellevue:
12461 ]</i></p>
12464 <blockquote>
12465 Concern this is similar to confusing "pointer to const" with "a constant pointer".
12466 </blockquote>
12469 <p><b>Proposed resolution:</b></p>
12471 </p>
12477 <hr>
12478 <h3><a name="745"></a>745. copy_exception API slices.</h3>
12479 <p><b>Section:</b> 18.7.5 [propagation] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12480 <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
12481 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#propagation">active issues</a> in [propagation].</p>
12482 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#propagation">issues</a> in [propagation].</p>
12483 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12484 <p><b>Discussion:</b></p>
12486 It could be I did not understand the design rationale, but I thought
12487 copy_exception would produce an exception_ptr to the most-derived (dynamic)
12488 type of the passed exception. Instead it slices, which appears to be less
12489 useful, and a likely source of FAQ questions in the future.
12490 </p>
12492 (Peter Dimov suggests NAD)
12493 </p>
12495 <p><i>[
12496 Bellevue:
12497 ]</i></p>
12500 <blockquote>
12502 How could this be implemented in a way that the dynamic type is cloned?
12503 </p>
12505 The feature is designed to create an exception_ptr from an object whose
12506 static type is identical to the dynamic type and thus there is no
12507 slicing involved.
12508 </p>
12509 </blockquote>
12512 <p><b>Proposed resolution:</b></p>
12514 </p>
12520 <hr>
12521 <h3><a name="748"></a>748. The is_abstract type trait is defined by reference to 10.4.</h3>
12522 <p><b>Section:</b> 20.4.4.3 [meta.unary.prop] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12523 <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
12524 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#meta.unary.prop">active issues</a> in [meta.unary.prop].</p>
12525 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#meta.unary.prop">issues</a> in [meta.unary.prop].</p>
12526 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12527 <p><b>Discussion:</b></p>
12529 I am trying to decide is a pure virtual function is a <i>necessary</i> as well as
12530 sufficient requirement to be classified as abstract?
12531 </p>
12533 For instance, is the following (non-polymorphic) type considered abstract?
12534 </p>
12535 <blockquote><pre>struct abstract {
12536 protected:
12537 &nbsp;abstract(){}
12538 &nbsp;abstract( abstract const &amp; ) {}
12539 &nbsp;~abstract() {}
12541 </pre></blockquote>
12543 (Suggested that this may be NAD, with an editorial fix-up from Pete on the
12544 core wording to make clear that abstract requires a pure virtual function)
12545 </p>
12548 <p><b>Proposed resolution:</b></p>
12550 Core has clarified that the definition abstract is adequate. Issue withdrawn by submitter. NAD.
12551 </p>
12557 <hr>
12558 <h3><a name="754"></a>754. Ambiguous return clause for <tt>std::uninitialized_copy</tt></h3>
12559 <p><b>Section:</b> 20.6.10.1 [uninitialized.copy] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
12560 <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-10-15</p>
12561 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#uninitialized.copy">issues</a> in [uninitialized.copy].</p>
12562 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
12563 <p><b>Discussion:</b></p>
12565 14882-2003, [lib.uninitialized.copy] is currently written as follows:
12566 </p>
12568 <blockquote>
12569 <pre>template &lt;class InputIterator, class ForwardIterator&gt;
12570 ForwardIterator uninitialized_copy(InputIterator <i>first</i>, InputIterator <i>last</i>,
12571 ForwardIterator <i>result</i>);
12572 </pre>
12573 <blockquote>
12575 -1- <i>Effects:</i>
12576 </p>
12577 <blockquote><pre>for (; first != last; ++result, ++first)
12578 new (static_cast&lt;void*&gt;(&amp;*result))
12579 typename iterator_traits&lt;ForwardIterator&gt;::value_type(*first);
12580 </pre></blockquote>
12582 -2- <i>Returns:</i> <tt><i>result</i></tt>
12583 </p>
12584 </blockquote>
12585 </blockquote>
12588 similarily for N2369, and its corresponding section
12589 20.6.10.1 [uninitialized.copy].
12590 </p>
12593 It's not clear to me what the return clause is supposed to mean, I see
12595 possible interpretations:
12596 </p>
12598 <ol type="a">
12599 <li>
12600 The notion of <tt><i>result</i></tt> is supposed to mean the value given by the
12601 function parameter <tt><i>result</i></tt> [Note to the issue editor: Please use italics for
12602 <tt><i>result</i></tt>].
12603 This seems somewhat implied by recognizing that both the function
12604 parameter
12605 and the name used in the clause do have the same italic font.
12606 </li>
12607 <li>
12608 The notion of "result" is supposed to mean the value of <tt><i>result</i></tt>
12609 after the
12610 preceding effects clause. This is in fact what all implementations I
12611 checked
12612 do (and which is probably it's intend, because it matches the
12613 specification of <tt>std::copy</tt>).
12614 </li>
12615 </ol>
12618 The problem is: I see nothing in the standard which grants that this
12619 interpretation
12620 is correct, specifically [lib.structure.specifications] or
12621 17.3.1.3 [structure.specifications]
12622 resp. do not clarify which "look-up" rules apply for names found in
12623 the elements
12624 of the detailed specifications - Do they relate to the corresponding
12625 synopsis or
12626 to the effects clause (or possibly other elements)? Fortunately most
12627 detailed
12628 descriptions are unambigious in this regard, e.g. this problem does
12629 not apply
12630 for <tt>std::copy</tt>.
12631 </p>
12635 <p><b>Proposed resolution:</b></p>
12637 Change the wording of the return clause to say (20.6.10.1 [uninitialized.copy]):
12638 </p>
12640 <blockquote>
12642 -2- <i>Returns:</i> <ins>The value of</ins> <tt><i>result</i></tt> <ins>after effects have taken place.</ins>
12643 </p>
12644 </blockquote>
12647 <p><i>[
12648 Bellevue:
12649 ]</i></p>
12652 <blockquote>
12653 Resolution: NAD editorial -- project editor to decide if change is
12654 worthwhile. Concern is that there are many other places this might
12655 occur.
12656 </blockquote>
12661 <hr>
12662 <h3><a name="757"></a>757. Typo in the synopsis of vector</h3>
12663 <p><b>Section:</b> 23.2.6 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">Pending NAD Editorial</a>
12664 <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2007-11-04</p>
12665 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector">issues</a> in [vector].</p>
12666 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Pending%20NAD%20Editorial">Pending NAD Editorial</a> status.</p>
12667 <p><b>Discussion:</b></p>
12669 In the synopsis 23.2.6 [vector], there is the signature:
12670 </p>
12672 <blockquote><pre>void insert(const_iterator position, size_type n, T&amp;&amp; x);
12673 </pre></blockquote>
12676 instead of:
12677 </p>
12679 <blockquote><pre>iterator insert(const_iterator position, T&amp;&amp; x);
12680 </pre></blockquote>
12683 23.2.6.4 [vector.modifiers] is fine.
12684 </p>
12688 <p><b>Proposed resolution:</b></p>
12690 Change the synopsis in 23.2.6 [vector]:
12691 </p>
12693 <blockquote><pre>iterator insert(const_iterator position, const T&amp; x);
12694 <ins>iterator insert(const_iterator position, T&amp;&amp; x);</ins>
12695 void insert(const_iterator position, size_type n, const T&amp; x);
12696 <del>void insert(const_iterator position, size_type n, T&amp;&amp; x);</del>
12697 </pre></blockquote>
12703 <hr>
12704 <h3><a name="763"></a>763. Renaming <tt>emplace()</tt> overloads</h3>
12705 <p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12706 <b>Submitter:</b> Sylvain Pion <b>Date:</b> 2007-12-04</p>
12707 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#associative.reqmts">issues</a> in [associative.reqmts].</p>
12708 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12709 <p><b>Discussion:</b></p>
12711 The associative containers provide 2 overloads of <tt>emplace()</tt>:
12712 </p>
12714 <blockquote><pre>template &lt;class... Args&gt; pair&lt;iterator, bool&gt; emplace(Args&amp;&amp;... args);
12715 template &lt;class... Args&gt; iterator emplace(const_iterator position, Args&amp;&amp;... args);
12716 </pre></blockquote>
12719 This is a problem if you mean the first overload while passing
12720 a <tt>const_iterator</tt> as first argument.
12721 </p>
12723 <p><i>[
12724 Related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#767">767</a>
12725 ]</i></p>
12728 <p><i>[
12729 Bellevue:
12730 ]</i></p>
12733 <blockquote>
12734 </blockquote>
12736 This can be disambiguated by passing "begin" as the first argument in
12737 the case when the non-default choice is desired. We believe that desire
12738 will be rare.
12739 </p>
12741 Resolution: Change state to NAD.
12742 </p>
12745 <p><b>Proposed resolution:</b></p>
12747 Rename one of the two overloads.
12748 For example to <tt>emplace_here</tt>, <tt>hint_emplace</tt>...
12749 </p>
12755 <hr>
12756 <h3><a name="764"></a>764. <tt>equal_range</tt> on unordered containers should return a <tt>pair</tt> of <tt>local_iterators</tt></h3>
12757 <p><b>Section:</b> 23.1.3 [unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12758 <b>Submitter:</b> Joe Gottman <b>Date:</b> 2007-11-29</p>
12759 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#unord.req">issues</a> in [unord.req].</p>
12760 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12761 <p><b>Discussion:</b></p>
12763 A major attribute of the unordered containers is that iterating
12764 though them inside a bucket is very fast while iterating between buckets
12765 can be much slower. If an unordered container has a low load factor,
12766 iterating between the last iterator in one bucket and the next iterator,
12767 which is in another bucket, is <tt>O(bucket_count())</tt> which may be much
12768 larger than <tt>O(size())</tt>.
12769 </p>
12771 If <tt>b</tt> is an non-const unordered container of type <tt>B</tt> and <tt>k</tt> is an
12772 object of it's <tt>key_type</tt>, then <tt>b.equal_range(k)</tt> currently returns
12773 <tt>pair&lt;B::iterator, B::iterator&gt;</tt>. Consider the following code:
12774 </p>
12776 <blockquote><pre>B::iterator lb, ub;
12777 tie(lb, ub) = b.equal_range(k);
12778 for (B::iterator it = lb; it != ub; ++it) {
12779 // Do something with *it
12781 </pre></blockquote>
12784 If <tt>b.equal_range(k)</tt> returns a non-empty range (i.e. <tt>b</tt> contains at least
12785 on element whose key is equivalent to <tt>k</tt>), then every iterator in the
12786 half-open range <tt>[lb, ub)</tt> will be in the same bucket, but <tt>ub</tt> will likely
12787 either be in a different bucket or be equal to <tt>b.end()</tt>. In either case,
12788 iterating between <tt>ub - 1</tt> and <tt>ub</tt> could take a much longer time than
12789 iterating through the rest of the range.
12790 </p>
12792 If instead of returning <tt>pair&lt;iterator, iterator&gt;</tt>, <tt>equal_range</tt> were to
12793 return <tt>pair&lt;local_iterator, local_iterator&gt;</tt>, then <tt>ub</tt> (which, like <tt>lb</tt>,
12794 would now be a <tt>local_iterator</tt>) could be guaranteed to always be in the
12795 same bucket as <tt>lb</tt>. In the cases where currently <tt>ub</tt> is equal to <tt>b.end()</tt>
12796 or is in a different bucket, <tt>ub</tt> would be equal to <tt>b.end(b.bucket(key))</tt>.
12797 This would make iterating between <tt>lb</tt> and <tt>ub</tt> much faster, as every
12798 iteration would be constant time.
12799 </p>
12801 <p><i>[
12802 Bellevue:
12803 ]</i></p>
12806 <blockquote>
12807 The proposed resolution breaks consistency with other container types
12808 for dubious benefit, and iterators are already constant time.
12809 </blockquote>
12813 <p><b>Proposed resolution:</b></p>
12815 Change the entry for <tt>equal_range</tt> in Table 93 (23.1.3 [unord.req]) as follows:
12816 </p>
12817 <table border="1">
12818 <tbody><tr>
12819 <th>expression</th> <th>return type</th> <th>assertion/note pre/post-condition</th> <th>complexity</th>
12820 </tr>
12822 <tr>
12823 <td><tt>b.equal_range(k)</tt></td>
12824 <td><tt>pair&lt;<ins>local_</ins>iterator,<ins>local_</ins>iterator&gt;; pair&lt;const_<ins>local_</ins>iterator,const_<ins>local_</ins>iterator&gt;</tt> for <tt>const b</tt>.</td>
12825 <td>Returns a range containing all elements with keys equivalent to <tt>k</tt>. Returns <tt>make_pair(b.end(<ins>b.bucket(key)</ins>),b.end(<ins>b.bucket(key)</ins>))</tt> if no such elements exist.</td>
12826 <td>Average case &#920;<tt>(b.count(k))</tt>. Worst case &#920;<tt>(b.size())</tt>. </td>
12827 </tr>
12828 </tbody></table>
12834 <hr>
12835 <h3><a name="773"></a>773. issues with random</h3>
12836 <p><b>Section:</b> 26.4.8.1 [rand.dist.uni] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12837 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-01-14</p>
12838 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist.uni">issues</a> in [rand.dist.uni].</p>
12839 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12840 <p><b>Discussion:</b></p>
12841 <ol>
12842 <li>
12843 26.4.8.1.1 [rand.dist.uni.int] <tt>uniform_int</tt> constructor has changed the default
12844 max constructor parameter from 9 (in TR1) to <tt>max()</tt>. The value
12845 is arbitrary at best and shouldn't be lightly changed because
12846 it breaks backward compatibility.
12847 </li>
12849 <li>
12850 26.4.8.1.1 [rand.dist.uni.int] <tt>uniform_int</tt> has a parameter <tt>param</tt> that you can
12851 provide on construction or <tt>operator()</tt>, set, and get. But there
12852 is not even a hint of what this might be for.
12853 </li>
12855 <li>
12856 26.4.8.1.2 [rand.dist.uni.real] <tt>uniform_real</tt>. Same issue as #2.
12857 </li>
12858 </ol>
12860 <p><i>[
12861 Bellevue:
12862 ]</i></p>
12865 <blockquote>
12866 NAD. Withdrawn.
12867 </blockquote>
12870 <p><b>Proposed resolution:</b></p>
12872 </p>
12878 <hr>
12879 <h3><a name="784"></a>784. unique_lock::release</h3>
12880 <p><b>Section:</b> 30.3.3.2.3 [thread.lock.unique.mod] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12881 <b>Submitter:</b> Constantine Sapuntzakis <b>Date:</b> 2008-02-02</p>
12882 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12883 <p><b>Discussion:</b></p>
12885 <tt>unique_lock::release</tt> will probably lead to many mistakes where people
12886 call <tt>release</tt> instead of <tt>unlock</tt>. I just coded such a mistake using the
12887 boost pre-1.35 threads library last week.
12888 </p>
12891 In many threading libraries, a call with <tt>release</tt> in it unlocks the
12892 lock (e.g. ReleaseMutex in Win32, java.util.concurrent.Semaphore).
12893 </p>
12896 I don't call <tt>unique_lock::lock</tt> much at all, so I don't get to see the
12897 symmetry between <tt>::lock</tt> and <tt>::unlock</tt>. I usually use the constructor to
12898 lock the mutex. So I'm left to remember whether to call <tt>release</tt> or
12899 <tt>unlock</tt> during the few times I need to release the mutex before the scope
12900 ends. If I get it wrong, the compiler doesn't warn me.
12901 </p>
12904 An alternative name for release may be <tt>disown</tt>.
12905 </p>
12908 This might be a rare case where usability is hurt by consistency with
12909 the rest of the C++ standard (e.g. <tt>std::auto_ptr::release</tt>).
12910 </p>
12912 <p><i>[
12913 Bellevue:
12914 ]</i></p>
12917 <blockquote>
12918 Change a name from release to disown. However prior art uses the release
12919 name. Compatibility with prior art is more important that any possible
12920 benefit such a change might make. We do not see the benefit for
12921 changing. NAD
12922 </blockquote>
12925 <p><b>Proposed resolution:</b></p>
12927 Change the synopsis in 30.3.3.2 [thread.lock.unique]:
12928 </p>
12930 <blockquote><pre>template &lt;class Mutex&gt;
12931 class unique_lock
12933 public:
12935 mutex_type* <del>release</del> <ins>disown</ins>();
12938 </pre></blockquote>
12941 Change 30.3.3.2.3 [thread.lock.unique.mod]:
12942 </p>
12944 <blockquote><pre>mutex_type *<del>release</del> <ins>disown</ins>();
12945 </pre></blockquote>
12951 <hr>
12952 <h3><a name="790"></a>790. <tt>xor_combine::seed</tt> not specified</h3>
12953 <p><b>Section:</b> 26.4.4.4 [rand.adapt.xor] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12954 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
12955 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.adapt.xor">issues</a> in [rand.adapt.xor].</p>
12956 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12957 <p><b>Discussion:</b></p>
12959 <tt>xor_combine::seed(result_type)</tt> and <tt>seed(seed_seq&amp;)</tt> don't say what
12960 happens to each of the sub-engine seeds. (Should probably do the same
12961 to both, unlike TR1.)
12962 </p>
12964 <p><i>[
12965 Bellevue:
12966 ]</i></p>
12969 <blockquote>
12970 Overcome by the previous proposal. NAD mooted by resolution of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#789">789</a>.
12971 </blockquote>
12975 <p><b>Proposed resolution:</b></p>
12981 <hr>
12982 <h3><a name="791"></a>791. <tt>piecewise_constant_distribution::densities</tt> has wrong name</h3>
12983 <p><b>Section:</b> 26.4.8.5.2 [rand.dist.samp.pconst] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12984 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
12985 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#rand.dist.samp.pconst">active issues</a> in [rand.dist.samp.pconst].</p>
12986 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist.samp.pconst">issues</a> in [rand.dist.samp.pconst].</p>
12987 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
12988 <p><b>Discussion:</b></p>
12990 <tt>piecewise_constant_distribution::densities()</tt> should be <tt>probabilities()</tt>,
12991 just like <tt>discrete_distribution</tt>. (There's no real use for weights divided
12992 by areas.)
12993 </p>
12995 <p><i>[
12996 Bellevue:
12997 ]</i></p>
13000 <blockquote>
13002 Fermilab does not agree with this summary. As defined in the equation in
13003 26.4.8.5.2/4, the quantities are indeed probability densities not
13004 probabilities. Because we view this distribution as a parameterization
13005 of a *probability density function*, we prefer to work in terms of
13006 probability densities.
13007 </p>
13010 We don't think this should be changed.
13011 </p>
13014 If there is a technical argument about why the implementation dealing
13015 with these values can't be as efficient as one dealing with
13016 probabilities, we might reconsider. We don't care about this one member
13017 function being somewhat more or less efficient; we care about the size
13018 of the distribution object and the speed of the calls to generate
13019 variates.
13020 </p>
13021 </blockquote>
13025 <p><b>Proposed resolution:</b></p>
13028 Change synopsis in 26.4.8.5.2 [rand.dist.samp.pconst]:
13029 </p>
13031 <blockquote><pre>template &lt;class RealType = double&gt;
13032 class piecewise_constant_distribution
13034 public:
13036 vector&lt;double&gt; <del>densities</del> <ins>probabilities</ins>() const;
13039 </pre></blockquote>
13042 Change 26.4.8.5.2 [rand.dist.samp.pconst]/6:
13043 </p>
13045 <blockquote><pre>vector&lt;double&gt; <del>densities</del> <ins>probabilities</ins>() const;
13046 </pre></blockquote>
13053 <hr>
13054 <h3><a name="795"></a>795. <tt>general_pdf_distribution</tt> should be dropped</h3>
13055 <p><b>Section:</b> 26.4.8.5.3 [rand.dist.samp.genpdf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
13056 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13057 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.dist.samp.genpdf">issues</a> in [rand.dist.samp.genpdf].</p>
13058 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Dup">Dup</a> status.</p>
13059 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a></p>
13060 <p><b>Discussion:</b></p>
13062 <tt>general_pdf_distribution</tt> should be dropped. (It's a research topic in
13063 adaptive numerical integration.)
13064 </p>
13066 <p><i>[
13067 Stephan Tolksdorf notes:
13068 ]</i></p>
13071 <blockquote>
13072 This appears to be a duplicate of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>.
13073 </blockquote>
13076 <p><b>Proposed resolution:</b></p>
13083 <hr>
13084 <h3><a name="796"></a>796. <tt>ranlux48_base</tt> returns wrong value</h3>
13085 <p><b>Section:</b> 26.4.5 [rand.predef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
13086 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13087 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.predef">issues</a> in [rand.predef].</p>
13088 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
13089 <p><b>Discussion:</b></p>
13091 The 10,000<sup>th</sup> value returned by <tt>ranlux48_base</tt> is supposed to be
13092 61839128582725. We get 192113843633948. (Note that the underlying
13093 generator was changed in Kona.)
13094 </p>
13096 <p><i>[
13097 Bellevue:
13098 ]</i></p>
13101 <blockquote>
13102 Submitter withdraws defect.
13103 </blockquote>
13107 <p><b>Proposed resolution:</b></p>
13109 Change 26.4.5 [rand.predef]/p5:
13110 </p>
13112 <blockquote>
13113 <pre>typedef subtract_with_carry_engine&lt;uint_fast64_t, 48, 5, 12&gt;
13114 ranlux48_base;
13115 </pre>
13116 <blockquote>
13117 <i>Required behavior:</i> The 10000<sup>th</sup> consecutive invocation of a default-constructed
13118 object of type <tt>ranlux48_base</tt> shall produce the value
13119 <del>61839128582725</del> <ins>192113843633948</ins>.
13120 </blockquote>
13121 </blockquote>
13127 <hr>
13128 <h3><a name="797"></a>797. <tt>ranlux48</tt> returns wrong value</h3>
13129 <p><b>Section:</b> 26.4.5 [rand.predef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
13130 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13131 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.predef">issues</a> in [rand.predef].</p>
13132 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
13133 <p><b>Discussion:</b></p>
13135 The 10,000<sup>th</sup> value returned by <tt>ranlux48</tt> is supposed to be
13136 249142670248501. We get 88229545517833. (Note that this depends
13137 on <tt>ranlux48_base</tt>.)
13138 </p>
13139 <p><i>[
13140 Bellevue:
13141 ]</i></p>
13144 <blockquote>
13145 Submitter withdraws defect.
13146 </blockquote>
13150 <p><b>Proposed resolution:</b></p>
13152 Change 26.4.5 [rand.predef]/p6:
13153 </p>
13155 <blockquote>
13156 <pre>typedef discard_block_engine&lt;ranlux48_base, 389, 11&gt;
13157 ranlux48
13158 </pre>
13159 <blockquote>
13160 <i>Required behavior:</i> The 10000<sup>th</sup> consecutive invocation of a default-constructed
13161 object of type <tt>ranlux48</tt> shall produce the value
13162 <del>249142670248501</del> <ins>88229545517833</ins>.
13163 </blockquote>
13164 </blockquote>
13170 <hr>
13171 <h3><a name="799"></a>799. [tr.rand.eng.mers] and [rand.eng.mers]</h3>
13172 <p><b>Section:</b> 26.4.3.2 [rand.eng.mers], TR1 5.1.4.2 [tr.rand.eng.mers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
13173 <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2008-02-18</p>
13174 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.eng.mers">issues</a> in [rand.eng.mers].</p>
13175 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
13176 <p><b>Discussion:</b></p>
13178 TR1 5.1.4.2 [tr.rand.eng.mers](10) requires that <tt>operator==</tt> for the <tt>mersenne_twister</tt>
13179 returns <tt>true</tt> if and only if the states of two <tt>mersenne_twisters</tt>,
13180 consisting each of <tt>n</tt> integers between <tt>0</tt> and <tt>2<sup>w</sup> - 1</tt>, are completely
13181 equal. This is a contradiction with TR1 5.1.1 [tr.rand.req](3) because the given
13182 definition of the state also includes the lower <tt>r</tt> bits of <tt>x(i-n)</tt>, which
13183 will never be used to generate a random number. If two <tt>mersenne_twister</tt>s
13184 only differ in the lower bits of <tt>x(i-n)</tt> they will not compare equal,
13185 although they will produce an identical sequence of random numbers.
13186 </p>
13189 26.4.3.2 [rand.eng.mers] in the latest C++ draft does not specify the behaviour
13190 of <tt>operator==</tt> but uses a similar definition of the state and, just like
13191 TR1 5.1.4.2 [tr.rand.eng.mers], requires the textual representation of a
13192 <tt>mersenne_twister_engine</tt> to consist of <tt>X<sub>i-n</sub></tt> to <tt>X<sub>i-1</sub></tt>, including the
13193 lower bits of <tt>X<sub>i-n</sub></tt>. This leads to two problems: First, the
13194 unsuspecting implementer is likely to erroneously compare the lower <tt>r</tt>
13195 bits of <tt>X<sub>i-n</sub></tt> in <tt>operator==</tt>. Second, if only the lower <tt>r</tt> bits differ,
13196 two <tt>mersenne_twister_engine</tt>s will compare equal (if correctly
13197 implemented) but have different textual representations, which
13198 conceptually is a bit ugly.
13199 </p>
13202 I propose that a paragraph or footnote is added to 26.4.3.2 [rand.eng.mers] which
13203 clarifies that the lower <tt>r</tt> bits of <tt>X<sub>i-n</sub></tt> are not to be compared in
13204 <tt>operator==</tt> and <tt>operator!=</tt>. It would only be consequent if furthermore
13205 the specification for the textual respresentation was changed to
13206 <tt>X<sub>i-n</sub> bitand ((2<sup>w</sup> - 1) - (2<sup>r</sup> - 1)), X<sub>i-(n-1)</sub>, ..., X<sub>i-1</sub></tt> or
13207 something similar.
13208 </p>
13211 These changes would likely have no practical effect, but would allow an
13212 implementation that does the right thing to be standard-conformant.
13213 </p>
13215 <p><i>[
13216 Bellevue:
13217 ]</i></p>
13220 <blockquote>
13222 Fermi Lab has no objection to the proposed change. However it feels that
13223 more time is needed to check the details, which would suggest a change
13224 to REVIEW.
13225 </p>
13227 Bill feels that this is NAD, not enough practical importance to abandon
13228 the simple definition of equality, and someone would have to do a lot
13229 more study to ensure that all cases are covered for a very small
13230 payback. The submitter admits that "These changes would likely have no
13231 practical effect,", and according to Plum's razor this means that it is
13232 not worth the effort!
13233 </p>
13235 Revisted: Agree that the fact that there is no practical difference means that no change can be justified.
13236 </p>
13237 </blockquote>
13240 <p><b>Proposed resolution:</b></p>
13242 In 26.4.3.2 [rand.eng.mers]:
13243 </p>
13245 <blockquote>
13247 Insert at the end of para 2.:
13248 </p>
13250 <blockquote>
13251 [<i>Note:</i> The lower <tt>r</tt> bits of <tt>X<sub>i-n</sub></tt> do not influence
13252 the state transition and hence should not be compared when comparing two
13253 <tt>mersenne_twister_engine</tt> objects. <i>-- end note</i>]
13254 </blockquote>
13257 In para 5. change:
13258 </p>
13260 <blockquote>
13261 The textual representation of <tt>x<sub>i</sub></tt> consists of the values of
13262 <tt>X<sub>i-n</sub> <ins>bitand ((2<sup>w</sup> - 1) - (2<sup>r</sup> - 1)), X<sub>i-(n-1)</sub></ins>,
13263 ..., X<sub>i-1</sub></tt>, in that order.
13264 </blockquote>
13265 </blockquote>
13271 <hr>
13272 <h3><a name="802"></a>802. <tt>knuth_b</tt> returns wrong value</h3>
13273 <p><b>Section:</b> 26.4.5 [rand.predef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
13274 <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-20</p>
13275 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#rand.predef">issues</a> in [rand.predef].</p>
13276 <p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p>
13277 <p><b>Discussion:</b></p>
13279 The 10,000<sup>th</sup> value returned by <tt>knuth_b</tt> is supposed to be
13280 1112339016. We get 2126698284.
13281 </p>
13284 <p><b>Proposed resolution:</b></p>
13286 Change 26.4.5 [rand.predef]/p8:
13287 </p>
13289 <blockquote>
13290 <pre>typedef shuffle_order_engine&lt;minstd_rand0, 256&gt;
13291 knuth_b;
13292 </pre>
13293 <blockquote>
13294 <i>Required behavior:</i> The 10000<sup>th</sup> consecutive invocation of a default-constructed
13295 object of type <tt>knuth_b</tt> shall produce the value
13296 <del>1112339016</del> <ins>2126698284</ins>.
13297 </blockquote>
13298 </blockquote>
13301 <p><i>[
13302 Bellevue: Submitter withdraws defect. "We got the wrong value for entirely the right reasons". NAD.
13303 ]</i></p>
13310 </body></html>