]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.4/doc/html/ext/lwg-closed.html
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.4 / doc / html / ext / lwg-closed.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html><head>
3 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
4
5
6 <title>C++ Standard Library Closed Issues List</title>
7 <style type="text/css">
8 p {text-align:justify}
9 li {text-align:justify}
10 ins {background-color:#A0FFA0}
11 del {background-color:#FFA0A0}
12 </style>
13 </head><body>
14 <table>
15 <tbody><tr>
16 <td align="left">Doc. no.</td>
17 <td align="left">N2729=08-0239</td>
18 </tr>
19 <tr>
20 <td align="left">Date:</td>
21 <td align="left">2008-08-24</td>
22 </tr>
23 <tr>
24 <td align="left">Project:</td>
25 <td align="left">Programming Language C++</td>
26 </tr>
27 <tr>
28 <td align="left">Reply to:</td>
29 <td align="left">Howard Hinnant &lt;<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>&gt;</td>
30 </tr>
31 </tbody></table>
32 <h1>C++ Standard Library Closed Issues List (Revision R59)</h1>
33
34   <p>Reference ISO/IEC IS 14882:1998(E)</p>
35   <p>Also see:</p>
36     <ul>
37       <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li>
38       <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li>
39       <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li>
40       <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li>
41       <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li>
42     </ul>
43
44   <p>This document contains only library issues which have been closed
45   by the Library Working Group as duplicates or not defects. That is,
46   issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> or
47   <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
48   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
49   defects.  The introductory material in that document also applies to
50   this document.</p>
51
52 <h2>Revision History</h2>
53 <ul>
54 <li>R59: 
55 2008-08-22 pre-San Francisco mailing.
56 <ul>
57 <li><b>Summary:</b><ul>
58 <li>192 open issues, up by 9.</li>
59 <li>686 closed issues, up by 0.</li>
60 <li>878 issues total, up by 9.</li>
61 </ul></li>
62 <li><b>Details:</b><ul>
63 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#870">870</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#871">871</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#872">872</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#873">873</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#874">874</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#875">875</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#876">876</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#877">877</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#878">878</a>.</li>
64 </ul></li>
65 </ul>
66 </li>
67 <li>R58: 
68 2008-07-28 mid-term mailing.
69 <ul>
70 <li><b>Summary:</b><ul>
71 <li>183 open issues, up by 12.</li>
72 <li>686 closed issues, down by 4.</li>
73 <li>869 issues total, up by 8.</li>
74 </ul></li>
75 <li><b>Details:</b><ul>
76 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#862">862</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#863">863</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#864">864</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#865">865</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#866">866</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#867">867</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#868">868</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#869">869</a>.</li>
77 <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#393">393</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#592">592</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>
78 <li>Changed the following issues from Pending WP to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#644">644</a>.</li>
79 <li>Changed the following issues from WP 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#629">629</a>.</li>
80 <li>Changed the following issues from Pending NAD Editorial to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#709">709</a>.</li>
81 </ul></li>
82 </ul>
83 </li>
84 <li>R57: 
85 2008-06-27 post-Sophia Antipolis mailing.
86 <ul>
87 <li><b>Summary:</b><ul>
88 <li>171 open issues, down by 20.</li>
89 <li>690 closed issues, up by 43.</li>
90 <li>861 issues total, up by 23.</li>
91 </ul></li>
92 <li><b>Details:</b><ul>
93 <li>Added the following NAD issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#840">840</a>.</li>
94 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#841">841</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#843">843</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#845">845</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#846">846</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#847">847</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#849">849</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#853">853</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#854">854</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#855">855</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#856">856</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#857">857</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#858">858</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#859">859</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#860">860</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#861">861</a>.</li>
95 <li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#839">839</a>.</li>
96 <li>Added the following Ready issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#842">842</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#844">844</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#848">848</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#850">850</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#852">852</a>.</li>
97 <li>Added the following Review issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#851">851</a>.</li>
98 <li>Changed the following issues from New to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#826">826</a>.</li>
99 <li>Changed the following issues from Open to NAD: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#570">570</a>.</li>
100 <li>Changed the following issues from New to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#786">786</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#831">831</a>.</li>
101 <li>Changed the following issues from Open to NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#756">756</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#767">767</a>.</li>
102 <li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#723">723</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#794">794</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#825">825</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#833">833</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#834">834</a>.</li>
103 <li>Changed the following issues from Ready to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#471">471</a>.</li>
104 <li>Changed the following issues from Review to Open: <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-active.html#711">711</a>.</li>
105 <li>Changed the following issues from New to Ready: <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#769">769</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-active.html#779">779</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#787">787</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#813">813</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#829">829</a>.</li>
106 <li>Changed the following issues from Open to Ready: <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#396">396</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-active.html#720">720</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#762">762</a>.</li>
107 <li>Changed the following issues from Review to Ready: <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#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>
108 <li>Changed the following issues from New to Review: <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-active.html#698">698</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#804">804</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#828">828</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#832">832</a>.</li>
109 <li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#23">23</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#734">734</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#803">803</a>.</li>
110 <li>Changed the following issues from Ready to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#758">758</a>.</li>
111 <li>Changed the following issues from Ready to WP: <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#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#595">595</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#618">618</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-defects.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#755">755</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#759">759</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#761">761</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#766">766</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#768">768</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#770">770</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#775">775</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#777">777</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#778">778</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#781">781</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#782">782</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#783">783</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#789">789</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#792">792</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#798">798</a>.</li>
112 </ul></li>
113 </ul>
114 </li>
115 <li>R56: 
116 2008-05-16 pre-Sophia Antipolis mailing.
117 <ul>
118 <li><b>Summary:</b><ul>
119 <li>191 open issues, up by 24.</li>
120 <li>647 closed issues, up by 1.</li>
121 <li>838 issues total, up by 25.</li>
122 </ul></li>
123 <li><b>Details:</b><ul>
124 <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-closed.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-closed.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>
125 <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>
126 </ul></li>
127 </ul>
128 </li>
129 <li>R55: 
130 2008-03-14 post-Bellevue mailing.
131 <ul>
132 <li><b>Summary:</b><ul>
133 <li>167 open issues, down by 39.</li>
134 <li>646 closed issues, up by 65.</li>
135 <li>813 issues total, up by 26.</li>
136 </ul></li>
137 <li><b>Details:</b><ul>
138 <li>Added the following Dup issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#795">795</a>.</li>
139 <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>
140 <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>
141 <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>
142 <li>Added the following Ready issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#789">789</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#792">792</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#798">798</a>.</li>
143 <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>
144 <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>
145 <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>
146 <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>
147 <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>
148 <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>
149 <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>
150 <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>
151 <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-closed.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-closed.html#767">767</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#774">774</a>.</li>
152 <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>
153 <li>Changed the following issues from New to Pending NAD Editorial: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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>
154 <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>
155 <li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#710">710</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#715">715</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#740">740</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#744">744</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#746">746</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#749">749</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.html#759">759</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#761">761</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#766">766</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#768">768</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#770">770</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#775">775</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#777">777</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#778">778</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#781">781</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#782">782</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#783">783</a>.</li>
156 <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-defects.html#550">550</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.html#673">673</a>.</li>
157 <li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#685">685</a>.</li>
158 <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>
159 <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>
160 <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>
161 <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>
162 </ul></li>
163 </ul>
164 </li>
165 <li>R54: 
166 2008-02-01 pre-Bellevue mailing.
167 <ul>
168 <li><b>Summary:</b><ul>
169 <li>206 open issues, up by 23.</li>
170 <li>581 closed issues, up by 0.</li>
171 <li>787 issues total, up by 23.</li>
172 </ul></li>
173 <li><b>Details:</b><ul>
174 <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-defects.html#766">766</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#767">767</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.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-defects.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-defects.html#777">777</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.html#781">781</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#782">782</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-closed.html#786">786</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#787">787</a>.</li>
175 <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>
176 <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>
177 <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>
178 <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>
179 <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>
180 </ul></li>
181 </ul>
182 </li>
183 <li>R53: 
184 2007-12-09 mid-term mailing.
185 <ul>
186 <li><b>Summary:</b><ul>
187 <li>183 open issues, up by 11.</li>
188 <li>581 closed issues, down by 1.</li>
189 <li>764 issues total, up by 10.</li>
190 </ul></li>
191 <li><b>Details:</b><ul>
192 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#755">755</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.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-defects.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-defects.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>
193 <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>
194 <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>
195 </ul></li>
196 </ul>
197 </li>
198 <li>R52: 
199 2007-10-19 post-Kona mailing.
200 <ul>
201 <li><b>Summary:</b><ul>
202 <li>172 open issues, up by 4.</li>
203 <li>582 closed issues, up by 27.</li>
204 <li>754 issues total, up by 31.</li>
205 </ul></li>
206 <li><b>Details:</b><ul>
207 <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-defects.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-defects.html#743">743</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.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-defects.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>
208 <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>
209 <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>
210 <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>
211 <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-defects.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-defects.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>
212 <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>
213 <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>
214 <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-defects.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>
215 <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>
216 <li>Changed the following issues from New to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#574">574</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#596">596</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#618">618</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.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-defects.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#691">691</a>.</li>
217 <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>
218 <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>
219 <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>
220 </ul></li>
221 </ul>
222 </li>
223 <li>R51: 
224 2007-09-09 pre-Kona mailing.
225 <ul>
226 <li><b>Summary:</b><ul>
227 <li>168 open issues, up by 15.</li>
228 <li>555 closed issues, up by 0.</li>
229 <li>723 issues total, up by 15.</li>
230 </ul></li>
231 <li><b>Details:</b><ul>
232 <li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#709">709</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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-defects.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-defects.html#722">722</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#723">723</a>.</li>
233 </ul></li>
234 </ul>
235 </li>
236 <li>R50: 
237 2007-08-05 post-Toronto mailing.
238 <ul>
239 <li><b>Summary:</b><ul>
240 <li>153 open issues, down by 5.</li>
241 <li>555 closed issues, up by 17.</li>
242 <li>708 issues total, up by 12.</li>
243 </ul></li>
244 <li><b>Details:</b><ul>
245 <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>
246 <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>
247 <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>
248 <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>
249 <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>
250 <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>
251 <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>
252 <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>
253 <li>Changed the following issues from Ready to Pending WP: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#644">644</a>.</li>
254 <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>
255 <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>
256 <li>Changed the following issues from Open to Review: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#518">518</a>.</li>
257 <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>
258 <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>
259 <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>
260 </ul></li>
261 </ul>
262 </li>
263 <li>R49: 
264 2007-06-23 pre-Toronto mailing.
265 <ul>
266 <li><b>Summary:</b><ul>
267 <li>158 open issues, up by 13.</li>
268 <li>538 closed issues, up by 7.</li>
269 <li>696 issues total, up by 20.</li>
270 </ul></li>
271 <li><b>Details:</b><ul>
272 <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-defects.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>
273 <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>
274 <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>
275 <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>
276 <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>
277 </ul></li>
278 </ul>
279 </li>
280 <li>R48: 
281 2007-05-06 post-Oxford mailing.
282 <ul>
283 <li><b>Summary:</b><ul>
284 <li>145 open issues, down by 33.</li>
285 <li>531 closed issues, up by 53.</li>
286 <li>676 issues total, up by 20.</li>
287 </ul></li>
288 <li><b>Details:</b><ul>
289 <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-defects.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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>
290 <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>
291 <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>
292 <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>
293 <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>
294 <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>
295 <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>
296 <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>
297 <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>
298 <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>
299 <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-active.html#644">644</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#646">646</a>.</li>
300 <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>
301 <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>
302 <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>
303 <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>
304 </ul></li>
305 </ul>
306 </li>
307 <li>R47: 
308 2007-03-09 pre-Oxford mailing.
309 <ul>
310 <li><b>Summary:</b><ul>
311 <li>178 open issues, up by 37.</li>
312 <li>478 closed issues, up by 0.</li>
313 <li>656 issues total, up by 37.</li>
314 </ul></li>
315 <li><b>Details:</b><ul>
316 <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-defects.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-active.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>
317 <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>
318 <li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.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-defects.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li>
319 <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>
320 <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>
321 <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>
322 </ul></li>
323 </ul>
324 </li>
325 <li>R46: 
326 2007-01-12 mid-term mailing.
327 <ul>
328 <li><b>Summary:</b><ul>
329 <li>141 open issues, up by 11.</li>
330 <li>478 closed issues, down by 1.</li>
331 <li>619 issues total, up by 10.</li>
332 </ul></li>
333 <li><b>Details:</b><ul>
334 <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>
335 </ul></li>
336 </ul>
337 </li>
338 <li>R45: 
339 2006-11-03 post-Portland mailing.
340 <ul>
341 <li><b>Summary:</b><ul>
342 <li>130 open issues, up by 0.</li>
343 <li>479 closed issues, up by 17.</li>
344 <li>609 issues total, up by 17.</li>
345 </ul></li>
346 <li><b>Details:</b><ul>
347 <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>
348 <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>
349 <li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li>
350 <li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.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>
351 <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>
352 <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>
353 <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>
354 </ul></li>
355 </ul>
356 </li>
357 <li>R44: 
358 2006-09-08 pre-Portland mailing.
359 <ul>
360 <li><b>Summary:</b><ul>
361 <li>130 open issues, up by 6.</li>
362 <li>462 closed issues, down by 1.</li>
363 <li>592 issues total, up by 5.</li>
364 </ul></li>
365 <li><b>Details:</b><ul>
366 <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>
367 </ul></li>
368 </ul>
369 </li>
370 <li>R43: 
371 2006-06-23 mid-term mailing.
372 <ul>
373 <li><b>Summary:</b><ul>
374 <li>124 open issues, up by 14.</li>
375 <li>463 closed issues, down by 1.</li>
376 <li>587 issues total, up by 13.</li>
377 </ul></li>
378 <li><b>Details:</b><ul>
379 <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>
380 <li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li>
381 <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>
382 </ul></li>
383 </ul>
384 </li>
385 <li>R42: 
386 2006-04-21 post-Berlin mailing.
387 <ul>
388 <li><b>Summary:</b><ul>
389 <li>110 open issues, down by 16.</li>
390 <li>464 closed issues, up by 24.</li>
391 <li>574 issues total, up by 8.</li>
392 </ul></li>
393 <li><b>Details:</b><ul>
394 <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>
395 <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>
396 <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>
397 <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>
398 <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>
399 <li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li>
400 </ul></li>
401 </ul>
402 </li>
403 <li>R41: 
404 2006-02-24 pre-Berlin mailing.
405 <ul>
406 <li><b>Summary:</b><ul>
407 <li>126 open issues, up by 31.</li>
408 <li>440 closed issues, up by 0.</li>
409 <li>566 issues total, up by 31.</li>
410 </ul></li>
411 <li><b>Details:</b><ul>
412 <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>
413 <li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li>
414 <li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li>
415 </ul></li>
416 </ul>
417 </li>
418 <li>R40: 
419 2005-12-16 mid-term mailing.
420 <ul>
421 <li><b>Summary:</b><ul>
422 <li>95 open issues.</li>
423 <li>440 closed issues.</li>
424 <li>535 issues total.</li>
425 </ul></li>
426 <li><b>Details:</b><ul>
427 <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>
428 </ul></li>
429 </ul>
430 </li>
431 <li>R39: 
432 2005-10-14 post-Mont Tremblant mailing.
433 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>.
434 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.
435 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.
436 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.
437 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.
438 Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#500">500</a> from New to NAD.
439 Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#518">518</a> from New to Review.
440 </li>
441 <li>R38: 
442 2005-07-03 pre-Mont Tremblant mailing.
443 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>.
444 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>
445 </li>
446 <li>R37: 
447 2005-06 mid-term mailing.
448 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>.
449 </li>
450 <li>R36: 
451 2005-04 post-Lillehammer mailing. All issues in "ready" status except
452 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
453 previously in "DR" status were moved to "WP".
454 </li>
455 <li>R35: 
456 2005-03 pre-Lillehammer mailing.
457 </li>
458 <li>R34: 
459 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>.
460 </li>
461 <li>R33: 
462 2004-11 post-Redmond mailing. Reflects actions taken in Redmond.
463 </li>
464 <li>R32: 
465 2004-09 pre-Redmond mailing: reflects new proposed resolutions and
466 new issues received after the 2004-07 mailing.  Added
467 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>.
468 </li>
469 <li>R31: 
470 2004-07 mid-term mailing: reflects new proposed resolutions and
471 new issues received after the post-Sydney mailing.  Added
472 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>.
473 </li>
474 <li>R30: 
475 Post-Sydney mailing: reflects decisions made at the Sydney meeting.
476 Voted all "Ready" issues from R29 into the working paper.
477 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>.
478 </li>
479 <li>R29: 
480 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>.
481 </li>
482 <li>R28: 
483 Post-Kona mailing: reflects decisions made at the Kona meeting.
484 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>.
485 </li>
486 <li>R27: 
487 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>.
488 </li>
489 <li>R26: 
490 Post-Oxford mailing: reflects decisions made at the Oxford meeting.
491 All issues in Ready status were voted into DR status.  All issues in
492 DR status were voted into WP status.
493 </li>
494 <li>R25: 
495 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>.
496 </li>
497 <li>R24: 
498 Post-Santa Cruz mailing: reflects decisions made at the Santa Cruz
499 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
500 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
501 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
502 concerns with <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> involve wording.
503 </li>
504 <li>R23: 
505 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>.
506 Moved issues in the TC to TC status.
507 </li>
508 <li>R22: 
509 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>.
510 </li>
511 <li>R21: 
512 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>.
513 </li>
514 <li>R20: 
515 Post-Redmond mailing; reflects actions taken in Redmond.  Added
516 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 
517 <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
518 not discussed at the meeting.  
519
520 All Ready issues were moved to DR status, with the exception of issues
521 <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>.
522
523 Noteworthy issues discussed at Redmond include 
524 <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>, 
525 <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>.
526 </li>
527 <li>R19: 
528 Pre-Redmond mailing.  Added new issues 
529 <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>.
530 </li>
531 <li>R18: 
532 Post-Copenhagen mailing; reflects actions taken in Copenhagen.
533 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
534 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>.
535
536 Changed status of issues
537 <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>
538 <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>
539 <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>
540 <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>
541 <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>
542 <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>
543 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#268">268</a>
544 to DR.
545
546 Changed status of issues
547 <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>
548 <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>
549 <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>
550 <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>
551 <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>
552 <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>
553 <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>
554 <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>
555 <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>
556 to Ready.
557
558 Closed issues 
559 <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>
560 <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>
561 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#314">314</a>
562 as NAD.
563
564 </li>
565 <li>R17: 
566 Pre-Copenhagen mailing.  Converted issues list to XML.  Added proposed
567 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>.
568 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>.
569 </li>
570 <li>R16:  
571 post-Toronto mailing; reflects actions taken in Toronto. Added new
572 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
573 <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>,
574 <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>,
575 <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>,
576 <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>,
577 <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>,
578 <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>,
579 <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>,
580 <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>,
581 <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>,
582 <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>,
583 <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>,
584 <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>,
585 <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
586 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
587 <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
588 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
589 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
590 the bug in enough places.
591 </li>
592 <li>R15: 
593 pre-Toronto mailing. Added issues
594 <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
595 changes so that we pass Weblint tests.
596 </li>
597 <li>R14: 
598 post-Tokyo II mailing; reflects committee actions taken in
599 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)
600 </li>
601 <li>R13: 
602 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>.
603 </li>
604 <li>R12: 
605 pre-Tokyo II mailing: Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#199">199</a> to
606 <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
607 of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#29">29</a>.  Add further rationale to issue
608 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#178">178</a>.
609 </li>
610 <li>R11: 
611 post-Kona mailing: Updated to reflect LWG and full committee actions
612 in Kona (99-0048/N1224). Note changed resolution of issues
613 <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>
614 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
615 "closed" documents.  Changed the proposed resolution of issue
616 <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
617 of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#38">38</a>.
618 </li>
619 <li>R10: 
620 pre-Kona updated.  Added proposed resolutions <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>,
621 <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>,
622 <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
623 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>. (99-0033/D1209, 14 Oct 99)
624 </li>
625 <li>R9: 
626 pre-Kona mailing.  Added issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a> to
627 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#189">189</a>. Issues list split into separate "active" and
628 "closed" documents. (99-0030/N1206, 25 Aug 99)
629 </li>
630 <li>R8: 
631 post-Dublin mailing. Updated to reflect LWG and full committee actions
632 in Dublin. (99-0016/N1193, 21 Apr 99)
633 </li>
634 <li>R7: 
635 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>,
636 <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>,
637 <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>,
638 <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)
639 </li>
640 <li>R6: 
641 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>,
642 and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#129">129</a>.  (99-0007/N1194, 22 Feb 99)
643 </li>
644 <li>R5: 
645 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
646 <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
647 for making list public. (30 Dec 98)
648 </li>
649 <li>R4: 
650 post-Santa Cruz II updated: Issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#110">110</a>,
651 <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
652 issues corrected. (22 Oct 98)
653 </li>
654 <li>R3: 
655 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>
656 added, many issues updated to reflect LWG consensus (12 Oct 98)
657 </li>
658 <li>R2: 
659 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,
660 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#17">17</a> updated. (29 Sep 98)
661 </li>
662 <li>R1: 
663 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
664 format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98)
665 </li>
666 </ul>
667
668 <h2>Closed Issues</h2>
669 <hr>
670 <h3><a name="2"></a>2. Auto_ptr conversions effects incorrect</h3>
671 <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>
672  <b>Submitter:</b> Nathan Myers <b>Date:</b> 1997-12-04</p>
673 <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>
674 <p><b>Discussion:</b></p>
675 <p>Paragraph 1 in "Effects", says "Calls
676 p-&gt;release()" where it clearly must be "Calls
677 p.release()". (As it is, it seems to require using
678 auto_ptr&lt;&gt;::operator-&gt; to refer to X::release, assuming that
679 exists.)</p>
680
681
682 <p><b>Proposed resolution:</b></p>
683 <p>Change 20.5.4.3 [meta.unary.prop] paragraph 1 Effects from 
684 "Calls p-&gt;release()" to "Calls p.release()".</p>
685
686
687 <p><b>Rationale:</b></p>
688 <p>Not a defect: the proposed change is already found in the standard.
689 [Originally classified as a defect, later reclassified.]</p>
690
691
692
693
694
695 <hr>
696 <h3><a name="4"></a>4. Basic_string size_type and difference_type should be implementation defined</h3>
697 <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>
698  <b>Submitter:</b> Beman Dawes <b>Date:</b> 1997-11-16</p>
699 <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>
700 <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>
701 <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>
702 <p><b>Discussion:</b></p>
703 <p>In Morristown we changed the size_type and difference_type typedefs
704 for all the other containers to implementation defined with a
705 reference to 23.1 [container.requirements].  This should probably also have been
706 done for strings. </p>
707
708
709 <p><b>Rationale:</b></p>
710 <p>Not a defect.  [Originally classified as a defect, later
711 reclassified.]  basic_string, unlike the other standard library
712 template containers, is severely constrained by its use of
713 char_traits. Those types are dictated by the traits class, and are far
714 from implementation defined.</p>
715
716
717
718
719
720 <hr>
721 <h3><a name="6"></a>6. File position not an offset unimplementable</h3>
722 <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>
723  <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-15</p>
724 <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>
725 <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>
726 <p><b>Discussion:</b></p>
727 <p>Table 88, in I/O, is too strict; it's unimplementable on systems
728 where a file position isn't just an offset. It also never says just
729 what fpos&lt;&gt; is really supposed to be.  [Here's my summary, which
730 Jerry agrees is more or less accurate. "I think I now know what
731 the class really is, at this point: it's a magic cookie that
732 encapsulates an mbstate_t and a file position (possibly represented as
733 an fpos_t), it has syntactic support for pointer-like arithmetic, and
734 implementors are required to have real, not just syntactic, support
735 for arithmetic." This isn't standardese, of course.] </p>
736
737
738 <p><b>Rationale:</b></p>
739 <p>Not a defect. The LWG believes that the Standard is already clear,
740 and that the above summary is what the Standard in effect says.</p>
741
742
743
744
745
746 <hr>
747 <h3><a name="10"></a>10. Codecvt&lt;&gt;::do unclear</h3>
748 <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>
749  <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-14</p>
750 <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>
751 <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>
752 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a></p>
753 <p><b>Discussion:</b></p>
754 <p>Section 22.2.1.5.2 says that codecvt&lt;&gt;::do_in and do_out
755 should return the value noconv if "no conversion was
756 needed". However, I don't see anything anywhere that defines what
757 it means for a conversion to be needed or not needed. I can think of
758 several circumstances where one might plausibly think that a
759 conversion is not "needed", but I don't know which one is
760 intended here. </p>
761
762
763 <p><b>Rationale:</b></p>
764
765
766
767
768
769
770 <hr>
771 <h3><a name="12"></a>12. Way objects hold allocators unclear</h3>
772 <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>
773  <b>Submitter:</b> Angelika Langer <b>Date:</b> 1998-02-23</p>
774 <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>
775 <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>
776 <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>
777 <p><b>Discussion:</b></p>
778 <p>I couldn't find a statement in the standard saying whether the allocator object held by
779 a container is held as a copy of the constructor argument or whether a pointer of
780 reference is maintained internal. There is an according statement for compare objects and
781 how they are maintained by the associative containers, but I couldn't find anything
782 regarding allocators. </p>
783
784 <p>Did I overlook it? Is it an open issue or known defect? Or is it deliberately left
785 unspecified? </p>
786
787
788 <p><b>Rationale:</b></p>
789 <p>Not a defect. The LWG believes that the Standard is already
790 clear.&nbsp; See 23.1 [container.requirements], paragraph 8.</p>
791
792
793
794
795
796 <hr>
797 <h3><a name="43"></a>43. Locale table correction</h3>
798 <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>
799  <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1998-06-01</p>
800 <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>
801 <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>
802 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#33">33</a></p>
803 <p><b>Discussion:</b></p>
804
805
806 <p><b>Rationale:</b></p>
807
808
809
810
811
812
813 <hr>
814 <h3><a name="45"></a>45. Stringstreams read/write pointers initial position unclear</h3>
815 <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>
816  <b>Submitter:</b> Matthias Mueller <b>Date:</b> 1998-05-27</p>
817 <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>
818 <p><b>Discussion:</b></p>
819 <p>In a comp.lang.c++.moderated Matthias Mueller wrote:</p>
820
821 <p>"We are not sure how to interpret the CD2 (see 27.2
822 [iostream.forward], 27.7.3.1 [ostringstream.cons], 27.7.1.1
823 [stringbuf.cons])
824 with respect to the question as to what the correct initial positions
825 of the write and&nbsp; read pointers of a stringstream should
826 be."</p>
827
828 <p>"Is it the same to output two strings or to initialize the stringstream with the
829 first and to output the second?"</p>
830
831 <p><i>[PJ Plauger, Bjarne Stroustrup, Randy Smithey, Sean Corfield, and
832 Jerry Schwarz have all offered opinions; see reflector messages
833 lib-6518, 6519, 6520, 6521, 6523, 6524.]</i></p>
834
835
836
837
838 <p><b>Rationale:</b></p>
839 <p>The LWG believes the Standard is correct as written. The behavior
840 of stringstreams is consistent with fstreams, and there is a
841 constructor which can be used to obtain the desired effect. This
842 behavior is known to be different from strstreams.</p>
843
844
845
846
847
848 <hr>
849 <h3><a name="58"></a>58. Extracting a char from a wide-oriented stream</h3>
850 <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>
851  <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-01</p>
852 <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>
853 <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>
854 <p><b>Discussion:</b></p>
855 <p>27.6.1.2.3 has member functions for extraction of signed char and
856 unsigned char, both singly and as strings. However, it doesn't say
857 what it means to extract a <tt>char</tt> from a
858 <tt>basic_streambuf&lt;charT, Traits&gt;</tt>. </p>
859
860 <p>basic_streambuf, after all, has no members to extract a char, so
861 basic_istream must somehow convert from charT to signed char or
862 unsigned char. The standard doesn't say how it is to perform that
863 conversion. </p>
864
865
866 <p><b>Rationale:</b></p>
867 <p>The Standard is correct as written.  There is no such extractor and
868 this is the intent of the LWG.</p>
869
870
871
872
873 <hr>
874 <h3><a name="65"></a>65. Underspecification of strstreambuf::seekoff</h3>
875 <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>
876  <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-18</p>
877 <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>
878 <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>
879 <p><b>Discussion:</b></p>
880 <p>The standard says how this member function affects the current
881 stream position. (<tt>gptr</tt> or <tt>pptr</tt>) However, it does not
882 say how this member function affects the beginning and end of the
883 get/put area. </p>
884
885 <p>This is an issue when seekoff is used to position the get pointer
886 beyond the end of the current read area. (Which is legal. This is
887 implicit in the definition of <i>seekhigh</i> in D.7.1, paragraph 4.)
888 </p>
889
890
891 <p><b>Rationale:</b></p>
892 <p>The LWG agrees that seekoff() is underspecified, but does not wish
893 to invest effort in this deprecated feature.</p>
894
895
896
897
898
899 <hr>
900 <h3><a name="67"></a>67. Setw useless for strings</h3>
901 <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>
902  <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-07-09</p>
903 <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>
904 <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>
905 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#25">25</a></p>
906 <p><b>Discussion:</b></p>
907 <p>In a comp.std.c++ posting Michel Michaud wrote: What
908 should be output by: </p>
909
910 <pre>   string text("Hello");
911    cout &lt;&lt; '[' &lt;&lt; setw(10) &lt;&lt; right &lt;&lt; text &lt;&lt; ']';
912 </pre>
913
914 <p>Shouldn't it be:</p>
915
916 <pre>   [     Hello]</pre>
917
918 <p>Another person replied: Actually, according to the FDIS, the width
919 of the field should be the minimum of width and the length of the
920 string, so the output shouldn't have any padding. I think that this is
921 a typo, however, and that what is wanted is the maximum of the
922 two. (As written, setw is useless for strings. If that had been the
923 intent, one wouldn't expect them to have mentioned using its value.)
924 </p>
925
926 <p>It's worth pointing out that this is a recent correction anyway;
927 IIRC, earlier versions of the draft forgot to mention formatting
928 parameters whatsoever.</p>
929
930
931 <p><b>Rationale:</b></p>
932
933
934
935
936
937
938 <hr>
939 <h3><a name="72"></a>72. Do_convert phantom member function</h3>
940 <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>
941  <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-24</p>
942 <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>
943 <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>
944 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#24">24</a></p>
945 <p><b>Discussion:</b></p>
946 <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
947 "do_convert" is mentioned. This member was replaced with
948 "do_in" and "do_out", the proper referents in the
949 contexts above.</p>
950
951
952 <p><b>Rationale:</b></p>
953
954
955
956
957
958 <hr>
959 <h3><a name="73"></a>73. <tt>is_open</tt> should be const</h3>
960 <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>
961  <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-27</p>
962 <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>
963 <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>
964 <p><b>Discussion:</b></p>
965 <p>Classes <tt>basic_ifstream</tt>, <tt>basic_ofstream</tt>, and
966 <tt>basic_fstream</tt> all have a member function <tt>is_open</tt>. It
967 should be a <tt>const</tt> member function, since it does nothing but
968 call one of <tt>basic_filebuf</tt>'s const member functions. </p>
969
970
971 <p><b>Rationale:</b></p>
972 <p>Not a defect. This is a deliberate feature; const streams would be
973 meaningless.</p>
974
975
976
977
978 <hr>
979 <h3><a name="77"></a>77. Valarray operator[] const returning value</h3>
980 <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>
981  <b>Submitter:</b> Levente Farkas <b>Date:</b> 1998-09-09</p>
982 <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>
983 <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>
984 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a></p>
985 <p><b>Discussion:</b></p>
986 <p>valarray:<br>
987 <br>
988 &nbsp;&nbsp;&nbsp; <tt>T operator[] (size_t) const;</tt><br>
989 <br>
990 why not <br>
991 <br>
992 &nbsp;&nbsp;&nbsp; <tt>const T&amp; operator[] (size_t) const;</tt><br>
993 <br>
994 as in vector ???<br>
995 <br>
996 One can't copy even from a const valarray eg:<br>
997 <br>
998 &nbsp;&nbsp;&nbsp; <tt>memcpy(ptr, &amp;v[0], v.size() * sizeof(double));<br>
999 </tt><br>
1000 [I] find this bug in valarray is very difficult.</p>
1001
1002
1003 <p><b>Rationale:</b></p>
1004 <p>The LWG believes that the interface was deliberately designed that
1005 way. That is what valarray was designed to do; that's where the
1006 "value array" name comes from. LWG members further comment
1007 that "we don't want valarray to be a full STL container."
1008 26.5.2.3 [valarray.access] specifies properties that indicate "an
1009 absence of aliasing" for non-constant arrays; this allows
1010 optimizations, including special hardware optimizations, that are not
1011 otherwise possible. </p>
1012
1013
1014
1015
1016
1017 <hr>
1018 <h3><a name="81"></a>81. Wrong declaration of slice operations</h3>
1019 <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>
1020  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1021 <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>
1022 <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>
1023 <p><b>Discussion:</b></p>
1024 <p>Isn't the definition of copy constructor and assignment operators wrong?
1025 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Instead of</p>
1026
1027 <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array(const slice_array&amp;); 
1028 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; slice_array&amp; operator=(const slice_array&amp;);</pre>
1029
1030 <p>IMHO they have to be</p>
1031
1032 <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array(const slice_array&lt;T&gt;&amp;); 
1033 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;slice_array&amp; operator=(const slice_array&lt;T&gt;&amp;);</pre>
1034
1035 <p>Same for gslice_array. </p>
1036
1037
1038 <p><b>Rationale:</b></p>
1039 <p>Not a defect. The Standard is correct as written. </p>
1040
1041
1042
1043
1044 <hr>
1045 <h3><a name="82"></a>82. Missing constant for set elements</h3>
1046 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
1047  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1048 <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>
1049 <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>
1050 <p><b>Discussion:</b></p>
1051 <p>Paragraph 5 specifies:</p>
1052
1053 <blockquote><p>
1054 For set and multiset the value type is the same as the key type. For
1055 map and multimap it is equal to pair&lt;const Key, T&gt;.  
1056 </p></blockquote>
1057
1058 <p>Strictly speaking, this is not correct because for set and multiset
1059 the value type is the same as the <b>constant</b> key type.</p>
1060
1061
1062 <p><b>Rationale:</b></p>
1063 <p>Not a defect. The Standard is correct as written; it uses a
1064 different mechanism (const &amp;) for <tt>set</tt> and
1065 <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
1066 issue.</p>
1067
1068
1069
1070
1071 <hr>
1072 <h3><a name="84"></a>84. Ambiguity with string::insert()</h3>
1073 <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>
1074  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1075 <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>
1076 <p><b>Discussion:</b></p>
1077 <p>If I try</p>
1078 <pre>    s.insert(0,1,' ');</pre>
1079
1080 <p>&nbsp; I get an nasty ambiguity. It might be</p>
1081 <pre>    s.insert((size_type)0,(size_type)1,(charT)' ');</pre>
1082
1083 <p>which inserts 1 space character at position 0, or</p>
1084 <pre>    s.insert((char*)0,(size_type)1,(charT)' ')</pre>
1085
1086 <p>which inserts 1 space character at iterator/address 0 (bingo!), or</p>
1087 <pre>    s.insert((char*)0, (InputIterator)1, (InputIterator)' ')</pre>
1088
1089 <p>which normally inserts characters from iterator 1 to iterator '
1090 '. But according to 23.1.1.9 (the "do the right thing" fix)
1091 it is equivalent to the second. However, it is still ambiguous,
1092 because of course I mean the first!</p>
1093
1094
1095 <p><b>Rationale:</b></p>
1096 <p>Not a defect. The LWG believes this is a "genetic
1097 misfortune" inherent in the design of string and thus not a
1098 defect in the Standard as such .</p>
1099
1100
1101
1102
1103 <hr>
1104 <h3><a name="85"></a>85. String char types</h3>
1105 <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>
1106  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1107 <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>
1108 <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>
1109 <p><b>Discussion:</b></p>
1110 <p>The standard seems not to require that charT is equivalent to
1111 traits::char_type. So, what happens if charT is not equivalent to
1112 traits::char_type?</p>
1113
1114
1115 <p><b>Rationale:</b></p>
1116 <p>There is already wording in 21.1 [char.traits] paragraph 3 that
1117 requires them to be the same.</p>
1118
1119
1120
1121
1122 <hr>
1123 <h3><a name="87"></a>87. Error in description of string::compare()</h3>
1124 <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>
1125  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1126 <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>
1127 <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>
1128 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#5">5</a></p>
1129 <p><b>Discussion:</b></p>
1130 <p>The following compare() description is obviously a bug:</p>
1131
1132 <pre>int compare(size_type pos, size_type n1, 
1133             charT *s, size_type n2 = npos) const;
1134 </pre>
1135
1136 <p>because without passing n2 it should compare up to the end of the
1137 string instead of comparing npos characters (which throws an
1138 exception) </p>
1139
1140
1141 <p><b>Rationale:</b></p>
1142
1143
1144
1145
1146
1147 <hr>
1148 <h3><a name="88"></a>88. Inconsistency between string::insert() and string::append()</h3>
1149 <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>
1150  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1151 <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>
1152 <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>
1153 <p><b>Discussion:</b></p>
1154 <p>Why does </p>
1155 <pre>  template&lt;class InputIterator&gt; 
1156        basic_string&amp; append(InputIterator first, InputIterator last);</pre>
1157
1158 <p>return a string, while</p>
1159 <pre>  template&lt;class InputIterator&gt; 
1160        void insert(iterator p, InputIterator first, InputIterator last);</pre>
1161
1162 <p>returns nothing ?</p>
1163
1164
1165 <p><b>Rationale:</b></p>
1166 <p>The LWG believes this stylistic inconsistency is not sufficiently 
1167 serious to constitute a defect.</p>
1168
1169
1170
1171
1172 <hr>
1173 <h3><a name="89"></a>89. Missing throw specification for string::insert() and string::replace()</h3>
1174 <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>
1175  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1176 <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>
1177 <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>
1178 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a></p>
1179 <p><b>Discussion:</b></p>
1180 <p>All insert() and replace() members for strings with an iterator as
1181 first argument lack a throw specification. The throw
1182 specification should probably be: length_error if size exceeds
1183 maximum. </p>
1184
1185
1186 <p><b>Rationale:</b></p>
1187 <p>Considered a duplicate because it will be solved by the resolution
1188 of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p>
1189
1190
1191
1192
1193
1194 <hr>
1195 <h3><a name="93"></a>93. Incomplete Valarray Subset Definitions</h3>
1196 <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>
1197  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p>
1198 <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>
1199 <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>
1200 <p><b>Discussion:</b></p>
1201 <p>You can easily create subsets, but you can't easily combine them
1202 with other subsets.  Unfortunately, you almost always needs an
1203 explicit type conversion to valarray. This is because the standard
1204 does not specify that valarray subsets provide the same operations as
1205 valarrays. </p>
1206
1207 <p>For example, to multiply two subsets and assign the result to a third subset, you can't
1208 write the following:</p>
1209
1210 <pre>va[slice(0,4,3)] = va[slice(1,4,3)] * va[slice(2,4,3)];</pre>
1211
1212 <p>Instead, you have to code as follows:</p>
1213
1214 <pre>va[slice(0,4,3)] = static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(1,4,3)]) * 
1215                    static_cast&lt;valarray&lt;double&gt; &gt;(va[slice(2,4,3)]);</pre>
1216
1217 <p>This is tedious and error-prone. Even worse, it costs performance because each cast
1218 creates a temporary objects, which could be avoided without the cast. </p>
1219
1220
1221 <p><b>Proposed resolution:</b></p>
1222 <p>Extend all valarray subset types so that they offer all valarray operations.</p>
1223
1224
1225 <p><b>Rationale:</b></p>
1226 <p>This is not a defect in the Standard; it is a request for an extension.</p>
1227
1228
1229
1230
1231 <hr>
1232 <h3><a name="94"></a>94. May library implementors add template parameters to Standard Library classes?</h3>
1233 <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>
1234  <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-22</p>
1235 <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>
1236 <p><b>Discussion:</b></p>
1237 <p>Is it a permitted extension for library implementors to add template parameters to
1238 standard library classes, provided that those extra parameters have defaults? For example,
1239 instead of defining <tt>template &lt;class T, class Alloc = allocator&lt;T&gt; &gt; class
1240 vector;</tt> defining it as <tt>template &lt;class T, class Alloc = allocator&lt;T&gt;,
1241 int N = 1&gt; class vector;</tt> </p>
1242
1243 <p>The standard may well already allow this (I can't think of any way that this extension
1244 could break a conforming program, considering that users are not permitted to
1245 forward-declare standard library components), but it ought to be explicitly permitted or
1246 forbidden. </p>
1247
1248 <p>comment from Steve Cleary via comp.std.c++:</p>
1249 <blockquote>
1250 <p>I disagree [with the proposed resolution] for the following reason:
1251 consider user library code with template template parameters. For
1252 example, a user library object may be templated on the type of
1253 underlying sequence storage to use (deque/list/vector), since these
1254 classes all take the same number and type of template parameters; this
1255 would allow the user to determine the performance tradeoffs of the
1256 user library object. A similar example is a user library object
1257 templated on the type of underlying set storage (set/multiset) or map
1258 storage (map/multimap), which would allow users to change (within
1259 reason) the semantic meanings of operations on that object.</p>
1260 <p>I think that additional template parameters should be forbidden in
1261 the Standard classes. Library writers don't lose any expressive power,
1262 and can still offer extensions because additional template parameters
1263 may be provided by a non-Standard implementation class:</p>
1264 <pre> 
1265    template &lt;class T, class Allocator = allocator&lt;T&gt;, int N = 1&gt;
1266    class __vector
1267    { ... };
1268    template &lt;class T, class Allocator = allocator&lt;T&gt; &gt;
1269    class vector: public __vector&lt;T, Allocator&gt;
1270    { ... };
1271 </pre>
1272
1273 </blockquote>
1274
1275
1276
1277 <p><b>Proposed resolution:</b></p>
1278 <p>Add a new subclause [presumably 17.4.4.9] following 17.4.4.9 [res.on.exception.handling]:</p>
1279
1280 <blockquote>
1281   <p>17.4.4.9 Template Parameters</p> <p>A specialization of a
1282   template class described in the C++ Standard Library behaves the
1283   same as if the implementation declares no additional template
1284   parameters.</p> <p>Footnote: Additional template parameters with
1285   default values are thus permitted.</p>
1286 </blockquote>
1287
1288 <p>Add "template parameters" to the list of subclauses at
1289 the end of 17.4.4 [conforming] paragraph 1.</p>
1290
1291 <p><i>[Kona: The LWG agreed the standard needs clarification. After
1292 discussion with John Spicer, it seems added template parameters can be
1293 detected by a program using template-template parameters. A straw vote
1294 - "should implementors be allowed to add template
1295 parameters?" found no consensus ; 5 - yes, 7 - no.]</i></p>
1296
1297
1298
1299
1300 <p><b>Rationale:</b></p>
1301 <p>
1302 There is no ambiguity; the standard is clear as written.  Library
1303 implementors are not permitted to add template parameters to standard
1304 library classes.  This does not fall under the "as if" rule,
1305 so it would be permitted only if the standard gave explicit license
1306 for implementors to do this.  This would require a change in the 
1307 standard.
1308 </p>
1309
1310 <p>
1311 The LWG decided against making this change, because it would break
1312 user code involving template template parameters or specializations
1313 of standard library class templates.
1314 </p>
1315
1316
1317
1318
1319
1320 <hr>
1321 <h3><a name="95"></a>95. Members added by the implementation</h3>
1322 <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>
1323  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1324 <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>
1325 <p><b>Discussion:</b></p>
1326 <p>In 17.3.4.4/2 vs 17.3.4.7/0 there is a hole; an implementation could add virtual
1327 members a base class and break user derived classes.</p>
1328
1329 <p>Example: </p>
1330
1331 <blockquote>
1332   <pre>// implementation code:
1333 struct _Base { // _Base is in the implementer namespace
1334         virtual void foo ();
1335 };
1336 class vector : _Base // deriving from a class is allowed
1337 { ... };
1338
1339 // user code:
1340 class vector_checking : public vector 
1341 {
1342         void foo (); // don't want to override _Base::foo () as the 
1343                      // user doesn't know about _Base::foo ()
1344 };</pre>
1345 </blockquote>
1346
1347
1348 <p><b>Proposed resolution:</b></p>
1349 <p>Clarify the wording to make the example illegal.</p>
1350
1351
1352 <p><b>Rationale:</b></p>
1353 <p>This is not a defect in the Standard.&nbsp; The example is already
1354 illegal.&nbsp; See 17.4.4.4 [member.functions] paragraph 2.</p>
1355
1356
1357
1358
1359 <hr>
1360 <h3><a name="97"></a>97. Insert inconsistent definition</h3>
1361 <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>
1362  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1363 <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>
1364 <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>
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><tt>insert(iterator, const value_type&amp;)</tt> is defined both on
1368 sequences and on set, with unrelated semantics: insert here (in
1369 sequences), and insert with hint (in associative containers). They
1370 should have different names (B.S. says: do not abuse overloading).</p>
1371
1372
1373 <p><b>Rationale:</b></p>
1374 <p>This is not a defect in the Standard. It is a genetic misfortune of
1375 the design, for better or for worse.</p>
1376
1377
1378
1379
1380 <hr>
1381 <h3><a name="99"></a>99. Reverse_iterator comparisons completely wrong</h3>
1382 <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>
1383  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1384 <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>
1385 <p><b>Discussion:</b></p>
1386 <p>The &lt;, &gt;, &lt;=, &gt;= comparison operator are wrong: they
1387 return the opposite of what they should.</p>
1388
1389 <p>Note: same problem in CD2, these were not even defined in CD1.  SGI
1390 STL code is correct; this problem is known since the Morristown
1391 meeting but there it was too late</p>
1392
1393
1394 <p><b>Rationale:</b></p>
1395 <p>This is not a defect in the Standard. A careful reading shows the Standard is correct
1396 as written. A review of several implementations show that they implement
1397 exactly what the Standard says.</p>
1398
1399
1400
1401
1402 <hr>
1403 <h3><a name="100"></a>100. Insert iterators/ostream_iterators overconstrained</h3>
1404 <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>
1405  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1406 <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>
1407 <p><b>Discussion:</b></p>
1408 <p>Overspecified For an insert iterator it, the expression *it is
1409 required to return a reference to it. This is a simple possible
1410 implementation, but as the SGI STL documentation says, not the only
1411 one, and the user should not assume that this is the case.</p>
1412
1413
1414 <p><b>Rationale:</b></p>
1415 <p>The LWG believes this causes no harm and is not a defect in the
1416 standard. The only example anyone could come up with caused some
1417 incorrect code to work, rather than the other way around.</p>
1418
1419
1420
1421
1422
1423 <hr>
1424 <h3><a name="101"></a>101. No way to free storage for vector and deque</h3>
1425 <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>
1426  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1427 <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>
1428 <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>
1429 <p><b>Discussion:</b></p>
1430 <p>Reserve can not free storage, unlike string::reserve</p>
1431
1432
1433 <p><b>Rationale:</b></p>
1434 <p>This is not a defect in the Standard. The LWG has considered this
1435 issue in the past and sees no need to change the Standard. Deque has
1436 no reserve() member function. For vector, shrink-to-fit can be
1437 expressed in a single line of code (where <tt>v</tt> is
1438 <tt>vector&lt;T&gt;</tt>):
1439 </p>
1440
1441 <blockquote>
1442   <p><tt>vector&lt;T&gt;(v).swap(v);&nbsp; // shrink-to-fit v</tt></p>
1443 </blockquote>
1444
1445
1446
1447
1448
1449 <hr>
1450 <h3><a name="102"></a>102. Bug in insert range in associative containers</h3>
1451 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
1452  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1453 <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>
1454 <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>
1455 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a></p>
1456 <p><b>Discussion:</b></p>
1457 <p>Table 69 of Containers say that a.insert(i,j) is linear if [i, j) is ordered. It seems
1458 impossible to implement, as it means that if [i, j) = [x], insert in an associative
1459 container is O(1)!</p>
1460
1461
1462 <p><b>Proposed resolution:</b></p>
1463 <p>N+log (size()) if [i,j) is sorted according to value_comp()</p>
1464
1465
1466 <p><b>Rationale:</b></p>
1467 <p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>.</p>
1468
1469
1470
1471
1472
1473 <hr>
1474 <h3><a name="104"></a>104. Description of basic_string::operator[] is unclear</h3>
1475 <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>
1476  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1477 <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>
1478 <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>
1479 <p><b>Discussion:</b></p>
1480 <p>It is not clear that undefined behavior applies when pos == size ()
1481 for the non const version.</p>
1482
1483
1484 <p><b>Proposed resolution:</b></p>
1485 <p>Rewrite as: Otherwise, if pos &gt; size () or pos == size () and
1486 the non-const version is used, then the behavior is undefined.</p>
1487
1488
1489 <p><b>Rationale:</b></p>
1490 <p>The Standard is correct. The proposed resolution already appears in
1491 the Standard.</p>
1492
1493
1494
1495
1496 <hr>
1497 <h3><a name="105"></a>105. fstream ctors argument types desired</h3>
1498 <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>
1499  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1500 <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>
1501 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#454">454</a></p>
1502 <p><b>Discussion:</b></p>
1503
1504
1505 <p>fstream ctors take a const char* instead of string.<br>
1506 fstream ctors can't take wchar_t</p>
1507
1508 <p>An extension to add a const wchar_t* to fstream would make the
1509 implementation non conforming.</p>
1510
1511
1512 <p><b>Rationale:</b></p>
1513 <p>This is not a defect in the Standard. It might be an
1514 interesting extension for the next Standard. </p>
1515
1516
1517
1518
1519 <hr>
1520 <h3><a name="107"></a>107. Valarray constructor is strange</h3>
1521 <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>
1522  <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p>
1523 <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>
1524 <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>
1525 <p><b>Discussion:</b></p>
1526 <p>The order of the arguments is (elem, size) instead of the normal
1527 (size, elem) in the rest of the library. Since elem often has an
1528 integral or floating point type, both types are convertible to each
1529 other and reversing them leads to a well formed program.</p>
1530
1531
1532 <p><b>Proposed resolution:</b></p>
1533 <p>Inverting the arguments could silently break programs. Introduce
1534 the two signatures (const T&amp;, size_t) and (size_t, const T&amp;),
1535 but make the one we do not want private so errors result in a
1536 diagnosed access violation. This technique can also be applied to STL
1537 containers.</p>
1538
1539
1540 <p><b>Rationale:</b></p>
1541 <p>The LWG believes that while the order of arguments is unfortunate,
1542 it does not constitute a defect in the standard. The LWG believes that
1543 the proposed solution will not work for valarray&lt;size_t&gt; and
1544 perhaps other cases.</p>
1545
1546
1547
1548
1549 <hr>
1550 <h3><a name="111"></a>111. istreambuf_iterator::equal overspecified, inefficient</h3>
1551 <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>
1552  <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-10-15</p>
1553 <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>
1554 <p><b>Discussion:</b></p>
1555 <p>The member istreambuf_iterator&lt;&gt;::equal is specified to be
1556 unnecessarily inefficient. While this does not affect the efficiency
1557 of conforming implementations of iostreams, because they can
1558 "reach into" the iterators and bypass this function, it does
1559 affect users who use istreambuf_iterators. </p>
1560
1561 <p>The inefficiency results from a too-scrupulous definition, which
1562 requires a "true" result if neither iterator is at eof. In
1563 practice these iterators can only usefully be compared with the
1564 "eof" value, so the extra test implied provides no benefit,
1565 but slows down users' code. </p>
1566
1567 <p>The solution is to weaken the requirement on the function to return
1568 true only if both iterators are at eof. </p>
1569
1570
1571 <p><b>Proposed resolution:</b></p>
1572 <p>Replace 24.5.3.5 [istreambuf.iterator::equal],
1573 paragraph 1, </p>
1574
1575 <blockquote>
1576   <p>-1- Returns: true if and only if both iterators are at end-of-stream, or neither is at
1577   end-of-stream, regardless of what streambuf object they use. </p>
1578 </blockquote>
1579
1580 <p>with</p>
1581
1582 <blockquote>
1583   <p>-1- Returns: true if and only if both iterators are at
1584   end-of-stream, regardless of what streambuf object they use. </p>
1585 </blockquote>
1586
1587
1588
1589 <p><b>Rationale:</b></p>
1590 <p>It is not clear that this is a genuine defect.  Additionally, the
1591 LWG was reluctant to make a change that would result in 
1592 operator== not being a equivalence relation.  One consequence of
1593 this change is that an algorithm that's passed the range [i, i)
1594 would no longer treat it as an empty range.</p>
1595
1596
1597
1598
1599
1600 <hr>
1601 <h3><a name="113"></a>113. Missing/extra iostream sync semantics</h3>
1602 <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>
1603  <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-10-13</p>
1604 <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>
1605 <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>
1606 <p><b>Discussion:</b></p>
1607 <p>In 27.6.1.1, class basic_istream has a member function sync, described in 27.6.1.3,
1608 paragraph 36. </p>
1609
1610 <p>Following the chain of definitions, I find that the various sync functions have defined
1611 semantics for output streams, but no semantics for input streams. On the other hand,
1612 basic_ostream has no sync function. </p>
1613
1614 <p>The sync function should at minimum be added to basic_ostream, for internal
1615 consistency. </p>
1616
1617 <p>A larger question is whether sync should have assigned semantics for input streams. </p>
1618
1619 <p>Classic iostreams said streambuf::sync flushes pending output and attempts to return
1620 unread input characters to the source. It is a protected member function. The filebuf
1621 version (which is public) has that behavior (it backs up the read pointer). Class
1622 strstreambuf does not override streambuf::sync, and so sync can't be called on a
1623 strstream. </p>
1624
1625 <p>If we can add corresponding semantics to the various sync functions, we should. If not,
1626 we should remove sync from basic_istream.</p>
1627
1628
1629 <p><b>Rationale:</b></p>
1630 <p>A sync function is not needed in basic_ostream because the flush function provides the
1631 desired functionality.</p>
1632
1633 <p>As for the other points, the LWG finds the standard correct as written.</p>
1634
1635
1636
1637
1638
1639 <hr>
1640 <h3><a name="116"></a>116. bitset cannot be constructed with a const char*</h3>
1641 <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>
1642  <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-11-06</p>
1643 <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>
1644 <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>
1645 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#778">778</a></p>
1646 <p><b>Discussion:</b></p>
1647
1648
1649
1650 <p>The following code does not compile with the EDG compiler:</p>
1651
1652 <blockquote>
1653   <pre>#include &lt;bitset&gt;
1654 using namespace std;
1655 bitset&lt;32&gt; b("111111111");</pre>
1656 </blockquote>
1657
1658 <p>If you cast the ctor argument to a string, i.e.:</p>
1659
1660 <blockquote>
1661   <pre>bitset&lt;32&gt; b(string("111111111"));</pre>
1662 </blockquote>
1663
1664 <p>then it will compile. The reason is that bitset has the following templatized
1665 constructor:</p>
1666
1667 <blockquote>
1668   <pre>template &lt;class charT, class traits, class Allocator&gt;
1669 explicit bitset (const basic_string&lt;charT, traits, Allocator&gt;&amp; str, ...);</pre>
1670 </blockquote>
1671
1672 <p>According to the compiler vendor, Steve Adamcyk at EDG, the user
1673 cannot pass this template constructor a <tt>const char*</tt> and
1674 expect a conversion to <tt>basic_string</tt>.  The reason is
1675 "When you have a template constructor, it can get used in
1676 contexts where type deduction can be done. Type deduction basically
1677 comes up with exact matches, not ones involving conversions."
1678 </p>
1679
1680 <p>I don't think the intention when this constructor became
1681 templatized was for construction from a <tt>const char*</tt> to no
1682 longer work.</p>
1683
1684
1685 <p><b>Proposed resolution:</b></p>
1686 <p>Add to 23.3.5 [template.bitset] a bitset constructor declaration</p>
1687
1688 <blockquote>
1689   <pre>explicit bitset(const char*);</pre>
1690 </blockquote>
1691
1692 <p>and in Section 23.3.5.1 [bitset.cons] add:</p>
1693
1694 <blockquote>
1695   <pre>explicit bitset(const char* str);</pre>
1696   <p>Effects: <br>
1697   &nbsp;&nbsp;&nbsp; Calls <tt>bitset((string) str, 0, string::npos);</tt></p>
1698 </blockquote>
1699
1700
1701 <p><b>Rationale:</b></p>
1702 <p>Although the problem is real, the standard is designed that way so
1703 it is not a defect.  Education is the immediate workaround. A future
1704 standard may wish to consider the Proposed Resolution as an
1705 extension.</p>
1706
1707
1708
1709
1710
1711 <hr>
1712 <h3><a name="121"></a>121. Detailed definition for ctype&lt;wchar_t&gt; specialization</h3>
1713 <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>
1714  <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p>
1715 <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>
1716 <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>
1717 <p><b>Discussion:</b></p>
1718 <p>Section 22.1.1.1.1 has the following listed in Table 51: ctype&lt;char&gt; ,
1719 ctype&lt;wchar_t&gt;. </p>
1720
1721 <p>Also Section 22.2.1.1 [locale.ctype] says: </p>
1722
1723 <blockquote>
1724   <p>The instantiations required in Table 51 (22.1.1.1.1) namely ctype&lt;char&gt; and
1725   ctype&lt;wchar_t&gt; , implement character classing appropriate to the implementation's
1726   native character set. </p>
1727 </blockquote>
1728
1729 <p>However, Section 22.2.1.3 [facet.ctype.special]
1730 only has a detailed description of the ctype&lt;char&gt; specialization, not the
1731 ctype&lt;wchar_t&gt; specialization. </p>
1732
1733
1734 <p><b>Proposed resolution:</b></p>
1735 <p>Add the ctype&lt;wchar_t&gt; detailed class description to Section 
1736 22.2.1.3 [facet.ctype.special]. </p>
1737
1738
1739 <p><b>Rationale:</b></p>
1740 <p>Specialization for wchar_t is not needed since the default is acceptable.</p>
1741
1742
1743
1744
1745
1746 <hr>
1747 <h3><a name="131"></a>131. list::splice throws nothing</h3>
1748 <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>
1749  <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
1750 <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>
1751 <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>
1752 <p><b>Discussion:</b></p>
1753 <p>What happens if a splice operation causes the size() of a list to grow 
1754 beyond max_size()?</p>
1755
1756
1757 <p><b>Rationale:</b></p>
1758 <p>Size() cannot grow beyond max_size().&nbsp; </p>
1759
1760
1761
1762
1763
1764 <hr>
1765 <h3><a name="135"></a>135. basic_iostream doubly initialized</h3>
1766 <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>
1767  <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p>
1768 <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>
1769 <p><b>Discussion:</b></p>
1770 <p>-1- Effects Constructs an object of class basic_iostream, assigning
1771 initial values to the base classes by calling
1772 basic_istream&lt;charT,traits&gt;(sb) (lib.istream) and
1773 basic_ostream&lt;charT,traits&gt;(sb) (lib.ostream)</p>
1774
1775 <p>The called for basic_istream and basic_ostream constructors call
1776 init(sb). This means that the basic_iostream's virtual base class is
1777 initialized twice.</p>
1778
1779
1780 <p><b>Proposed resolution:</b></p>
1781 <p>Change 27.6.1.5.1, paragraph 1 to:</p>
1782
1783 <p>-1- Effects Constructs an object of class basic_iostream, assigning
1784 initial values to the base classes by calling
1785 basic_istream&lt;charT,traits&gt;(sb) (lib.istream).</p>
1786
1787
1788 <p><b>Rationale:</b></p>
1789 <p>The LWG agreed that the <tt> init()</tt> function is called
1790 twice, but said that this is harmless and so not a defect in the
1791 standard.</p>
1792
1793
1794
1795
1796 <hr>
1797 <h3><a name="138"></a>138. Class ctype_byname&lt;char&gt; redundant and misleading</h3>
1798 <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>
1799  <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-03-18</p>
1800 <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>
1801 <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>
1802 <p><b>Discussion:</b></p>
1803 <p>Section 22.2.1.4 [locale.codecvt] specifies that
1804 ctype_byname&lt;char&gt; must be a specialization of the ctype_byname
1805 template.</p>
1806
1807 <p>It is common practice in the standard that specializations of class templates are only
1808 mentioned where the interface of the specialization deviates from the interface of the
1809 template that it is a specialization of. Otherwise, the fact whether or not a required
1810 instantiation is an actual instantiation or a specialization is left open as an
1811 implementation detail. </p>
1812
1813 <p>Clause 22.2.1.4 deviates from that practice and for that reason is misleading. The
1814 fact, that ctype_byname&lt;char&gt; is specified as a specialization suggests that there
1815 must be something "special" about it, but it has the exact same interface as the
1816 ctype_byname template. Clause 22.2.1.4 does not have any explanatory value, is at best
1817 redundant, at worst misleading - unless I am missing anything. </p>
1818
1819 <p>Naturally, an implementation will most likely implement ctype_byname&lt;char&gt; as a
1820 specialization, because the base class ctype&lt;char&gt; is a specialization with an
1821 interface different from the ctype template, but that's an implementation detail and need
1822 not be mentioned in the standard. </p>
1823
1824
1825 <p><b>Rationale:</b></p>
1826 <p> The standard as written is mildly misleading, but the correct fix
1827 is to deal with the underlying problem in the ctype_byname base class,
1828 not in the specialization. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p>
1829
1830
1831
1832
1833 <hr>
1834 <h3><a name="140"></a>140. map&lt;Key, T&gt;::value_type does not satisfy the assignable requirement</h3>
1835 <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>
1836  <b>Submitter:</b> Mark Mitchell <b>Date:</b> 1999-04-14</p>
1837 <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>
1838 <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>
1839 <p><b>Discussion:</b></p>
1840 <blockquote>
1841   <p>23.1 [container.requirements]<br>
1842   <br>
1843   expression&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return type
1844   &nbsp;&nbsp;&nbsp;&nbsp; pre/post-condition<br>
1845   -------------&nbsp;&nbsp;&nbsp;&nbsp; ----------- &nbsp;&nbsp;&nbsp;&nbsp;
1846   -------------------<br>
1847   X::value_type&nbsp;&nbsp;&nbsp; T
1848   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1849   T is assignable<br>
1850   <br>
1851   23.3.1 [map]<br>
1852   <br>
1853   A map satisfies all the requirements of a container.<br>
1854   <br>
1855   For a map&lt;Key, T&gt; ... the value_type is pair&lt;const Key, T&gt;.</p>
1856 </blockquote>
1857
1858 <p>There's a contradiction here. In particular, `pair&lt;const Key,
1859 T&gt;' is not assignable; the `const Key' cannot be assigned
1860 to. So,&nbsp; map&lt;Key, T&gt;::value_type does not satisfy the
1861 assignable requirement imposed by a container.</p>
1862
1863 <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
1864 modification of set keys.]</i></p>
1865
1866
1867
1868 <p><b>Rationale:</b></p>
1869 <p>The LWG believes that the standard is inconsistent, but that this
1870 is a design problem rather than a strict defect. May wish to
1871 reconsider for the next standard.</p>
1872
1873
1874
1875
1876 <hr>
1877 <h3><a name="143"></a>143. C .h header wording unclear</h3>
1878 <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>
1879  <b>Submitter:</b> Christophe de Dinechin <b>Date:</b> 1999-05-04</p>
1880 <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>
1881 <p><b>Discussion:</b></p>
1882 <p>[depr.c.headers] paragraph 2 reads:</p>
1883
1884 <blockquote>
1885
1886 <p>Each C header, whose name has the form name.h, behaves as if each
1887 name placed in the Standard library namespace by the corresponding
1888 cname header is also placed within the namespace scope of the
1889 namespace std and is followed by an explicit using-declaration
1890 (_namespace.udecl_)</p>
1891
1892 </blockquote>
1893
1894 <p>I think it should mention the global name space somewhere...&nbsp;
1895 Currently, it indicates that name placed in std is also placed in
1896 std...</p>
1897
1898 <p>I don't know what is the correct wording. For instance, if struct
1899 tm is defined in time.h, ctime declares std::tm. However, the current
1900 wording seems ambiguous regarding which of the following would occur
1901 for use of both ctime and time.h:</p>
1902
1903 <blockquote>
1904   <pre>// version 1:
1905 namespace std {
1906         struct tm { ... };
1907 }
1908 using std::tm;
1909
1910 // version 2:
1911 struct tm { ... };
1912 namespace std {
1913         using ::tm;
1914 }
1915
1916 // version 3:
1917 struct tm { ... };
1918 namespace std {
1919         struct tm { ... };
1920 }</pre>
1921 </blockquote>
1922
1923 <p>I think version 1 is intended.</p>
1924
1925 <p><i>[Kona: The LWG agreed that the wording is not clear. It also
1926 agreed that version 1 is intended, version 2 is not equivalent to
1927 version 1, and version 3 is clearly not intended. The example below
1928 was constructed by Nathan Myers to illustrate why version 2 is not
1929 equivalent to version 1.</i></p>
1930
1931 <p><i>Although not equivalent, the LWG is unsure if (2) is enough of
1932 a problem to be prohibited. Points discussed in favor of allowing
1933 (2):</i></p>
1934
1935 <blockquote>
1936   <ul>
1937     <li><i>It may be a convenience to implementors.</i></li>
1938     <li><i>The only cases that fail are structs, of which the C library
1939       contains only a few.</i></li>
1940   </ul>
1941 </blockquote>
1942
1943 <p><i>]</i></p>
1944
1945 <p><b>Example:</b></p>
1946
1947 <blockquote>
1948
1949 <pre>#include &lt;time.h&gt;
1950 #include &lt;utility&gt;
1951
1952 int main() {
1953     std::tm * t;
1954     make_pair( t, t ); // okay with version 1 due to Koenig lookup
1955                        // fails with version 2; make_pair not found
1956     return 0;
1957 }</pre>
1958
1959 </blockquote>
1960
1961
1962 <p><b>Proposed resolution:</b></p>
1963
1964 <p>Replace D.5 [depr.c.headers] paragraph 2 with:</p>
1965
1966 <blockquote>
1967
1968 <p> Each C header, whose name has the form name.h, behaves as if each
1969 name placed in the Standard library namespace by the corresponding
1970 cname header is also placed within the namespace scope of the
1971 namespace std by name.h and is followed by an explicit
1972 using-declaration (_namespace.udecl_) in global scope.</p>
1973
1974 </blockquote>
1975
1976
1977
1978 <p><b>Rationale:</b></p>
1979 <p> The current wording in the standard is the result of a difficult
1980 compromise that averted delay of the standard. Based on discussions
1981 in Tokyo it is clear that there is no still no consensus on stricter
1982 wording, so the issue has been closed. It is suggested that users not
1983 write code that depends on Koenig lookup of C library functions.</p>
1984
1985
1986
1987
1988 <hr>
1989 <h3><a name="145"></a>145. adjustfield lacks default value</h3>
1990 <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>
1991  <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-05-12</p>
1992 <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>
1993 <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>
1994 <p><b>Discussion:</b></p>
1995 <p>There is no initial value for the adjustfield defined, although
1996 many people believe that the default adjustment were right. This is a
1997 common misunderstanding. The standard only defines that, if no
1998 adjustment is specified, all the predefined inserters must add fill
1999 characters before the actual value, which is "as if" the
2000 right flag were set. The flag itself need not be set.</p>
2001
2002 <p>When you implement a user-defined inserter you cannot rely on right
2003 being the default setting for the adjustfield. Instead, you must be
2004 prepared to find none of the flags set and must keep in mind that in
2005 this case you should make your inserter behave "as if" the
2006 right flag were set. This is surprising to many people and complicates
2007 matters more than necessary.</p>
2008
2009 <p>Unless there is a good reason why the adjustfield should not be
2010 initialized I would suggest to give it the default value that
2011 everybody expects anyway.</p>
2012
2013
2014
2015 <p><b>Rationale:</b></p>
2016 <p>This is not a defect. It is deliberate that the default is no bits
2017 set. Consider Arabic or Hebrew, for example. See 22.2.2.2.2 [facet.num.put.virtuals] paragraph 19, Table 61 - Fill padding.</p>
2018
2019
2020
2021
2022 <hr>
2023 <h3><a name="149"></a>149. Insert should return iterator to first element inserted</h3>
2024 <p><b>Section:</b> 23.1.3 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
2025  <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-06-28</p>
2026 <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>
2027 <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>
2028 <p><b>Discussion:</b></p>
2029 <p>Suppose that c and c1 are sequential containers and i is an
2030 iterator that refers to an element of c.  Then I can insert a copy of
2031 c1's elements into c ahead of element i by executing </p>
2032
2033 <blockquote>
2034
2035 <pre>c.insert(i, c1.begin(), c1.end());</pre>
2036
2037 </blockquote>
2038
2039 <p>If c is a vector, it is fairly easy for me to find out where the
2040 newly inserted elements are, even though i is now invalid: </p>
2041
2042 <blockquote>
2043
2044 <pre>size_t i_loc = i - c.begin();
2045 c.insert(i, c1.begin(), c1.end());</pre>
2046
2047 </blockquote>
2048
2049 <p>and now the first inserted element is at c.begin()+i_loc and one
2050 past the last is at c.begin()+i_loc+c1.size().<br>
2051 <br>
2052 But what if c is a list? I can still find the location of one past the
2053 last inserted element, because i is still valid. To find the location
2054 of the first inserted element, though, I must execute something like </p>
2055
2056 <blockquote>
2057
2058 <pre>for (size_t n = c1.size(); n; --n)
2059    --i;</pre>
2060
2061 </blockquote>
2062
2063 <p>because i is now no longer a random-access iterator.<br>
2064 <br>
2065 Alternatively, I might write something like </p>
2066
2067 <blockquote>
2068
2069 <pre>bool first = i == c.begin();
2070 list&lt;T&gt;::iterator j = i;
2071 if (!first) --j;
2072 c.insert(i, c1.begin(), c1.end());
2073 if (first)
2074    j = c.begin();
2075 else
2076    ++j;</pre>
2077
2078 </blockquote>
2079
2080 <p>which, although wretched, requires less overhead.<br>
2081 <br>
2082 But I think the right solution is to change the definition of insert
2083 so that instead of returning void, it returns an iterator that refers
2084 to the first element inserted, if any, and otherwise is a copy of its
2085 first argument.&nbsp; </p>
2086
2087
2088 <p><b>Rationale:</b></p>
2089 <p>The LWG believes this was an intentional design decision and so is
2090 not a defect. It may be worth revisiting for the next standard.</p>
2091
2092
2093
2094
2095 <hr>
2096 <h3><a name="157"></a>157. Meaningless error handling for <tt>pword()</tt> and <tt>iword()</tt></h3>
2097 <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>
2098  <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2099 <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>
2100 <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>
2101 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#41">41</a></p>
2102 <p><b>Discussion:</b></p>
2103 <p>According to paragraphs 2 and 4 of 27.4.2.5 [ios.base.storage], the
2104 functions <tt>iword()</tt> and <tt>pword()</tt> "set the
2105 <tt>badbit</tt> (which might throw an exception)" on
2106 failure. ... but what does it mean for <tt>ios_base</tt> to set the
2107 <tt>badbit</tt>? The state facilities of the IOStream library are
2108 defined in <tt>basic_ios</tt>, a derived class! It would be possible
2109 to attempt a down cast but then it would be necessary to know the
2110 character type used...</p>
2111
2112
2113 <p><b>Rationale:</b></p>
2114
2115
2116
2117
2118
2119 <hr>
2120 <h3><a name="162"></a>162. Really "formatted input functions"?</h3>
2121 <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>
2122  <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2123 <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>
2124 <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>
2125 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
2126 <p><b>Discussion:</b></p>
2127 <p>It appears to be somewhat nonsensical to consider the functions
2128 defined in the paragraphs 1 to 5 to be "Formatted input
2129 function" but since these functions are defined in a section
2130 labeled "Formatted input functions" it is unclear to me
2131 whether these operators are considered formatted input functions which
2132 have to conform to the "common requirements" from 27.6.1.2.1
2133 [istream.formatted.reqmts]: If this is the case, all manipulators, not
2134 just
2135 <tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is set
2136 (... but setting <tt>noskipws</tt> using the manipulator syntax would
2137 also skip whitespace :-)</p>
2138
2139 <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
2140 output</p>
2141
2142
2143 <p><b>Rationale:</b></p>
2144
2145
2146
2147
2148
2149 <hr>
2150 <h3><a name="163"></a>163. Return of <tt>gcount()</tt> after a call to <tt>gcount</tt></h3>
2151 <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>
2152  <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2153 <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>
2154 <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>
2155 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
2156 <p><b>Discussion:</b></p>
2157 <p>It is not clear which functions are to be considered unformatted
2158 input functions. As written, it seems that all functions in 27.6.1.3
2159 [istream.unformatted] are unformatted input functions. However, it does
2160 not
2161 really make much sense to construct a sentry object for
2162 <tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is unclear what
2163 happens to the <tt>gcount()</tt> if eg. <tt>gcount()</tt>,
2164 <tt>putback()</tt>, <tt>unget()</tt>, or <tt>sync()</tt> is called:
2165 These functions don't extract characters, some of them even
2166 "unextract" a character. Should this still be reflected in
2167 <tt>gcount()</tt>? Of course, it could be read as if after a call to
2168 <tt>gcount()</tt> <tt>gcount()</tt> return <tt>0</tt> (the last
2169 unformatted input function, <tt>gcount()</tt>, didn't extract any
2170 character) and after a call to <tt>putback()</tt> <tt>gcount()</tt>
2171 returns <tt>-1</tt> (the last unformatted input function
2172 <tt>putback()</tt> did "extract" back into the
2173 stream). Correspondingly for <tt>unget()</tt>. Is this what is
2174 intended?  If so, this should be clarified. Otherwise, a corresponding
2175 clarification should be used.</p>
2176
2177
2178 <p><b>Rationale:</b></p>
2179
2180
2181
2182
2183
2184 <hr>
2185 <h3><a name="166"></a>166. Really "formatted output functions"?</h3>
2186 <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>
2187  <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p>
2188 <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>
2189 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p>
2190 <p><b>Discussion:</b></p>
2191 <p>From 27.6.2.6.1 [ostream.formatted.reqmts] it appears that all the functions
2192 defined in 27.6.2.6.3 [ostream.inserters] have to construct a
2193 <tt>sentry</tt> object. Is this really intended?</p> 
2194
2195 <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
2196 for output instead of input.</p>
2197
2198
2199 <p><b>Rationale:</b></p>
2200
2201
2202
2203
2204
2205 <hr>
2206 <h3><a name="177"></a>177. Complex operators cannot be explicitly instantiated</h3>
2207 <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>
2208  <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p>
2209 <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>
2210 <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>
2211 <p><b>Discussion:</b></p>
2212 <p>A user who tries to explicitly instantiate a complex non-member operator will
2213 get compilation errors. Below is a simplified example of the reason why. The
2214 problem is that iterator_traits cannot be instantiated on a non-pointer type
2215 like float, yet when the compiler is trying to decide which operator+ needs to
2216 be instantiated it must instantiate the declaration to figure out the first
2217 argument type of a reverse_iterator operator.</p>
2218 <pre>namespace std {
2219 template &lt;class Iterator&gt; 
2220 struct iterator_traits
2221 {
2222     typedef typename Iterator::value_type value_type;
2223 };
2224
2225 template &lt;class T&gt; class reverse_iterator;
2226
2227 // reverse_iterator operator+
2228 template &lt;class T&gt; 
2229 reverse_iterator&lt;T&gt; operator+
2230 (typename iterator_traits&lt;T&gt;::difference_type, const reverse_iterator&lt;T&gt;&amp;);
2231
2232 template &lt;class T&gt; struct complex {};
2233
2234 // complex operator +
2235 template &lt;class T&gt;
2236 complex&lt;T&gt; operator+ (const T&amp; lhs, const complex&lt;T&gt;&amp; rhs) 
2237 { return complex&lt;T&gt;();} 
2238 }
2239
2240 // request for explicit instantiation
2241 template std::complex&lt;float&gt; std::operator+&lt;float&gt;(const float&amp;, 
2242      const std::complex&lt;float&gt;&amp;);</pre>
2243 <p>See also c++-stdlib reflector messages: lib-6814, 6815, 6816.</p>
2244
2245
2246 <p><b>Rationale:</b></p>
2247 <p>Implementors can make minor changes and the example will
2248 work. Users are not affected in any case.</p> <p>According to John
2249 Spicer, It is possible to explicitly instantiate these operators using
2250 different syntax: change "std::operator+&lt;float&gt;" to
2251 "std::operator+".</p>
2252
2253 <p>The proposed resolution of issue 120 is that users will not be able
2254 to explicitly instantiate standard library templates. If that
2255 resolution is accepted then library implementors will be the only ones
2256 that will be affected by this problem, and they must use the indicated
2257 syntax.</p>
2258
2259
2260
2261
2262 <hr>
2263 <h3><a name="178"></a>178. Should clog and cerr initially be tied to cout?</h3>
2264 <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>
2265  <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p>
2266 <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>
2267 <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>
2268 <p><b>Discussion:</b></p>
2269 <p>
2270 Section 27.3.1 says "After the object cerr is initialized,
2271 cerr.flags() &amp; unitbuf is nonzero. Its state is otherwise the same as
2272 required for ios_base::init (lib.basic.ios.cons).  It doesn't say
2273 anything about the the state of clog.  So this means that calling
2274 cerr.tie() and clog.tie() should return 0 (see Table 89 for
2275 ios_base::init effects).
2276 </p>
2277 <p>
2278 Neither of the popular standard library implementations
2279 that I tried does this, they both tie cerr and clog
2280 to &amp;cout. I would think that would be what users expect.
2281 </p>
2282
2283
2284 <p><b>Rationale:</b></p>
2285 <p>The standard is clear as written.</p>
2286 <p>27.3.1/5 says that "After the object cerr is initialized, cerr.flags()
2287 &amp; unitbuf is nonzero. Its state is otherwise the same as required for
2288 ios_base::init (27.4.4.1)." Table 89 in 27.4.4.1, which gives the
2289 postconditions of basic_ios::init(), says that tie() is 0. (Other issues correct
2290 ios_base::init to basic_ios::init().)</p>
2291
2292
2293
2294
2295 <hr>
2296 <h3><a name="188"></a>188. valarray helpers missing augmented assignment operators</h3>
2297 <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>
2298  <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 1999-08-15</p>
2299 <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>
2300 <p><b>Discussion:</b></p>
2301 <p>26.5.2.6 defines augmented assignment operators
2302 valarray&lt;T&gt;::op=(const T&amp;), but fails to provide
2303 corresponding versions for the helper classes. Thus making the
2304 following illegal:</p>
2305 <blockquote>
2306 <pre>#include &lt;valarray&gt;
2307
2308 int main()
2309 {
2310 std::valarray&lt;double&gt; v(3.14, 1999);
2311
2312 v[99] *= 2.0; // Ok
2313
2314 std::slice s(0, 50, 2);
2315
2316 v[s] *= 2.0; // ERROR
2317 }</pre>
2318 </blockquote>
2319 <p>I can't understand the intent of that omission.  It makes the
2320 valarray library less intuitive and less useful.</p>
2321
2322
2323 <p><b>Rationale:</b></p>
2324 <p>Although perhaps an unfortunate
2325 design decision, the omission is not a defect in the current
2326 standard.&nbsp; A future standard may wish to add the missing
2327 operators.</p>
2328
2329
2330
2331
2332 <hr>
2333 <h3><a name="191"></a>191. Unclear complexity for algorithms such as binary search</h3>
2334 <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>
2335  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1999-10-10</p>
2336 <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>
2337 <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>
2338 <p><b>Discussion:</b></p>
2339 <p>The complexity of binary_search() is stated as "At most
2340 log(last-first) + 2 comparisons", which seems to say that the
2341 algorithm has logarithmic complexity. However, this algorithms is
2342 defined for forward iterators. And for forward iterators, the need to
2343 step element-by-element results into linear complexity. But such a
2344 statement is missing in the standard. The same applies to
2345 lower_bound(), upper_bound(), and equal_range().&nbsp;<br>
2346 <br>
2347 However, strictly speaking the standard contains no bug here. So this
2348 might considered to be a clarification or improvement.
2349 </p>
2350
2351
2352 <p><b>Rationale:</b></p>
2353 <p>The complexity is expressed in terms of comparisons, and that
2354 complexity can be met even if the number of iterators accessed is
2355 linear. Paragraph 1 already says exactly what happens to
2356 iterators.</p>
2357
2358
2359
2360
2361 <hr>
2362 <h3><a name="192"></a>192. a.insert(p,t) is inefficient and overconstrained</h3>
2363 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2364  <b>Submitter:</b> Ed Brey <b>Date:</b> 1999-06-06</p>
2365 <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>
2366 <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>
2367 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p>
2368 <p><b>Discussion:</b></p>
2369 <p>As defined in 23.1.2, paragraph 7 (table 69), a.insert(p,t) suffers from
2370 several problems:</p>
2371 <table border="1" cellpadding="5">
2372   <tbody><tr>
2373     <td><b>expression</b></td>
2374     <td><b>return type</b></td>
2375     <td><b>pre/post-condition</b></td>
2376     <td><b>complexity</b></td>
2377   </tr>
2378   <tr>
2379     <td><tt>a.insert(p,t)</tt></td>
2380     <td><tt>iterator</tt></td>
2381     <td>inserts t if and only if there is no element with key equivalent to the key of 
2382        t in containers with unique keys; always inserts t in containers with equivalent 
2383        keys. always returns the iterator pointing to the element with key equivalent to 
2384        the key of t . iterator p is a hint pointing to where the insert should start to search.</td>
2385     <td>logarithmic in general, but amortized constant if t is inserted right after p .</td>
2386   </tr>
2387 </tbody></table>
2388 <p>1. For a container with unique keys, only logarithmic complexity is
2389 guaranteed if no element is inserted, even though constant complexity is always
2390 possible if p points to an element equivalent to t.</p>
2391 <p>2. For a container with equivalent keys, the amortized constant complexity
2392 guarantee is only useful if no key equivalent to t exists in the container.
2393 Otherwise, the insertion could occur in one of multiple locations, at least one
2394 of which would not be right after p.</p>
2395 <p>3. By guaranteeing amortized constant complexity only when t is inserted
2396 after p, it is impossible to guarantee constant complexity if t is inserted at
2397 the beginning of the container. Such a problem would not exist if amortized
2398 constant complexity was guaranteed if t is inserted before p, since there is
2399 always some p immediately before which an insert can take place.</p>
2400 <p>4. For a container with equivalent keys, p does not allow specification of
2401 where to insert the element, but rather only acts as a hint for improving
2402 performance. This negates the added functionality that p would provide if it
2403 specified where within a sequence of equivalent keys the insertion should occur.
2404 Specifying the insert location provides more control to the user, while
2405 providing no disadvantage to the container implementation.</p>
2406
2407
2408 <p><b>Proposed resolution:</b></p>
2409 <p>In 23.1.4 [associative.reqmts] paragraph 7, replace the row in table 69
2410 for a.insert(p,t) with the following two rows:</p>
2411 <table border="1" cellpadding="5">
2412   <tbody><tr>
2413     <td><b>expression</b></td>
2414     <td><b>return type</b></td>
2415     <td><b>pre/post-condition</b></td>
2416     <td><b>complexity</b></td>
2417   </tr>
2418   <tr>
2419     <td><tt>a_uniq.insert(p,t)</tt></td>
2420     <td><tt>iterator</tt></td>
2421     <td>inserts t if and only if there is no element with key equivalent to the
2422       key of t. returns the iterator pointing to the element with key equivalent
2423       to the key of t.</td>
2424     <td>logarithmic in general, but amortized constant if t is inserted right
2425       before p or p points to an element with key equivalent to t.</td>
2426   </tr>
2427   <tr>
2428     <td><tt>a_eq.insert(p,t)</tt></td>
2429     <td><tt>iterator</tt></td>
2430     <td>inserts t and returns the iterator pointing to the newly inserted
2431       element. t is inserted right before p if doing so preserves the container
2432       ordering.</td>
2433     <td>logarithmic in general, but amortized constant if t is inserted right
2434       before p.</td>
2435   </tr>
2436 </tbody></table>
2437
2438
2439
2440 <p><b>Rationale:</b></p>
2441 <p>Too big a change.&nbsp; Furthermore, implementors report checking
2442 both before p and after p, and don't want to change this behavior.</p>
2443
2444
2445
2446
2447
2448 <hr>
2449 <h3><a name="194"></a>194. rdbuf() functions poorly specified</h3>
2450 <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>
2451  <b>Submitter:</b> Steve Clamage <b>Date:</b> 1999-09-07</p>
2452 <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>
2453 <p><b>Discussion:</b></p>
2454 <p>In classic iostreams, base class ios had an rdbuf function that returned a
2455 pointer to the associated streambuf. Each derived class had its own rdbuf
2456 function that returned a pointer of a type reflecting the actual type derived
2457 from streambuf. Because in ARM C++, virtual function overrides had to have the
2458 same return type, rdbuf could not be virtual.</p>
2459 <p>In standard iostreams, we retain the non-virtual rdbuf function design, and
2460 in addition have an overloaded rdbuf function that sets the buffer pointer.
2461 There is no need for the second function to be virtual nor to be implemented in
2462 derived classes.</p>
2463 <p>Minor question: Was there a specific reason not to make the original rdbuf
2464 function virtual?</p>
2465 <p>Major problem: Friendly compilers warn about functions in derived classes
2466 that hide base-class overloads. Any standard implementation of iostreams will
2467 result in such a warning on each of the iostream classes, because of the
2468 ill-considered decision to overload rdbuf only in a base class.</p>
2469 <p>In addition, users of the second rdbuf function must use explicit
2470 qualification or a cast to call it from derived classes. An explicit
2471 qualification or cast to basic_ios would prevent access to any later overriding
2472 version if there was one.</p>
2473 <p>What I'd like to do in an implementation is add a using- declaration for the
2474 second rdbuf function in each derived class. It would eliminate warnings about
2475 hiding functions, and would enable access without using explicit qualification.
2476 Such a change I don't think would change the behavior of any valid program, but
2477 would allow invalid programs to compile:</p>
2478 <blockquote>
2479   <pre> filebuf mybuf;
2480  fstream f;
2481  f.rdbuf(mybuf); // should be an error, no visible rdbuf</pre>
2482 </blockquote>
2483 <p>I'd like to suggest this problem as a defect, with the proposed resolution to
2484 require the equivalent of a using-declaration for the rdbuf function that is not
2485 replaced in a later derived class. We could discuss whether replacing the
2486 function should be allowed.</p>
2487
2488
2489 <p><b>Rationale:</b></p>
2490 <p>For historical reasons, the standard is correct as written. There is a subtle difference between the base
2491 class <tt> rdbuf()</tt> and derived class <tt>rdbuf()</tt>. The derived
2492 class <tt> rdbuf()</tt> always returns the original streambuf, whereas the base class
2493 <tt> rdbuf()</tt> will return the "current streambuf" if that has been changed by the variant you mention.</p>
2494
2495 <p>Permission is not required to add such an extension.  See 
2496 17.4.4.4 [member.functions].</p>
2497
2498
2499
2500
2501 <hr>
2502 <h3><a name="196"></a>196. Placement new example has alignment problems</h3>
2503 <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>
2504  <b>Submitter:</b> Herb Sutter <b>Date:</b> 1998-12-15</p>
2505 <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>
2506 <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>
2507 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a></p>
2508 <p><b>Discussion:</b></p>
2509 <p>The example in 18.5.1.3 [new.delete.placement] paragraph 4 reads: </p>
2510
2511 <blockquote>
2512
2513 <p>[Example: This can be useful for constructing an object at a known address:<br>
2514 <br>
2515 <tt>&nbsp;&nbsp; char place[sizeof(Something)];<br>
2516 &nbsp;&nbsp; Something* p = new (place) Something();<br>
2517 <br>
2518 </tt>end example] </p>
2519
2520 </blockquote>
2521
2522 <p>This example has potential alignment problems. </p>
2523
2524
2525 <p><b>Rationale:</b></p>
2526
2527
2528
2529
2530
2531 <hr>
2532 <h3><a name="197"></a>197. max_size() underspecified</h3>
2533 <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>
2534  <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1999-10-21</p>
2535 <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>
2536 <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>
2537 <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>
2538 <p><b>Discussion:</b></p>
2539 <p>Must the value returned by max_size() be unchanged from call to call? </p>
2540
2541 <p>Must the value returned from max_size() be meaningful? </p>
2542
2543 <p>Possible meanings identified in lib-6827: </p>
2544
2545 <p>1) The largest container the implementation can support given "best
2546 case" conditions - i.e. assume the run-time platform is "configured to
2547 the max", and no overhead from the program itself. This may possibly
2548 be determined at the point the library is written, but certainly no
2549 later than compile time.<br>
2550 <br>
2551 2) The largest container the program could create, given "best case"
2552 conditions - i.e. same platform assumptions as (1), but take into
2553 account any overhead for executing the program itself. (or, roughly
2554 "storage=storage-sizeof(program)"). This does NOT include any resource
2555 allocated by the program. This may (or may not) be determinable at
2556 compile time.<br>
2557 <br>
2558 3) The largest container the current execution of the program could
2559 create, given knowledge of the actual run-time platform, but again,
2560 not taking into account any currently allocated resource. This is
2561 probably best determined at program start-up.<br>
2562 <br>
2563 4) The largest container the current execution program could create at
2564 the point max_size() is called (or more correctly at the point
2565 max_size() returns :-), given it's current environment (i.e. taking
2566 into account the actual currently available resources). This,
2567 obviously, has to be determined dynamically each time max_size() is
2568 called. </p>
2569
2570
2571 <p><b>Proposed resolution:</b></p>
2572
2573
2574 <p><b>Rationale:</b></p>
2575 <p>max_size() isn't useful for very many things, and the existing
2576   wording is sufficiently clear for the few cases that max_size() can
2577   be used for.  None of the attempts to change the existing wording
2578   were an improvement.</p>
2579
2580 <p>It is clear to the LWG that the value returned by max_size() can't
2581   change from call to call.</p>
2582
2583
2584
2585
2586
2587
2588 <hr>
2589 <h3><a name="203"></a>203. basic_istream::sentry::sentry() is uninstantiable with ctype&lt;user-defined type&gt;</h3>
2590 <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>
2591  <b>Submitter:</b> Matt McClure and Dietmar Kühl <b>Date:</b> 2000-01-01</p>
2592 <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>
2593 <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>
2594 <p><b>Discussion:</b></p>
2595 <p>27.6.1.1.2 Paragraph 4 states:</p>
2596 <blockquote>
2597   <p>To decide if the character c is a whitespace character, the constructor      
2598      performs ''as if'' it executes the following code fragment:&nbsp;</p>
2599   <pre>const ctype&lt;charT&gt;&amp; ctype = use_facet&lt;ctype&lt;charT&gt; &gt;(is.getloc());
2600 if (ctype.is(ctype.space,c)!=0)
2601 // c is a whitespace character.</pre>
2602 </blockquote>
2603
2604 <p> But Table 51 in 22.1.1.1.1 only requires an implementation to
2605 provide specializations for ctype&lt;char&gt; and
2606 ctype&lt;wchar_t&gt;.  If sentry's constructor is implemented using
2607 ctype, it will be uninstantiable for a user-defined character type
2608 charT, unless the implementation has provided non-working (since it
2609 would be impossible to define a correct ctype&lt;charT&gt; specialization
2610 for an arbitrary charT) definitions of ctype's virtual member
2611 functions.</p>
2612
2613 <p>
2614 It seems the intent the standard is that sentry should behave, in
2615 every respect, not just during execution, as if it were implemented
2616 using ctype, with the burden of providing a ctype specialization
2617 falling on the user.  But as it is written, nothing requires the
2618 translation of sentry's constructor to behave as if it used the above
2619 code, and it would seem therefore, that sentry's constructor should be
2620 instantiable for all character types.
2621 </p>
2622
2623 <p> 
2624 Note: If I have misinterpreted the intent of the standard with
2625 respect to sentry's constructor's instantiability, then a note should
2626 be added to the following effect:
2627 </p>
2628
2629 <blockquote><p>
2630 An implementation is forbidden from using the above code if it renders
2631 the constructor uninstantiable for an otherwise valid character
2632 type.
2633 </p></blockquote>
2634
2635 <p>In any event, some clarification is needed.</p>
2636
2637
2638
2639 <p><b>Rationale:</b></p>
2640 <p>It is possible but not easy to instantiate on types other than char
2641 or wchar_t; many things have to be done first. That is by intention
2642 and is not a defect.</p>
2643
2644
2645
2646
2647 <hr>
2648 <h3><a name="204"></a>204. distance(first, last) when "last" is before "first"</h3>
2649 <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>
2650  <b>Submitter:</b> Rintala Matti <b>Date:</b> 2000-01-28</p>
2651 <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>
2652 <p><b>Discussion:</b></p>
2653 <p>Section 24.3.4 describes the function distance(first, last) (where first and
2654 last are iterators) which calculates "the number of increments or
2655 decrements needed to get from 'first' to 'last'".</p>
2656 <p>The function should work for forward, bidirectional and random access
2657 iterators, and there is a requirement 24.3.4.5 which states that "'last'
2658 must be reachable from 'first'".</p>
2659 <p>With random access iterators the function is easy to implement as "last
2660 - first".</p>
2661 <p>With forward iterators it's clear that 'first' must point to a place before
2662 'last', because otherwise 'last' would not be reachable from 'first'.</p>
2663 <p>But what about bidirectional iterators? There 'last' is reachable from
2664 'first' with the -- operator even if 'last' points to an earlier position than
2665 'first'. However, I cannot see how the distance() function could be implemented
2666 if the implementation does not know which of the iterators points to an earlier
2667 position (you cannot use ++ or -- on either iterator if you don't know which
2668 direction is the "safe way to travel").</p>
2669 <p>The paragraph 24.3.4.1 states that "for ... bidirectional iterators they
2670 use ++ to provide linear time implementations". However, the ++ operator is
2671 not mentioned in the reachability requirement. Furthermore 24.3.4.4 explicitly
2672 mentions that distance() returns the number of increments _or decrements_,
2673 suggesting that it could return a negative number also for bidirectional
2674 iterators when 'last' points to a position before 'first'.</p>
2675 <p>Is a further requirement is needed to state that for forward and
2676 bidirectional iterators "'last' must be reachable from 'first' using the ++
2677 operator". Maybe this requirement might also apply to random access
2678 iterators so that distance() would work the same way for every iterator
2679 category?</p>
2680
2681
2682 <p><b>Rationale:</b></p>
2683 <p>"Reachable" is defined in the standard in 24.1 [iterator.requirements] paragraph 6.
2684 The definition is only in terms of operator++(). The LWG sees no defect in
2685 the standard.</p>
2686
2687
2688
2689
2690 <hr>
2691 <h3><a name="205"></a>205.  numeric_limits unclear on how to determine floating point types</h3>
2692 <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>
2693  <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-01-28</p>
2694 <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>
2695 <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>
2696 <p><b>Discussion:</b></p>
2697 <p>In several places in 18.2.1.2 [numeric.limits.members], a member is
2698 described as "Meaningful for all floating point types."
2699 However, no clear method of determining a floating point type is
2700 provided.</p>
2701
2702 <p>In 18.2.1.5 [numeric.special], paragraph 1 states ". . . (for
2703 example, epsilon() is only meaningful if is_integer is
2704 false). . ." which suggests that a type is a floating point type
2705 if is_specialized is true and is_integer is false; however, this is
2706 unclear.</p>
2707
2708 <p>When clarifying this, please keep in mind this need of users: what
2709 exactly is the definition of floating point? Would a fixed point or
2710 rational representation be considered one? I guess my statement here
2711 is that there could also be types that are neither integer or
2712 (strictly) floating point.</p>
2713
2714
2715 <p><b>Rationale:</b></p>
2716 <p>It is up to the implementor of a user define type to decide if it is a
2717 floating point type.</p>
2718
2719
2720
2721
2722 <hr>
2723 <h3><a name="207"></a>207. ctype&lt;char&gt; members return clause incomplete</h3>
2724 <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>
2725  <b>Submitter:</b> Robert Klarer <b>Date:</b> 1999-11-02</p>
2726 <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>
2727 <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>
2728 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a></p>
2729 <p><b>Discussion:</b></p>
2730 <p>
2731 The <tt>widen</tt> and <tt>narrow</tt> member functions are described
2732 in 22.2.1.3.2, paragraphs 9-11.  In each case we have two overloaded
2733 signatures followed by a <b>Returns</b> clause.  The <b>Returns</b>
2734 clause only describes one of the overloads.
2735 </p>
2736
2737
2738 <p><b>Proposed resolution:</b></p>
2739 <p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members]
2740 paragraph 10 from:</p>
2741 <p>&nbsp;&nbsp;&nbsp; Returns: do_widen(low, high, to).</p>
2742
2743 <p>to:</p>
2744 <p>&nbsp;&nbsp;&nbsp; Returns: do_widen(c) or do_widen(low, high, to), 
2745 respectively.</p>
2746
2747 <p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members] paragraph 11
2748 from:</p> 
2749 <p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(low, high, to).</p>
2750
2751 <p>to:</p>
2752 <p>&nbsp;&nbsp;&nbsp; Returns: do_narrow(c) or do_narrow(low, high, to), 
2753 respectively.</p>
2754
2755
2756 <p><b>Rationale:</b></p>
2757 <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
2758 paragraphs.</p>
2759
2760
2761
2762
2763
2764
2765 <hr>
2766 <h3><a name="213"></a>213. Math function overloads ambiguous</h3>
2767 <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>
2768  <b>Submitter:</b> Nico Josuttis <b>Date:</b> 2000-02-26</p>
2769 <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>
2770 <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>
2771 <p><b>Discussion:</b></p>
2772 <p>Due to the additional overloaded versions of numeric functions for
2773 float and long double according to Section 26.5, calls such as int x;
2774 std::pow (x, 4) are ambiguous now in a standard conforming
2775 implementation. Current implementations solve this problem very
2776 different (overload for all types, don't overload for float and long
2777 double, use preprocessor, follow the standard and get
2778 ambiguities).</p> <p>This behavior should be standardized or at least
2779 identified as implementation defined.</p>
2780
2781
2782 <p><b>Rationale:</b></p>
2783 <p>These math issues are an
2784 understood and accepted consequence of the design. They have
2785 been discussed several times in the past. Users must write casts
2786 or write floating point expressions as arguments.</p>
2787
2788
2789
2790
2791 <hr>
2792 <h3><a name="215"></a>215. Can a map's key_type be const?</h3>
2793 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2794  <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-02-29</p>
2795 <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>
2796 <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>
2797 <p><b>Discussion:</b></p>
2798 <p>A user noticed that this doesn't compile with the Rogue Wave library because
2799 the rb_tree class declares a key_allocator, and allocator&lt;const int&gt; is
2800 not legal, I think:</p>
2801 <blockquote>
2802   <pre>map &lt; const int, ... &gt; // legal?</pre>
2803 </blockquote>
2804 <p>which made me wonder whether it is legal for a map's key_type to be const. In
2805 email from Matt Austern he said:</p>
2806 <blockquote>
2807 <p>I'm not sure whether it's legal to declare a map with a const key type. I
2808 hadn't thought about that question until a couple weeks ago. My intuitive
2809 feeling is that it ought not to be allowed, and that the standard ought to say
2810 so. It does turn out to work in SGI's library, though, and someone in the
2811 compiler group even used it. Perhaps this deserves to be written up as an issue
2812 too.</p>
2813 </blockquote>
2814
2815
2816 <p><b>Rationale:</b></p>
2817 <p>The "key is assignable" requirement from table 69 in
2818 23.1.4 [associative.reqmts] already implies the key cannot be const.</p>
2819
2820
2821
2822
2823 <hr>
2824 <h3><a name="216"></a>216. setbase manipulator description flawed</h3>
2825 <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>
2826  <b>Submitter:</b> Hyman Rosen <b>Date:</b> 2000-02-29</p>
2827 <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>
2828 <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>
2829 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a></p>
2830 <p><b>Discussion:</b></p>
2831 <p>27.6.3 [std.manip] paragraph 5 says:</p>
2832 <blockquote>
2833 <pre>smanip setbase(int base);</pre>
2834 <p> Returns: An object s of unspecified type such that if out is an
2835 (instance of) basic_ostream then the expression out&lt;&lt;s behaves
2836 as if f(s) were called, in is an (instance of) basic_istream then the
2837 expression in&gt;&gt;s behaves as if f(s) were called. Where f can be
2838 defined as:</p>
2839 <pre>ios_base&amp; f(ios_base&amp; str, int base)
2840 {
2841   // set basefield
2842   str.setf(n == 8 ? ios_base::oct :
2843                 n == 10 ? ios_base::dec :
2844                 n == 16 ? ios_base::hex :
2845                   ios_base::fmtflags(0), ios_base::basefield);
2846   return str;
2847 }</pre>
2848 </blockquote>
2849 <p>There are two problems here. First, f takes two parameters, so the
2850 description needs to say that out&lt;&lt;s and in&gt;&gt;s behave as if f(s,base)
2851 had been called. Second, f is has a parameter named base, but is written as if
2852 the parameter was named n.</p>
2853 <p>Actually, there's a third problem. The paragraph has grammatical errors.
2854 There needs to be an "and" after the first comma, and the "Where
2855 f" sentence fragment needs to be merged into its preceding sentence. You
2856 may also want to format the function a little better. The formatting above is
2857 more-or-less what the Standard contains.</p>
2858
2859
2860 <p><b>Rationale:</b></p>
2861 <p>The resolution of this defect is subsumed by the proposed resolution for
2862 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a>.</p>
2863
2864 <p><i>[Tokyo: The LWG agrees that this is a defect and notes that it
2865 occurs additional places in the section, all requiring fixes.]</i></p>
2866
2867
2868
2869
2870
2871
2872
2873
2874 <hr>
2875 <h3><a name="218"></a>218. Algorithms do not use binary predicate objects for default comparisons</h3>
2876 <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>
2877  <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p>
2878 <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>
2879 <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>
2880 <p><b>Discussion:</b></p>
2881 <p>Many of the algorithms take an argument, pred, of template parameter type
2882 BinaryPredicate or an argument comp of template parameter type Compare. These
2883 algorithms usually have an overloaded version that does not take the predicate
2884 argument. In these cases pred is usually replaced by the use of operator== and
2885 comp is replaced by the use of operator&lt;.</p>
2886 <p>This use of hard-coded operators is inconsistent with other parts of the
2887 library, particularly the containers library, where equality is established
2888 using equal_to&lt;&gt; and ordering is established using less&lt;&gt;. Worse,
2889 the use of operator&lt;, would cause the following innocent-looking code to have
2890 undefined behavior:</p>
2891 <blockquote>
2892   <pre>vector&lt;string*&gt; vec;
2893 sort(vec.begin(), vec.end());</pre>
2894 </blockquote>
2895 <p>The use of operator&lt; is not defined for pointers to unrelated objects. If
2896 std::sort used less&lt;&gt; to compare elements, then the above code would be
2897 well-defined, since less&lt;&gt; is explicitly specialized to produce a total
2898 ordering of pointers.</p>
2899
2900
2901 <p><b>Rationale:</b></p>
2902 <p>This use of operator== and operator&lt; was a very deliberate, conscious, and
2903 explicitly made design decision; these operators are often more efficient. The
2904 predicate forms are available for users who don't want to rely on operator== and
2905 operator&lt;.</p>
2906
2907
2908
2909
2910 <hr>
2911 <h3><a name="219"></a>219. find algorithm missing version that takes a binary predicate argument</h3>
2912 <p><b>Section:</b> 25.1.5 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a>
2913  <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p>
2914 <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>
2915 <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>
2916 <p><b>Discussion:</b></p>
2917 <p>The find function always searches for a value using operator== to compare the
2918 value argument to each element in the input iterator range. This is inconsistent
2919 with other find-related functions such as find_end and find_first_of, which
2920 allow the caller to specify a binary predicate object to be used for determining
2921 equality. The fact that this can be accomplished using a combination of find_if
2922 and bind_1st or bind_2nd does not negate the desirability of a consistent,
2923 simple, alternative interface to find.</p>
2924
2925
2926 <p><b>Proposed resolution:</b></p>
2927 <blockquote>
2928 <p>In section 25.1.5 [alg.find], add a second prototype for find
2929 (between the existing prototype and the prototype for find_if), as
2930 follows:</p>
2931 <pre>    template&lt;class InputIterator, class T, class BinaryPredicate&gt;
2932       InputIterator find(InputIterator first, InputIterator last,
2933                          const T&amp; value, BinaryPredicate bin_pred);</pre>
2934 <p>Change the description of the return from:</p>
2935 <blockquote>
2936   <p>Returns: The first iterator i in the range [first, last) for which the following corresponding
2937   conditions hold: *i == value, pred(*i) != false. Returns last if no such iterator is found.</p>
2938 </blockquote>
2939 <p>&nbsp;to:</p>
2940 <blockquote>
2941   <p>Returns: The first iterator i in the range [first, last) for which the following&nbsp;
2942   corresponding condition holds: *i == value, bin_pred(*i,value) != false, pred(*)
2943   != false. Return last if no such iterator is found.</p>
2944 </blockquote>
2945 </blockquote>
2946
2947
2948 <p><b>Rationale:</b></p>
2949 <p>This is request for a pure extension, so it is not a defect in the
2950 current standard.&nbsp; As the submitter pointed out, "this can
2951 be accomplished using a combination of find_if and bind_1st or
2952 bind_2nd".</p>
2953
2954
2955
2956
2957 <hr>
2958 <h3><a name="236"></a>236. ctype&lt;char&gt;::is() member modifies facet</h3>
2959 <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>
2960  <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p>
2961 <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>
2962 <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>
2963 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#28">28</a></p>
2964 <p><b>Discussion:</b></p>
2965 <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
2966 second form of the <tt>is()</tt> method modifies the masks in the
2967 <tt>ctype</tt> object. The correct semantics if, of course, to obtain
2968 an array of masks. The corresponding method in the general case,
2969 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>
2970
2971
2972 <p><b>Proposed resolution:</b></p>
2973   <p>Change paragraph 4 from</p>
2974     <blockquote><p>
2975     The second form, for all *p in the range [low, high), assigns
2976     vec[p-low] to table()[(unsigned char)*p].
2977     </p></blockquote>
2978   <p>to become</p>
2979     <blockquote><p>
2980     The second form, for all *p in the range [low, high), assigns
2981     table()[(unsigned char)*p] to vec[p-low].
2982   </p></blockquote>
2983
2984
2985 <p><b>Rationale:</b></p>
2986
2987
2988
2989
2990
2991 <hr>
2992 <h3><a name="244"></a>244. Must <tt>find</tt>'s third argument be CopyConstructible?</h3>
2993 <p><b>Section:</b> 25.1.5 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
2994  <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p>
2995 <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>
2996 <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>
2997 <p><b>Discussion:</b></p>
2998 <p>Is the following implementation of <tt>find</tt> acceptable?</p>
2999
3000 <pre>        template&lt;class Iter, class X&gt;
3001         Iter find(Iter begin, Iter end, const X&amp; x)
3002         {
3003             X x1 = x;           // this is the crucial statement
3004             while (begin != end &amp;&amp; *begin != x1)
3005                 ++begin;
3006             return begin;
3007         }
3008 </pre>
3009
3010 <p>If the answer is yes, then it is implementation-dependent as to
3011 whether the following fragment is well formed:</p>
3012
3013 <pre>        vector&lt;string&gt; v;
3014
3015         find(v.begin(), v.end(), "foo");
3016 </pre>
3017
3018 <p>At issue is whether there is a requirement that the third argument
3019 of find be CopyConstructible.  There may be no problem here, but
3020 analysis is necessary.</p>
3021
3022
3023 <p><b>Rationale:</b></p>
3024 <p>There is no indication in the standard that find's third argument
3025 is required to be Copy Constructible.  The LWG believes that no such
3026 requirement was intended.  As noted above, there are times when a user
3027 might reasonably pass an argument that is not Copy Constructible.</p>
3028
3029
3030
3031
3032 <hr>
3033 <h3><a name="245"></a>245. Which operations on <tt>istream_iterator</tt> trigger input operations?</h3>
3034 <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>
3035  <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p>
3036 <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>
3037 <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>
3038 <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>
3039 <p><b>Discussion:</b></p>
3040 <p>I do not think the standard specifies what operation(s) on istream
3041 iterators trigger input operations.  So, for example:</p>
3042
3043 <pre>        istream_iterator&lt;int&gt; i(cin);
3044
3045         int n = *i++;
3046 </pre>
3047
3048 <p>I do not think it is specified how many integers have been read
3049 from cin.  The number must be at least 1, of course, but can it be 2?
3050 More?</p>
3051
3052
3053 <p><b>Rationale:</b></p>
3054 <p>The standard is clear as written: the stream is read every time
3055 operator++ is called, and it is also read either when the iterator is
3056 constructed or when operator* is called for the first time.  In the
3057 example above, exactly two integers are read from cin.</p>
3058
3059 <p>There may be a problem with the interaction between istream_iterator
3060 and some STL algorithms, such as find.  There are no guarantees about
3061 how many times find may invoke operator++.</p>
3062
3063
3064
3065
3066 <hr>
3067 <h3><a name="246"></a>246. <tt>a.insert(p,t)</tt> is incorrectly specified</h3>
3068 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>
3069  <b>Submitter:</b> Mark Rodgers <b>Date:</b> 2000-05-19</p>
3070 <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>
3071 <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>
3072 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p>
3073 <p><b>Discussion:</b></p>
3074 <p>Closed issue 192 raised several problems with the specification of
3075 this function, but was rejected as Not A Defect because it was too big
3076 a change with unacceptable impacts on existing implementations.
3077 However, issues remain that could be addressed with a smaller change
3078 and with little or no consequent impact.</p>
3079
3080 <ol>
3081    <li><p> The specification is inconsistent with the original
3082    proposal and with several implementations.</p>
3083
3084    <p>The initial implementation by Hewlett Packard only ever looked
3085    immediately <i>before</i> p, and I do not believe there was any
3086    intention to standardize anything other than this behavior.
3087    Consequently, current implementations by several leading
3088    implementors also look immediately before p, and will only insert
3089    after p in logarithmic time.  I am only aware of one implementation
3090    that does actually look after p, and it looks before p as well.  It
3091    is therefore doubtful that existing code would be relying on the
3092    behavior defined in the standard, and it would seem that fixing
3093    this defect as proposed below would standardize existing
3094    practice.</p></li>
3095
3096    <li><p>
3097    The specification is inconsistent with insertion for sequence
3098    containers.</p>
3099
3100    <p>This is difficult and confusing to teach to newcomers.  All
3101    insert operations that specify an iterator as an insertion location
3102    should have a consistent meaning for the location represented by
3103    that iterator.</p></li>
3104
3105    <li><p> As specified, there is no way to hint that the insertion
3106    should occur at the beginning of the container, and the way to hint
3107    that it should occur at the end is long winded and unnatural.</p>
3108
3109    <p>For a container containing n elements, there are n+1 possible
3110    insertion locations and n+1 valid iterators.  For there to be a
3111    one-to-one mapping between iterators and insertion locations, the
3112    iterator must represent an insertion location immediately before
3113    the iterator.</p></li>
3114
3115    <li><p> When appending sorted ranges using insert_iterators,
3116    insertions are guaranteed to be sub-optimal.</p>
3117
3118    <p>In such a situation, the optimum location for insertion is
3119    always immediately after the element previously inserted.  The
3120    mechanics of the insert iterator guarantee that it will try and
3121    insert after the element after that, which will never be correct.
3122    However, if the container first tried to insert before the hint,
3123    all insertions would be performed in amortized constant
3124    time.</p></li>
3125 </ol>
3126
3127
3128 <p><b>Proposed resolution:</b></p>
3129 <p>In 23.1.2 [lib.associative.reqmts] paragraph 7, table 69, make
3130 the following changes in the row for a.insert(p,t):</p>
3131
3132 <p><i>assertion/note pre/post condition:</i>
3133 <br>Change the last sentence from</p>
3134      <blockquote><p>
3135      "iterator p is a hint pointing to where the insert should
3136      start to search."
3137      </p></blockquote>
3138 <p>to</p>
3139      <blockquote><p>
3140      "iterator p is a hint indicating that immediately before p
3141      may be a correct location where the insertion could occur."
3142      </p></blockquote>
3143
3144 <p><i>complexity:</i><br>
3145 Change the words "right after" to "immediately before".</p>
3146
3147
3148 <p><b>Rationale:</b></p>
3149
3150
3151
3152
3153
3154 <hr>
3155 <h3><a name="249"></a>249. Return Type of <tt>auto_ptr::operator=</tt></h3>
3156 <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>
3157  <b>Submitter:</b> Joseph Gottman <b>Date:</b> 2000-06-30</p>
3158 <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>
3159 <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>
3160 <p><b>Discussion:</b></p>
3161 <p>According to section 20.4.5, the function
3162 <tt>auto_ptr::operator=()</tt> returns a reference to an auto_ptr.
3163 The reason that <tt>operator=()</tt> usually returns a reference is to
3164 facilitate code like</p>
3165
3166 <pre>    int x,y,z;
3167     x = y = z = 1;
3168 </pre>
3169
3170 <p>However, given analogous code for <tt>auto_ptr</tt>s,</p>
3171 <pre>    auto_ptr&lt;int&gt; x, y, z;
3172     z.reset(new int(1));
3173     x = y = z;
3174 </pre>
3175
3176 <p>the result would be that <tt>z</tt> and <tt>y</tt> would both be set to 
3177 NULL, instead of all the <tt>auto_ptr</tt>s being set to the same value. 
3178 This makes such cascading assignments useless and counterintuitive for 
3179 <tt>auto_ptr</tt>s.</p>
3180
3181
3182 <p><b>Proposed resolution:</b></p>
3183 <p>Change <tt>auto_ptr::operator=()</tt> to return <tt>void</tt> instead
3184 of an <tt>auto_ptr</tt> reference.</p>
3185
3186
3187 <p><b>Rationale:</b></p>
3188 <p>The return value has uses other than cascaded assignments: a user can
3189 call an auto_ptr member function, pass the auto_ptr to a
3190 function, etc.  Removing the return value could break working user
3191 code.</p>
3192
3193
3194
3195
3196 <hr>
3197 <h3><a name="257"></a>257. STL functional object and iterator inheritance.</h3>
3198 <p><b>Section:</b> 20.6.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>
3199  <b>Submitter:</b> Robert Dick  <b>Date:</b> 2000-08-17</p>
3200 <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>
3201 <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>
3202 <p><b>Discussion:</b></p>
3203 <p>
3204 According to the November 1997 Draft Standard, the results of deleting an
3205 object of a derived class through a pointer to an object of its base class are
3206 undefined if the base class has a non-virtual destructor.  Therefore, it is
3207 potentially dangerous to publicly inherit from such base classes.
3208 </p>
3209
3210 <p>Defect:
3211 <br>
3212 The STL design encourages users to publicly inherit from a number of classes
3213 which do nothing but specify interfaces, and which contain non-virtual
3214 destructors.
3215 </p>
3216
3217 <p>Attribution:
3218 <br>
3219 Wil Evers and William E. Kempf suggested this modification for functional
3220 objects.
3221 </p>
3222
3223
3224 <p><b>Proposed resolution:</b></p>
3225 <p>
3226 When a base class in the standard library is useful only as an interface
3227 specifier, i.e., when an object of the class will never be directly
3228 instantiated, specify that the class contains a protected destructor.  This
3229 will prevent deletion through a pointer to the base class without performance,
3230 or space penalties (on any implementation I'm aware of).
3231 </p>
3232
3233 <p>
3234 As an example, replace...
3235 </p>
3236
3237 <pre>    template &lt;class Arg, class Result&gt;
3238     struct unary_function {
3239             typedef Arg    argument_type;
3240             typedef Result result_type;
3241     };
3242 </pre>
3243
3244 <p>
3245 ... with...
3246 </p>
3247
3248 <pre>    template &lt;class Arg, class Result&gt;
3249     struct unary_function {
3250             typedef Arg    argument_type;
3251             typedef Result result_type;
3252     protected:
3253             ~unary_function() {}
3254     };
3255 </pre>
3256
3257 <p>
3258 Affected definitions:
3259 <br>
3260   &nbsp;20.3.1 [lib.function.objects] -- unary_function, binary_function
3261   <br>
3262   &nbsp;24.3.2 [lib.iterator.basic] -- iterator
3263 </p>
3264
3265
3266 <p><b>Rationale:</b></p>
3267 <p>
3268 The standard is clear as written; this is a request for change, not a
3269 defect in the strict sense.  The LWG had several different objections
3270 to the proposed change.  One is that it would prevent users from
3271 creating objects of type <tt>unary_function</tt> and
3272 <tt>binary_function</tt>.  Doing so can sometimes be legitimate, if users
3273 want to pass temporaries as traits or tag types in generic code.
3274 </p>
3275
3276
3277
3278
3279
3280 <hr>
3281 <h3><a name="267"></a>267. interaction of strstreambuf::overflow() and seekoff()</h3>
3282 <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>
3283  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-10-05</p>
3284 <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>
3285 <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>
3286 <p><b>Discussion:</b></p>
3287 <p>
3288 It appears that the interaction of the strstreambuf members overflow()
3289 and seekoff() can lead to undefined behavior in cases where defined
3290 behavior could reasonably be expected. The following program
3291 demonstrates this behavior:
3292 </p>
3293
3294 <pre>    #include &lt;strstream&gt;
3295
3296     int main ()
3297     {
3298          std::strstreambuf sb;
3299          sb.sputc ('c');
3300
3301          sb.pubseekoff (-1, std::ios::end, std::ios::in);
3302          return !('c' == sb.sgetc ());
3303     }
3304 </pre>
3305
3306 <p>
3307 D.7.1.1, p1 initializes strstreambuf with a call to basic_streambuf&lt;&gt;(),
3308 which in turn sets all pointers to 0 in 27.5.2.1, p1.
3309 </p>
3310  
3311 <p>
3312 27.5.2.2.5, p1 says that basic_streambuf&lt;&gt;::sputc(c) calls
3313 overflow(traits::to_int_type(c)) if a write position isn't available (it
3314 isn't due to the above).
3315 </p>
3316
3317 <p>
3318 D.7.1.3, p3 says that strstreambuf::overflow(off, ..., ios::in) makes at
3319 least one write position available (i.e., it allows the function to make
3320 any positive number of write positions available).
3321 </p>
3322
3323 <p>
3324 D.7.1.3, p13 computes newoff = seekhigh - eback(). In D.7.1, p4 we see
3325 seekhigh = epptr() ? epptr() : egptr(), or seekhigh = epptr() in this
3326 case. newoff is then epptr() - eback().
3327 </p>
3328
3329 <p>
3330 D.7.1.4, p14 sets gptr() so that gptr() == eback() + newoff + off, or
3331 gptr() == epptr() + off holds.
3332 </p>
3333
3334 <p>
3335 If strstreambuf::overflow() made exactly one write position available
3336 then gptr() will be set to just before epptr(), and the program will
3337 return 0. Buf if the function made more than one write position
3338 available, epptr() and gptr() will both point past pptr() and the
3339 behavior of the program is undefined.
3340 </p>
3341
3342
3343 <p><b>Proposed resolution:</b></p>
3344
3345
3346    <p>Change the last sentence of D.7.1 [depr.strstreambuf] paragraph 4 from</p>
3347
3348       <blockquote><p>
3349       Otherwise, seeklow equals gbeg and seekhigh is either pend, if
3350       pend is not a null pointer, or gend.
3351       </p></blockquote>
3352
3353    <p>to become</p>
3354
3355       <blockquote><p>
3356       Otherwise, seeklow equals gbeg and seekhigh is either gend if
3357       0 == pptr(), or pbase() + max where max is the maximum value of
3358       pptr() - pbase() ever reached for this stream.
3359       </p></blockquote>
3360
3361 <p><i>[
3362   pre-Copenhagen: Dietmar provided wording for proposed resolution.
3363 ]</i></p>
3364
3365
3366 <p><i>[
3367   post-Copenhagen: Fixed a typo: proposed resolution said to fix
3368   4.7.1, not D.7.1.
3369 ]</i></p>
3370
3371
3372
3373
3374 <p><b>Rationale:</b></p>
3375 <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
3376 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>, 
3377 the library working group does not wish to invest time nailing down
3378 corner cases in a deprecated feature.</p>
3379
3380
3381
3382
3383
3384 <hr>
3385 <h3><a name="269"></a>269. cstdarg and unnamed parameters</h3>
3386 <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>
3387  <b>Submitter:</b> J. Stephen Adamczyk <b>Date:</b> 2000-10-10</p>
3388 <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>
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>
3391 <p>
3392 One of our customers asks whether this is valid C++:
3393 </p>
3394
3395 <pre>   #include &lt;cstdarg&gt;
3396
3397    void bar(const char *, va_list);
3398
3399    void
3400    foo(const char *file, const char *, ...)
3401    {
3402      va_list ap;
3403      va_start(ap, file);
3404      bar(file, ap);
3405      va_end(ap);
3406    }
3407 </pre>
3408
3409 <p>
3410 The issue being whether it is valid to use cstdarg when the final
3411 parameter before the "..." is unnamed.  cstdarg is, as far
3412 as I can tell, inherited verbatim from the C standard. and the
3413 definition there (7.8.1.1 in the ISO C89 standard) refers to "the
3414 identifier of the rightmost parameter".  What happens when there
3415 is no such identifier?
3416 </p>
3417
3418 <p>
3419 My personal opinion is that this should be allowed, but some tweak
3420 might be required in the C++ standard.
3421 </p>
3422
3423
3424 <p><b>Rationale:</b></p>
3425 <p>
3426 Not a defect, the C and C++ standards are clear.  It is impossible to
3427 use varargs if the parameter immediately before "..." has no
3428 name, because that is the parameter that must be passed to va_start.
3429 The example given above is broken, because va_start is being passed
3430 the wrong parameter.
3431 </p>
3432
3433 <p>
3434 There is no support for extending varargs to provide additional
3435 functionality beyond what's currently there.  For reasons of C/C++
3436 compatibility, it is especially important not to make gratuitous
3437 changes in this part of the C++ standard.  The C committee has already
3438 been requested not to touch this part of the C standard unless
3439 necessary.
3440 </p>
3441
3442
3443
3444
3445 <hr>
3446 <h3><a name="277"></a>277. Normative encouragement in allocator requirements unclear</h3>
3447 <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>
3448  <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-11-07</p>
3449 <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>
3450 <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>
3451 <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>
3452 <p><b>Discussion:</b></p>
3453 <p>
3454 In 20.1.5, paragraph 5, the standard says that "Implementors are
3455 encouraged to supply libraries that can accept allocators that
3456 encapsulate more general memory models and that support non-equal
3457 instances." This is intended as normative encouragement to
3458 standard library implementors.  However, it is possible to interpret
3459 this sentence as applying to nonstandard third-party libraries.
3460 </p>
3461
3462
3463 <p><b>Proposed resolution:</b></p>
3464 <p>
3465 In 20.1.5, paragraph 5, change "Implementors" to
3466 "Implementors of the library described in this International
3467 Standard".
3468 </p>
3469
3470
3471 <p><b>Rationale:</b></p>
3472 <p>The LWG believes the normative encouragement is already
3473 sufficiently clear, and that there are no important consequences
3474 even if it is misunderstood.</p>
3475
3476
3477
3478
3479
3480 <hr>
3481 <h3><a name="279"></a>279. const and non-const iterators should have equivalent typedefs</h3>
3482 <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>
3483  <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-11-27</p>
3484 <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>
3485 <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>
3486 <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>
3487 <p><b>Discussion:</b></p>
3488
3489 <p>
3490 This came from an email from Steve Cleary to Fergus in reference to
3491 issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed
3492 this in Toronto and believes it should be a separate issue.
3493 </p>
3494
3495 <p>
3496 Steve said: "We may want to state that the const/non-const iterators must have
3497 the same difference type, size_type, and category."
3498 </p>
3499
3500 <p>
3501 (Comment from Judy)
3502 I'm not sure if the above sentence should be true for all
3503 const and non-const iterators in a particular container, or if it means 
3504 the container's iterator can't be compared with the container's
3505 const_iterator unless the above it true. I suspect the former.
3506 </p>
3507
3508
3509 <p><b>Proposed resolution:</b></p>
3510 <p>
3511 In <b>Section:</b> 23.1 [container.requirements],
3512 table 65, in the assertion/note pre/post condition for X::const_iterator,
3513 add the following:
3514 </p>
3515
3516 <blockquote>
3517 <p>
3518 typeid(X::const_iterator::difference_type) == typeid(X::iterator::difference_type)
3519 </p>
3520
3521 <p>
3522 typeid(X::const_iterator::size_type) == typeid(X::iterator::size_type)
3523 </p>
3524
3525 <p>
3526 typeid(X::const_iterator::category) == typeid(X::iterator::category)
3527 </p>
3528 </blockquote>
3529
3530
3531 <p><b>Rationale:</b></p>
3532 <p>Going through the types one by one: Iterators don't have a
3533 <tt>size_type</tt>.  We already know that the difference types are
3534 identical, because the container requirements already say that the
3535 difference types of both X::iterator and X::const_iterator are both
3536 X::difference_type.  The standard does not require that X::iterator
3537 and X::const_iterator have the same iterator category, but the LWG
3538 does not see this as a defect: it's possible to imagine cases in which
3539 it would be useful for the categories to be different.</p>
3540
3541 <p>It may be desirable to require X::iterator and X::const_iterator to
3542 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>
3543
3544
3545
3546
3547
3548
3549 <hr>
3550 <h3><a name="287"></a>287. conflicting ios_base fmtflags</h3>
3551 <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>
3552  <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
3553 <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>
3554 <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>
3555 <p><b>Discussion:</b></p>
3556 <p>
3557 The Effects clause for ios_base::setf(fmtflags fmtfl) says
3558 "Sets fmtfl in flags()".  What happens if the user first calls
3559 ios_base::scientific and then calls ios_base::fixed or vice-versa?
3560 This is an issue for all of the conflicting flags, i.e. ios_base::left
3561 and ios_base::right or ios_base::dec, ios_base::hex and ios_base::oct.
3562 </p>
3563
3564 <p>
3565 I see three possible solutions: 
3566 </p>
3567
3568 <ol>
3569 <li>Set ios_base::failbit whenever the user specifies a conflicting
3570 flag with one previously explicitly set. If the constructor is
3571 supposed to set ios_base::dec (see discussion below), then
3572 the user setting hex or oct format after construction will not
3573 set failbit. </li>
3574 <li>The last call to setf "wins", i.e. it clears any conflicting
3575 previous setting.</li>
3576 <li>All the flags that the user specifies are set, but when actually 
3577 interpreting them, fixed always override scientific, right always 
3578 overrides left, dec overrides hex which overrides oct.</li>
3579 </ol>
3580
3581 <p>
3582 Most existing implementations that I tried seem to conform to resolution #3,
3583 except that when using the iomanip manipulator hex or oct then that always 
3584 overrides dec, but calling setf(ios_base::hex) doesn't. 
3585 </p>
3586
3587 <p>
3588 There is a sort of related issue, which is that although the ios_base
3589 constructor says that each ios_base member has an indeterminate value
3590 after construction, all the existing implementations I tried explicitly set 
3591 ios_base::dec.
3592 </p>
3593
3594
3595 <p><b>Proposed resolution:</b></p>
3596
3597
3598 <p><b>Rationale:</b></p>
3599 <p>
3600 <tt>adjustfield</tt>, <tt>basefield</tt>, and <tt>floatfield</tt>
3601 are each multi-bit fields.  It is possible to set multiple bits within
3602 each of those fields.  (For example, <tt>dec</tt> and
3603 <tt>oct</tt>). These fields are used by locale facets. The LWG
3604 reviewed the way in which each of those three fields is used, and
3605 believes that in each case the behavior is well defined for any
3606 possible combination of bits. See for example Table 58, in 22.2.2.2.2
3607 [facet.num.put.virtuals], noting the requirement in paragraph 6 of that
3608 section.
3609 </p>
3610 <p>
3611 Users are advised to use manipulators, or else use the two-argument
3612 version of <tt>setf</tt>, to avoid unexpected behavior.
3613 </p>
3614
3615
3616
3617
3618
3619 <hr>
3620 <h3><a name="289"></a>289. &lt;cmath&gt; requirements missing C float and long double versions</h3>
3621 <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>
3622  <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p>
3623 <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>
3624 <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>
3625 <p><b>Discussion:</b></p>
3626 <p>
3627     In ISO/IEC 9899:1990 Programming Languages C we find the following
3628     concerning &lt;math.h&gt;:
3629 </p>
3630
3631 <blockquote><p>
3632          7.13.4 Mathematics &lt;math.h&gt;
3633          <br>
3634          The names of all existing functions declared in the &lt;math.h&gt;
3635          header, suffixed with f or l, are reserved respectively for
3636          corresponding functions with float and long double arguments
3637          are return values.
3638 </p></blockquote>
3639
3640 <p>
3641     For example, <tt>float&nbsp;sinf(float)</tt>
3642     is reserved.
3643 </p>
3644
3645 <p>
3646     In the C99 standard, &lt;math.h&gt; must contain declarations
3647     for these functions.
3648 </p>
3649
3650 <p>
3651 So, is it acceptable for an implementor to add these prototypes to the
3652 C++ versions of the math headers? Are they required?
3653 </p>
3654
3655
3656 <p><b>Proposed resolution:</b></p>
3657 <p>
3658 Add these Functions to Table 80, section 26.5 and to Table 99,
3659 section C.2:
3660 </p>
3661
3662 <pre>    acosf asinf atanf atan2f ceilf cosf coshf 
3663     expf fabsf floorf fmodf frexpf ldexpf 
3664     logf log10f modff powf sinf sinhf sqrtf 
3665     tanf tanhf 
3666     acosl asinl atanl atan2l ceill cosl coshl 
3667     expl fabsl floorl fmodl frexpl ldexpl 
3668     logl log10l modfl powl sinl sinhl sqrtl 
3669     tanl tanhl
3670 </pre>
3671
3672 <p>
3673 There should probably be a note saying that these functions
3674 are optional and, if supplied, should match the description in
3675 the 1999 version of the C standard. In the next round
3676 of C++ standardization they can then become mandatory. 
3677 </p>
3678
3679
3680 <p><b>Rationale:</b></p>
3681 <p>The C90 standard, as amended, already permits (but does not
3682 require) these functions, and the C++ standard incorporates the
3683 C90 standard by reference.  C99 is not an issue, because it is
3684 never referred to by the C++ standard.</p>
3685
3686
3687
3688
3689
3690 <hr>
3691 <h3><a name="293"></a>293. Order of execution in transform algorithm</h3>
3692 <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>
3693  <b>Submitter:</b> Angelika Langer <b>Date:</b> 2001-01-04</p>
3694 <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>
3695 <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>
3696 <p><b>Discussion:</b></p>
3697 <p>This issue is related to issue 242.  In case that the resolution
3698 proposed for issue 242 is accepted, we have have the following
3699 situation: The 4 numeric algorithms (accumulate and consorts) as well
3700 as transform would allow a certain category of side effects.  The
3701 numeric algorithms specify that they invoke the functor "for
3702 every iterator i in the range [first, last) in order". transform,
3703 in contrast, would not give any guarantee regarding order of
3704 invocation of the functor, which means that the functor can be invoked
3705 in any arbitrary order.
3706 </p>
3707
3708 <p>Why would that be a problem?  Consider an example: say the
3709 transformator that is a simple enumerator ( or more generally
3710 speaking, "is order-sensitive" ).  Since a standard
3711 compliant implementation of transform is free to invoke the enumerator
3712 in no definite order, the result could be a garbled enumeration.
3713 Strictly speaking this is not a problem, but it is certainly at odds
3714 with the prevalent understanding of transform as an algorithms that
3715 assigns "a new _corresponding_ value" to the output
3716 elements.
3717 </p>
3718
3719 <p>All implementations that I know of invoke the transformator in
3720 definite order, namely starting from first and proceeding to last -
3721 1. Unless there is an optimization conceivable that takes advantage of
3722 the indefinite order I would suggest to specify the order, because it
3723 eliminate the uncertainty that users would otherwise have regarding
3724 the order of execution of their potentially order-sensitive function
3725 objects.
3726 </p>
3727
3728
3729 <p><b>Proposed resolution:</b></p>
3730 <p>In section 25.2.3 - Transform [lib.alg.transform] change:</p>
3731 <blockquote><p>
3732 -1- Effects: Assigns through every iterator i in the range [result,
3733 result + (last1 - first1)) a new corresponding
3734 value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
3735 (i - result), *(first2 + (i - result))).
3736 </p></blockquote>
3737 <p>to:</p>
3738 <blockquote><p>
3739 -1- Effects: Computes values by  invoking the operation op or binary_op 
3740 for every iterator in the range [first1, last1) in order. Assigns through
3741 every iterator i in the range [result, result + (last1 - first1)) a new
3742 corresponding
3743 value equal to op(*(first1 + (i - result)) or binary_op(*(first1 +
3744 (i - result), *(first2 + (i - result))).
3745 </p></blockquote>
3746
3747
3748 <p><b>Rationale:</b></p>
3749 <p>For Input Iterators an order is already guaranteed, because
3750 only one order is possible.  If a user who passes a Forward
3751 Iterator to one of these algorithms really needs a specific
3752 order of execution, it's possible to achieve that effect by
3753 wrapping it in an Input Iterator adaptor.</p>
3754
3755
3756
3757
3758
3759 <hr>
3760 <h3><a name="296"></a>296. Missing descriptions and requirements of pair operators</h3>
3761 <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>
3762  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-14</p>
3763 <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>
3764 <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>
3765 <p><b>Discussion:</b></p>
3766 <p>The synopsis of the header <tt>&lt;utility&gt;</tt> in 20.2 [utility]
3767 lists the complete set of equality and relational operators for <tt>pair</tt>
3768 but the section describing the template and the operators only describes
3769 <tt>operator==()</tt> and <tt>operator&lt;()</tt>, and it fails to mention
3770 any requirements on the template arguments. The remaining operators are
3771 not mentioned at all.
3772 </p> 
3773
3774
3775 <p><b>Rationale:</b></p>
3776 <p>20.2.1 [operators] paragraph 10 already specifies the semantics.
3777 That paragraph says that, if declarations of operator!=, operator&gt;,
3778 operator&lt;=, and operator&gt;= appear without definitions, they are
3779 defined as specified in 20.2.1 [operators].  There should be no user
3780 confusion, since that paragraph happens to immediately precede the
3781 specification of <tt>pair</tt>.</p>
3782
3783
3784
3785
3786
3787 <hr>
3788 <h3><a name="302"></a>302. Need error indication from codecvt&lt;&gt;::do_length</h3>
3789 <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>
3790  <b>Submitter:</b> Gregory Bumgardner <b>Date:</b> 2001-01-25</p>
3791 <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>
3792 <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>
3793 <p><b>Discussion:</b></p>
3794 <p>
3795 The effects of <tt>codecvt&lt;&gt;::do_length()</tt> are described in
3796 22.2.1.5.2, paragraph 10.  As implied by that paragraph, and clarified
3797 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
3798 process the source data and update the <tt>stateT</tt> argument just
3799 as if the data had been processed by <tt>codecvt&lt;&gt;::in()</tt>.
3800 However, the standard does not specify how <tt>do_length()</tt> would
3801 report a translation failure, should the source sequence contain
3802 untranslatable or illegal character sequences.
3803 </p>
3804
3805 <p>
3806 The other conversion methods return an "error" result value
3807 to indicate that an untranslatable character has been encountered, but
3808 <tt>do_length()</tt> already has a return value (the number of source
3809 characters that have been processed by the method).
3810 </p>
3811
3812
3813 <p><b>Proposed resolution:</b></p>
3814 <p>
3815 This issue cannot be resolved without modifying the interface. An exception
3816 cannot be used, as there would be no way to determine how many characters
3817 have been processed and the state object would be left in an indeterminate
3818 state.
3819 </p>
3820
3821 <p>
3822 A source compatible solution involves adding a fifth argument to length()
3823 and do_length() that could be used to return position of the offending
3824 character sequence. This argument would have a default value that would
3825 allow it to be ignored:
3826 </p>
3827
3828 <pre>  int length(stateT&amp; state, 
3829              const externT* from, 
3830              const externT* from_end, 
3831              size_t max,
3832              const externT** from_next = 0);
3833
3834   virtual
3835   int do_length(stateT&amp; state, 
3836                 const externT* from, 
3837                 const externT* from_end, 
3838                 size_t max,
3839                 const externT** from_next);
3840 </pre>
3841
3842 <p>
3843 Then an exception could be used to report any translation errors and
3844 the from_next argument, if used, could then be used to retrieve the
3845 location of the offending character sequence.
3846 </p>
3847
3848
3849 <p><b>Rationale:</b></p>
3850 <p>The standard is already clear: the return value is the number of
3851 "valid complete characters".  If it encounters an invalid sequence of
3852 external characters, it stops.</p>
3853
3854
3855
3856
3857
3858 <hr>
3859 <h3><a name="304"></a>304. Must <tt>*a</tt> return an lvalue when <tt>a</tt> is an input iterator?</h3>
3860 <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>
3861  <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-02-05</p>
3862 <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>
3863 <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>
3864 <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>
3865 <p><b>Discussion:</b></p>
3866 <p>
3867 We all "know" that input iterators are allowed to produce
3868 values when dereferenced of which there is no other in-memory copy.
3869 </p>
3870
3871 <p>
3872 But: Table 72, with a careful reading, seems to imply that this can only be
3873 the case if the value_type has no members (e.g. is a built-in type).
3874 </p>
3875
3876 <p>The problem occurs in the following entry:</p>
3877
3878 <pre>  a-&gt;m     pre: (*a).m is well-defined
3879            Equivalent to (*a).m
3880 </pre>
3881
3882 <p>
3883 <tt>*a.m</tt> can be well-defined if <tt>*a</tt> is not a reference
3884 type, but since <tt>operator-&gt;()</tt> must return a pointer for
3885 <tt>a-&gt;m</tt> to be well-formed, it needs something to return a
3886 pointer <i>to</i>. This seems to indicate that <tt>*a</tt> must be
3887 buffered somewhere to make a legal input iterator.
3888 </p>
3889
3890 <p>I don't think this was intentional.</p>
3891
3892
3893 <p><b>Rationale:</b></p>
3894 <p>The current standard is clear and consistent.  Input iterators that
3895   return rvalues are in fact implementable.  They may in some cases
3896   require extra work, but it is still possible to define an operator-&gt;
3897   in such cases: it doesn't have to return a T*, but may return a
3898   proxy type.  No change to the standard is justified.</p>
3899
3900
3901
3902
3903
3904 <hr>
3905 <h3><a name="313"></a>313. set_terminate and set_unexpected question</h3>
3906 <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>
3907  <b>Submitter:</b> Judy Ward <b>Date:</b> 2001-04-03</p>
3908 <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>
3909 <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>
3910 <p><b>Discussion:</b></p>
3911 <p>
3912 According to section 18.7.3.3 of the standard, std::terminate() is
3913 supposed to call the terminate_handler in effect immediately after
3914 evaluating the throw expression.
3915 </p>
3916
3917 <p>
3918 Question: what if the terminate_handler in effect is itself
3919 std::terminate?
3920 </p>
3921
3922 <p>For example:</p>
3923
3924 <pre>  #include &lt;exception&gt;
3925
3926   int main () {
3927       std::set_terminate(std::terminate);
3928       throw 5;
3929       return 0;
3930   }
3931 </pre>
3932
3933 <p>
3934 Is the implementation allowed to go into an infinite loop?
3935 </p>
3936
3937 <p>
3938 I think the same issue applies to std::set_unexpected.
3939 </p>
3940
3941
3942 <p><b>Proposed resolution:</b></p>
3943
3944
3945 <p><b>Rationale:</b></p>
3946 <p>Infinite recursion is to be expected: users who set the terminate
3947 handler to <tt>terminate</tt> are explicitly asking for <tt>terminate</tt>
3948 to call itself.</p>
3949
3950
3951
3952
3953
3954 <hr>
3955 <h3><a name="314"></a>314. Is the stack unwound when terminate() is called?</h3>
3956 <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>
3957  <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-04-11</p>
3958 <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>
3959 <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>
3960 <p><b>Discussion:</b></p>
3961
3962 <p>
3963 The standard appears to contradict itself about whether the stack is
3964 unwound when the implementation calls terminate().
3965 </p>
3966
3967 <p>From 18.7.3.3p2:</p>
3968 <blockquote><p>
3969     Calls the terminate_handler function in effect immediately
3970     after evaluating the throw-expression (lib.terminate.handler),
3971     if called by the implementation [...]
3972 </p></blockquote>
3973
3974 <p>So the stack is guaranteed not to be unwound.</p>
3975
3976 <p>But from 15.3p9:</p>
3977 <blockquote><p>
3978     [...]whether or not the stack is unwound before this call
3979     to terminate() is implementation-defined (except.terminate).
3980 </p></blockquote>
3981
3982 <p>
3983 And 15.5.1 actually defines that in most cases the stack is unwound.
3984 </p>
3985
3986
3987 <p><b>Proposed resolution:</b></p>
3988
3989
3990 <p><b>Rationale:</b></p>
3991 <p>There is definitely no contradiction between the core and library
3992 clauses; nothing in the core clauses says that stack unwinding happens
3993 after <tt>terminate</tt> is called.  18.7.3.3p2 does not say anything
3994 about when terminate() is called; it merely specifies which
3995 <tt>terminate_handler</tt> is used.</p>
3996
3997
3998
3999
4000
4001 <hr>
4002 <h3><a name="323"></a>323. abs() overloads in different headers</h3>
4003 <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>
4004  <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-06-04</p>
4005 <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>
4006 <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>
4007 <p><b>Discussion:</b></p>
4008 <p>Currently the standard mandates the following overloads of
4009 abs():</p>
4010
4011 <pre>    abs(long), abs(int) in &lt;cstdlib&gt;
4012
4013     abs(float), abs(double), abs(long double) in &lt;cmath&gt;
4014
4015     template&lt;class T&gt; T abs(const complex&lt;T&gt;&amp;) in &lt;complex&gt;
4016
4017     template&lt;class T&gt; valarray&lt;T&gt; abs(const valarray&lt;T&gt;&amp;); in &lt;valarray&gt;
4018 </pre>
4019
4020 <p>
4021 The problem is that having only some overloads visible of a function
4022 that works on "implicitly inter-convertible" types is dangerous in
4023 practice. The headers that get included at any point in a translation
4024 unit can change unpredictably during program
4025 development/maintenance. The wrong overload might be unintentionally
4026 selected.
4027 </p>
4028
4029 <p>
4030 Currently, there is nothing that mandates the simultaneous visibility
4031 of these overloads. Indeed, some vendors have begun fastidiously
4032 reducing dependencies among their (public) headers as a QOI issue: it
4033 helps people to write portable code by refusing to compile unless all
4034 the correct headers are #included.
4035 </p>
4036
4037 <p>The same issue may exist for other functions in the library.</p>
4038
4039 <p>Redmond: PJP reports that C99 adds two new kinds of abs: complex,
4040 and int_max_abs.</p>
4041
4042 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#343">343</a>.</p>
4043
4044 <p><i>[
4045 Bellevue:
4046 ]</i></p>
4047
4048
4049 <blockquote>
4050 The situation is not sufficiently severe to warrant a change.
4051 </blockquote>
4052
4053
4054
4055
4056 <p><b>Rationale:</b></p>
4057 <p>The programs that could potentially be broken by this situation are
4058   already fragile, and somewhat contrived: For example, a user-defined
4059   class that has conversion overloads both to <tt>long</tt> and
4060   to <tt>float</tt>.  If <tt>x</tt> is a value of such a class, then
4061   <tt>abs(x)</tt> would give the <tt>long</tt> version if the user
4062   included &lt;cstdlib&gt;, the <tt>float</tt> version if the user
4063   included &lt;cmath&gt;, and would be diagnosed as ambiguous at
4064   compile time if the user included both headers.  The LWG couldn't
4065   find an example of a program whose meaning would be changed (as
4066   opposed to changing it from well-formed to ill-formed) simply by
4067   adding another standard header.</p>
4068
4069 <p>Since the harm seems minimal, and there don't seem to be any simple
4070   and noninvasive solutions, this is being closed as NAD.  It is
4071   marked as "Future" for two reasons.  First, it might be useful to
4072   define an <tt>&lt;all&gt;</tt> header that would include all
4073   Standard Library headers.  Second, we should at least make sure that
4074   future library extensions don't make this problem worse.</p>
4075
4076
4077
4078
4079
4080 <hr>
4081 <h3><a name="326"></a>326. Missing typedef in moneypunct_byname</h3>
4082 <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>
4083  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-05</p>
4084 <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>
4085 <p><b>Discussion:</b></p>
4086 <p>The definition of the moneypunct facet contains the typedefs char_type
4087 and string_type. Only one of these names, string_type, is defined in
4088 the derived facet, moneypunct_byname.</p>
4089
4090
4091 <p><b>Proposed resolution:</b></p>
4092 <p>For consistency with the numpunct facet, add a typedef for
4093 char_type to the definition of the moneypunct_byname facet in
4094 22.2.6.4 [locale.moneypunct.byname].</p>
4095
4096
4097 <p><b>Rationale:</b></p>
4098 <p>The absence of the typedef is irrelevant.  Users can still access
4099 the typedef, because it is inherited from the base class.</p>
4100
4101
4102
4103
4104
4105 <hr>
4106 <h3><a name="330"></a>330. Misleading "exposition only" value in class locale definition</h3>
4107 <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>
4108  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-15</p>
4109 <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>
4110 <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>
4111 <p><b>Discussion:</b></p>
4112 <p>
4113 The "exposition only" value of the std::locale::none constant shown in
4114 the definition of class locale is misleading in that it on many
4115 systems conflicts with the value assigned to one if the LC_XXX
4116 constants (specifically, LC_COLLATE on AIX, LC_ALL on HP-UX, LC_CTYPE
4117 on Linux and SunOS). This causes incorrect behavior when such a
4118 constant is passed to one of the locale member functions that accept a
4119 locale::category argument and interpret it as either the C LC_XXX
4120 constant or a bitmap of locale::category values. At least three major
4121 implementations adopt the suggested value without a change and
4122 consequently suffer from this problem.
4123 </p>
4124
4125 <p>
4126 For instance, the following code will (presumably) incorrectly copy facets
4127 belonging to the collate category from the German locale on AIX:
4128 </p>
4129
4130 <pre>  std::locale l (std::locale ("C"), "de_DE", std::locale::none);
4131 </pre>
4132
4133
4134 <p><b>Rationale:</b></p>
4135 <p>The LWG agrees that it may be difficult to implement locale member
4136 functions in such a way that they can take either <tt>category</tt>
4137 arguments or the LC_ constants defined in &lt;cctype&gt;.  In light of
4138 this requirement (22.1.1.1.1 [locale.category], paragraph 2), and in light
4139 of the requirement in the preceding paragraph that it is possible to
4140 combine <tt>category</tt> bitmask elements with bitwise operations,
4141 defining the <tt>category</tt> elements is delicate,
4142 particularly if an implementor is constrained to work with a
4143 preexisting C library.  (Just using the existing LC_ constants would
4144 not work in general.)  There's no set of "exposition only" values that
4145 could give library implementors proper guidance in such a delicate
4146 matter.  The non-normative example we're giving is no worse than
4147 any other choice would be.</p>
4148
4149 <p>See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>.</p>
4150
4151
4152
4153
4154
4155 <hr>
4156 <h3><a name="332"></a>332. Consider adding increment and decrement operators to std::fpos&lt; T &gt; </h3>
4157 <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>
4158  <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-27</p>
4159 <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>
4160 <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>
4161 <p><b>Discussion:</b></p>
4162 <p>
4163 Increment and decrement operators are missing from 
4164 Table 88 -- Position type requirements in 27.4.3 [fpos].
4165 </p>
4166
4167
4168 <p><b>Proposed resolution:</b></p>
4169 <p>
4170 Table 88 (section 27.4.3) -- Position type requirements
4171 be updated to include increment and decrement operators.
4172 </p>
4173
4174 <pre>expression        return type     operational    note
4175
4176 ++p               fpos&amp;           p += O(1)
4177 p++               fpos            { P tmp = p;
4178                                     ++p;
4179                                     return tmp; }
4180 --p               fpos&amp;           p -= O(1)
4181 p--               fpos            { P tmp = p;
4182                                     --p;
4183                                     return tmp; }
4184 </pre>
4185
4186
4187
4188 <p><b>Rationale:</b></p>
4189 <p>The LWG believes this is a request for extension, not a defect
4190 report.  Additionally, nobody saw a clear need for this extension;
4191 <tt>fpos</tt> is used only in very limited ways.</p>
4192
4193
4194
4195
4196
4197 <hr>
4198 <h3><a name="344"></a>344. grouping + showbase</h3>
4199 <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>
4200  <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-10-13</p>
4201 <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>
4202 <p><b>Discussion:</b></p>
4203 <p>
4204 When both grouping and showbase are active and the basefield is octal, 
4205 does the leading 0 participate in the grouping or not?  For example, 
4206 should one format as: 0,123,456 or 0123,456?
4207 </p>
4208 <p>
4209 An analogy can be drawn with hexadecimal.  It appears that 0x123,456 is 
4210 preferred over 0x,123,456.  However, this analogy is not universally 
4211 accepted to apply to the octal base.  The standard is not clear on how 
4212 to format (or parse) in this manner.
4213 </p>
4214
4215 <p><b>Proposed resolution:</b></p>
4216 <p>
4217 Insert into 22.2.3.1.2 [facet.numpunct.virtuals] paragraph 3, just before the last
4218 sentence:
4219 </p>
4220 <blockquote><p>
4221 The leading hexadecimal base specifier "0x" does not participate in 
4222 grouping.  The leading '0' octal base specifier may participate in 
4223 grouping.  It is unspecified if the leading '0' participates in 
4224 formatting octal numbers.  In parsing octal numbers, the implementation 
4225 is encouraged to accept both the leading '0' participating in the 
4226 grouping, and not participating (e.g. 0123,456 or 0,123,456).
4227 </p></blockquote>
4228
4229 <p><b>Rationale:</b></p>
4230 <p>
4231 The current behavior may be unspecified, but it's not clear that it
4232 matters.  This is an obscure corner case, since grouping is usually
4233 intended for the benefit of humans and oct/hex prefixes are usually
4234 intended for the benefit of machines.  There is not a strong enough
4235 consensus in the LWG for action.
4236 </p>
4237
4238
4239
4240
4241 <hr>
4242 <h3><a name="348"></a>348. Minor issue with std::pair operator&lt;</h3>
4243 <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>
4244  <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-10-23</p>
4245 <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>
4246 <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>
4247 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#532">532</a></p>
4248 <p><b>Discussion:</b></p>
4249
4250
4251 <p>
4252 The current wording of 20.2.2 [lib.pairs] p6 precludes the use of
4253 operator&lt; on any pair type which contains a pointer.
4254 </p>
4255
4256
4257 <p><b>Proposed resolution:</b></p>
4258 <p>In 20.2.3 [pairs] paragraph 6, replace:</p>
4259 <pre>    Returns: x.first &lt; y.first || (!(y.first &lt; x.first) &amp;&amp; x.second &lt;
4260         y.second).
4261 </pre>
4262 <p>With:</p>
4263 <pre>    Returns: std::less&lt;T1&gt;()( x.first, y.first ) ||
4264              (!std::less&lt;T1&gt;()( y.first, x.first) &amp;&amp; 
4265              std::less&lt;T2&gt;()( x.second, y.second ) )
4266 </pre>
4267
4268
4269
4270 <p><b>Rationale:</b></p>
4271 <p>This is an instance of a much more general problem.  If we want
4272   operator&lt; to translate to std::less for pairs of pointers, where
4273   do we draw the line?  The same issue applies to individual
4274   pointers, smart pointer wrappers, std::vector&lt;T*&gt;, and so
4275   on.</p>
4276
4277 <p>Andy Koenig suggests that the real issue here is that we aren't
4278   distinguishing adequately between two different orderings, a
4279   "useful ordering" and a "canonical ordering" that's used just
4280   because we sometimes need <i>some</i> ordering without caring much
4281   which ordering it is.  Another example of the later is typeinfo's
4282   <tt>before</tt>.</p>
4283
4284
4285
4286
4287
4288
4289 <hr>
4290 <h3><a name="350"></a>350. allocator&lt;&gt;::address</h3>
4291 <p><b>Section:</b> 20.7.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>
4292  <b>Submitter:</b> Nathan Myers <b>Date:</b> 2001-10-25</p>
4293 <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>
4294 <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>
4295 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#634">634</a></p>
4296 <p><b>Discussion:</b></p>
4297 <p>See c++std-lib-9006 and c++std-lib-9007.  This issue is taken
4298 verbatim from -9007.</p>
4299
4300 <p>
4301 The core language feature allowing definition of operator&amp;() applied 
4302 to any non-builtin type makes that operator often unsafe to use in 
4303 implementing libraries, including the Standard Library.  The result
4304 is that many library facilities fail for legal user code, such as
4305 the fragment</p>
4306 <pre>  class A { private: A* operator&amp;(); };
4307   std::vector&lt;A&gt; aa;
4308
4309   class B { };
4310   B* operator&amp;(B&amp;) { return 0; }
4311   std::vector&lt;B&gt; ba;
4312 </pre>
4313
4314 <p>
4315 In particular, the requirements table for Allocator (Table 32) specifies
4316 no semantics at all for member address(), and allocator&lt;&gt;::address is 
4317 defined in terms of unadorned operator &amp;.
4318 </p>
4319
4320
4321
4322 <p><b>Proposed resolution:</b></p>
4323 <p>
4324 In 20.6.1.1, Change the definition of allocator&lt;&gt;::address from:</p>
4325 <blockquote><p>
4326   Returns: &amp;x
4327 </p></blockquote>
4328
4329 <p>to:</p>
4330
4331 <p>
4332   Returns: The value that the built in operator&amp;(x) would return if not 
4333   overloaded.
4334 </p>
4335
4336 <p>
4337 In 20.1.6, Table 32, add to the Notes column of the a.address(r) and
4338 a.address(s) lines, respectively: 
4339 </p>
4340
4341 <pre>  allocator&lt;T&gt;::address(r)
4342   allocator&lt;T&gt;::address(s)
4343 </pre> 
4344
4345 <p>In addition, in clause 17.4.1.1, add a statement:</p>
4346
4347 <blockquote><p>
4348  The Standard Library does not apply operator&amp; to any type for which
4349  operator&amp; may be overloaded.
4350 </p></blockquote> 
4351
4352
4353
4354 <p><b>Rationale:</b></p>
4355 <p>The LWG believes both examples are ill-formed.  The contained type
4356 is required to be CopyConstructible (20.1.1 [utility.arg.requirements]), and that
4357 includes the requirement that &amp;t return the usual types and
4358 values. Since allocators are intended to be used in conjunction with
4359 containers, and since the CopyConstructible requirements appear to
4360 have been written to deal with the concerns of this issue, the LWG
4361 feels it is NAD unless someone can come up with a well-formed example
4362 exhibiting a problem.</p>
4363
4364 <p>It may well be that the CopyConstructible requirements are too
4365   restrictive and that either the container requirements or the
4366   CopyConstructive requirements should be relaxed, but that's a far
4367   larger issue.  Marking this issue as "future" as a pointer to that
4368   larger issue.</p>
4369
4370
4371
4372
4373
4374 <hr>
4375 <h3><a name="351"></a>351. unary_negate and binary_negate: struct or class?</h3>
4376 <p><b>Section:</b> 20.6 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
4377  <b>Submitter:</b> Dale Riley <b>Date:</b> 2001-11-12</p>
4378 <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>
4379 <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>
4380 <p><b>Discussion:</b></p>
4381 <p>
4382 In 20.6 [function.objects] the header &lt;functional&gt; synopsis declares
4383 the unary_negate and binary_negate function objects as struct.
4384 However in 20.6.10 [negators] the unary_negate and binary_negate
4385 function objects are defined as class.  Given the context, they are
4386 not "basic function objects" like negate, so this is either a typo or
4387 an editorial oversight.
4388 </p>
4389
4390 <p><i>[Taken from comp.std.c++]</i></p>
4391
4392
4393
4394 <p><b>Proposed resolution:</b></p>
4395 <p>Change the synopsis to reflect the useage in 20.6.10 [negators]</p>
4396
4397 <p><i>[Curaçao: Since the language permits "struct", the LWG
4398 views this as NAD. They suggest, however, that the Project Editor
4399 might wish to make the change as editorial.]</i></p>
4400
4401
4402
4403
4404
4405
4406
4407 <hr>
4408 <h3><a name="353"></a>353. <tt>std::pair</tt> missing template assignment</h3>
4409 <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>
4410  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-12-02</p>
4411 <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>
4412 <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>
4413 <p><b>Discussion:</b></p>
4414 <p>
4415 The class template <tt>std::pair</tt> defines a template ctor (20.2.2, p4) but
4416 no template assignment operator. This may lead to inefficient code since
4417 assigning an object of <tt>pair&lt;C, D&gt;</tt> to <tt>pair&lt;A, B&gt;</tt>
4418 where the types <tt>C</tt> and <tt>D</tt> are distinct from but convertible to
4419 <tt>A</tt> and <tt>B</tt>, respectively, results in a call to the template copy
4420 ctor to construct an unnamed temporary of type <tt>pair&lt;A, B&gt;</tt>
4421 followed by an ordinary (perhaps implicitly defined) assignment operator,
4422 instead of just a straight assignment.
4423 </p>
4424
4425
4426 <p><b>Proposed resolution:</b></p>
4427 <p>
4428 Add the following declaration to the definition of <tt>std::pair</tt>:
4429 </p>
4430 <pre>    template&lt;class U, class V&gt;
4431     pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
4432 </pre>
4433 <p>
4434 And also add a paragraph describing the effects of the function template to the
4435 end of 20.2.2:
4436 </p>
4437 <pre>    template&lt;class U, class V&gt;
4438     pair&amp; operator=(const pair&lt;U, V&gt; &amp;p);
4439 </pre>
4440 <p>
4441     <b>Effects</b>: <tt>first = p.first;</tt>
4442                     <tt>second = p.second;</tt>
4443     <b>Returns</b>: <tt>*this</tt>
4444 </p>
4445
4446 <p><i>[Curaçao: There is no indication this is was anything other than
4447 a design decision, and thus NAD.&nbsp; May be appropriate for a future
4448 standard.]</i></p>
4449
4450
4451 <p><i>[
4452 Pre Bellevue:  It was recognized that this was taken care of by
4453 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a>,
4454 and thus moved from NAD Future to NAD Editorial.
4455 ]</i></p>
4456
4457
4458
4459
4460
4461
4462 <hr>
4463 <h3><a name="356"></a>356. Meaning of ctype_base::mask enumerators</h3>
4464 <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>
4465  <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-01-23</p>
4466 <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>
4467 <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>
4468 <p><b>Discussion:</b></p>
4469
4470 <p>What should the following program print?</p>
4471
4472 <pre>  #include &lt;locale&gt;
4473   #include &lt;iostream&gt;
4474
4475   class my_ctype : public std::ctype&lt;char&gt;
4476   {
4477     typedef std::ctype&lt;char&gt; base;
4478   public:
4479     my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
4480     {
4481       std::copy(base::classic_table(), base::classic_table() + base::table_size,
4482                 my_table);
4483       my_table[(unsigned char) '_'] = (base::mask) (base::print | base::space);
4484     }
4485   private:
4486     mask my_table[base::table_size];
4487   };
4488
4489   int main()
4490   {
4491     my_ctype ct;
4492     std::cout &lt;&lt; "isspace: " &lt;&lt; ct.is(std::ctype_base::space, '_') &lt;&lt; "    "
4493               &lt;&lt; "isalpha: " &lt;&lt; ct.is(std::ctype_base::alpha, '_') &lt;&lt; std::endl;
4494   }
4495 </pre>
4496
4497 <p>The goal is to create a facet where '_' is treated as whitespace.</p>
4498
4499 <p>On gcc 3.0, this program prints "isspace: 1 isalpha: 0".  On
4500 Microsoft C++ it prints "isspace: 1 isalpha: 1".</p>
4501
4502 <p>
4503 I believe that both implementations are legal, and the standard does not
4504 give enough guidance for users to be able to use std::ctype's
4505 protected interface portably.</p>
4506
4507 <p>
4508 The above program assumes that ctype_base::mask enumerators like
4509 <tt>space</tt> and <tt>print</tt> are disjoint, and that the way to
4510 say that a character is both a space and a printing character is to or
4511 those two enumerators together.  This is suggested by the "exposition
4512 only" values in 22.2.1 [category.ctype], but it is nowhere specified in
4513 normative text.  An alternative interpretation is that the more
4514 specific categories subsume the less specific.  The above program
4515 gives the results it does on the Microsoft compiler because, on that
4516 compiler, <tt>print</tt> has all the bits set for each specific
4517 printing character class.
4518 </p>
4519
4520 <p>From the point of view of std::ctype's public interface, there's no
4521 important difference between these two techniques.  From the point of
4522 view of the protected interface, there is.  If I'm defining a facet
4523 that inherits from std::ctype&lt;char&gt;, I'm the one who defines the
4524 value that table()['a'] returns.  I need to know what combination of
4525 mask values I should use.  This isn't so very esoteric: it's exactly
4526 why std::ctype has a protected interface.  If we care about users
4527 being able to write their own ctype facets, we have to give them a
4528 portable way to do it.
4529 </p>
4530
4531 <p>
4532 Related reflector messages:
4533 lib-9224, lib-9226, lib-9229, lib-9270, lib-9272, lib-9273, lib-9274,
4534 lib-9277, lib-9279.
4535 </p>
4536
4537 <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
4538 proposed resolution if issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#339">339</a> says that
4539 ctype_base::mask must be a bitmask type. It does not say that the
4540 ctype_base::mask elements are bitmask elements, so it doesn't
4541 directly affect this issue.</p>
4542
4543 <p>More comments from Benjamin Kosnik, who believes that 
4544 that C99 compatibility essentially requires what we're
4545 calling option 1 below.</p>
4546
4547 <blockquote>
4548 <pre>I think the C99 standard is clear, that isspace -&gt; !isalpha.
4549 --------
4550
4551 #include &lt;locale&gt;
4552 #include &lt;iostream&gt;
4553
4554 class my_ctype : public std::ctype&lt;char&gt;
4555 {
4556 private:
4557   typedef std::ctype&lt;char&gt; base;
4558   mask my_table[base::table_size];
4559
4560 public:
4561   my_ctype(std::size_t refs = 0) : base(my_table, false, refs)
4562   {
4563     std::copy(base::classic_table(), base::classic_table() + base::table_size,
4564               my_table);
4565     mask both = base::print | base::space;
4566     my_table[static_cast&lt;mask&gt;('_')] = both;
4567   }
4568 };
4569
4570 int main()
4571 {
4572   using namespace std;
4573   my_ctype ct;
4574   cout &lt;&lt; "isspace: " &lt;&lt; ct.is(ctype_base::space, '_') &lt;&lt; endl;
4575   cout &lt;&lt; "isprint: " &lt;&lt; ct.is(ctype_base::print, '_') &lt;&lt; endl;
4576
4577   // ISO C99, isalpha iff upper | lower set, and !space.
4578   // 7.5, p 193
4579   // -&gt; looks like g++ behavior is correct.
4580   // 356 -&gt; bitmask elements are required for ctype_base
4581   // 339 -&gt; bitmask type required for mask
4582   cout &lt;&lt; "isalpha: " &lt;&lt; ct.is(ctype_base::alpha, '_') &lt;&lt; endl;
4583 }
4584 </pre>
4585 </blockquote>
4586
4587
4588
4589 <p><b>Proposed resolution:</b></p>
4590 <p>Informally, we have three choices:</p> 
4591 <ol>
4592 <li>Require that the enumerators are disjoint (except for alnum and
4593 graph)</li>
4594 <li>Require that the enumerators are not disjoint, and specify which
4595 of them subsume which others.  (e.g. mandate that lower includes alpha
4596 and print)</li>
4597 <li>Explicitly leave this unspecified, which the result that the above
4598 program is not portable.</li>
4599 </ol>
4600
4601 <p>Either of the first two options is just as good from the standpoint
4602 of portability.  Either one will require some implementations to
4603 change.</p>
4604
4605
4606 <p><b>Rationale:</b></p>
4607 <p>The LWG agrees that this is a real ambiguity, and that both
4608 interpretations are conforming under the existing standard. However,
4609 there's no evidence that it's causing problems for real users. Users
4610 who want to define ctype facets portably can test the ctype_base masks
4611 to see which interpretation is being used.</p>
4612
4613
4614
4615
4616
4617 <hr>
4618 <h3><a name="357"></a>357. &lt;cmath&gt; float functions cannot return HUGE_VAL</h3>
4619 <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>
4620  <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-02-26</p>
4621 <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>
4622 <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>
4623 <p><b>Discussion:</b></p>
4624 <p>
4625 The float versions of the math functions have no meaningful value to return 
4626 for a range error. The long double versions have a value they can return, 
4627 but it isn't necessarily the most reasonable value.
4628 </p>
4629
4630 <p>
4631 Section 26.5 [lib.c.math], paragraph 5, says that C++ "adds float and long 
4632 double overloaded versions of these functions, with the same semantics," 
4633 referring to the math functions from the C90 standard.
4634 </p>
4635
4636 <p>
4637 The C90 standard, in section 7.5.1, paragraph 3, says that functions return 
4638 "the value of the macro HUGE_VAL" when they encounter a range error. 
4639 Section 7.5, paragraph 2, defines HUGE_VAL as a macro that "expands to a 
4640 positive double expression, not necessarily representable as a float."
4641 </p>
4642
4643 <p>
4644 Therefore, the float versions of the math functions have no way to
4645 signal a range error. <i>[Curaçao: The LWG notes that this isn't
4646 strictly correct, since errno is set.]</i> The semantics require that they
4647 return HUGE_VAL, but they cannot because HUGE_VAL might not be
4648 representable as a float.
4649 </p>
4650
4651 <p>
4652 The problem with long double functions is less severe because HUGE_VAL is 
4653 representable as a long double. On the other hand, it might not be a "huge" 
4654 long double value, and might fall well within the range of normal return 
4655 values for a long double function. Therefore, it does not make sense for a 
4656 long double function to return a double (HUGE_VAL) for a range error.
4657 </p>
4658
4659
4660 <p><b>Proposed resolution:</b></p>
4661 <p>Curaçao: C99 was faced with a similar problem, which they fixed by
4662 adding HUGE_VALF and HUGE_VALL in addition to HUGE_VAL.</p>
4663
4664 <p>C++ must also fix, but it should be done in the context of the
4665 general C99 based changes to C++, not via DR. Thus the LWG in Curaçao
4666 felt the resolution should be NAD, FUTURE, but the issue is being held
4667 open for one more meeting to ensure LWG members not present during the
4668 discussion concur.</p>
4669
4670
4671 <p><b>Rationale:</b></p>
4672 <p>Will be fixed as part of more general work in the TR.</p>
4673
4674
4675
4676
4677
4678 <hr>
4679 <h3><a name="361"></a>361. num_get&lt;&gt;::do_get (..., void*&amp;) checks grouping</h3>
4680 <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>
4681  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p>
4682 <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>
4683 <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>
4684 <p><b>Discussion:</b></p>
4685 <p>
4686 22.2.2.2.2, p12 specifies that <tt>thousands_sep</tt> is to be inserted only
4687 for integral types (issue 282 suggests that this should be done for
4688 all arithmetic types).
4689 </p>
4690
4691 <p>
4692 22.2.2.1.2, p12 requires that grouping be checked for all extractors
4693 including that for <tt>void*</tt>.
4694 </p>
4695
4696 <p>
4697 I don't think that's right. <tt>void*</tt> values should not be checked for
4698 grouping, should they? (Although if they should, then <tt>num_put</tt> needs
4699 to write them out, otherwise their extraction will fail.)
4700 </p>
4701
4702
4703 <p><b>Proposed resolution:</b></p>
4704 <p>
4705 Change the first sentence of 22.2.2.2.2, p12 from
4706 </p>
4707 <blockquote><p>
4708     Digit grouping is checked. That is, the positions of discarded
4709     separators is examined for consistency with
4710     use_facet&lt;numpunct&lt;charT&gt; &gt;(loc).grouping().
4711     If they are not consistent then ios_base::failbit is assigned
4712     to err.
4713 </p></blockquote>
4714
4715 <p>to</p>
4716 <blockquote><p>
4717     Except for conversions to void*, digit grouping is checked...
4718 </p></blockquote>
4719
4720
4721
4722 <p><b>Rationale:</b></p>
4723 <p>This would be a change: as it stands, the standard clearly
4724   specifies that grouping applies to void*.  A survey of existing
4725   practice shows that most existing implementations do that, as they
4726   should.</p>
4727
4728
4729
4730
4731
4732 <hr>
4733 <h3><a name="366"></a>366. Excessive const-qualification</h3>
4734 <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>
4735  <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p>
4736 <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>
4737 <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>
4738 <p><b>Discussion:</b></p>
4739 <p>
4740 The following member functions are declared const, yet return non-const
4741 pointers. We believe they are should be changed, because they allow code
4742 that may surprise the user. See document N1360 for details and
4743 rationale.
4744 </p>
4745
4746 <p><i>[Santa Cruz: the real issue is that we've got const member
4747 functions that return pointers to non-const, and N1360 proposes
4748 replacing them by overloaded pairs.  There isn't a consensus about
4749 whether this is a real issue, since we've never said what our
4750 constness policy is for iostreams.  N1360 relies on a distinction
4751 between physical constness and logical constness; that distinction, or
4752 those terms, does not appear in the standard.]</i></p>
4753
4754
4755
4756
4757 <p><b>Proposed resolution:</b></p>
4758 <p>In 27.4.4 and 27.4.4.2</p>
4759 <p>Replace</p>
4760 <pre>  basic_ostream&lt;charT,traits&gt;* tie() const;
4761 </pre>
4762 <p>with</p>
4763 <pre>  basic_ostream&lt;charT,traits&gt;* tie();
4764   const basic_ostream&lt;charT,traits&gt;* tie() const;
4765 </pre>
4766
4767 <p>and replace</p>
4768 <pre>  basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
4769 </pre>
4770 <p>with</p>
4771 <pre>  basic_streambuf&lt;charT,traits&gt;* rdbuf();
4772   const basic_streambuf&lt;charT,traits&gt;* rdbuf() const;
4773 </pre>
4774
4775 <p>In 27.5.2 and 27.5.2.3.1</p>
4776 <p>Replace</p>
4777 <pre>  char_type* eback() const;
4778 </pre>
4779 <p>with</p>
4780 <pre>  char_type* eback();
4781   const char_type* eback() const;
4782 </pre>
4783
4784 <p>Replace</p>
4785 <pre>  char_type gptr() const;
4786 </pre>
4787 <p>with</p>
4788 <pre>  char_type* gptr();
4789   const char_type* gptr() const;
4790 </pre>
4791
4792 <p>Replace</p>
4793 <pre>  char_type* egptr() const;
4794 </pre>
4795 <p>with</p>
4796 <pre>  char_type* egptr();
4797   const char_type* egptr() const;
4798 </pre>
4799
4800 <p>In 27.5.2 and 27.5.2.3.2</p>
4801 <p>Replace</p>
4802 <pre>  char_type* pbase() const;
4803 </pre>
4804 <p>with</p>
4805 <pre>  char_type* pbase();
4806   const char_type* pbase() const;
4807 </pre>
4808
4809 <p>Replace</p>
4810 <pre>  char_type* pptr() const;
4811 </pre>
4812 <p>with</p>
4813 <pre>  char_type* pptr();
4814   const char_type* pptr() const;
4815 </pre>
4816
4817 <p>Replace</p>
4818 <pre>  char_type* epptr() const;
4819 </pre>
4820 <p>with</p>
4821 <pre>  char_type* epptr();
4822   const char_type* epptr() const;
4823 </pre>
4824
4825 <p>In 27.7.2, 27.7.2.2, 27.7.3 27.7.3.2, 27.7.4, and 27.7.6</p>
4826 <p>Replace</p>
4827 <pre>  basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
4828 </pre>
4829 <p>with</p>
4830 <pre>  basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf();
4831   const basic_stringbuf&lt;charT,traits,Allocator&gt;* rdbuf() const;
4832 </pre>
4833
4834 <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>
4835 <p>Replace</p>
4836 <pre>  basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
4837 </pre>
4838 <p>with</p>
4839 <pre>  basic_filebuf&lt;charT,traits&gt;* rdbuf();
4840   const basic_filebuf&lt;charT,traits&gt;* rdbuf() const;
4841 </pre>
4842
4843
4844 <p><b>Rationale:</b></p>
4845 <p>The existing specification is a bit sloppy, but there's no
4846   particular reason to change this other than tidiness, and there are
4847   a number of ways in which streams might have been designed
4848   differently if we were starting today.  There's no evidence that the
4849   existing constness policy is harming users.  We might consider
4850   a different constness policy as part of a full stream redesign.</p>
4851
4852
4853
4854
4855
4856 <hr>
4857 <h3><a name="367"></a>367. remove_copy/remove_copy_if and Input Iterators</h3>
4858 <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>
4859  <b>Submitter:</b> Anthony Williams <b>Date:</b> 2002-05-13</p>
4860 <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>
4861 <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>
4862 <p><b>Discussion:</b></p>
4863 <p>
4864 remove_copy and remove_copy_if (25.2.8 [alg.remove]) permit their
4865 input range to be marked with Input Iterators. However, since two
4866 operations are required against the elements to copy (comparison and
4867 assigment), when the input range uses Input Iterators, a temporary
4868 copy must be taken to avoid dereferencing the iterator twice. This
4869 therefore requires the value type of the InputIterator to be
4870 CopyConstructible. If the iterators are at least Forward Iterators,
4871 then the iterator can be dereferenced twice, or a reference to the
4872 result maintained, so the temporary is not required.
4873 </p>
4874
4875
4876 <p><b>Proposed resolution:</b></p>
4877 <p>
4878 Add "If InputIterator does not meet the requirements of forward
4879 iterator, then the value type of InputIterator must be copy
4880 constructible. Otherwise copy constructible is not required." to
4881 25.2.8 [alg.remove] paragraph 6.
4882 </p>
4883
4884
4885 <p><b>Rationale:</b></p>
4886 <p>The assumption is that an input iterator can't be dereferenced
4887   twice.  There's no basis for that assumption in the Standard.</p>
4888
4889
4890
4891
4892
4893 <hr>
4894 <h3><a name="368"></a>368. basic_string::replace has two "Throws" paragraphs</h3>
4895 <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>
4896  <b>Submitter:</b> Beman Dawes <b>Date:</b> 2002-06-03</p>
4897 <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>
4898 <p><b>Discussion:</b></p>
4899 <p>
4900 21.3.6.6 [string::replace] basic_string::replace, second
4901 signature, given in paragraph 1, has two "Throws" paragraphs (3 and
4902 5).
4903 </p>
4904
4905 <p>
4906 In addition, the second "Throws" paragraph (5) includes specification
4907 (beginning with "Otherwise, the function replaces ...") that should be
4908 part of the "Effects" paragraph.
4909 </p>
4910
4911
4912 <p><b>Proposed resolution:</b></p>
4913
4914
4915 <p><b>Rationale:</b></p>
4916 <p>This is editorial. Both "throws" statements are true. The bug is
4917   just that the second one should be a sentence, part of the "Effects"
4918   clause, not a separate "Throws".  The project editor has been
4919   notified.</p>
4920
4921
4922
4923
4924
4925 <hr>
4926 <h3><a name="372"></a>372. Inconsistent description of stdlib exceptions</h3>
4927 <p><b>Section:</b> 17.4.4.9 [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>
4928  <b>Submitter:</b> Randy Maddox <b>Date:</b> 2002-07-22</p>
4929 <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>
4930 <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>
4931 <p><b>Discussion:</b></p>
4932
4933 <p>Paragraph 3 under clause 17.4.4.9 [res.on.exception.handling], Restrictions on
4934 Exception Handling, states that "Any other functions defined in the
4935 C++ Standard Library that do not have an exception-specification may
4936 throw implementation-defined exceptions unless otherwise specified."
4937 This statement is followed by a reference to footnote 178 at the
4938 bottom of that page which states, apparently in reference to the C++
4939 Standard Library, that "Library implementations are encouraged (but
4940 not required) to report errors by throwing exceptions from (or derived
4941 from) the standard exceptions."</p>
4942
4943 <p>These statements appear to be in direct contradiction to clause
4944 18.6.1 [type.info], which states "The class exception defines the
4945 base class for the types of objects thrown as exceptions by the C++
4946 Standard library components ...".</p>
4947
4948 <p>Is this inconsistent?</p>
4949
4950
4951
4952 <p><b>Proposed resolution:</b></p>
4953
4954
4955 <p><b>Rationale:</b></p>
4956 <p>Clause 17 is setting the overall library requirements, and it's
4957   clear and consistent.  This sentence from Clause 18 is descriptive,
4958   not setting a requirement on any other class.
4959 </p>
4960
4961
4962
4963
4964
4965 <hr>
4966 <h3><a name="374"></a>374. moneypunct::frac_digits returns int not unsigned</h3>
4967 <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>
4968  <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-08</p>
4969 <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>
4970 <p><b>Discussion:</b></p>
4971 <p>
4972 In section 22.2.6.3.1 [locale.moneypunct.members], frac_digits() returns type
4973 "int". This implies that frac_digits() might return a negative value,
4974 but a negative value is nonsensical. It should return "unsigned".
4975 </p>
4976
4977 <p>
4978 Similarly, in section 22.2.6.3.2 [locale.moneypunct.virtuals], do_frac_digits()
4979 should return "unsigned".
4980 </p>
4981
4982
4983
4984 <p><b>Proposed resolution:</b></p>
4985
4986
4987 <p><b>Rationale:</b></p>
4988 <p>Regardless of whether the return value is int or unsigned, it's
4989 always conceivable that frac_digits might return a nonsensical
4990 value. (Is 4294967295 really any better than -1?)  The clients of
4991 moneypunct, the get and put facets, can and do perform range
4992 checks.</p>
4993
4994
4995
4996
4997
4998 <hr>
4999 <h3><a name="377"></a>377. basic_string::insert and length_error</h3>
5000 <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>
5001  <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-16</p>
5002 <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>
5003 <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>
5004 <p><b>Discussion:</b></p>
5005 <p>
5006 Section 21.3.6.4 [string::insert], paragraph 4, contains the following,
5007 "Then throws length_error if size() &gt;= npos - rlen."
5008 </p>
5009
5010 <p>
5011 Related to DR 83, this sentence should probably be removed.
5012 </p>
5013
5014
5015 <p><b>Proposed resolution:</b></p>
5016
5017
5018 <p><b>Rationale:</b></p><p>This requirement is redundant but correct.  No change is
5019 needed.</p>
5020
5021
5022
5023
5024 <hr>
5025 <h3><a name="378"></a>378. locale immutability and locale::operator=()</h3>
5026 <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>
5027  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p>
5028 <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>
5029 <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>
5030 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a></p>
5031 <p><b>Discussion:</b></p>
5032 <p>
5033 I think there is a problem with 22.1.1, p6 which says that
5034 </p>
5035 <pre>    -6- An instance of locale is immutable; once a facet reference
5036         is obtained from it, that reference remains usable as long
5037         as the locale value itself exists.
5038 </pre>
5039 <p>
5040 and 22.1.1.2, p4:
5041 </p>
5042 <pre>    const locale&amp; operator=(const locale&amp; other) throw();
5043
5044     -4- Effects: Creates a copy of other, replacing the current value.
5045 </pre>
5046 <p>
5047 How can a reference to a facet obtained from a locale object remain
5048 valid after an assignment that clearly must replace all the facets
5049 in the locale object? Imagine a program such as this
5050 </p>
5051 <pre>    std::locale loc ("de_DE");
5052     const std::ctype&lt;char&gt; &amp;r0 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
5053     loc = std::locale ("en_US");
5054     const std::ctype&lt;char&gt; &amp;r1 = std::use_facet&lt;std::ctype&lt;char&gt; &gt;(loc);
5055 </pre>
5056 <p>
5057 Is r0 really supposed to be preserved and destroyed only when loc goes
5058 out of scope?
5059 </p>
5060
5061
5062 <p><b>Proposed resolution:</b></p>
5063 <p><i>[Summer '04 mid-meeting mailing: Martin and Dietmar believe this
5064   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
5065   closed.
5066 ]</i></p>
5067
5068
5069
5070
5071
5072
5073 <hr>
5074 <h3><a name="385"></a>385. Does call by value imply the CopyConstructible requirement?</h3>
5075 <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>
5076  <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-10-23</p>
5077 <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>
5078 <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>
5079 <p><b>Discussion:</b></p>
5080 <p>
5081 Many function templates have parameters that are passed by value;
5082 a typical example is <tt>find_if</tt>'s <i>pred</i> parameter in
5083 25.1.5 [alg.find].  Are the corresponding template parameters
5084 (<tt>Predicate</tt> in this case) implicitly required to be
5085 CopyConstructible, or does that need to be spelled out explicitly?
5086 </p>
5087
5088 <p>
5089 This isn't quite as silly a question as it might seem to be at first
5090 sight.  If you call <tt>find_if</tt> in such a way that template
5091 argument deduction applies, then of course you'll get call by value
5092 and you need to provide a copy constructor.  If you explicitly provide
5093 the template arguments, however, you can force call by reference by
5094 writing something like <tt>find_if&lt;my_iterator,
5095 my_predicate&amp;&gt;</tt>.  The question is whether implementation
5096 are required to accept this, or whether this is ill-formed because
5097 my_predicate&amp; is not CopyConstructible.
5098 </p>
5099
5100 <p>
5101 The scope of this problem, if it is a problem, is unknown.  Function
5102 object arguments to generic algorithms in clauses 25 [algorithms]
5103 and 26 [numerics] are obvious examples.  A review of the whole
5104 library is necessary.
5105 </p>
5106 <p><i>[
5107 This is really two issues.  First, predicates are typically passed by
5108 value but we don't say they must be Copy Constructible.  They should
5109 be. Second: is specialization allowed to transform value arguments
5110 into references? References aren't copy constructible, so this should
5111 not be allowed.
5112 ]</i></p>
5113
5114 <p><i>[
5115 2007-01-12, Howard: First, despite the note above, references <b>are</b>
5116 copy constructible. They just aren't assignable.  Second, this is very
5117 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.
5118 That issue already says that implementations are allowed to copy
5119 function objects.  If one passes in a reference, it is copyable, but
5120 susceptible to slicing if one passes in a reference to a base.  Third,
5121 with rvalue reference in the language one only needs to satisfy
5122 MoveConstructible to pass an rvalue "by value".  Though the function
5123 might still copy the function object internally (requiring
5124 CopyConstructible). Finally (and fwiw), if we wanted to, it is easy to
5125 code all of the std::algorithms such that they do not copy function
5126 objects internally.  One merely passes them by reference internally if
5127 desired (this has been fully implemented and shipped for several years).
5128  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
5129 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.
5130 ]</i></p>
5131
5132
5133
5134 <p><b>Proposed resolution:</b></p>
5135 <p>
5136 Recommend NAD.
5137 </p>
5138
5139
5140 <p><b>Rationale:</b></p>
5141 <p>
5142 Generic algorithms will be marked with concepts and these will imply a requirement
5143 of MoveConstructible (not CopyConstructible).  The signature of the function will
5144 then precisely describe and enforce the precise requirements.
5145 </p>
5146
5147
5148
5149
5150
5151 <hr>
5152 <h3><a name="388"></a>388. Use of complex as a key in associative containers</h3>
5153 <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>
5154  <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p>
5155 <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>
5156 <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>
5157 <p><b>Discussion:</b></p>
5158 <p>
5159 Practice with std::complex&lt;&gt; and the associative containers
5160 occasionally reveals artificial and distracting issues with constructs
5161 resembling: std::set&lt;std::complex&lt;double&gt; &gt; s;
5162 </p>
5163
5164 <p>
5165 The main reason for the above to fail is the absence of an approriate
5166 definition for std::less&lt;std::complex&lt;T&gt; &gt;. That in turn comes from
5167 the definition of the primary template std::less&lt;&gt; in terms of
5168 operator&lt;.
5169 </p>
5170
5171 <p>
5172 The usual argument goes as follows: Since there is no ordering over
5173 the complex field compatible with field operations it makes little
5174 sense to define a function operator&lt; operating on the datatype
5175 std::complex&lt;T&gt;.  That is fine. However, that reasoning does not carry
5176 over to std::less&lt;T&gt; which is used, among other things, by associative
5177 containers as an ordering useful to meet complexity requirements.
5178 </p>
5179
5180 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>.</p>
5181
5182 <p><i>[
5183 Pre Bellevue: Reopened at the request of Alisdair.
5184 ]</i></p>
5185
5186
5187 <p><i>[
5188 Bellevue:
5189 ]</i></p>
5190
5191
5192 <blockquote>
5193 This is a request for a design change, and not a defect in the standard.
5194 It is in scope to consider, but the group feels that it is not a change
5195 that we need to do. Is there a total ordering for floating point values,
5196 including NaN? There is not a clear enough solution or big enough
5197 problem for us to solve. Solving this problem would require solving the
5198 problem for floating point, which is equally unclear. The LWG noted that
5199 users who want to put objects into an associative container for which
5200 operator&lt; isn't defined can simply provide their own comparison function
5201 object. NAD
5202 </blockquote>
5203
5204
5205 <p><b>Proposed resolution:</b></p>
5206 <p>Informally: Add a specialization of std::less for std::complex.</p>
5207
5208
5209 <p><b>Rationale:</b></p>
5210 <p>Discussed in Santa Cruz.  An overwhelming majority of the LWG
5211 believes this should not be treated a DR: it's a request for a design
5212 change, not a defect in the existing standard.  Most people (10-3)
5213 believed that we probably don't want this change, period: as with
5214 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.
5215 The LWG noted that users who want to put objects into an associative
5216 container for which <tt>operator&lt;</tt> isn't defined can simply
5217 provide their own comparison function object.</p>
5218
5219
5220
5221
5222
5223 <hr>
5224 <h3><a name="390"></a>390. CopyConstructible requirements too strict</h3>
5225 <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>
5226  <b>Submitter:</b> Doug Gregor <b>Date:</b> 2002-10-24</p>
5227 <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>
5228 <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>
5229 <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>
5230 <p><b>Discussion:</b></p>
5231 <p>
5232 The CopyConstructible requirements in Table 30 state that for an
5233 object t of type T (where T is CopyConstructible), the expression &amp;t
5234 returns the address of t (with type T*). This requirement is overly
5235 strict, in that it disallows types that overload operator&amp; to not
5236 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
5237 operator&amp; is overloaded for a Boost.Lambda function object to return
5238 another function object.
5239 </p>
5240
5241 <p>Example:</p>
5242
5243 <pre>  std::vector&lt;int&gt; u, v;
5244   int x;
5245   // ...
5246   std::transform(u.begin(), u.end(), std::back_inserter(v), _1 * x);
5247 </pre>
5248
5249 <p>
5250 _1 * x returns an unnamed function object with operator&amp; overloaded to
5251 not return T* , therefore rendering the std::transform call ill-formed.
5252 However, most standard library implementations will compile this code
5253 properly, and the viability of such binder libraries is severely hindered
5254 by the unnecessary restriction in the CopyConstructible requirements.
5255 </p>
5256
5257 <p>
5258 For reference, the address of an object can be retrieved without using
5259 the address-of operator with the following function template:
5260 </p>
5261
5262 <pre>  template &lt;typename T&gt; T* addressof(T&amp; v)
5263   {
5264     return reinterpret_cast&lt;T*&gt;(
5265          &amp;const_cast&lt;char&amp;&gt;(reinterpret_cast&lt;const volatile char &amp;&gt;(v)));
5266   }
5267 </pre>
5268
5269 <p>
5270 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
5271 will need to be reexamined if the CopyConstructible requirements
5272 change.
5273 </p>
5274
5275
5276 <p><b>Proposed resolution:</b></p>
5277 <p>
5278 Remove the last two rows of Table 30, eliminating the requirements
5279 that &amp;t and &amp;u return the address of t and u, respectively.
5280 </p>
5281
5282
5283 <p><b>Rationale:</b></p>
5284 <p>This was a deliberate design decision.  Perhaps it should be
5285    reconsidered for C++0x. </p>
5286
5287
5288
5289
5290
5291 <hr>
5292 <h3><a name="392"></a>392. 'equivalence' for input iterators</h3>
5293 <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>
5294  <b>Submitter:</b> Corwin Joy <b>Date:</b> 2002-12-11</p>
5295 <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>
5296 <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>
5297 <p><b>Discussion:</b></p>
5298
5299 <p>
5300 In section 24.1.1 [input.iterators] table 72 -
5301 'Input Iterator Requirements' we have as a postcondition of *a:
5302 "If a==b and (a, b) is in the domain of == then *a is equivalent to *b".
5303 </p>
5304
5305 <p>
5306 In section 24.5.3.5 [istreambuf.iterator::equal] it states that
5307 "istreambuf_iterator::equal returns true if and only if both iterators
5308 are at end-of-stream, or neither is at end-of-stream, <i>regardless of
5309 what streambuf object they use</i>."  (My emphasis).
5310 </p>
5311
5312 <p>
5313 The defect is that either 'equivalent' needs to be more precisely
5314 defined or the conditions for equality in 24.5.3.5 [istreambuf.iterator::equal]
5315 are incorrect. (Or both).
5316 </p>
5317
5318 <p>Consider the following example:</p>
5319 <pre>   #include &lt;iostream&gt;
5320    #include &lt;fstream&gt;
5321    #include &lt;iterator&gt;
5322    using namespace std;
5323
5324    int main() {
5325     ifstream file1("file1.txt"), file2("file2.txt");
5326     istreambuf_iterator&lt;char&gt; f1(file1), f2(file2);
5327     cout &lt;&lt; "f1 == f2 : " &lt;&lt; boolalpha &lt;&lt; (f1 == f2) &lt;&lt; endl;
5328     cout &lt;&lt; "f1 = " &lt;&lt; *f1 &lt;&lt; endl;
5329     cout &lt;&lt; "f2 = " &lt;&lt; *f2 &lt;&lt; endl;
5330     return 0;
5331    }
5332 </pre>
5333
5334 <p>Now assuming that neither f1 or f2 are at the end-of-stream then
5335 f1 == f2 by 24.5.3.5 [istreambuf.iterator::equal].</p>
5336
5337 <p>However, it is unlikely that *f1 will give the same value as *f2 except
5338 by accident.</p>
5339
5340 <p>So what does *f1 'equivalent' to *f2 mean?  I think the standard should
5341 be clearer on this point, or at least be explicit that this does not
5342 mean that *f1 and *f2 are required to have the same value in the case
5343 of input iterators.</p>
5344
5345
5346 <p><b>Proposed resolution:</b></p>
5347
5348
5349 <p><b>Rationale:</b></p><p>The two iterators aer not in the domain of ==</p>
5350
5351
5352
5353
5354
5355
5356 <hr>
5357 <h3><a name="393"></a>393. do_in/do_out operation on state unclear</h3>
5358 <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">NAD Editorial</a>
5359  <b>Submitter:</b> Alberto Barbati <b>Date:</b> 2002-12-24</p>
5360 <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>
5361 <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>
5362 <p><b>Discussion:</b></p>
5363 <p>
5364 this DR follows the discussion on the previous thread "codecvt::do_in
5365 not consuming external characters". It's just a clarification issue
5366 and not a request for a change.
5367 </p>
5368 <p>
5369 Can do_in()/do_out() produce output characters without consuming input 
5370 characters as a result of operation on state?
5371 </p>
5372
5373
5374 <p><b>Proposed resolution:</b></p>
5375 <p>
5376 Add a note at the end of 22.2.1.4.2 [locale.codecvt.virtuals], 
5377 paragraph 3:
5378 </p>
5379
5380 <p>
5381 [Note: As a result of operations on state, it can return ok or partial 
5382 and set from_next == from and to_next != to. --end note]
5383 </p>
5384
5385
5386 <p><b>Rationale:</b></p>
5387 <p>
5388 The submitter believes that standard already provides an affirmative
5389 answer to the question. However, the current wording has induced a few
5390 library implementors to make the incorrect assumption that
5391 do_in()/do_out() always consume at least one internal character when
5392 they succeed.
5393 </p>
5394
5395 <p>
5396 The submitter also believes that the proposed resolution is not in
5397 conflict with the related issue 76. Moreover, by explicitly allowing
5398 operations on state to produce characters, a codecvt implementation
5399 may effectively implement N-to-M translations without violating the
5400 "one character at a time" principle described in such issue. On a side
5401 note, the footnote in the proposed resolution of issue 76 that
5402 informally rules out N-to-M translations for basic_filebuf should be
5403 removed if this issue is accepted as valid.
5404 </p>
5405
5406
5407 <p><i>[
5408 Kona (2007): The proposed resolution is to add a note. Since this is
5409 non-normative, the issue is editorial, but we believe that the note is
5410 correct. Proposed Disposition: NAD, Editorial
5411 ]</i></p>
5412
5413
5414
5415
5416
5417
5418 <hr>
5419 <h3><a name="399"></a>399. volations of unformatted input function requirements</h3>
5420 <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>
5421  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p>
5422 <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>
5423 <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>
5424 <p><b>Discussion:</b></p>
5425     <p>
5426 The Effects clauses for the two functions below violate the
5427 general requirements on unformatted input functions outlined
5428 in 27.6.1.3: they do not begin by constructing a sentry object.
5429 Instead, they begin by calling widen ('\n'), which may throw
5430 an exception. The exception is then allowed to propagate from
5431 the unformatted input function irrespective of the setting of
5432 exceptions().
5433     </p>
5434     <p>
5435 Note that in light of 27.6.1.1, p3 and p4, the fact that the
5436 functions allow exceptions thrown from widen() to propagate
5437 may not strictly speaking be a defect (but the fact that the
5438 functions do not start by constructing a sentry object still
5439 is). However, since an exception thrown from ctype&lt;charT&gt;
5440 ::widen() during any other input operation (say, from within
5441 a call to num_get&lt;charT&gt;::get()) will be caught and cause
5442 badbit to be set, these two functions should not be treated
5443 differently for the sake of consistency.
5444     </p>
5445   
5446
5447 <p><b>Proposed resolution:</b></p>
5448
5449
5450 <p><b>Rationale:</b></p>
5451 <p>
5452 Not a defect.  The standard is consistent, and the behavior required
5453 by the standard is unambiguous.  Yes, it's theoretically possible for
5454 widen to throw.  (Not that this will happen for the default ctype
5455 facet or for most real-world replacement ctype facets.)  Users who
5456 define ctype facets that can throw, and who care about this behavior,
5457 can use alternative signatures that don't call widen.
5458 </p>
5459
5460
5461
5462
5463
5464
5465 <hr>
5466 <h3><a name="424"></a>424. normative notes</h3>
5467 <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>
5468  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
5469 <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>
5470 <p><b>Discussion:</b></p>
5471
5472 <p>
5473 The text in 17.3.1.1, p1 says:
5474 <br>
5475
5476 "Paragraphs labelled "Note(s):" or "Example(s):" are informative, other
5477 paragraphs are normative."
5478 <br>
5479
5480 The library section makes heavy use of paragraphs labeled "Notes(s),"
5481 some of which are clearly intended to be normative (see list 1), while
5482 some others are not (see list 2). There are also those where the intent
5483 is not so clear (see list 3).
5484 <br><br>
5485
5486 List 1 -- Examples of (presumably) normative Notes:
5487 <br>
5488
5489 20.7.5.1 [allocator.members], p3,<br>
5490 20.7.5.1 [allocator.members], p10,<br>
5491 21.3.2 [string.cons], p11,<br>
5492 22.1.1.2 [locale.cons], p11,<br>
5493 23.2.2.3 [deque.modifiers], p2,<br>
5494 25.3.7 [alg.min.max], p3,<br>
5495 26.3.6 [complex.ops], p15,<br>
5496 27.5.2.4.3 [streambuf.virt.get], p7.<br>
5497 <br>
5498
5499 List 2 -- Examples of (presumably) informative Notes:
5500 <br>
5501
5502 18.5.1.3 [new.delete.placement], p3,<br>
5503 21.3.6.6 [string::replace], p14,<br>
5504 22.2.1.4.2 [locale.codecvt.virtuals], p3,<br>
5505 25.1.4 [alg.foreach], p4,<br>
5506 26.3.5 [complex.member.ops], p1,<br>
5507 27.4.2.5 [ios.base.storage], p6.<br>
5508 <br>
5509
5510 List 3 -- Examples of Notes that are not clearly either normative
5511 or informative:
5512 <br>
5513
5514 22.1.1.2 [locale.cons], p8,<br>
5515 22.1.1.5 [locale.statics], p6,<br>
5516 27.5.2.4.5 [streambuf.virt.put], p4.<br>
5517 <br>
5518
5519 None of these lists is meant to be exhaustive.
5520 </p>
5521
5522 <p><i>[Definitely a real problem.  The big problem is there's material
5523   that doesn't quite fit any of the named paragraph categories
5524   (e.g. <b>Effects</b>).  Either we need a new kind of named
5525   paragraph, or we need to put more material in unnamed paragraphs
5526   jsut after the signature.  We need to talk to the Project Editor
5527   about how to do this.
5528 ]</i></p>
5529
5530
5531 <p><i>[
5532 Bellevue: Specifics of list 3: First 2 items correct in std (22.1.1.2,
5533 22.1.1.5) Third item should be non-normative (27.5.2.4.5), which Pete
5534 will handle editorially.
5535 ]</i></p>
5536
5537
5538
5539 <p><b>Proposed resolution:</b></p>
5540 <p><i>[Pete: I changed the paragraphs marked "Note" and "Notes" to use "Remark" and "Remarks".
5541 Fixed as editorial.  This change has been in the WD since the post-Redmond mailing, in 2004.
5542 Recommend NAD.]</i></p>
5543
5544 <p><i>[
5545 Batavia:  We feel that the references in List 2 above should be changed from <i>Remarks</i>
5546 to <i>Notes</i>.  We also feel that those items in List 3 need to be double checked for
5547 the same change.  Alan and Pete to review.
5548 ]</i></p>
5549
5550
5551
5552
5553
5554 <hr>
5555 <h3><a name="429"></a>429. typo in basic_ios::clear(iostate)</h3>
5556 <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>
5557  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p>
5558 <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>
5559 <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>
5560 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#412">412</a></p>
5561 <p><b>Discussion:</b></p>
5562         <p>
5563
5564 The Effects clause in 27.4.4.3, p5 describing the effects of a call to
5565 the ios_base member function clear(iostate state) says that the function
5566 only throws if the respective bits are already set prior to the function
5567 call. That's obviously not the intent. If it was, a call to clear(badbit)
5568 on an object for which (rdstate() == goodbit &amp;&amp; exceptions() == badbit)
5569 holds would not result in an exception being thrown.
5570
5571         </p>
5572     
5573     <p><b>Proposed resolution:</b></p>
5574         <p>
5575
5576 The text ought to be changed from
5577 <br>
5578
5579 "If (rdstate() &amp; exceptions()) == 0, returns. ..."
5580 <br>
5581
5582 to
5583 <br>
5584
5585 "If (state &amp; exceptions()) == 0, returns. ..."
5586         </p>
5587
5588
5589 <p><b>Rationale:</b></p>
5590
5591
5592
5593
5594
5595
5596 <hr>
5597 <h3><a name="433"></a>433. Contradiction in specification of unexpected()</h3>
5598 <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>
5599  <b>Submitter:</b> Vyatcheslav Sysoltsev <b>Date:</b> 2003-09-29</p>
5600 <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>
5601 <p><b>Discussion:</b></p>
5602 <p>
5603 Clause 15.5.2 [except.unexpected] paragraph 1 says that "void unexpected();
5604 is called (18.7.2) immediately after completing the stack unwinding
5605 for the former function", but 18.7.2.4 (Effects) says that "void
5606 unexpected(); . . . Calls the unexpected_handler function in effect
5607 immediately after evaluating the throwexpression (18.7.2.2),".  Isn't
5608 here a contradiction: 15.5.2 requires stack have been unwound when in
5609 void unexpected() and therefore in unexpected_handler but 18.7.2.4
5610 claims that unexpected_handler is called "in effect immediately" after
5611 evaluation of throw expression is finished, so there is no space left
5612 for stack to be unwound therefore?  I think the phrase "in effect
5613 immediately" should be removed from the standard because it brings
5614 ambiguity in understanding.
5615 </p>
5616
5617
5618 <p><b>Proposed resolution:</b></p>
5619
5620
5621 <p><b>Rationale:</b></p>
5622 <p>There is no contradiction.  The phrase "in effect immediately" is
5623   just to clarify which handler is to be called.</p>
5624
5625
5626
5627
5628
5629 <hr>
5630 <h3><a name="437"></a>437. Formatted output of function pointers is confusing</h3>
5631 <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>
5632  <b>Submitter:</b> Ivan Godard <b>Date:</b> 2003-10-24</p>
5633 <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>
5634 <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>
5635 <p><b>Discussion:</b></p>
5636 <p>
5637 Given:
5638 </p>
5639 <pre>void f(int) {}
5640 void(*g)(int) = f;
5641 cout &lt;&lt; g;
5642 </pre>
5643
5644 <p>
5645 (with the expected #include and usings), the value printed is a rather
5646 surprising "true". Rather useless too.
5647 </p>
5648
5649 <p>The standard defines:</p>
5650
5651 <pre>ostream&amp; operator&lt;&lt;(ostream&amp;, void*);</pre>
5652
5653 <p>which picks up all data pointers and prints their hex value, but does
5654 not pick up function pointers because there is no default conversion
5655 from function pointer to void*. Absent that, we fall back to legacy
5656 conversions from C and the function pointer is converted to bool.
5657 </p>
5658
5659 <p>There should be an analogous inserter that prints the address of a
5660   function pointer.</p>
5661
5662
5663 <p><b>Proposed resolution:</b></p>
5664
5665
5666 <p><b>Rationale:</b></p>
5667 <p>This is indeed a wart, but there is no good way to solve it.  C
5668   doesn't provide a portable way of outputting the address of a
5669   function point either.</p>
5670
5671
5672
5673
5674
5675 <hr>
5676 <h3><a name="439"></a>439. Should facets be copyable?</h3>
5677 <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>
5678  <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-02</p>
5679 <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>
5680 <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>
5681 <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>
5682 <p><b>Discussion:</b></p>
5683 <p>The following facets classes have no copy constructors described in
5684   the standard, which, according to the standard, means that they are
5685   supposed to use the compiler-generated defaults.  Default copy
5686   behavior is probably inappropriate.  We should either make these
5687   classes uncopyable or else specify exactly what their constructors do.</p>
5688
5689 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#421">421</a>.</p>
5690
5691 <pre>        ctype_base
5692         ctype
5693         ctype_byname
5694         ctype&lt;char&gt;
5695         ctype_byname&lt;char&gt;
5696         codecvt_base
5697         codecvt
5698         codecvt_byname
5699         num_get
5700         num_put
5701         numpunct
5702         numpunct_byname
5703         collate
5704         collate_byname
5705         time_base
5706         time_get
5707         time_get_byname
5708         time_put
5709         time_put_byname
5710         money_get
5711         money_put
5712         money_base
5713         moneypunct
5714         moneypunct_byname
5715         messages_base
5716         messages
5717         messages_byname
5718 </pre>
5719
5720
5721
5722 <p><b>Proposed resolution:</b></p>
5723
5724
5725 <p><b>Rationale:</b></p>
5726 <p>The copy constructor in the base class is private.</p>
5727
5728
5729
5730
5731
5732 <hr>
5733 <h3><a name="440"></a>440. Should std::complex use unqualified transcendentals?</h3>
5734 <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>
5735  <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-05</p>
5736 <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>
5737 <p><b>Discussion:</b></p>
5738 <p>
5739 Operations like <tt>pow</tt> and <tt>exp</tt> on
5740 <tt>complex&lt;T&gt;</tt> are typically implemented in terms of
5741 operations like <tt>sin</tt> and <tt>cos</tt> on <tt>T</tt>.  
5742 Should implementations write this as <tt>std::sin</tt>, or as plain
5743 unqualified <tt>sin</tt>?
5744 </p>
5745
5746 <p>The issue, of course, is whether we want to use
5747 argument-dependent lookup in the case where <tt>T</tt> is a
5748 user-defined type.  This is similar to the issue of valarray
5749 transcendentals, as discussed in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a>.</p>
5750
5751 <p>This issue differs from valarray transcendentals in two important
5752 ways.  First, "the effect of instantiating the template
5753 <tt>complex</tt> for types other than float, double or long double is
5754 unspecified." (26.3.1 [complex.synopsis]) Second, the standard does not
5755 dictate implementation, so there is no guarantee that a particular
5756 real math function is used in the implementation of a particular
5757 complex function.</p>
5758
5759
5760
5761 <p><b>Proposed resolution:</b></p>
5762
5763
5764 <p><b>Rationale:</b></p>
5765 <p>If you instantiate std::complex for user-defined types, all bets
5766 are off.</p>
5767
5768
5769
5770
5771
5772 <hr>
5773 <h3><a name="447"></a>447. Wrong template argument for time facets</h3>
5774 <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>
5775  <b>Submitter:</b> Pete Becker <b>Date:</b> 2003-12-26</p>
5776 <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>
5777 <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>
5778 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#327">327</a></p>
5779 <p><b>Discussion:</b></p>
5780 <p>
5781 22.1.1.1.1/4, table 52, "Required Instantiations", lists, among others:
5782 </p>
5783 <pre>    time_get&lt;char,InputIterator&gt;
5784     time_get_byname&lt;char,InputIterator&gt;
5785     time_get&lt;wchar_t,OutputIterator&gt;
5786     time_get_byname&lt;wchar_t,OutputIterator&gt;
5787 </pre>
5788
5789 <p>
5790 The second argument to the last two should be InputIterator, not
5791 OutputIterator.
5792 </p>
5793
5794
5795 <p><b>Proposed resolution:</b></p>
5796 <p>
5797 Change the second template argument to InputIterator.
5798 </p>
5799
5800
5801 <p><b>Rationale:</b></p>
5802
5803
5804
5805
5806
5807
5808 <hr>
5809 <h3><a name="450"></a>450. set::find is inconsistent with associative container requirements</h3>
5810 <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>
5811  <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
5812 <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>
5813 <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>
5814 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a></p>
5815 <p><b>Discussion:</b></p>
5816 <p>map/multimap have:</p>
5817
5818 <pre>   iterator find(const key_type&amp; x) const;
5819         const_iterator find(const key_type&amp; x) const;
5820 </pre>
5821
5822 <p>
5823 which is consistent with the table of associative container requirements.
5824 But set/multiset have:
5825 </p>
5826 <pre>   iterator find(const key_type&amp;) const;
5827 </pre>
5828
5829 <p>
5830 set/multiset should look like map/multimap, and honor the requirements
5831 table, in this regard.
5832 </p>
5833
5834
5835 <p><b>Proposed resolution:</b></p>
5836
5837
5838 <p><b>Rationale:</b></p>
5839
5840
5841
5842
5843
5844
5845 <hr>
5846 <h3><a name="451"></a>451. Associative erase should return an iterator</h3>
5847 <p><b>Section:</b> 23.1.4 [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>
5848  <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
5849 <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>
5850 <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>
5851 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a></p>
5852 <p><b>Discussion:</b></p>
5853 <p>map/multimap/set/multiset have:</p>
5854 <pre>   void erase(iterator);
5855         void erase(iterator, iterator);
5856 </pre>
5857
5858 <p>But there's no good reason why these can't return an iterator, as for
5859 vector/deque/list:</p>
5860 <pre>   iterator erase(iterator);
5861         iterator erase(iterator, iterator);
5862 </pre>
5863
5864
5865
5866 <p><b>Proposed resolution:</b></p>
5867 <p>
5868 Informally: The table of associative container requirements, and the
5869 relevant template classes, should return an iterator designating the
5870 first element beyond the erased subrange.
5871 </p>
5872
5873
5874 <p><b>Rationale:</b></p>
5875
5876
5877
5878
5879
5880
5881 <hr>
5882 <h3><a name="452"></a>452.  locale::combine should be permitted to generate a named locale</h3>
5883 <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>
5884  <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p>
5885 <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>
5886 <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>
5887 <p><b>Discussion:</b></p>
5888 <pre>template&lt;class Facet&gt;
5889         locale::combine(const locale&amp;) const;
5890 </pre>
5891 <p>
5892 is obliged to create a locale that has no name. This is overspecification
5893 and overkill. The resulting locale should follow the usual rules -- it
5894 has a name if the locale argument has a name and Facet is one of the
5895 standard facets.
5896 </p>
5897
5898 <p><i>[
5899  Sydney and post-Sydney (see c++std-lib-13439, c++std-lib-13440,
5900  c++std-lib-13443): agreed that it's overkill to say that the locale
5901  is obligated to be nameless.  However, we also can't require it to
5902  have a name.  At the moment, locale names are based on categories
5903  and not on individual facets.  If a locale contains two different
5904  facets of different names from the same category, then this would
5905  not fit into existing naming schemes.  We need to give
5906  implementations more freedom.  Bill will provide wording.
5907 ]</i></p>
5908
5909
5910
5911
5912 <p><b>Rationale:</b></p>
5913 <p>After further discussion the LWG decided to close this as NAD.
5914   The fundamental problem is that names right now are per-category,
5915   not per-facet.  The <tt>combine</tt> member function works at the
5916   wrong level of granularity.</p>
5917
5918
5919
5920
5921
5922 <hr>
5923 <h3><a name="462"></a>462. Destroying objects with static storage duration</h3>
5924 <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>
5925  <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-03-23</p>
5926 <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>
5927 <p><b>Discussion:</b></p>
5928 <p>
5929 3.6.3 Termination spells out in detail the interleaving of static
5930 destructor calls and calls to functions registered with atexit. To
5931 match this behavior requires intimate cooperation between the code
5932 that calls destructors and the exit/atexit machinery. The former
5933 is tied tightly to the compiler; the latter is a primitive mechanism
5934 inherited from C that traditionally has nothing to do with static
5935 construction and destruction. The benefits of intermixing destructor
5936 calls with atexit handler calls is questionable at best, and <i>very</i>
5937 difficult to get right, particularly when mixing third-party C++
5938 libraries with different third-party C++ compilers and C libraries
5939 supplied by still other parties.
5940 </p>
5941
5942 <p>
5943 I believe the right thing to do is defer all static destruction
5944 until after all atexit handlers are called. This is a change in
5945 behavior, but one that is likely visible only to perverse test
5946 suites. At the very least, we should <i>permit</i> deferred destruction
5947 even if we don't require it.
5948 </p>
5949
5950 <p><i>[If this is to be changed, it should probably be changed by CWG.
5951   At this point, however, the LWG is leaning toward NAD.  Implementing
5952   what the standard says is hard work, but it's not impossible and
5953   most vendors went through that pain years ago.  Changing this
5954   behavior would be a user-visible change, and would break at least
5955   one real application.]</i></p>
5956
5957
5958 <p><i>[
5959 Batavia:  Send to core with our recommendation that we should permit deferred
5960 destruction but not require it.
5961 ]</i></p>
5962
5963
5964 <p><i>[
5965 Howard:  The course of action recommended in Batavia would undo LWG
5966 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
5967 singleton". Search the net for "phoenix singleton atexit" to get a feel
5968 for the size of the adverse impact this change would have.  Below is
5969 sample code which implements the phoenix singleton and would break if
5970 <tt>atexit</tt> is changed in this way:
5971 ]</i></p>
5972
5973
5974 <blockquote><pre>#include &lt;cstdlib&gt;
5975 #include &lt;iostream&gt;
5976 #include &lt;type_traits&gt;
5977 #include &lt;new&gt;
5978
5979 class A
5980 {
5981     bool alive_;
5982     A(const A&amp;);
5983     A&amp; operator=(const A&amp;);
5984 public:
5985     A() : alive_(true) {std::cout &lt;&lt; "A()\n";}
5986     ~A() {alive_ = false; std::cout &lt;&lt; "~A()\n";}
5987     void use()
5988     {
5989         if (alive_)
5990             std::cout &lt;&lt; "A is alive\n";
5991         else
5992             std::cout &lt;&lt; "A is dead\n";
5993     }
5994 };
5995
5996 void deallocate_resource();
5997
5998 // This is the phoenix singleton pattern
5999 A&amp; get_resource(bool create = true)
6000 {
6001     static std::aligned_storage&lt;sizeof(A), std::alignment_of&lt;A&gt;::value&gt;::type buf;
6002     static A* a;
6003     if (create)
6004     {
6005         if (a != (A*)&amp;buf)
6006         {
6007             a = ::new (&amp;buf) A;
6008             std::atexit(deallocate_resource);
6009         }
6010     }
6011     else
6012     {
6013         a-&gt;~A();
6014         a = (A*)&amp;buf + 1;
6015     }
6016     return *a;
6017 }
6018
6019 void deallocate_resource()
6020 {
6021     get_resource(false);
6022 }
6023
6024 void use_A(const char* message)
6025 {
6026     A&amp; a = get_resource();
6027     std::cout &lt;&lt; "Using A " &lt;&lt; message &lt;&lt; "\n";
6028     a.use();
6029 }
6030
6031 struct B
6032 {
6033     ~B() {use_A("from ~B()");}
6034 };
6035
6036 B b;
6037
6038 int main()
6039 {
6040     use_A("from main()");
6041 }
6042 </pre></blockquote>
6043
6044 <p>
6045 The correct output is:
6046 </p>
6047
6048 <blockquote><pre>A()
6049 Using A from main()
6050 A is alive
6051 ~A()
6052 A()
6053 Using A from ~B()
6054 A is alive
6055 ~A()
6056 </pre></blockquote>
6057
6058 <p><i>[
6059 Bellevue: Confirmed no interaction with <tt>quick_exit</tt>.
6060 Strong feeling against mandating the change. Leaning towards NAD rather than permitting the change,
6061 as this would make common implementations of pheonix-singleton pattern implementation defined, as noted by Howard.
6062 Bill agrees issue is no longer serious, and accepts NAD.
6063 ]</i></p>
6064
6065
6066
6067
6068 <p><b>Proposed resolution:</b></p>
6069 <p>
6070 </p>
6071
6072
6073
6074
6075
6076 <hr>
6077 <h3><a name="466"></a>466. basic_string ctor should prevent null pointer error</h3>
6078 <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>
6079  <b>Submitter:</b> Daniel Frey <b>Date:</b> 2004-06-10</p>
6080 <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>
6081 <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>
6082 <p><b>Discussion:</b></p>
6083 <p>
6084 Today, my colleagues and me wasted a lot of time. After some time, I
6085 found the problem. It could be reduced to the following short example:
6086 </p>
6087
6088 <pre>  #include &lt;string&gt;
6089   int main() { std::string( 0 ); }
6090 </pre>
6091
6092 <p>The problem is that the tested compilers (GCC 2.95.2, GCC 3.3.1 and
6093 Comeau online) compile the above without errors or warnings! The
6094 programs (at least for the GCC) resulted in a SEGV.</p>
6095
6096 <p>I know that the standard explicitly states that the ctor of string
6097 requires a char* which is not zero. STLs could easily detect the above
6098 case with a private ctor for basic_string which takes a single 'int'
6099 argument. This would catch the above code at compile time and would not
6100 ambiguate any other legal ctors.</p>
6101
6102 <p><i>[Redmond: No great enthusiasm for doing this.  If we do,
6103   however, we want to do it for all places that take <tt>charT*</tt>
6104   pointers, not just the single-argument constructor.  The other
6105   question is whether we want to catch this at compile time (in which
6106   case we catch the error of a literal 0, but not an expression whose
6107   value is a null pointer), at run time, or both.]</i></p>
6108
6109
6110
6111
6112 <p><b>Proposed resolution:</b></p>
6113
6114
6115 <p><b>Rationale:</b></p>
6116 <p>
6117 Recommend NAD.  Relegate this functionality to debugging implementations.
6118 </p>
6119
6120
6121
6122
6123
6124 <hr>
6125 <h3><a name="470"></a>470. accessing containers from their elements' special functions</h3>
6126 <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>
6127  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p>
6128 <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>
6129 <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>
6130 <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>
6131 <p><b>Discussion:</b></p>
6132
6133 <p>
6134 The standard doesn't prohibit the destructors (or any other special
6135 functions) of containers' elements invoked from a member function
6136 of the container from "recursively" calling the same (or any other)
6137 member function on the same container object, potentially while the
6138 container is in an intermediate state, or even changing the state
6139 of the container object while it is being modified. This may result
6140 in some surprising (i.e., undefined) behavior.
6141 </p>
6142
6143 <p>Read email thread starting with c++std-lib-13637 for more.</p>
6144
6145
6146
6147 <p><b>Proposed resolution:</b></p>
6148
6149 <p>Add to Container Requirements the following new paragraph:</p>
6150
6151 <pre>    Unless otherwise specified, the behavior of a program that
6152     invokes a container member function f from a member function
6153     g of the container's value_type on a container object c that
6154     called g from its mutating member function h, is undefined.
6155     I.e., if v is an element of c, directly or indirectly calling
6156     c.h() from v.g() called from c.f(), is undefined.
6157 </pre>
6158
6159 <p><i>[Redmond: This is a real issue, but it's probably a clause 17
6160   issue, not clause 23.  We get the same issue, for example, if we
6161   try to destroy a stream from one of the stream's callback functions.]</i></p>
6162
6163   
6164
6165
6166 <p><b>Rationale:</b></p>
6167 <p>
6168 Recommend NAD.  We agree this is an issue, but not a defect.
6169 We believe that there is no wording we can put in the standard
6170 that will cover all cases without introducing unfortunate
6171 corner cases.
6172 </p>
6173
6174
6175
6176
6177
6178 <hr>
6179 <h3><a name="472"></a>472. Missing "Returns" clause in std::equal_range</h3>
6180 <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>
6181  <b>Submitter:</b> Prateek R Karandikar <b>Date:</b> 2004-06-30</p>
6182 <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>
6183 <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>
6184 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a></p>
6185 <p><b>Discussion:</b></p>
6186 <p>
6187 There is no "Returns:" clause for std::equal_range, which returns non-void.
6188 </p>
6189
6190
6191 <p><b>Proposed resolution:</b></p>
6192
6193
6194 <p><b>Rationale:</b></p>
6195 <p>Fixed as part of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>.</p>
6196
6197
6198
6199
6200
6201
6202 <hr>
6203 <h3><a name="476"></a>476. Forward Iterator implied mutability</h3>
6204 <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>
6205  <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-09</p>
6206 <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>
6207 <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>
6208 <p><b>Discussion:</b></p>
6209
6210 <p>24.1/3 says:</p>
6211 <blockquote><p>
6212   Forward iterators satisfy all the requirements of the input and
6213   output iterators and can be used whenever either kind is specified
6214 </p></blockquote>
6215
6216 <p>
6217 The problem is that satisfying the requirements of output iterator
6218 means that you can always assign *something* into the result of
6219 dereferencing it.  That makes almost all non-mutable forward
6220 iterators non-conforming.  I think we need to sever the refinement
6221 relationship between forward iterator and output iterator.
6222 </p>
6223
6224 <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>
6225
6226
6227
6228 <p><b>Proposed resolution:</b></p>
6229
6230
6231 <p><b>Rationale:</b></p>
6232 <p>Yes, 24.1/3 does say that. But it's introductory material. The
6233 precise specification is in 24.1.3, and the requrements table there is
6234 right.  We don't need to fine-tune introductory wording.  (Especially
6235 since this wording is likely to be changed as part of the iterator
6236 overhaul.)</p> 
6237
6238
6239
6240
6241
6242 <hr>
6243 <h3><a name="477"></a>477. Operator-&gt; for const forward iterators</h3>
6244 <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>
6245  <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-11</p>
6246 <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>
6247 <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>
6248 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
6249 <p><b>Discussion:</b></p>
6250 <p>
6251 The Forward Iterator requirements table contains the following:
6252 </p>
6253 <pre> expression  return type         operational  precondition
6254                                   semantics
6255   ==========  ==================  ===========  ==========================
6256   a-&gt;m        U&amp; if X is mutable, (*a).m       pre: (*a).m is well-defined.
6257               otherwise const U&amp;
6258
6259   r-&gt;m        U&amp;                  (*r).m       pre: (*r).m is well-defined.
6260 </pre>
6261
6262 <p>
6263 The first line is exactly right.  The second line is wrong.  Basically
6264 it implies that the const-ness of the iterator affects the const-ness
6265 of referenced members.  But Paragraph 11 of [lib.iterator.requirements] says:
6266 </p>
6267
6268 <blockquote><p>
6269    In the following sections, a and b denote values of type const X, n
6270    denotes a value of the difference type Distance, u, tmp, and m
6271    denote identifiers, r denotes a value of X&amp;, t denotes a value of
6272    value type T, o denotes a value of some type that is writable to
6273    the output iterator.
6274 </p></blockquote>
6275
6276 <p>AFAICT if we need the second line at all, it should read the same
6277 as the first line.</p>
6278
6279 <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p>
6280
6281
6282 <p><b>Proposed resolution:</b></p>
6283
6284
6285 <p><b>Rationale:</b></p>
6286 <p>The LWG agrees that this is a real problem.  Marked as a DUP
6287   because the LWG chose to adopt the solution proposed in
6288   <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>.
6289 </p>
6290
6291
6292
6293
6294
6295 <hr>
6296 <h3><a name="479"></a>479. Container requirements and placement new</h3>
6297 <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>
6298  <b>Submitter:</b> Herb Sutter <b>Date:</b> 2004-08-01</p>
6299 <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>
6300 <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>
6301 <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>
6302 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a></p>
6303 <p><b>Discussion:</b></p>
6304 <p>Nothing in the standard appears to make this program ill-formed:</p>
6305
6306 <pre>  struct C {
6307     void* operator new( size_t s ) { return ::operator new( s ); }
6308     // NOTE: this hides in-place and nothrow new
6309   };
6310
6311   int main() {
6312     vector&lt;C&gt; v;
6313     v.push_back( C() );
6314   }
6315 </pre>
6316
6317 <p>Is that intentional?  We should clarify whether or not we intended
6318   to require containers to support types that define their own special
6319   versions of <tt>operator new</tt>.</p>
6320
6321 <p><i>[
6322 Lillehammer: A container will definitely never use this overridden
6323 operator new, but whether it will fail to compile is unclear from the
6324 standard.  Are containers supposed to use qualified or unqualified
6325 placement new?  20.4.1.1 is somewhat relevant, but the standard
6326 doesn't make it completely clear whether containers have to use
6327 Allocator::construct(). If containers don't use it, the details of how
6328 containers use placement new are unspecified. That is the real bug,
6329 but it needs to be fixed as part of the allocator overhaul.  Weak
6330 support that the eventual solution should make this code well formed.
6331 ]</i></p>
6332
6333
6334
6335
6336 <p><b>Proposed resolution:</b></p>
6337
6338
6339
6340
6341
6342
6343
6344 <hr>
6345 <h3><a name="480"></a>480. unary_function and binary_function should have protected nonvirtual destructors</h3>
6346 <p><b>Section:</b> 20.6.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
6347  <b>Submitter:</b> Joe Gottman <b>Date:</b> 2004-08-19</p>
6348 <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>
6349 <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>
6350 <p><b>Discussion:</b></p>
6351 <p>The classes std::unary_function and std::binary_function are both
6352 designed to be inherited from but contain no virtual functions.  This
6353 makes it too easy for a novice programmer to write code like
6354 binary_function&lt;int, int, int&gt; *p = new plus&lt;int&gt;; delete p;</p>
6355
6356 <p>There are two common ways to prevent this source of undefined
6357 behavior: give the base class a public virtual destructor, or give it
6358 a protected nonvirtual destructor.  Since unary_function and
6359 binary_function have no other virtual functions, (note in particular
6360 the absence of an operator()() ), it would cost too much to give them
6361 public virtual destructors.  Therefore, they should be given protected
6362 nonvirtual destructors.</p>
6363
6364
6365 <p><b>Proposed resolution:</b></p>
6366 <p>Change Paragraph 20.3.1 of the Standard from</p>
6367 <pre>    template &lt;class Arg, class Result&gt;
6368     struct unary_function {
6369         typedef Arg argument_type;
6370         typedef Result result_type;
6371     };
6372
6373     template &lt;class Arg1, class Arg2, class Result&gt;
6374     struct binary_function {
6375         typedef Arg1 first_argument_type;
6376         typedef Arg2 second_argument_type;
6377         typedef Result result_type;
6378     };
6379 </pre>
6380
6381 <p>to</p>
6382 <pre>    template &lt;class Arg, class Result&gt;
6383         struct unary_function {
6384         typedef Arg argument_type;
6385         typedef Result result_type;
6386     protected:
6387         ~unary_function() {}
6388     };
6389
6390     template &lt;class Arg1, class Arg2, class Result&gt;
6391     struct binary_function {
6392         typedef Arg1 first_argument_type;
6393         typedef Arg2 second_argument_type;
6394         typedef Result result_type;
6395     protected:
6396         ~binary_function() {}
6397     };
6398 </pre>
6399
6400
6401 <p><b>Rationale:</b></p>
6402 <p>The LWG doesn't believe the existing definition causes anybody any
6403   concrete harm.</p>
6404
6405
6406
6407
6408
6409 <hr>
6410 <h3><a name="481"></a>481. unique's effects on the range [result, last)</h3>
6411 <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>
6412  <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-08-30</p>
6413 <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>
6414 <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>
6415 <p><b>Discussion:</b></p>
6416 <p>
6417 The standard says that unique(first, last) "eliminates all but the
6418 first element from every consecutive group of equal elements" in
6419 [first, last) and returns "the end of the resulting range".  So a
6420 postcondition is that [first, result) is the same as the old [first,
6421 last) except that duplicates have been eliminated.
6422 </p>
6423
6424 <p>What postconditions are there on the range [result, last)?  One
6425   might argue that the standard says nothing about those values, so
6426   they can be anything.  One might also argue that the standard
6427   doesn't permit those values to be changed, so they must not be.
6428   Should the standard say something explicit one way or the other?</p>
6429
6430
6431
6432 <p><b>Proposed resolution:</b></p>
6433 <p>
6434 </p>
6435
6436
6437 <p><b>Rationale:</b></p>
6438 <p>We don't want to make many guarantees about what's in [result,
6439 end). Maybe we aren't being quite explicit enough about not being
6440 explicit, but it's hard to think that's a major problem.</p>
6441
6442
6443
6444
6445
6446 <hr>
6447 <h3><a name="482"></a>482. Swapping pairs</h3>
6448 <p><b>Section:</b> 20.2.3 [pairs], 20.4 [tuple] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
6449  <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-09-14</p>
6450 <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>
6451 <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>
6452 <p><b>Discussion:</b></p>
6453 <p>(Based on recent comp.std.c++ discussion)</p>
6454
6455 <p>Pair (and tuple) should specialize std::swap to work in terms of
6456 std::swap on their components.  For example, there's no obvious reason
6457 why swapping two objects of type pair&lt;vector&lt;int&gt;,
6458 list&lt;double&gt; &gt; should not take O(1).</p>
6459
6460 <p><i>[Lillehammer: We agree it should be swappable.  Howard will
6461   provide wording.]</i></p>
6462
6463
6464 <p><i>[
6465 Post Oxford:  We got <tt>swap</tt> for <tt>pair</tt> but accidently
6466 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>.
6467 ]</i></p>
6468
6469
6470
6471
6472 <p><b>Proposed resolution:</b></p>
6473 <p>
6474 Wording provided in
6475 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>.
6476 </p>
6477
6478 <p><b>Rationale:</b></p>
6479 <p>
6480 Recommend NAD, fixed by 
6481 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>.
6482 </p>
6483
6484
6485
6486
6487
6488 <hr>
6489 <h3><a name="483"></a>483. Heterogeneous equality and EqualityComparable</h3>
6490 <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>
6491  <b>Submitter:</b> Peter Dimov <b>Date:</b> 2004-09-20</p>
6492 <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>
6493 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a></p>
6494 <p><b>Discussion:</b></p>
6495 <p>c++std-lib-14262</p>
6496
6497 <p>[lib.alg.find] requires T to be EqualityComparable:</p>
6498
6499 <pre>template &lt;class InputIterator, class T&gt;
6500    InputIterator find(InputIterator first, InputIterator last,
6501                       const T&amp; value);
6502 </pre>
6503
6504 <p>
6505 However the condition being tested, as specified in the Effects
6506 clause, is actually *i == value, where i is an InputIterator.
6507 </p>
6508
6509 <p>
6510 The two clauses are in agreement only if the type of *i is T, but this
6511 isn't necessarily the case. *i may have a heterogeneous comparison
6512 operator that takes a T, or a T may be convertible to the type of *i.
6513 </p>
6514
6515 <p>Further discussion (c++std-lib-14264): this problem affects a
6516   number of algorithsm in clause 25, not just <tt>find</tt>.  We
6517   should try to resolve this problem everywhere it appears.</p>
6518
6519
6520 <p><b>Proposed resolution:</b></p>
6521
6522 <p>[lib.alg.find]:</p>
6523 <blockquote><p>
6524    Remove [lib.alg.find]/1.
6525 </p></blockquote>
6526
6527 <p>[lib.alg.count]:</p>
6528 <blockquote><p>
6529    Remove [lib.alg.count]/1.
6530 </p></blockquote>
6531
6532 <p>[lib.alg.search]:</p>
6533 <blockquote><p>
6534    Remove "Type T is EqualityComparable (20.1.1), " from [lib.alg.search]/4.
6535 </p></blockquote>
6536
6537 <p>[lib.alg.replace]:</p>
6538
6539 <blockquote>
6540    <p>
6541    Remove [lib.alg.replace]/1.
6542    Replace [lb.alg.replace]/2 with:
6543    </p>
6544
6545        <blockquote><p>
6546        For every iterator i in the range [first, last) for which *i == value
6547        or pred(*i) holds perform *i = new_value.
6548        </p></blockquote>
6549
6550    <p>
6551    Remove the first sentence of /4.
6552    Replace the beginning of /5 with:
6553    </p>
6554
6555        <blockquote><p>
6556        For every iterator i in the range [result, result + (last -
6557        first)), assign to *i either...
6558        </p></blockquote>
6559
6560    <p>(Note the defect here, current text says assign to i, not *i).</p>
6561 </blockquote>
6562
6563 <p>[lib.alg.fill]:</p>
6564
6565 <blockquote>
6566    <p>
6567    Remove "Type T is Assignable (23.1), " from /1.
6568    Replace /2 with:
6569    </p>
6570
6571        <blockquote><p>
6572        For every iterator i in the range [first, last) or [first, first + n),
6573        perform *i = value.
6574        </p></blockquote>
6575 </blockquote>
6576
6577 <p>[lib.alg.remove]:</p>
6578 <blockquote><p>
6579    Remove /1.
6580    Remove the first sentence of /6.
6581 </p></blockquote>
6582
6583
6584
6585 <p><b>Rationale:</b></p>
6586 <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>
6587
6588
6589
6590
6591
6592
6593 <hr>
6594 <h3><a name="486"></a>486. min/max CopyConstructible requirement is too strict</h3>
6595 <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>
6596  <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-10-13</p>
6597 <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>
6598 <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>
6599 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a></p>
6600 <p><b>Discussion:</b></p>
6601 <p>A straightforward implementation of these algorithms does not need to
6602 copy T.</p>
6603
6604
6605 <p><b>Proposed resolution:</b></p>
6606 <p>drop the the words "and CopyConstructible" from paragraphs 1 and 4</p>
6607
6608
6609 <p><b>Rationale:</b></p>
6610
6611
6612
6613
6614
6615
6616 <hr>
6617 <h3><a name="487"></a>487. Allocator::construct is too limiting</h3>
6618 <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>
6619  <b>Submitter:</b> Dhruv Matani <b>Date:</b> 2004-10-17</p>
6620 <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>
6621 <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>
6622 <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>
6623 <p><b>Discussion:</b></p>
6624 <p>
6625 The standard's version of allocator::construct(pointer,
6626 const_reference) severely limits what you can construct using this
6627 function.  Say you can construct a socket from a file descriptor. Now,
6628 using this syntax, I first have to manually construct a socket from
6629 the fd, and then pass the constructed socket to the construct()
6630 function so it will just to an uninitialized copy of the socket I
6631 manually constructed. Now it may not always be possible to copy
6632 construct a socket eh! So, I feel that the changes should go in the
6633 allocator::construct(), making it:
6634 </p>
6635 <pre>    template&lt;typename T&gt;
6636     struct allocator{
6637       template&lt;typename T1&gt;
6638       void construct(pointer T1 const&amp; rt1);
6639     };
6640 </pre>
6641
6642 <p>
6643 Now, the ctor of the class T which matches the one that takes a T1 can
6644 be called! Doesn't that sound great?
6645 </p>
6646
6647
6648 <p><b>Proposed resolution:</b></p>
6649
6650
6651 <p><b>Rationale:</b></p>
6652 <p>NAD. STL uses copying all the time, and making it possible for
6653   allocators to construct noncopyable objects is useless in the
6654   absence of corresponding container changes. We might consider this
6655   as part of a larger redesign of STL.</p>
6656
6657
6658
6659
6660
6661 <hr>
6662 <h3><a name="489"></a>489. std::remove / std::remove_if wrongly specified</h3>
6663 <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>
6664  <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
6665 <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>
6666 <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>
6667 <p><b>Discussion:</b></p>
6668 <p>In Section 25.2.7 [lib.alg.remove], paragraphs 1 to 5 describe the
6669 behavior of the mutating sequence operations std::remove and
6670 std::remove_if. However, the wording does not reflect the intended
6671 behavior [Note: See definition of intended behavior below] of these
6672 algorithms, as it is known to the C++ community [1].
6673 </p>
6674
6675
6676
6677 <p>1) Analysis of current wording:</p>
6678
6679
6680 <p>25.2.7 [lib.alg.remove], paragraph 2:</p>
6681
6682 <p>Current wording says:
6683 "Effects: Eliminates all the elements referred to by iterator i in the
6684 range [first, last) for which the following corresponding conditions
6685 hold: *i == value, pred(*i) != false."</p>
6686
6687 <p>
6688 This sentences expresses specifically that all elements denoted by the
6689 (original) range [first, last) for which the corresponding condition
6690 hold will be eliminated. Since there is no formal definition of the term
6691 "eliminate" provided, the meaning of "eliminate" in everyday language
6692 implies that as postcondition, no element in the range denoted by
6693 [first, last) will hold the corresponding condition on reiteration over
6694 the range [first, last).
6695 </p>
6696
6697 <p>
6698 However, this is neither the intent [Note: See definition of intended
6699 behavior below] nor a general possible approach. It can be easily proven
6700 that if all elements of the original range[first, last) will hold the
6701 condition, it is not possible to substitute them by an element for which
6702 the condition will not hold.
6703 </p>
6704
6705
6706 <p>25.2.7 [lib.alg.remove], paragraph 3:</p>
6707
6708 <p>
6709 Current wording says:
6710 "Returns: The end of the resulting range."
6711 </p>
6712
6713 <p>
6714 The resulting range is not specified. In combination with 25.2.7
6715 [lib.alg.remove], paragraph 2, the only reasonable interpretation of
6716 this so-called resulting range is the range [first,last) - thus
6717 returning always the ForwardIterator 'last' parameter.
6718 </p>
6719
6720
6721 <p>
6722 25.2.7 [lib.alg.remove], paragraph 4:
6723 </p>
6724
6725 <p>
6726 Current wording says:
6727 "Notes: Stable: the relative order of the elements that are not removed
6728 is the same as their relative order in the original range"
6729 </p>
6730
6731 <p>
6732 This sentences makes use of the term "removed", which is neither
6733 specified, nor used in a previous paragraph (which uses the term
6734 "eliminate"), nor unamgiuously separated from the name of the algorithm.
6735 </p>
6736
6737
6738 <p>2) Description of intended behavior:</p>
6739
6740 <p>
6741 For the rest of this Defect Report, it is assumed that the intended
6742 behavior was that all elements of the range [first, last) which do not
6743 hold the condition *i == value (std::remove) or  pred(*i) != false
6744 (std::remove_if)], call them s-elements [Note: s...stay], will be placed
6745 into a contiguous subrange of [first, last), denoted by the iterators
6746 [first, return value). The number of elements in the resulting range
6747 [first, return value) shall be equal to the number of s-elements in the
6748 original range [first, last). The relative order of the elements in the
6749 resulting subrange[first, return value) shall be the same as the
6750 relative order of the corresponding elements in the original range. It
6751 is undefined whether any elements in the resulting subrange [return
6752 value, last) will hold the corresponding condition, or not.
6753 </p>
6754
6755 <p>
6756 All implementations known to the author of this Defect Report comply
6757 with this intent. Since the intent  of the behavior (contrary to the
6758 current wording) is also described in various utility references serving
6759 the C++ community [1], it is not expected that fixing the paragraphs
6760 will influence current code - unless the code relies on the behavior as
6761 it is described by current wording and the implementation indeed
6762 reflects the current wording, and not the intent.
6763 </p>
6764
6765
6766
6767 <p>3) Proposed fixes:</p>
6768
6769
6770 <p>Change 25.2.7 [lib.alg.remove], paragraph 2 to:</p>
6771
6772 <p>
6773 "Effect: Places all the elements referred to by iterator i in the range
6774 [first, last) for which the following corresponding conditions hold :
6775 !(*i == value), pred(*i) == false into the subrange [first, k) of the
6776 original range, where k shall denote a value of type ForwardIterator. It
6777 is undefined whether any elements in the resulting subrange [k, last)
6778 will hold the corresponding condition, or not."
6779 </p>
6780
6781 <p>Comments to the new wording:</p>
6782
6783 <p>
6784 a) "Places" has no special meaning, and the everyday language meaning
6785 should fit.
6786 b) The corresponding conditions were negated compared to the current
6787 wording, becaue the new wording requires it.
6788 c) The wording "of the original range" might be redundant, since any
6789 subrange starting at 'first' and containing no more elements than the
6790 original range is implicitly a subrange of the original range [first,
6791 last).
6792 d) The iterator k was introduced instead of "return value" in order to
6793 avoid a cyclic dependency on 25.2.7/3. The wording ", where k shall
6794 denote a value of type ForwardIterator" might be redundant, because it
6795 follows implicitly by 25.2.7/3.
6796 e) "Places" does, in the author's opinion, explicitly forbid duplicating
6797 any element holding the corresponding condition in the original range
6798 [first, last) within the resulting range [first, k). If there is doubt
6799 this term might be not unambiguous regarding this, it is suggested that
6800 k is specified more closely by the following wording: "k shall denote a
6801 value of type ForwardIterator [Note: see d)] so that k - first is equal
6802 to the number of elements in the original range [first, last) for which
6803 the corresponding condition did hold". This could also be expressed as a
6804 separate paragraph "Postcondition:"
6805 f) The senctence "It is undefined whether any elements in the resulting
6806 subrange [k, last) will hold the corresponding condition, or not." was
6807 added consciously so the term "Places" does not imply if the original
6808 range [first, last) contains n elements holding the corresponding
6809 condition, the identical range[first, last) will also contain exactly n
6810 elements holding the corresponding condition after application of the
6811 algorithm.
6812 </p>
6813
6814 <p>
6815 Change 25.2.7 [lib.alg.remove], paragraph 3 to:
6816
6817 "Returns: The iterator k."
6818 </p>
6819
6820 <p>
6821 Change 25.2.7 [lib.alg.remove], paragraph 4 to:
6822
6823 "Notes: Stable: the relative order of the elements that are placed into
6824 the subrange [first, return value) shall be the same as their relative
6825 order was in the original range [first, last) prior to application of
6826 the algorithm."
6827 </p>
6828
6829 <p>
6830 Comments to the new wording:
6831 </p>
6832
6833 <p>
6834 a) the wording "was ...  prior to application of the algorithm" is used
6835 to explicitly distinguish the original range not only by means of
6836 iterators, but also by a 'chronological' factor from the resulting range
6837 [first, return value). It might be redundant.
6838 </p>
6839
6840 <p>
6841 [1]:
6842 The wording of these references is not always unambiguous, and provided
6843 examples partially contradict verbal description of the algorithms,
6844 because the verbal description resembles the problematic wording of
6845 ISO/IEC 14882:2003.
6846 </p>
6847
6848
6849 <p><b>Proposed resolution:</b></p>
6850
6851
6852 <p><b>Rationale:</b></p>
6853 <p>The LWG believes that the standard is sufficiently clear, and that
6854   there is no evidence of any real-world confusion about this point.</p>
6855
6856
6857
6858
6859
6860 <hr>
6861 <h3><a name="490"></a>490. std::unique wrongly specified</h3>
6862 <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>
6863  <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
6864 <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>
6865 <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>
6866 <p><b>Discussion:</b></p>
6867 <p>In Section 25.2.8 [lib.alg.unique], paragraphs 1 to 3 describe the
6868 behavior of the mutating sequence operation std::unique. However, the
6869 wording does not reflect the intended behavior [Note: See definition of
6870 intended behavior below] of these algorithms, as it is known to the C++
6871 community [1].</p>
6872
6873
6874
6875 <p>1) Analysis of current wording:</p>
6876
6877
6878 <p>25.2.8 [lib.alg.unique], paragraph 1:</p>
6879
6880 <p>
6881 Current wording says:
6882 "Effects: Eliminates all but the first element from every consecutive
6883 group of equal elements referred to by the iterator i in the range
6884 [first, last) for which the following corresponding conditions hold: *i
6885 == *(i - 1) or pred(*i, *(i -1)) != false"
6886 </p>
6887
6888 <p>
6889 This sentences expresses specifically that all elements denoted by the
6890 (original) range [first, last) which are not but the first element from
6891 a consecutive group of equal elements (where equality is defined as *i
6892 == *(i - 1) or pred(*i, *(i - 1)) ! = false) [Note: See DR 202], call
6893 them r-elements [Note: r...remove], will be eliminated. Since there is
6894 no formal definition of the term "eliminate" provided, it is undefined
6895 how this "elimination" takes place. But the meaning of "eliminate" in
6896 everyday language seems to disallow explicitly that after application of
6897 the algorithm, any r-element will remain at any position of the range
6898 [first, last) [2].
6899 </p>
6900
6901 <p>
6902 Another defect in the current wording concerns the iterators used to
6903 compare two elements for equality: The current wording contains the
6904 expression "(i - 1)", which is not covered by 25/9 [Note: See DR
6905 submitted by Thomas Mang regarding invalid iterator arithmetic
6906 expressions].
6907 </p>
6908
6909
6910 <p>
6911 25.2.8 [lib.alg.unique], paragraph 2:
6912 </p>
6913 <p>Current wording says:
6914 "Returns: The end of the resulting range."</p>
6915
6916 <p>
6917 The resulting range is not specified. In combination with 25.2.8
6918 [lib.alg.unique], paragraph 1, one reasonable interpretation (in the
6919 author's opinion even the only possible interpretation) of this
6920 so-called resulting range is the range [first, last) - thus returning
6921 always the ForwardIterator 'last' parameter.
6922 </p>
6923
6924 <p>2) Description of intended behavior:</p>
6925
6926 <p>
6927 For the rest of this Defect Report, it is assumed that the intended
6928 behavior was that all elements denoted by the original range [first,
6929 last) which are the first element from a consecutive group of elements
6930 for which the corresponding conditions: *(i-1) == *i (for the version of
6931 unique without a predicate argument) or pred(*(i-1), *i) ! = false (for
6932 the version of unique with a predicate argument) [Note: If such a group
6933 of elements consists of only a single element, this is also considered
6934 the first element] [Note: See resolutions of DR 202], call them
6935 s-elements [Note: s...stay], will be placed into a contiguous subrange
6936 of [first, last), denoted by the iterators [first, return value). The
6937 number of elements in the resulting range [first, return value) shall be
6938 equal to the number of s-elements in the original range [first, last).
6939 Invalid iterator arithmetic expressions are expected to be resolved as
6940 proposed in DR submitted by Thomas Mang regarding invalid iterator
6941 arithmetic expressions. It is also assumed by the author that the
6942 relative order of the elements in the resulting subrange [first, return
6943 value) shall be the same as the relative order of the corresponding
6944 elements (the s-elements) in the original range [Note: If this was not
6945 intended behavior, the additional proposed paragraph about stable order
6946 will certainly become obsolete].
6947 Furthermore, the resolutions of DR 202 are partially considered.
6948 </p>
6949
6950 <p>
6951 All implementations known to the author of this Defect Report comply
6952 with this intent [Note: Except possible effects of DR 202]. Since this
6953 intent of the behavior (contrary to the current wording) is also
6954 described in various utility references serving the C++ community [1],
6955 it is not expected that fixing the paragraphs will influence current
6956 code [Note: Except possible effects of DR 202] - unless the code relies
6957 on the behavior as it is described by current wording and the
6958 implementation indeed reflects the current wording, and not the intent.
6959 </p>
6960
6961
6962
6963 <p>3) Proposed fixes:</p>
6964
6965 <p>
6966 Change 25.2.8 [lib.alg.unique], paragraph 1 to:
6967 </p>
6968
6969 <p>
6970 "Effect: Places the first element from every consecutive group of
6971 elements, referred to by the iterator i in the range [first, last), for
6972 which the following conditions hold: *(i-1) == *i (for the version of
6973 unique without a predicate argument) or pred(*(i -1), *i) != false (for
6974 the version of unique with a predicate argument), into the subrange
6975 [first, k) of the original range, where k shall denote a value of type
6976 ForwardIterator."
6977 </p>
6978
6979 <p>Comments to the new wording:</p>
6980
6981 <p>
6982 a) The new wording was influenced by the resolutions of DR 202. If DR
6983 202 is resolved in another way, the proposed wording need also
6984 additional review.
6985 b) "Places" has no special meaning, and the everyday language meaning
6986 should fit.
6987 c) The expression "(i - 1)" was left, but is expected that DR submitted
6988 by Thomas Mang regarding invalid iterator arithmetic expressions will
6989 take this into account.
6990 d) The wording "(for the version of unique without a predicate
6991 argument)" and "(for the version of unique with a predicate argument)"
6992 was added consciously for clarity and is in resemblence with current
6993 23.2.2.4 [lib.list.ops], paragraph 19. It might be considered redundant.
6994 e) The wording "of the original range" might be redundant, since any
6995 subrange starting at first and containing no more elements than the
6996 original range is implicitly a subrange of the original range [first,
6997 last).
6998 f) The iterator k was introduced instead of "return value" in order to
6999 avoid a cyclic dependency on 25.2.8 [lib.alg.unique], paragraph 2. The
7000 wording ", where k shall denote a value of type ForwardIterator" might
7001 be redundant, because it follows implicitly by 25.2.8 [lib.alg.unique],
7002 paragraph 2.
7003 g) "Places" does, in the author's opinion, explicitly forbid duplicating
7004 any s-element in the original range [first, last) within the resulting
7005 range [first, k). If there is doubt this term might be not unambiguous
7006 regarding this, it is suggested that k is specified more closely by the
7007 following wording: "k shall denote a value of type ForwardIterator
7008 [Note: See f)] so that k - first is equal to the number of elements in
7009 the original range [first, last) being the first element from every
7010 consecutive group of elements for which the corresponding condition did
7011 hold". This could also be expressed as a separate paragraph
7012 "Postcondition:".
7013 h) If it is considered that the wording is unclear whether it declares
7014 the element of a group which consists of only a single element
7015 implicitly to be the first element of this group [Note: Such an
7016 interpretation could eventually arise especially in case last - first ==
7017 1] , the following additional sentence is proposed: "If such a group of
7018 elements consists of only a single element, this element is also
7019 considered the first element."
7020 </p>
7021
7022 <p>
7023 Change 25.2.8 [lib.alg.unique], paragraph 2 to:
7024 "Returns: The iterator k."
7025 </p>
7026
7027 <p>
7028 Add a separate paragraph "Notes:" as 25.2.8 [lib.alg.unique], paragraph
7029 2a or 3a, or a separate paragraph "Postcondition:" before 25.2.8
7030 [lib.alg.unique], paragraph 2 (wording inside {} shall be eliminated if
7031 the preceding expressions are used, or the preceding expressions shall
7032 be eliminated if wording inside {} is used):
7033 </p>
7034
7035 <p>
7036 "Notes:{Postcondition:} Stable: the relative order of the elements that
7037 are placed into the subrange [first, return value {k}) shall be the same
7038 as their relative order was in the original range [first, last) prior to
7039 application of the algorithm."
7040 </p>
7041
7042 <p>Comments to the new wording:</p>
7043
7044 <p>
7045 a) It is assumed by the author that the algorithm was intended to be
7046 stable.
7047 In case this was not the intent, this paragraph becomes certainly
7048 obsolete.
7049 b) The wording "was ...  prior to application of the algorithm" is used
7050 to explicitly distinguish the original range not only by means of
7051 iterators, but also by a 'chronological' factor from the resulting range
7052 [first, return value). It might be redundant.
7053 </p>
7054
7055 <p>
7056 25.2.8 [lib.alg.unique], paragraph 3:
7057 </p>
7058 <p>See DR 239.</p>
7059
7060 <p>
7061 4) References to other DRs:
7062 </p>
7063
7064 <p>
7065 See DR 202, but which does not address any of the problems described in
7066 this Defect Report [Note: This DR is supposed to complement DR 202].
7067 See DR 239.
7068 See DR submitted by Thomas Mang regarding invalid iterator arithmetic
7069 expressions.
7070 </p>
7071
7072 <p>
7073 [1]:
7074 The wording of these references is not always unambiguous, and provided
7075 examples partially contradict verbal description of the algorithms,
7076 because the verbal description resembles the problematic wording of
7077 ISO/IEC 14882:2003.
7078 </p>
7079
7080 <p>
7081 [2]:
7082 Illustration of conforming implementations according to current wording:
7083 </p>
7084
7085 <p>
7086 One way the author of this DR considers how this "elimination" could be
7087 achieved by a conforming implementation according to current wording is
7088 by substituting each r-element by _any_ s-element [Note: s...stay; any
7089 non-r-element], since all r-elements are "eliminated".
7090 </p>
7091
7092 <p>
7093 In case of a sequence consisting of elements being all 'equal' [Note:
7094 See DR 202], substituting each r-element by the single s-element is the
7095 only possible solution according to current wording.
7096 </p>
7097
7098
7099 <p><b>Proposed resolution:</b></p>
7100
7101
7102 <p><b>Rationale:</b></p>
7103 <p>The LWG believes the standard is sufficiently clear. No
7104 implementers get it wrong, and changing it wouldn't cause any code to
7105 change, so there is no real-world harm here.</p>
7106
7107
7108
7109
7110
7111 <hr>
7112 <h3><a name="491"></a>491. std::list&lt;&gt;::unique incorrectly specified</h3>
7113 <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>
7114  <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p>
7115 <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>
7116 <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>
7117 <p><b>Discussion:</b></p>
7118 <p>In Section 23.2.4.4 [list.ops], paragraphs 19 to 21 describe the
7119 behavior of the std::list&lt;T, Allocator&gt;::unique operation. However, the
7120 current wording is defective for various reasons.</p>
7121
7122
7123
7124 <p>
7125 1) Analysis of current wording:
7126 </p>
7127
7128 <p>23.2.4.4 [list.ops], paragraph 19:</p>
7129
7130 <p>
7131 Current wording says:
7132 "Effects:  Eliminates all but the first element from every consecutive
7133 group of equal elements referred to by the iterator i in the range
7134 [first + 1, last) for which *i == *(i - 1) (for the version of unique
7135 with no argument) or pred(*i, *(i -1)) (for the version of unique with a
7136 predicate argument) holds."</p>
7137
7138 <p>
7139 This sentences makes use of the undefined term "Eliminates". Although it
7140 is, to a certain degree, reasonable to consider the term "eliminate"
7141 synonymous with "erase", using "Erase" in the first place, as the
7142 wording of 23.2.4.4 [list.ops], paragraph 15 does, would be clearer.</p>
7143
7144 <p>
7145 The range of the elements referred to by iterator i is "[first + 1,
7146 last)". However, neither "first" nor "last" is defined.</p>
7147
7148 <p>
7149 The sentence makes three times use of iterator arithmetic expressions (
7150 "first + 1", "*i == *(i - 1)", "pred(*i, *(i -1))" ) which is not
7151 defined for bidirectional iterator [see DR submitted by Thomas Mang
7152 regarding invalid iterator arithmetic expressions].</p>
7153
7154 <p>
7155 The same problems as pointed out in DR 202 (equivalence relation / order
7156 of arguments for pred()) apply to this paragraph.</p>
7157
7158 <p>
7159 23.2.4.4 [list.ops], paragraph 20:
7160 </p>
7161
7162 <p>
7163 Current wording says:
7164 "Throws: Nothing unless an exception in thrown by *i == *(i-1) or
7165 pred(*i, *(i - 1))"</p>
7166
7167 <p>
7168 The sentence makes two times use of invalid iterator arithmetic
7169 expressions ( "*i == *(i - 1)", "pred(*i, *(i -1))" ).
7170 </p>
7171 <p>
7172 [Note: Minor typos: "in" / missing dot at end of sentence.]
7173 </p>
7174
7175 <p>
7176 23.2.4.4 [list.ops], paragraph 21:</p>
7177
7178 <p>
7179 Current wording says:
7180 "Complexity: If the range (last - first) is not empty, exactly (last -
7181 first) - 1 applications of the corresponding predicate, otherwise no
7182 application of the predicate.</p>
7183
7184 <p>
7185 See DR 315 regarding "(last - first)" not yielding a range.</p>
7186
7187 <p>
7188 Invalid iterator arithmetic expression "(last - first) - 1" left .</p>
7189
7190
7191 <p>2) Description of intended behavior:</p>
7192
7193 <p>
7194 For the rest of this Defect Report, it is assumed that "eliminate" is
7195 supposed to be synonymous to "erase", that "first" is equivalent to an
7196 iterator obtained by a call to begin(), "last" is equivalent to an
7197 iterator obtained by a call to end(), and that all invalid iterator
7198 arithmetic expressions are resolved as described in DR submitted by
7199 Thomas Mang regarding invalid iterator arithmetic expressions.</p>
7200
7201 <p>
7202 Furthermore, the resolutions of DR 202 are considered regarding
7203 equivalence relation and order of arguments for a call to pred.</p>
7204
7205 <p>
7206 All implementations known to the author of this Defect Report comply
7207 with these assumptions, apart from the impact of the alternative
7208 resolution of DR 202. Except for the changes implied by the resolutions
7209 of DR 202, no impact on current code is expected.</p>
7210
7211 <p>
7212 3) Proposed fixes:</p>
7213
7214 <p>
7215 Change 23.2.4.4 [list.ops], paragraph 19 to:</p>
7216
7217 <p>
7218 "Effect: Erases all but the first element from every consecutive group
7219 of elements, referred to by the iterator i in the range [begin(),
7220 end()), for which the following conditions hold: *(i-1) == *i (for the
7221 version of unique with no argument) or pred(*(i-1), *i) != false (for
7222 the version of unique with a predicate argument)."</p>
7223
7224 <p>
7225 Comments to the new wording:</p>
7226
7227 <p>
7228 a) The new wording was influenced by DR 202 and the resolutions
7229 presented there. If DR 202 is resolved in another way, the proposed
7230 wording need also additional review.
7231 b) "Erases" refers in the author's opinion unambiguously to the member
7232 function "erase". In case there is doubt this might not be unamgibuous,
7233 a direct reference to the member function "erase" is suggested [Note:
7234 This would also imply a change of 23.2.4.4 [list.ops], paragraph
7235 15.].
7236 c) The expression "(i - 1)" was left, but is expected that DR submitted
7237 by Thomas Mang regarding invalid iterator arithmetic expressions will
7238 take this into account.
7239 d) The wording "(for the version of unique with no argument)" and "(for
7240 the version of unique with a predicate argument)" was kept consciously
7241 for clarity.
7242 e) "begin()" substitutes "first", and "end()" substitutes "last". The
7243 range need adjustment from "[first + 1, last)" to "[begin(), end())" to
7244 ensure a valid range in case of an empty list.
7245 f) If it is considered that the wording is unclear whether it declares
7246 the element of a group which consists of only a single element
7247 implicitly to be the first element of this group [Note: Such an
7248 interpretation could eventually arise especially in case size() == 1] ,
7249 the following additional sentence is proposed: "If such a group of
7250 elements consists of only a single element, this element is also
7251 considered the first element."</p>
7252
7253 <p>
7254 Change 23.2.4.4 [list.ops], paragraph 20 to:</p>
7255
7256 <p>
7257 "Throws: Nothing unless an exception is thrown by *(i-1) == *i or
7258 pred(*(i-1), *i)."</p>
7259
7260 <p>
7261 Comments to the new wording:</p>
7262
7263 <p>
7264 a) The wording regarding the conditions is identical to proposed
7265 23.2.4.4 [list.ops], paragraph 19. If 23.2.4.4 [list.ops],
7266 paragraph 19 is resolved in another way, the proposed wording need also
7267 additional review.
7268 b) The expression "(i - 1)" was left, but is expected that DR submitted
7269 by Thomas Mang regarding invalid iterator arithmetic expressions will
7270 take this into account.
7271 c) Typos fixed.</p>
7272
7273 <p>
7274 Change 23.2.4.4 [list.ops], paragraph 21 to:</p>
7275
7276 <p>
7277 "Complexity: If empty() == false, exactly size() - 1 applications of the
7278 corresponding predicate, otherwise no applications of the corresponding
7279 predicate."</p>
7280
7281 <p>
7282 Comments to the new wording:</p>
7283
7284 <p>
7285 a) The new wording is supposed to also replace the proposed resolution
7286 of DR 315, which suffers from the problem of undefined "first" / "last".
7287 </p>
7288
7289 <p>
7290 5) References to other DRs:</p>
7291
7292 <p>See DR 202.
7293 See DR 239.
7294 See DR 315.
7295 See DR submitted by Thomas Mang regarding invalid iterator arithmetic
7296 expressions.</p>
7297
7298
7299
7300 <p><b>Proposed resolution:</b></p>
7301
7302
7303 <p><b>Rationale:</b></p>
7304 <p>"All implementations known to the author of this Defect Report
7305 comply with these assumption", and "no impact on current code is
7306 expected", i.e. there is no evidence of real-world confusion or
7307 harm.</p>
7308
7309
7310
7311
7312
7313 <hr>
7314 <h3><a name="493"></a>493. Undefined Expression in Input Iterator Note Title</h3>
7315 <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>
7316  <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-12-13</p>
7317 <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>
7318 <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>
7319 <p><b>Discussion:</b></p>
7320 <p>1) In 24.1.1/3, the following text is currently present.</p>
7321
7322 <p>"Note: For input iterators, a==b does not imply ++a=++b (Equality does
7323 not guarantee the substitution property or referential transparency)."</p>
7324
7325 <p>However, when in Table 72, part of the definition of ++r is given as:</p>
7326
7327 <p>"pre: r is dereferenceable.
7328 post: any copies of the previous value of r are no longer required
7329 either to be dereferenceable ..."</p>
7330
7331 <p>While a==b does not imply that b is a copy of a, this statement should
7332 perhaps still be made more clear.</p>
7333
7334 <p>2) There are no changes to intended behaviour</p>
7335
7336 <p>
7337 3) This Note should be altered to say "Note: For input iterators a==b,
7338 when its behaviour is defined ++a==++b may still be false (Equality does
7339 not guarantee the substitution property or referential transparency).</p>
7340
7341
7342
7343 <p><b>Proposed resolution:</b></p>
7344
7345
7346 <p><b>Rationale:</b></p>
7347 <p>This is descriptive text, not normative, and the meaning is clear.</p>
7348
7349
7350
7351
7352
7353 <hr>
7354 <h3><a name="494"></a>494. Wrong runtime complexity for associative container's insert and delete</h3>
7355 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7356  <b>Submitter:</b> Hans B os <b>Date:</b> 2004-12-19</p>
7357 <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>
7358 <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>
7359 <p><b>Discussion:</b></p>
7360 <p>According to [lib.associative.reqmts] table 69, the runtime comlexity
7361 of insert(p, t) and erase(q) can be done in amortized constant time.</p>
7362
7363 <p>It was my understanding that an associative container could be
7364 implemented as a balanced binary tree.</p>
7365
7366 <p>For inser(p, t), you 'll have to iterate to p's next node to see if t
7367 can be placed next to p.  Furthermore, the insertion usually takes
7368 place at leaf nodes. An insert next to the root node will be done at
7369 the left of the root next node</p>
7370
7371 <p>So when p is the root node you 'll have to iterate from the root to
7372 its next node, which  takes O(log(size)) time in a balanced tree.</p>
7373
7374 <p>If you insert all values with insert(root, t) (where root is the
7375 root of the tree before insertion) then each insert takes O(log(size))
7376 time.  The amortized complexity per insertion will be O(log(size))
7377 also.</p>
7378
7379 <p>For erase(q), the normal algorithm for deleting a node that has no
7380 empty left or right subtree, is to iterate to the next (or previous),
7381 which is a leaf node. Then exchange the node with the next and delete
7382 the leaf node.  Furthermore according to DR 130, erase should return
7383 the next node of the node erased.  Thus erasing the root node,
7384 requires iterating to the next node.</p>
7385
7386 <p>Now if you empty a map by deleting the root node until the map is
7387 empty, each operation will take O(log(size)), and the amortized
7388 complexity is still O(log(size)).</p>
7389
7390 <p>The operations can be done in amortized constant time if iterating
7391 to the next node can be done in (non amortized) constant time.  This
7392 can be done by putting all nodes in a double linked list.  This
7393 requires two extra links per node.  To me this is a bit overkill since
7394 you can already efficiently insert or erase ranges with erase(first,
7395 last) and insert(first, last).</p>
7396
7397
7398
7399 <p><b>Proposed resolution:</b></p>
7400
7401
7402 <p><b>Rationale:</b></p>
7403 <p>Only "amortized constant" in special circumstances, and we believe
7404   that's implementable. That is: doing this N times will be O(N), not
7405   O(log N).</p>
7406
7407
7408
7409
7410
7411 <hr>
7412 <h3><a name="499"></a>499. Std. doesn't seem to require stable_sort() to be stable!</h3>
7413 <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>
7414  <b>Submitter:</b> Prateek Karandikar <b>Date:</b> 2005-04-12</p>
7415 <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>
7416 <p><b>Discussion:</b></p>
7417 <blockquote><p>
7418 17.3.1.1 Summary</p>
7419
7420 <p>
7421 1 The Summary provides a synopsis of the category, and introduces the 
7422 first-level subclauses. Each subclause also provides a summary, listing 
7423 the headers specified in the subclause and the library entities 
7424 provided in each header. 
7425 </p>
7426 <p>
7427 2 Paragraphs labelled "Note(s):" or "Example(s):" are informative, 
7428 other paragraphs are normative.
7429 </p></blockquote> 
7430
7431 <p>So this means that a "Notes" paragraph wouldn't be normative. </p>
7432
7433 <blockquote><p>
7434 25.3.1.2 stable_sort
7435 </p>
7436 <pre>template&lt;class RandomAccessIterator&gt; 
7437 void stable_sort(RandomAccessIterat or first, RandomAccessIterator last); 
7438
7439 template&lt;class RandomAccessIterator, class Compare&gt; 
7440 void stable_sort(RandomAccessIterat or first, RandomAccessIterator last, Compare comp);
7441 </pre>
7442 <p>
7443 1 Effects: Sorts the elements in the range [first, last).
7444 </p>
7445 <p>
7446 2 Complexity: It does at most N(log N)^2 (where N == last - first) 
7447 comparisons; if enough extra memory is available, it is N log N.
7448 </p>
7449 <p>
7450 3 Notes: Stable: the relative order of the equivalent elements is 
7451 preserved. 
7452 </p></blockquote> 
7453
7454 <p>
7455 The Notes para is informative, and nowhere else is stability mentioned above. 
7456 </p>
7457
7458 <p>
7459 Also, I just searched for the word "stable" in my copy of the Standard. 
7460 and the phrase "Notes: Stable: the relative order of the elements..." 
7461 is repeated several times in the Standard library clauses for 
7462 describing various functions. How is it that stability is talked about 
7463 in the informative paragraph? Or am I missing something obvious? 
7464 </p>
7465
7466
7467 <p><b>Proposed resolution:</b></p>
7468 <p>
7469 </p>
7470
7471
7472 <p><b>Rationale:</b></p>
7473 <p>
7474 This change has already been made.
7475 </p>
7476
7477
7478
7479
7480
7481 <hr>
7482 <h3><a name="500"></a>500. do_length cannot be implemented correctly</h3>
7483 <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>
7484  <b>Submitter:</b> Krzysztof &#379;elechowski <b>Date:</b> 2005-05-24</p>
7485 <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>
7486 <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>
7487 <p><b>Discussion:</b></p>
7488 <ol>
7489 <li>codecvt::do_length is of type int;</li>
7490 <li>it is assumed to be sort-of returning from_next - from of type ptrdiff_t;</li>
7491 <li>ptrdiff_t cannot be cast to an int without data loss.</li>
7492 </ol>
7493 <p>
7494 Contradiction.
7495 </p>
7496
7497
7498 <p><b>Proposed resolution:</b></p>
7499 <p>
7500 </p>
7501
7502
7503
7504
7505
7506 <hr>
7507 <h3><a name="501"></a>501. Proposal: strengthen guarantees of lib.comparisons</h3>
7508 <p><b>Section:</b> 20.6.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
7509  <b>Submitter:</b> Me &lt;anti_spam_email2003@yahoo.com&gt; <b>Date:</b> 2005-06-07</p>
7510 <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>
7511 <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>
7512 <p><b>Discussion:</b></p>
7513 <blockquote><p>
7514 "For templates greater, less, greater_equal, and less_equal,
7515 the specializations for any pointer type yield a total order, even if
7516 the built-in operators &lt;, &gt;, &lt;=, &gt;= do not."
7517 </p></blockquote>
7518
7519 <p>
7520 The standard should do much better than guarantee that these provide a
7521 total order, it should guarantee that it can be used to test if memory
7522 overlaps, i.e. write a portable memmove. You can imagine a platform
7523 where the built-in operators use a uint32_t comparison (this tests for
7524 overlap on this platform) but the less&lt;T*&gt; functor is allowed to be
7525 defined to use a int32_t comparison. On this platform, if you use
7526 std::less with the intent of making a portable memmove, comparison on
7527 an array that straddles the 0x7FFFFFFF/0x8000000 boundary can give
7528 incorrect results.
7529 </p>
7530
7531
7532 <p><b>Proposed resolution:</b></p>
7533 <p>
7534 Add a footnote to 20.5.3/8 saying:
7535 </p>
7536
7537 <blockquote><p>
7538 Given a p1 and p2 such that p1 points to N objects of type T and p2
7539 points to M objects of type T. If [p1,p1+N) does not overlap [p2,p2+M),
7540 less returns the same value when comparing all pointers in [p1,p1+N) to
7541 all pointers in [p2,p2+M). Otherwise, there is a value Q and a value R
7542 such that less returns the same value when comparing all pointers in
7543 [p1,p1+Q) to all pointers in [p2,p2+R) and an opposite value when
7544 comparing all pointers in [p1+Q,p1+N) to all pointers in [p2+R,p2+M).
7545 For the sake of completeness, the null pointer value (4.10) for T is
7546 considered to be an array of 1 object that doesn't overlap with any
7547 non-null pointer to T. less_equal, greater, greater_equal, equal_to,
7548 and not_equal_to give the expected results based on the total ordering
7549 semantics of less. For T of void, treat it as having similar semantics
7550 as T of char i.e. less&lt;cv T*&gt;(a, b) gives the same results as less&lt;cv
7551 void*&gt;(a, b) which gives the same results as less&lt;cv char*&gt;((cv
7552 char*)(cv void*)a, (cv char*)(cv void*)b).
7553 </p></blockquote>
7554
7555 <p>
7556 I'm also thinking there should be a footnote to 20.5.3/1 saying that if
7557 A and B are similar types (4.4/4), comp&lt;A&gt;(a,b) returns the same value
7558 as comp&lt;B&gt;(a,b) (where comp is less, less_equal, etc.). But this might
7559 be problematic if there is some really funky operator overloading going
7560 on that does different things based on cv (that should be undefined
7561 behavior if somebody does that though). This at least should be
7562 guaranteed for all POD types (especially pointers) that use the
7563 built-in comparison operators.
7564 </p>
7565
7566
7567
7568 <p><b>Rationale:</b></p>
7569 <p>
7570 less is already required to provide a strict weak ordering which is good enough
7571 to detect overlapping memory situations.
7572 </p>
7573
7574
7575
7576
7577
7578 <hr>
7579 <h3><a name="504"></a>504. Integer types in pseudo-random number engine requirements</h3>
7580 <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>
7581  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7582 <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>
7583 <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>
7584 <p><b>Discussion:</b></p>
7585 <p>
7586 In [tr.rand.req], Paragraph 2 states that "... s is a value of integral type,
7587 g is an ... object returning values of unsigned integral type ..."
7588 </p>
7589
7590
7591 <p><b>Proposed resolution:</b></p>
7592 <p>
7593 In 5.1.1 [tr.rand.req], Paragraph 2 replace
7594 </p>
7595
7596 <blockquote><p>
7597 ... s is a value of integral type, g is an lvalue of a type other than X that
7598 defines a zero-argument function object returning values of <del>unsigned integral</del> type
7599 <ins><tt>unsigned long int</tt></ins>,
7600 ...
7601 </p></blockquote>
7602
7603 <p>
7604 In 5.1.1 [tr.rand.seq], Table 16, replace in the line for X(s)
7605 </p>
7606
7607 <blockquote><p>
7608 creates an engine with the initial internal state
7609 determined by <ins><tt>static_cast&lt;unsigned long&gt;(</tt></ins><tt><i>s</i></tt><ins><tt>)</tt></ins>
7610 </p></blockquote>
7611
7612 <p><i>[
7613 Mont Tremblant:  Both s and g should be unsigned long.
7614 This should refer to the constructor signatures. Jens  provided wording post Mont Tremblant.
7615 ]</i></p>
7616
7617
7618 <p><i>[
7619 Berlin:  N1932 adopts the proposed resolution:  see 26.3.1.3/1e and Table 3 row 2. Moved
7620 to Ready.
7621 ]</i></p>
7622
7623
7624
7625
7626 <p><b>Rationale:</b></p>
7627 <p>
7628 Jens:  Just requiring X(unsigned long) still makes it possible
7629 for an evil library writer to also supply a X(int) that does something
7630 unexpected.  The wording above requires that X(s) always performs
7631 as if X(unsigned long) would have been called.  I believe that is
7632 sufficient and implements our intentions from Mont Tremblant.  I
7633 see no additional use in actually requiring a X(unsigned long)
7634 signature.  u.seed(s) is covered by its reference to X(s), same
7635 arguments.
7636 </p>
7637
7638
7639 <p><i>[
7640 Portland:  Subsumed by N2111.
7641 ]</i></p>
7642
7643
7644
7645
7646
7647 <hr>
7648 <h3><a name="506"></a>506. Requirements of Distribution parameter for variate_generator</h3>
7649 <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>
7650  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7651 <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>
7652 <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>
7653 <p><b>Discussion:</b></p>
7654 <p>
7655 Paragraph 3 requires that template argument U (which corresponds to template
7656 parameter Engine) satisfy all uniform random number generator requirements.
7657 However, there is no  analogous requirement regarding the template argument
7658 that corresponds to template parameter Distribution.  We believe there should
7659 be, and that it should require that this template argument satisfy all random
7660 distribution requirements.
7661 </p>
7662
7663
7664 <p><b>Proposed resolution:</b></p>
7665 <p>
7666 Consequence 1: Remove the precondition clauses [tr.rand.var]/16 and /18.
7667 </p>
7668 <p>
7669 Consequence 2: Add max() and min() functions to those distributions that
7670 do not already have them.
7671 </p>
7672
7673 <p><i>[
7674 Mont Tremblant: Jens reccommends NAD, min/max not needed everywhere.
7675 Marc supports having min and max to satisfy generic programming interface.
7676 ]</i></p>
7677
7678
7679
7680
7681 <p><b>Rationale:</b></p>
7682 <p>Berlin:  N1932 makes this moot: variate_generator has been eliminated.</p>
7683
7684
7685
7686
7687
7688 <hr>
7689 <h3><a name="509"></a>509. Uniform_int template parameters</h3>
7690 <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>
7691  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7692 <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>
7693 <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>
7694 <p><b>Discussion:</b></p>
7695 <p>
7696 In [tr.rand.dist.iunif] the uniform_int distribution currently has a single
7697 template parameter, IntType, used as the input_type and as the result_type
7698 of the distribution.  We believe there is no reason to conflate these types
7699 in this way.
7700 </p>
7701
7702
7703 <p><b>Proposed resolution:</b></p>
7704 <p>
7705 We recommend that there be a second template  parameter to
7706 reflect the distribution's input_type, and that the existing first template
7707 parameter continue to reflect (solely) the result_type:
7708 </p>
7709 <blockquote><pre>template&lt; class IntType = int, UIntType = unsigned int &gt;
7710 class uniform_int
7711 {
7712 public:
7713   // types
7714   typedef  UIntType  input_type;
7715   typedef  IntType   result_type;
7716 </pre></blockquote>
7717
7718 <p><i>[
7719 Berlin: Moved to NAD.  N1932 makes this moot: the input_type template parameter has been
7720 eliminated.
7721 ]</i></p>
7722
7723
7724
7725
7726
7727
7728
7729 <hr>
7730 <h3><a name="510"></a>510. Input_type for bernoulli_distribution</h3>
7731 <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>
7732  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7733 <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>
7734 <p><b>Discussion:</b></p>
7735 <p>
7736 In [tr.rand.dist.bern] the distribution currently requires;
7737 </p>
7738 <blockquote><pre>typedef  int  input_type;
7739 </pre></blockquote>
7740
7741
7742 <p><b>Proposed resolution:</b></p>
7743 <p>
7744 We believe this is an unfortunate choice, and recommend instead:
7745 </p>
7746 <blockquote><pre>typedef  unsigned int  input_type;
7747 </pre></blockquote>
7748
7749 <p><i>[
7750 Berlin:  Moved to NAD. N1932 makes this moot: the input_type template parameter has been
7751 eliminated.
7752 ]</i></p>
7753
7754
7755
7756
7757
7758
7759
7760 <hr>
7761 <h3><a name="511"></a>511. Input_type for binomial_distribution</h3>
7762 <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>
7763  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7764 <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>
7765 <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>
7766 <p><b>Discussion:</b></p>
7767 <p>
7768 Unlike all other distributions in TR1, this binomial_distribution has an
7769 implementation-defined  input_type.  We believe this is an unfortunate choice,
7770 because it hinders users from writing portable code.  It also hinders the
7771 writing of compliance tests.  We recommend instead:
7772 </p>
7773 <blockquote><pre>typedef  RealType  input_type;
7774 </pre></blockquote>
7775 <p>
7776 While this choice is somewhat arbitrary (as it was for some of the other
7777 distributions), we make  this particular choice because (unlike all other
7778 distributions) otherwise this template would not publish its RealType
7779 argument and so users could not write generic code that accessed this
7780 second template parameter.  In this respect, the choice is consistent with
7781 the other distributions in  TR1. 
7782 </p>
7783 <p>
7784 We have two reasons for recommending that a real type be specified instead.
7785 One reason is  based specifically on characteristics of binomial distribution
7786 implementations, while the other is based on mathematical characteristics of
7787 probability distribution functions in general.
7788 </p>
7789 <p>
7790 Implementations of binomial distributions commonly use Stirling approximations
7791 for values in certain ranges.  It is far more natural to use real values to
7792 represent these approximations than it would be to use integral values to do
7793 so.  In other ranges, implementations reply on the Bernoulli  distribution to
7794 obtain values.  While TR1's bernoulli_distribution::input_type is specified as
7795 int, we believe this would be better specified as double.
7796 </p>
7797 <p>
7798 This brings us to our main point:  The notion of a random distribution rests
7799 on the notion of a cumulative distribution function, which in turn mathematically
7800 depends on a continuous dependent variable.  Indeed, such a distribution function
7801 would be meaningless if it depended on  discrete values such as integers - and this
7802 remains true even if the distribution function were to take discrete steps.
7803 </p>
7804 <p>
7805 Although this note is specifically about binomial_distribution::input_type,
7806 we intend to recommend that all of the random distributions input_types be
7807 specified as a real type (either a RealType template parameter, or double,
7808 as appropriate).
7809 </p>
7810 <p>
7811 Of the nine distributions in TR1, four already have this characteristic
7812 (uniform_real, exponential_distribution, normal_distribution, and
7813 gamma_distribution).  We have already argued the case for the binomial the
7814 remaining four distributions.
7815 </p>
7816 <p>
7817 In the case of uniform_int, we believe that the calculations to produce an
7818 integer result in a  specified range from an integer in a different specified
7819 range is best done using real arithmetic.  This is because it involves a
7820 product, one of whose terms is the ratio of the extents of the two ranges.
7821 Without real arithmetic, the results become less uniform: some numbers become
7822 more  (or less) probable that they should be.  This is, of course, undesireable
7823 behavior in a uniform distribution.
7824 </p>
7825 <p>
7826 Finally, we believe that in the case of the bernoulli_distribution (briefly
7827 mentioned earlier), as well as the cases of the geometric_distribution and the
7828 poisson_distribution, it would be far more natural to have a real input_type.
7829 This is because the most natural computation involves the  random number
7830 delivered and the distribution's parameter p (in the case of bernoulli_distribution,
7831 for example, the computation is a comparison against p), and p is already specified
7832 in each case as having some real type.
7833 </p>
7834
7835
7836 <p><b>Proposed resolution:</b></p>
7837 <blockquote><pre>typedef  RealType  input_type;
7838 </pre></blockquote>
7839
7840 <p><i>[
7841 Berlin:  Moved to NAD.  N1932 makes this moot: the input_type template parameter has been
7842 eliminated.
7843 ]</i></p>
7844
7845
7846
7847
7848
7849
7850 <hr>
7851 <h3><a name="512"></a>512. Seeding subtract_with_carry_01 from a single unsigned long</h3>
7852 <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>
7853  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7854 <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>
7855 <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>
7856 <p><b>Discussion:</b></p>
7857 <p>
7858 Paragraph 8 specifies the algorithm by which a subtract_with_carry_01  engine
7859 is to be seeded given a single unsigned long.  This algorithm is seriously
7860 flawed in the case where the engine parameter w (also known as word_size)
7861 exceeds 31 [bits].  The key part of the paragraph reads:
7862 </p>
7863 <blockquote><p>
7864 sets x(-r) ... x(-1) to (lcg(1)*2**(-w)) mod 1
7865 </p></blockquote>
7866 <p>
7867 and so forth. 
7868 </p>
7869 <p>
7870 Since the specified linear congruential engine, lcg, delivers numbers with
7871 a maximum of 2147483563 (just a shade under 31 bits), then when w is, for
7872 example, 48, each of the x(i) will be less than 2**-17.  The consequence
7873 is that roughly the first 400 numbers delivered will be  conspicuously
7874 close to either zero or one.
7875 </p>
7876 <p>
7877 Unfortunately, this is not an innocuous flaw:  One of the predefined engines
7878 in [tr.rand.predef],  namely ranlux64_base_01, has w = 48 and would exhibit
7879 this poor behavior, while the original N1378 proposal states that these
7880 pre-defined engines are intended to be of "known good properties."
7881 </p>
7882
7883
7884 <p><b>Proposed resolution:</b></p>
7885 <p>
7886 In 5.1.4.4 [tr.rand.eng.sub1], replace the "effects" clause for
7887 void seed(unsigned long value = 19780503) by
7888 </p>
7889
7890 <blockquote><p>
7891 <i>Effects:</i> If <tt>value == 0</tt>, sets value to <tt>19780503</tt>. In any
7892 case, <del>with a linear congruential generator <tt>lcg</tt>(i) having parameters
7893 <tt><i>m<sub>lcg</sub></i> = 2147483563</tt>, <tt><i>a<sub>lcg</sub></i> = 40014</tt>,
7894 <tt><i>c<sub>lcg</sub></i> = 0</tt>, and <tt><i>lcg</i>(0) = value</tt>,</del>
7895 sets <ins>carry<tt>(-1)</tt> and</ins> <tt>x(-r) &#8230; x(-1)</tt>
7896 <ins>as if executing</ins></p>
7897
7898 <blockquote><pre><ins>
7899 linear_congruential&lt;unsigned long, 40014, 0, 2147483563&gt; lcg(value);
7900 seed(lcg);
7901 </ins></pre></blockquote>
7902
7903 <p>
7904 <del>to <tt>(<i>lcg</i>(1) · 2<sup>-<i>w</i></sup>) mod 1
7905 &#8230; (<i>lcg</i>(<i>r</i>) · 2<sup>-<i>w</i></sup>) mod 1</tt>,
7906 respectively. If <tt><i>x</i>(-1) == 0</tt>, sets carry<tt>(-1) = 2<sup>-<i>w</i></sup></tt>,
7907 else sets carry<tt>(-1) = 0</tt>.</del></p>
7908 </blockquote>
7909
7910 <p><i>[
7911 Jens provided revised wording post Mont Tremblant.
7912 ]</i></p>
7913
7914
7915 <p><i>[
7916 Berlin: N1932 adopts the originally-proposed resolution of the issue.
7917 Jens's supplied wording is a clearer description of what is
7918 intended.  Moved to Ready.
7919 ]</i></p>
7920
7921
7922
7923
7924 <p><b>Rationale:</b></p>
7925 <p>
7926 Jens: I'm using an explicit type here, because fixing the
7927 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
7928 stricter) requirements we have for seed(Gen&amp;).
7929 </p>
7930
7931 <p><i>[
7932 Portland:  Subsumed by N2111.
7933 ]</i></p>
7934
7935
7936
7937
7938
7939
7940 <hr>
7941 <h3><a name="513"></a>513. Size of state for subtract_with_carry_01</h3>
7942 <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>
7943  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7944 <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>
7945 <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>
7946 <p><b>Discussion:</b></p>
7947 <p>
7948 Paragraph 3 begins:
7949 </p>
7950 <blockquote><p>
7951 The size of the state is r.
7952 </p></blockquote>
7953 <p>
7954 However, this is not quite consistent with the remainder of the paragraph
7955 which specifies a total  of nr+1 items in the textual representation of
7956 the state.  We recommend the sentence be corrected to match:
7957 </p>
7958 <blockquote><p>
7959 The size of the state is nr+1.
7960 </p></blockquote>
7961 <p>
7962 To give meaning to the coefficient n, it may be also desirable to move
7963 n's definition from later in the paragraph.  Either of the following
7964 seem reasonable formulations:
7965 </p>
7966 <blockquote><p>
7967 With n=..., the size of the state is nr+1.
7968 </p></blockquote>
7969 <blockquote><p>
7970 The size of the state is nr+1, where n=... .
7971 </p></blockquote>
7972
7973
7974
7975 <p><b>Proposed resolution:</b></p>
7976 <p><i>[
7977 Jens:  I plead for "NAD" on the grounds that "size of state" is only
7978 used as an argument for big-O complexity notation, thus
7979 constant factors and additions don't count.
7980 ]</i></p>
7981
7982
7983 <p><i>[
7984 Berlin: N1932 adopts the proposed NAD.
7985 ]</i></p>
7986
7987
7988
7989
7990
7991
7992
7993 <hr>
7994 <h3><a name="514"></a>514. Size of state for subtract_with_carry</h3>
7995 <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>
7996  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
7997 <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>
7998 <p><b>Discussion:</b></p>
7999 <p>
8000 Paragraph 2 begins:
8001 </p>
8002 <blockquote><p>
8003 The size of the state is r.
8004 </p></blockquote>
8005 <p>
8006 However, the next sentence specifies a total of r+1 items in the textual
8007 representation of the state,  r specific x's as well as a specific carry.
8008 This makes a total of r+1 items that constitute the size of the state,
8009 rather than r.
8010 </p>
8011
8012
8013 <p><b>Proposed resolution:</b></p>
8014 <p>
8015 We recommend the sentence be corrected to match:
8016 </p>
8017 <blockquote><p>
8018  The size of the state is r+1.
8019 </p></blockquote>
8020
8021 <p><i>[
8022 Jens:  I plead for "NAD" on the grounds that "size of state" is only
8023 used as an argument for big-O complexity notation, thus
8024 constant factors and additions don't count.
8025 ]</i></p>
8026
8027
8028 <p><i>[
8029 Berlin: N1932 adopts the proposed NAD.
8030 ]</i></p>
8031
8032
8033
8034
8035
8036
8037
8038 <hr>
8039 <h3><a name="515"></a>515. Random number engine traits</h3>
8040 <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>
8041  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
8042 <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>
8043 <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>
8044 <p><b>Discussion:</b></p>
8045 <p>
8046 To accompany the concept of a pseudo-random number engine as defined in Table 17,
8047 we propose and recommend an adjunct template, engine_traits, to be declared in
8048 [tr.rand.synopsis] as:
8049 </p>
8050 <blockquote><pre>template&lt; class PSRE &gt;
8051 class engine_traits;
8052 </pre></blockquote>
8053 <p>
8054 This template's primary purpose would be as an aid to generic programming involving
8055 pseudo-random number engines.  Given only the facilities described in tr1, it would
8056 be very difficult to produce any algorithms involving the notion of a generic engine.
8057 The intent of this proposal is to  provide, via engine_traits&lt;&gt;, sufficient
8058 descriptive information to allow an algorithm to employ a pseudo-random number engine
8059 without regard to its exact type, i.e., as a template parameter.
8060 </p>
8061 <p>
8062 For example, today it is not possible to write an efficient generic function that
8063 requires any specific number of random bits.  More specifically, consider a
8064 cryptographic application that internally needs 256 bits of randomness per call:
8065 </p>
8066 <blockquote><pre>template&lt; class Eng, class InIter, class OutIter &gt;
8067 void crypto( Eng&amp; e, InIter in, OutIter out );
8068 </pre></blockquote>
8069 <p>
8070 Without knowning the number of bits of randomness produced per call to a provided
8071 engine, the algorithm has no means of determining how many times to call the engine.
8072 </p>
8073 <p>
8074 In a new section [tr.rand.eng.traits], we proposed to define the engine_traits
8075 template as: 
8076 </p>
8077 <blockquote><pre>template&lt; class PSRE &gt;
8078 class engine_traits
8079 {
8080   static  std::size_t  bits_of_randomness = 0u;
8081   static  std::string  name()  { return "unknown_engine"; }
8082   // TODO: other traits here
8083 };
8084 </pre></blockquote>
8085 <p>
8086 Further, each engine described in [tr.rand.engine] would be accompanied by a
8087 complete specialization of this new engine_traits template.
8088 </p>
8089
8090
8091
8092 <p><b>Proposed resolution:</b></p>
8093 <p><i>[
8094 Berlin:  Walter: While useful for implementation per TR1, N1932 has no need for this
8095 feature.  Recommend close as NAD.
8096 ]</i></p>
8097
8098
8099
8100 <p><b>Rationale:</b></p>
8101 <p>
8102 Recommend NAD,
8103 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1932.pdf">N1932</a>,
8104 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>
8105 covers this.  Already in WP.
8106 </p>
8107
8108
8109
8110
8111
8112 <hr>
8113 <h3><a name="516"></a>516. Seeding subtract_with_carry_01 using a generator</h3>
8114 <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>
8115  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
8116 <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>
8117 <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>
8118 <p><b>Discussion:</b></p>
8119 <p>
8120 Paragraph 6 says:
8121 </p>
8122 <blockquote><p>
8123 ... obtained by successive invocations of g, ... 
8124 </p></blockquote>
8125 <p>
8126 We recommend instead:
8127 </p>
8128 <blockquote><p>
8129 ... obtained by taking successive invocations of g mod 2**32, ...
8130 </p></blockquote>
8131 <p>
8132 as the context seems to require only 32-bit quantities be used here.
8133 </p>
8134
8135
8136 <p><b>Proposed resolution:</b></p>
8137 <p>
8138 Berlin: N1932 adopts the proposed resultion: see 26.3.3.4/7.  Moved to Ready.
8139 </p>
8140
8141 <p><i>[
8142 Portland:  Subsumed by N2111.
8143 ]</i></p>
8144
8145
8146
8147
8148
8149
8150 <hr>
8151 <h3><a name="517"></a>517. Should include name in external representation</h3>
8152 <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>
8153  <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p>
8154 <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>
8155 <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>
8156 <p><b>Discussion:</b></p>
8157 <p>
8158 The last two rows of Table 16 deal with the i/o requirements of an engine,
8159 specifying that the textual representation of an engine's state,
8160 appropriately formatted, constitute the engine's  external representation.
8161 </p>
8162 <p>
8163 This seems adequate when an engine's type is known.  However, it seems
8164 inadequate in the  context of generic code, where it becomes useful and
8165 perhaps even necessary to determine an engine's type via input.
8166 </p>
8167 <p>
8168 </p>
8169
8170
8171 <p><b>Proposed resolution:</b></p>
8172 <p>
8173 We therefore recommend that, in each of these two rows of Table 16, the
8174 text "textual representation" be expanded so as to read "engine name
8175 followed by the textual representation."
8176 </p>
8177
8178 <p><i>[
8179 Berlin: N1932 considers this NAD. This is a QOI issue.
8180 ]</i></p>
8181
8182
8183
8184
8185
8186
8187
8188 <hr>
8189 <h3><a name="525"></a>525. type traits definitions not clear</h3>
8190 <p><b>Section:</b> 20.5.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>
8191  <b>Submitter:</b> Robert Klarer <b>Date:</b> 2005-07-11</p>
8192 <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>
8193 <p><b>Discussion:</b></p>
8194 <p>
8195 It is not completely clear how the primary type traits deal with
8196 cv-qualified types.  And several of the secondary type traits
8197 seem to be lacking a definition.
8198 </p>
8199
8200 <p><i>[
8201 Berlin:  Howard to provide wording.
8202 ]</i></p>
8203
8204
8205
8206 <p><b>Proposed resolution:</b></p>
8207 <p>
8208 Wording provided in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2028.html">N2028</a>.
8209 A
8210 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a>
8211 provides more detail for motivation.
8212 </p>
8213
8214
8215 <p><b>Rationale:</b></p>
8216 Solved by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a>
8217 in the WP.
8218
8219
8220
8221
8222
8223 <hr>
8224 <h3><a name="526"></a>526. Is it undefined if a function in the standard changes in parameters?</h3>
8225 <p><b>Section:</b> 23.1.3 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
8226  <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2005-09-14</p>
8227 <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>
8228 <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>
8229 <p><b>Discussion:</b></p>
8230 <p>
8231 Problem: There are a number of places in the C++ standard library where
8232 it is possible to write what appear to be sensible ways of calling
8233 functions, but which can cause problems in some (or all)
8234 implementations, as they cause the values given to the function to be
8235 changed in a way not specified in standard (and therefore not coded to
8236 correctly work). These fall into two similar categories.
8237 </p>
8238
8239 <p>
8240 1) Parameters taken by const reference can be changed during execution
8241 of the function
8242 </p>
8243
8244 <p>
8245 Examples:
8246 </p>
8247
8248 <p>
8249 Given std::vector&lt;int&gt; v:
8250 </p>
8251 <p>
8252 v.insert(v.begin(), v[2]);
8253 </p>
8254 <p>
8255 v[2] can be changed by moving elements of vector
8256 </p>
8257
8258
8259 <p>
8260 Given std::list&lt;int&gt; l:
8261 </p>
8262 <p>
8263 l.remove(*l.begin());
8264 </p>
8265 <p>
8266 Will delete the first element, and then continue trying to access it.
8267 This is particularily vicious, as it will appear to work in almost all
8268 cases.
8269 </p>
8270
8271 <p>
8272 2) A range is given which changes during the execution of the function:
8273 Similarly,
8274 </p>
8275
8276 <p>
8277 v.insert(v.begin(), v.begin()+4, v.begin()+6);
8278 </p>
8279
8280 <p>
8281 This kind of problem has been partly covered in some cases. For example
8282 std::copy(first, last, result) states that result cannot be in the range
8283 [first, last). However, does this cover the case where result is a
8284 reverse_iterator built from some iterator in the range [first, last)?
8285 Also, std::copy would still break if result was reverse_iterator(last +
8286 1), yet this is not forbidden by the standard
8287 </p>
8288
8289 <p>
8290 Solution:
8291 </p>
8292
8293 <p>
8294 One option would be to try to more carefully limit the requirements of
8295 each function. There are many functions which would have to be checked.
8296 However as has been shown in the std::copy case, this may be difficult.
8297 A simpler, more global option would be to somewhere insert text similar to:
8298 </p>
8299
8300 <p>
8301 If the execution of any function would change either any values passed
8302 by reference or any value in any range passed to a function in a way not
8303 defined in the definition of that function, the result is undefined.
8304 </p>
8305
8306 <p>
8307 Such code would have to at least cover chapters 23 and 25 (the sections
8308 I read through carefully). I can see no harm on applying it to much of
8309 the rest of the standard.
8310 </p>
8311
8312 <p>
8313 Some existing parts of the standard could be improved to fit with this,
8314 for example the requires for 25.2.1 (Copy) could be adjusted to:
8315 </p>
8316
8317 <p>
8318 Requires: For each non-negative integer n &lt; (last - first), assigning to
8319 *(result + n) must not alter any value in the range [first + n, last).
8320 </p>
8321
8322 <p>
8323 However, this may add excessive complication.
8324 </p>
8325
8326 <p>
8327 One other benefit of clearly introducing this text is that it would
8328 allow a number of small optimisations, such as caching values passed
8329 by const reference.
8330 </p>
8331
8332 <p>
8333 Matt Austern adds that this issue also exists for the <tt>insert</tt> and
8334 <tt>erase</tt> members of the ordered and unordered associative containers.
8335 </p>
8336
8337 <p><i>[
8338 Berlin: Lots of controversey over how this should be solved. Lots of confusion
8339 as to whether we're talking about self referencing iterators or references.
8340 Needs a good survey as to the cases where this matters, for which
8341 implementations, and how expensive it is to fix each case.
8342 ]</i></p>
8343
8344
8345
8346
8347 <p><b>Proposed resolution:</b></p>
8348
8349
8350 <p><b>Rationale:</b></p>
8351 <p>
8352 Recommend NAD.
8353 </p>
8354 <ul>
8355 <li><tt>vector::insert(iter, value)</tt> is required to work because the standard
8356 doesn't give permission for it not to work.</li>
8357 <li><tt>list::remove(value)</tt> is required to work because the standard
8358 doesn't give permission for it not to work.</li>
8359 <li><tt>vector::insert(iter, iter, iter)</tt> is not required to work because
8360 23.1.3 [sequence.reqmts], p4 says so.</li>
8361 <li><tt>copy</tt> has to work, except where 25.2.1 [alg.copy] says
8362 it doesn't have to work.  While a language lawyer can tear this wording apart,
8363 it is felt that the wording is not prone to accidental interpretation.</li>
8364 <li>The current working draft provide exceptions for the unordered associative
8365 containers similar to the containers requirements which exempt the member
8366 template insert functions from self referencing.</li>
8367 </ul>
8368
8369
8370
8371
8372
8373 <hr>
8374 <h3><a name="528"></a>528. <tt>const_iterator</tt> <tt>iterator</tt> issue when they are the same type</h3>
8375 <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>
8376  <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2005-10-12</p>
8377 <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>
8378 <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>
8379 <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>
8380 <p><b>Discussion:</b></p>
8381 <p>
8382 while implementing the resolution of issue 6.19 I'm noticing the
8383 following: according to 6.3.4.3/2 (and 6.3.4.5/2), for unordered_set and
8384 unordered_multiset:
8385 </p>
8386
8387 <blockquote><p>
8388     "The iterator and const_iterator types are both const types. It is
8389 unspecified whether they are the same type"
8390 </p></blockquote>
8391
8392 <p>
8393 Now, according to the resolution of 6.19, we have overloads of insert
8394 with hint and erase (single and range) both for iterator and
8395 const_iterator, which, AFAICS, can be meaningful at the same time *only*
8396 if iterator and const_iterator *are* in fact different types.
8397 </p>
8398 <p>
8399 Then, iterator and const_iterator are *required* to be different types?
8400 Or that is an unintended consequence? Maybe the overloads for plain
8401 iterators should be added only to unordered_map and unordered_multimap?
8402 Or, of course, I'm missing something?
8403 </p>
8404
8405
8406
8407 <p><b>Proposed resolution:</b></p>
8408 <p>
8409 Add to 6.3.4.3p2 (and 6.3.4.5p2):
8410 </p>
8411 <p>
8412 2  ... The iterator and const_iterator types are both <del>const</del>
8413 <ins>constant</ins> iterator types.
8414 It is unspecified whether they are the same type. 
8415 </p>
8416
8417 <p>
8418 Add a new subsection to 17.4.4 [lib.conforming]:
8419 </p>
8420
8421 <blockquote>
8422 <p>
8423 An implementation shall not supply an overloaded function
8424        signature specified in any library clause if such a signature
8425        would be inherently ambiguous during overload resolution
8426        due to two library types referring to the same type.
8427 </p>
8428 <p>
8429        [Note: For example, this occurs when a container's iterator
8430        and const_iterator types are the same. -- end note]
8431 </p>
8432 </blockquote>
8433
8434 <p><i>[
8435 Post-Berlin: Beman supplied wording.
8436 ]</i></p>
8437
8438
8439
8440
8441 <p><b>Rationale:</b></p>
8442 Toronto:  The first issue has been fixed by N2350 (the insert and erase members
8443 are collapsed into one signature).  Alisdair to open a separate issue on the
8444 chapter 17 wording.
8445
8446
8447
8448
8449
8450 <hr>
8451 <h3><a name="529"></a>529. The standard encourages redundant and confusing preconditions</h3>
8452 <p><b>Section:</b> 17.4.3.10 [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>
8453  <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-10-25</p>
8454 <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>
8455 <p><b>Discussion:</b></p>
8456 <p>
8457 17.4.3.8/1 says:
8458 </p>
8459
8460 <blockquote><p>
8461 Violation of the preconditions specified in a function's 
8462 Required behavior: paragraph results in undefined behavior unless the 
8463 function's Throws: paragraph specifies throwing an exception when the 
8464 precondition is violated.
8465 </p></blockquote>
8466
8467 <p>
8468 This implies that a precondition violation can lead to defined
8469 behavior.  That conflicts with the only reasonable definition of
8470 precondition: that a violation leads to undefined behavior.  Any other
8471 definition muddies the waters when it comes to analyzing program
8472 correctness, because precondition violations may be routinely done in
8473 correct code (e.g. you can use std::vector::at with the full
8474 expectation that you'll get an exception when your index is out of
8475 range, catch the exception, and continue).  Not only is it a bad
8476 example to set, but it encourages needless complication and redundancy
8477 in the standard.  For example:
8478 </p>
8479
8480 <blockquote><pre>  21 Strings library 
8481   21.3.3 basic_string capacity
8482
8483   void resize(size_type n, charT c);
8484
8485   5 Requires: n &lt;= max_size()
8486   6 Throws: length_error if n &gt; max_size().
8487   7 Effects: Alters the length of the string designated by *this as follows:
8488 </pre></blockquote>
8489
8490 <p>
8491 The Requires clause is entirely redundant and can be dropped.  We
8492 could make that simplifying change (and many others like it) even
8493 without changing 17.4.3.8/1; the wording there just seems to encourage
8494 the redundant and error-prone Requires: clause.
8495 </p>
8496
8497 <p><i>[
8498 Batavia:  Alan and Pete to work.
8499 ]</i></p>
8500
8501
8502 <p><i>[
8503 Bellevue:  NAD Editorial, this group likes 
8504 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2121.html">N2121</a>,
8505 Pete agrees, accepting it is Pete's business.
8506 General agreement that precondition violations are synonymous with UB.
8507 ]</i></p>
8508
8509
8510
8511 <p><b>Proposed resolution:</b></p>
8512 <p>
8513 1. Change 17.4.3.8/1 to read:
8514 </p>
8515
8516 <blockquote><p>
8517 Violation of the preconditions specified in a function's
8518 <i>Required behavior:</i> paragraph results in undefined behavior
8519 <del>unless the function's <i>Throws:</i> paragraph specifies throwing
8520 an exception when the precondition is violated</del>.
8521 </p></blockquote>
8522
8523 <p>
8524 2. Go through and remove redundant Requires: clauses.  Specifics to be
8525    provided by Dave A.
8526 </p>
8527
8528 <p><i>[
8529 Berlin: The LWG requests a detailed survey of part 2 of the proposed resolution.
8530 ]</i></p>
8531
8532
8533 <p><i>[
8534 Alan provided the survey
8535 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2121.html">N2121</a>.
8536 ]</i></p>
8537
8538
8539
8540
8541
8542
8543
8544 <hr>
8545 <h3><a name="532"></a>532. Tuple comparison</h3>
8546 <p><b>Section:</b> 20.4.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>
8547  <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-11-29</p>
8548 <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>
8549 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a></p>
8550 <p><b>Discussion:</b></p>
8551 <p>
8552 Where possible, tuple comparison operators &lt;,&lt;=,=&gt;, and &gt; ought to be
8553 defined in terms of std::less rather than operator&lt;, in order to
8554 support comparison of tuples of pointers.  
8555 </p>
8556
8557
8558 <p><b>Proposed resolution:</b></p>
8559 <p>
8560 change 6.1.3.5/5 from:
8561 </p>
8562
8563 <blockquote><p>
8564   Returns: The result of a lexicographical comparison between t and
8565   u. The result is defined as: (bool)(get&lt;0&gt;(t) &lt; get&lt;0&gt;(u)) ||
8566   (!(bool)(get&lt;0&gt;(u) &lt; get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for
8567   some tuple r is a tuple containing all but the first element of
8568   r. For any two zero-length tuples e and f, e &lt; f returns false.
8569 </p></blockquote>
8570
8571 <p>
8572 to:
8573 </p>
8574
8575 <blockquote>
8576 <p>
8577   Returns: The result of a lexicographical comparison between t and
8578   u. For any two zero-length tuples e and f, e &lt; f returns false.
8579   Otherwise, the result is defined as: cmp( get&lt;0&gt;(t), get&lt;0&gt;(u)) ||
8580   (!cmp(get&lt;0&gt;(u), get&lt;0&gt;(t)) &amp;&amp; ttail &lt; utail), where rtail for some
8581   tuple r is a tuple containing all but the first element of r, and
8582   cmp(x,y) is an unspecified function template defined as follows.
8583 </p>
8584 <p>
8585   Where T is the type of x and U is the type of y:
8586 </p>
8587
8588 <p>
8589      if T and U are pointer types and T is convertible to U, returns
8590      less&lt;U&gt;()(x,y)
8591 </p>
8592
8593 <p>
8594      otherwise, if T and U are pointer types, returns less&lt;T&gt;()(x,y)
8595 </p>
8596
8597 <p>
8598      otherwise, returns (bool)(x &lt; y)
8599 </p>
8600 </blockquote>
8601
8602 <p><i>[
8603 Berlin: This issue is much bigger than just tuple (pair, containers,
8604 algorithms). Dietmar will survey and work up proposed wording.
8605 ]</i></p>
8606
8607
8608
8609
8610 <p><b>Rationale:</b></p>
8611 <p>
8612 Recommend NAD.  This will be fixed with the next revision of concepts.
8613 </p>
8614
8615
8616
8617
8618
8619 <hr>
8620 <h3><a name="536"></a>536. Container iterator constructor and explicit convertibility</h3>
8621 <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>
8622  <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2005-12-17</p>
8623 <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>
8624 <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>
8625 <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>
8626 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a></p>
8627 <p><b>Discussion:</b></p>
8628 <p>
8629 The iterator constructor X(i,j) for containers as defined in 23.1.1 and
8630 23.2.2 does only require that i and j be input iterators but
8631 nothing is said about their associated value_type. There are three
8632 sensible
8633 options:
8634 </p>
8635 <ol>
8636 <li>iterator's value_type is exactly X::value_type (modulo cv).</li>
8637 <li>iterator's value_type is *implicitly* convertible to X::value_type.</li>
8638 <li>iterator's value_type is *explicitly* convertible to X::value_type.</li>
8639 </ol>
8640 <p>
8641 The issue has practical implications, and stdlib vendors have
8642 taken divergent approaches to it: Dinkumware follows 2,
8643 libstdc++ follows 3.
8644 </p>
8645 <p>
8646 The same problem applies to the definition of insert(p,i,j) for
8647 sequences and insert(i,j) for associative contianers, as well as
8648 assign.
8649 </p>
8650
8651 <p><i>[
8652 The following added by Howard and the example code was originally written by
8653 Dietmar.
8654 ]</i></p>
8655
8656 <p>
8657 Valid code below?
8658 </p>
8659
8660 <blockquote><pre>#include &lt;vector&gt; 
8661 #include &lt;iterator&gt; 
8662 #include &lt;iostream&gt; 
8663
8664 struct foo 
8665
8666     explicit foo(int) {} 
8667 }; 
8668
8669 int main() 
8670
8671     std::vector&lt;int&gt; v_int; 
8672     std::vector&lt;foo&gt; v_foo1(v_int.begin(), v_int.end()); 
8673     std::vector&lt;foo&gt; v_foo2((std::istream_iterator&lt;int&gt;(std::cin)), 
8674                              std::istream_iterator&lt;int&gt;()); 
8675
8676 </pre></blockquote>
8677 <p><i>[
8678 Berlin: Some support, not universal, for respecting the explicit qualifier.
8679 ]</i></p>
8680
8681
8682
8683
8684 <p><b>Proposed resolution:</b></p>
8685
8686
8687
8688
8689
8690
8691 <hr>
8692 <h3><a name="544"></a>544. minor NULL problems in C.2</h3>
8693 <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>
8694  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-11-25</p>
8695 <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>
8696 <p><b>Discussion:</b></p>
8697 <p>
8698 According to C.2.2.3, p1, "the macro NULL, defined in any of &lt;clocale&gt;,
8699 &lt;cstddef&gt;, &lt;cstdio&gt;, &lt;cstdlib&gt;, &lt;cstring&gt;, &lt;ctime&gt;,
8700 or &lt;cwchar&gt;." This is consistent with the C standard.
8701 </p>
8702 <p>
8703 However, Table 95 in C.2 fails to mention &lt;clocale&gt; and &lt;cstdlib&gt;.
8704 </p>
8705 <p>
8706 In addition, C.2, p2 claims that "The C++ Standard library provides
8707 54 standard macros from the C library, as shown in Table 95." While
8708 table 95 does have 54 entries, since a couple of them (including the
8709 NULL macro) are listed more than once, the actual number of macros
8710 defined by the C++ Standard Library may not be 54.
8711 </p>
8712
8713
8714 <p><b>Proposed resolution:</b></p>
8715 <p>
8716 I propose we add &lt;clocale&gt; and &lt;cstdlib&gt; to Table 96 and remove the
8717 number of macros from C.2, p2 and reword the sentence as follows:
8718 </p>
8719 <blockquote><p>
8720 The C++ Standard library <del>provides 54 standard macros from</del>
8721 <ins>defines a number macros corresponding to those defined by</ins> the C 
8722 <ins>Standard</ins> library, as shown in Table 96.
8723 </p></blockquote>
8724
8725 <p><i>[
8726 Portland:  Resolution is considered editorial.  It will be incorporated into the WD.
8727 ]</i></p>
8728
8729
8730
8731
8732
8733
8734
8735 <hr>
8736 <h3><a name="547"></a>547. division should be floating-point, not integer</h3>
8737 <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>
8738  <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
8739 <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>
8740 <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>
8741 <p><b>Discussion:</b></p>
8742 <p>
8743 Paragraph 10 describes how a variate generator uses numbers produced by an
8744 engine to pass to a generator. The sentence that concerns me is: "Otherwise, if
8745 the value for engine_value_type::result_type is true and the value for
8746 Distribution::input_type is false [i.e. if the engine produces integers and the
8747 engine wants floating-point values], then the numbers in s_eng are divided by
8748 engine().max() - engine().min() + 1 to obtain the numbers in s_e." Since the
8749 engine is producing integers, both the numerator and the denominator are
8750 integers and we'll be doing integer division, which I don't think is what we
8751 want. Shouldn't we be performing a conversion to a floating-point type first?
8752 </p>
8753
8754
8755 <p><b>Proposed resolution:</b></p>
8756
8757
8758 <p><b>Rationale:</b></p>
8759 <p>
8760 Recommend NAD as the affected section is now gone and so the issue is moot.
8761 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>.
8762 </p>
8763
8764
8765
8766
8767
8768 <hr>
8769 <h3><a name="548"></a>548. May random_device block?</h3>
8770 <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>
8771  <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
8772 <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>
8773 <p><b>Discussion:</b></p>
8774 <p>
8775 Class random_device "produces non-deterministic random numbers", using some
8776 external source of entropy. In most real-world systems, the amount of available
8777 entropy is limited. Suppose that entropy has been exhausted. What is an
8778 implementation permitted to do? In particular, is it permitted to block
8779 indefinitely until more random bits are available, or is the implementation
8780 required to detect failure immediately? This is not an academic question. On
8781 Linux a straightforward implementation would read from /dev/random, and "When
8782 the entropy pool is empty, reads to /dev/random will block until additional
8783 environmental noise is gathered." Programmers need to know whether random_device
8784 is permitted to (or possibly even required to?) behave the same way.
8785 </p>
8786
8787 <p><i>[
8788 Berlin: Walter: N1932 considers this NAD. Does the standard specify whether std::cin
8789 may block?
8790 ]</i></p>
8791
8792
8793 <p>
8794 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2391.pdf">N2391</a> and
8795 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a>
8796 for some further discussion.
8797 </p>
8798
8799
8800 <p><b>Proposed resolution:</b></p>
8801 <p>
8802 Adopt the proposed resolution in
8803 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2423.pdf">N2423</a> (NAD).
8804 </p>
8805
8806
8807
8808
8809
8810 <hr>
8811 <h3><a name="549"></a>549. Undefined variable in binomial_distribution</h3>
8812 <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>
8813  <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p>
8814 <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>
8815 <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>
8816 <p><b>Discussion:</b></p>
8817 <p>
8818 Paragraph 1 says that "A binomial distributon random distribution produces
8819 integer values i&gt;0 with p(i) = (n choose i) * p*i * (1-p)^(t-i), where t and
8820 p are the parameters of the distribution. OK, that tells us what t, p, and i
8821 are. What's n?
8822 </p>
8823
8824
8825 <p><b>Proposed resolution:</b></p>
8826 <p>
8827 Berlin: Typo: "n" replaced by "t" in N1932: see 26.3.7.2.2/1.
8828 </p>
8829
8830 <p><i>[
8831 Portland:  Subsumed by N2111.
8832 ]</i></p>
8833
8834
8835
8836
8837
8838
8839 <hr>
8840 <h3><a name="553"></a>553. very minor editorial change intptr_t / uintptr_t</h3>
8841 <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>
8842  <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-01-30</p>
8843 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#cstdint.syn">issues</a> in [cstdint.syn].</p>
8844 <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>
8845 <p><b>Discussion:</b></p>
8846 <p>
8847 In the synopsis, some types are identified as optional: int8_t, int16_t,
8848 and so on, consistently with C99, indeed.
8849 </p>
8850 <p>
8851 On the other hand, intptr_t and uintptr_t, are not marked as such and
8852 probably should, consistently with C99, 7.18.1.4.
8853 </p>
8854
8855
8856 <p><b>Proposed resolution:</b></p>
8857 <p>
8858 Change 18.3.1 [cstdint.syn]:
8859 </p>
8860
8861 <blockquote><pre>...
8862 typedef <i>signed integer type</i> intptr_t;    <ins><i>// optional</i></ins>
8863 ...
8864 typedef <i>unsigned integer type</i> uintptr_t;    <ins><i>// optional</i></ins>
8865 ...
8866 </pre></blockquote>
8867
8868
8869
8870 <p><b>Rationale:</b></p>
8871 Recommend NAD and fix as editorial with the proposed resolution.
8872
8873
8874
8875
8876
8877 <hr>
8878 <h3><a name="554"></a>554. Problem with lwg DR 184 numeric_limits&lt;bool&gt;</h3>
8879 <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>
8880  <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-29</p>
8881 <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>
8882 <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>
8883 <p><b>Discussion:</b></p>
8884 <p>
8885 I believe we have a bug in the resolution of:
8886 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">lwg 184</a>
8887 (WP status).
8888 </p>
8889
8890 <p>
8891 The resolution spells out each member of <tt>numeric_limits&lt;bool&gt;</tt>.
8892 The part I'm having a little trouble with is:
8893 </p>
8894 <blockquote><pre>static const bool traps = false;
8895 </pre></blockquote>
8896
8897 <p>
8898 Should this not be implementation defined?  Given:
8899 </p>
8900
8901 <blockquote><pre>int main()
8902 {
8903      bool b1 = true;
8904      bool b2 = false;
8905      bool b3 = b1/b2;
8906 }
8907 </pre></blockquote>
8908
8909 <p>
8910 If this causes a trap, shouldn't <tt>numeric_limits&lt;bool&gt;::traps</tt> be
8911 <tt>true</tt>?
8912 </p>
8913
8914
8915 <p><b>Proposed resolution:</b></p>
8916 <p>
8917 Change 18.2.1.5p3:
8918 </p>
8919
8920 <blockquote><p>
8921 -3- The specialization for <tt>bool</tt> shall be provided as follows: </p>
8922 <blockquote><pre>namespace std { 
8923    template &lt;&gt; class numeric_limits&lt;bool&gt; {
8924       ...
8925       static const bool traps = <del>false</del> <ins><i>implementation-defined</i></ins>;
8926       ...
8927    };
8928 }
8929 </pre></blockquote>
8930 </blockquote>
8931
8932 <p><i>[
8933 Redmond:  NAD because traps refers to values, not operations.  There is no bool
8934 value that will trap.
8935 ]</i></p>
8936
8937
8938
8939
8940
8941
8942
8943 <hr>
8944 <h3><a name="555"></a>555. TR1, 8.21/1: typo</h3>
8945 <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>
8946  <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-02</p>
8947 <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>
8948 <p><b>Discussion:</b></p>
8949 <p>
8950 This one, if nobody noticed it yet, seems really editorial:
8951 s/cstbool/cstdbool/
8952 </p>
8953
8954
8955 <p><b>Proposed resolution:</b></p>
8956 <p>
8957 Change 8.21p1:
8958 </p>
8959 <blockquote><p>
8960 -1- The header behaves as if it defines the additional macro defined in
8961 <tt>&lt;cst<ins>d</ins>bool&gt;</tt> by including the header <tt>&lt;cstdbool&gt;</tt>.
8962 </p></blockquote>
8963
8964 <p><i>[
8965 Redmond:  Editorial.
8966 ]</i></p>
8967
8968
8969
8970
8971
8972
8973
8974 <hr>
8975 <h3><a name="557"></a>557. TR1: div(_Longlong, _Longlong) vs div(intmax_t, intmax_t)</h3>
8976 <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">NAD Editorial</a>
8977  <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-06</p>
8978 <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>
8979 <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>
8980 <p><b>Discussion:</b></p>
8981 <p>
8982 I'm seeing a problem with such overloads: when, _Longlong == intmax_t ==
8983 long long we end up, essentially, with the same arguments and different
8984 return types (lldiv_t and imaxdiv_t, respectively). Similar issue with
8985 abs(_Longlong) and abs(intmax_t), of course.
8986 </p>
8987 <p>
8988 Comparing sections 8.25 and 8.11, I see an important difference,
8989 however: 8.25.3 and 8.25.4 carefully describe div and abs for _Longlong
8990 types (rightfully, because not moved over directly from C99), whereas
8991 there is no equivalent in 8.11: the abs and div overloads for intmax_t
8992 types appear only in the synopsis and are not described anywhere, in
8993 particular no mention in 8.11.2 (at variance with 8.25.2).
8994 </p>
8995 <p>
8996 I'm wondering whether we really, really, want div and abs for intmax_t...
8997 </p>
8998
8999
9000
9001 <p><b>Proposed resolution:</b></p>
9002
9003
9004
9005 <p><i>[
9006 Portland: no consensus.
9007 ]</i></p>
9008
9009
9010 <p><b>Rationale:</b></p>
9011 <p><i>[
9012 Batavia, Bill: The <tt>&lt;cstdint&gt;</tt> synopsis in TR1 8.11.1 [tr.c99.cinttypes.syn] contains:
9013 ]</i></p>
9014
9015 <blockquote><pre>intmax_t imaxabs(intmax_t i);
9016 intmax_t abs(intmax_t i);
9017
9018 imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
9019 imaxdiv_t div(intmax_t numer, intmax_t denom);
9020 </pre></blockquote>
9021
9022 <p><i>[
9023 and in TR1 8.11.2 [tr.c99.cinttypes.def]:
9024 ]</i></p>
9025
9026
9027 <blockquote><p>
9028 The header defines all functions, types, and macros the same as C99
9029 subclause 7.8.
9030 </p></blockquote>
9031
9032 <p><i>[
9033 This is as much definition as we give for most other C99 functions,
9034 so nothing need change. We might, however, choose to add the footnote:
9035 ]</i></p>
9036
9037
9038 <blockquote><p>
9039 [<i>Note:</i> These overloads for <tt>abs</tt> and <tt>div</tt> may well be equivalent to
9040 those that take <tt>long long</tt> arguments. If so, the implementation is
9041 responsible for avoiding conflicting declarations. -- <i>end note</i>]
9042 </p></blockquote>
9043
9044 <p><i>[
9045 Bellevue: NAD Editorial. Pete must add a footnote, as described below.
9046 ]</i></p>
9047
9048
9049 <blockquote>
9050 <p><i>[
9051 Looks like a real problem. Dietmar suggests div() return a template
9052 type. Matt: looks like imaxdiv_t is loosly defined. Can it be a typedef
9053 for lldiv_t when _Longlong == intmax_t? PJP seems to agree. We would
9054 need a non-normative note declaring that the types lldiv_t and imaxdiv_t
9055 may not be unique if intmax_t==_longlong.
9056 ]</i></p>
9057
9058 </blockquote>
9059
9060
9061
9062
9063
9064
9065 <hr>
9066 <h3><a name="558"></a>558. lib.input.iterators Defect</h3>
9067 <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>
9068  <b>Submitter:</b> David Abrahams <b>Date:</b> 2006-02-09</p>
9069 <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>
9070 <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>
9071 <p><b>Discussion:</b></p>
9072 <blockquote>
9073 <p>
9074   24.1.1 Input iterators [lib.input.iterators]
9075 </p>
9076 <p>
9077   1 A class or a built-in type X satisfies the requirements of an
9078   input iterator for the value type T if the following expressions are
9079   valid, where U is the type of any specified member of type T, as
9080   shown in Table 73.
9081 </p>
9082 </blockquote>
9083 <p>
9084 There is no capital U used in table 73.  There is a lowercase u, but
9085 that is clearly not meant to denote a member of type T.  Also, there's
9086 no description in 24.1.1 of what lowercase a means.  IMO the above
9087 should have been...Hah, a and b are already covered in 24.1/11, so maybe it
9088 should have just been:
9089 </p>
9090
9091
9092 <p><b>Proposed resolution:</b></p>
9093 <p>
9094 Change 24.1.1p1:
9095 </p>
9096 <blockquote><p>
9097 -1- A class or a built-in type <tt>X</tt> satisfies the requirements of an
9098 input iterator for the value type <tt>T</tt> if the following expressions 
9099 are valid<del>, where <tt>U</tt> is the type of any specified member of type
9100 <tt>T</tt>,</del> as shown in Table 73.
9101 </p></blockquote>
9102
9103 <p><i>[
9104 Portland: Editorial.
9105 ]</i></p>
9106
9107
9108
9109
9110
9111
9112
9113 <hr>
9114 <h3><a name="560"></a>560. User-defined allocators without default constructor</h3>
9115 <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>
9116  <b>Submitter:</b> Sergey P. Derevyago <b>Date:</b> 2006-02-17</p>
9117 <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>
9118 <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>
9119 <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>
9120 <p><b>Discussion:</b></p>
9121 <h4>1. The essence of the problem.</h4>
9122 <p>
9123 User-defined allocators without default constructor are not explicitly
9124 supported by the standard but they can be supported just like std::vector
9125 supports elements without default constructor.
9126 </p>
9127 <p>
9128 As a result, there exist implementations that work well with such allocators
9129 and implementations that don't.
9130 </p>
9131
9132 <h4>2. The cause of the problem.</h4>
9133 <p>
9134 1) The standard doesn't explicitly state this intent but it should. In
9135 particular, 20.1.5p5 explicitly state the intent w.r.t. the allocator
9136 instances that compare non-equal. So it can similarly state the intent w.r.t.
9137 the user-defined allocators without default constructor.
9138 </p>
9139 <p>
9140 2) Some container operations are obviously underspecified. In particular,
9141 21.3.7.1p2 tells:
9142 </p>
9143 <blockquote><pre>template&lt;class charT, class traits, class Allocator&gt;
9144   basic_string&lt;charT,traits,Allocator&gt; operator+(
9145     const charT* lhs,
9146     const basic_string&lt;charT,traits,Allocator&gt;&amp; rhs
9147   );
9148 </pre>
9149 <p>
9150 Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs) + rhs</tt>.
9151 </p>
9152 </blockquote>
9153 <p>
9154 That leads to the basic_string&lt;charT,traits,Allocator&gt;(lhs, Allocator()) call.
9155 Obviously, the right requirement is:
9156 </p>
9157 <blockquote><p>
9158 Returns: <tt>basic_string&lt;charT,traits,Allocator&gt;(lhs, rhs.get_allocator()) + rhs</tt>.
9159 </p></blockquote>
9160 <p>
9161 It seems like a lot of DRs can be submitted on this "Absent call to
9162 get_allocator()" topic.
9163 </p>
9164
9165 <h4>3. Proposed actions.</h4>
9166 <p>
9167 1) Explicitly state the intent to allow for user-defined allocators without
9168 default constructor in 20.1.5 Allocator requirements.
9169 </p>
9170 <p>
9171 2) Correct all the places, where a correct allocator object is available
9172 through the get_allocator() call but default Allocator() gets passed instead.
9173 </p>
9174 <h4>4. Code sample.</h4>
9175 <p>
9176 Let's suppose that the following memory pool is available:
9177 </p>
9178 <blockquote><pre>class mem_pool {
9179       // ...
9180       void* allocate(size_t size);
9181       void deallocate(void* ptr, size_t size);
9182 };
9183 </pre></blockquote>
9184 <p>
9185 So the following allocator can be implemented via this pool:
9186 </p>
9187 <blockquote><pre>class stl_allocator {
9188       mem_pool&amp; pool;
9189
9190  public:
9191       explicit stl_allocator(mem_pool&amp; mp) : pool(mp) {}
9192       stl_allocator(const stl_allocator&amp; sa) : pool(sa.pool) {}
9193       template &lt;class U&gt;
9194       stl_allocator(const stl_allocator&lt;U&gt;&amp; sa)  : pool(sa.get_pool()) {}
9195       ~stl_allocator() {}
9196
9197       pointer allocate(size_type n, std::allocator&lt;void&gt;::const_pointer = 0)
9198       {
9199        return (n!=0) ? static_cast&lt;pointer&gt;(pool.allocate(n*sizeof(T))) : 0;
9200       }
9201
9202       void deallocate(pointer p, size_type n)
9203       {
9204        if (n!=0) pool.deallocate(p, n*sizeof(T));
9205       }
9206
9207       // ...
9208 };
9209 </pre></blockquote>
9210 <p>
9211 Then the following code works well on some implementations and doesn't work on
9212 another:
9213 </p>
9214 <blockquote><pre>typedef basic_string&lt;char, char_traits&lt;char&gt;, stl_allocator&lt;char&gt; &gt; 
9215   tl_string;
9216 mem_pool mp;
9217 tl_string s1("abc", stl_allocator&lt;int&gt;(mp));
9218 printf("(%s)\n", ("def"+s1).c_str());
9219 </pre></blockquote>
9220 <p>
9221 In particular, on some implementations the code can't be compiled without
9222 default stl_allocator() constructor.
9223 </p>
9224 <p>
9225 The obvious way to solve the compile-time problems is to intentionally define
9226 a NULL pointer dereferencing default constructor
9227 </p>
9228 <blockquote><pre>stl_allocator() : pool(*static_cast&lt;mem_pool*&gt;(0)) {}
9229 </pre></blockquote>
9230 <p>
9231 in a hope that it will not be called. The problem is that it really gets
9232 called by operator+(const char*, const string&amp;) under the current 21.3.7.1p2
9233 wording.
9234 </p>
9235
9236
9237 <p><b>Proposed resolution:</b></p>
9238 <p>
9239 </p>
9240
9241
9242 <p><b>Rationale:</b></p>
9243 <p>
9244 Recommend NAD.  <tt>operator+()</tt> with <tt>string</tt> already requires the desired
9245 semantics of copying the allocator from one of the strings (<i>lhs</i> when there is a choice).
9246 </p>
9247
9248
9249
9250
9251
9252 <hr>
9253 <h3><a name="569"></a>569. Postcondition for basic_ios::clear(iostate) incorrectly stated</h3>
9254 <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>
9255  <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 2006-03-10</p>
9256 <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>
9257 <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>
9258 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a></p>
9259 <p><b>Discussion:</b></p>
9260 <p>
9261 Section: 27.4.4.3 [lib.iostate.flags]
9262 </p>
9263 <p>
9264 Paragraph 4 says:
9265 </p>
9266 <blockquote>
9267 <blockquote><pre>void clear(iostate <i>state</i> = goodbit);
9268 </pre></blockquote>
9269 <p>
9270 <i>Postcondition:</i> If <tt>rdbuf()!=0</tt> then <tt><i>state</i> == rdstate();</tt>
9271 otherwise <tt>rdstate()==<i>state</i>|ios_base::badbit</tt>.
9272 </p>
9273 </blockquote>
9274
9275 <p>
9276 The postcondition "rdstate()==state|ios_base::badbit" is parsed as
9277 "(rdstate()==state)|ios_base::badbit", which is probably what the
9278 committee meant.
9279 </p>
9280
9281
9282
9283
9284 <p><b>Rationale:</b></p>
9285
9286
9287
9288
9289
9290
9291 <hr>
9292 <h3><a name="570"></a>570. Request adding additional explicit specializations of char_traits</h3>
9293 <p><b>Section:</b> 21.1 [char.traits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9294  <b>Submitter:</b> Jack Reeves <b>Date:</b> 2006-04-06</p>
9295 <p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#char.traits">issues</a> in [char.traits].</p>
9296 <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>
9297 <p><b>Discussion:</b></p>
9298 <p>
9299 Currently, the Standard Library specifies only a declaration for template class
9300 char_traits&lt;&gt; and requires the implementation provide two explicit
9301 specializations: char_traits&lt;char&gt; and char_traits&lt;wchar_t&gt;. I feel the Standard
9302 should require explicit specializations for all built-in character types, i.e.
9303 char, wchar_t, unsigned char, and signed char.
9304 </p>
9305 <p>
9306 I have put together a paper
9307 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1985.htm">N1985</a>)
9308 that describes this in more detail and
9309 includes all the necessary wording.
9310 </p>
9311 <p><i>[
9312 Portland: Jack will rewrite
9313 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1985.htm">N1985</a>
9314 to propose a primary template that will work with other integral types.
9315 ]</i></p>
9316
9317 <p><i>[
9318 Toronto: issue has grown with addition of <tt>char16_t</tt> and <tt>char32_t</tt>.
9319 ]</i></p>
9320
9321
9322 <p><i>[
9323 post Bellevue:
9324 ]</i></p>
9325
9326
9327 <blockquote>
9328 <p>
9329 We suggest that Jack be asked about the status of his paper, and if it
9330 is not forthcoming, the work-item be assigned to someone else. If no one
9331 steps forward to do the paper before the next meeting, we propose to
9332 make this NAD without further discussion. We leave this Open for now,
9333 but our recommendation is NAD.
9334 </p>
9335 <p>
9336 Note: the issue statement should be updated, as the Toronto comment has
9337 already been resolved. E.g., char_traits specializations for char16_t
9338 and char32_t are now in the working paper.
9339 </p>
9340 </blockquote>
9341
9342 <p><i>[
9343 Sophia Antipolis:
9344 ]</i></p>
9345
9346
9347 <blockquote>
9348 Nobody has submitted the requested paper, so we move to NAD, as suggested by the decision at the last meeting.
9349 </blockquote>
9350
9351
9352 <p><b>Proposed resolution:</b></p>
9353
9354
9355
9356
9357
9358 <hr>
9359 <h3><a name="571"></a>571. Update C90 references to C99?</h3>
9360 <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>
9361  <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-04-08</p>
9362 <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>
9363 <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>
9364 <p><b>Discussion:</b></p>
9365 <p>
9366 1.2 Normative references [intro.refs] of the WP currently refers to ISO/IEC
9367 9899:1990, Programming languages - C. Should that be changed to ISO/IEC
9368 9899:1999?
9369 </p>
9370 <p>
9371 What impact does this have on the library?
9372 </p>
9373
9374
9375 <p><b>Proposed resolution:</b></p>
9376 <p>
9377 In 1.2/1 [intro.refs] of the WP, change:
9378 </p>
9379 <blockquote>
9380 <ul>
9381 <li>ISO/IEC 9899:<del>1990</del><ins>1999 + TC1 + TC2</ins>, <i>Programming languages - C</i></li>
9382 </ul>
9383 </blockquote>
9384
9385
9386
9387 <p><b>Rationale:</b></p>
9388 Recommend NAD, fixed editorially.
9389
9390
9391
9392
9393
9394 <hr>
9395 <h3><a name="572"></a>572. Oops, we gave 507 WP status</h3>
9396 <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>
9397  <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-04-11</p>
9398 <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>
9399 <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>
9400 <p><b>Discussion:</b></p>
9401 <p>
9402 In Berlin, as a working group, we voted in favor of N1932 which makes issue 507 moot:
9403 variate_generator has been eliminated.  Then in full committee we voted to give
9404 this issue WP status (mistakenly).
9405 </p>
9406
9407
9408 <p><b>Proposed resolution:</b></p>
9409 <p>
9410 Strike the proposed resolution of issue 507.
9411 </p>
9412 <p><i>[
9413 post-Portland:  Walter and Howard recommend NAD.  The proposed resolution of 507 no longer
9414 exists in the current WD.
9415 ]</i></p>
9416
9417
9418
9419 <p><b>Rationale:</b></p>
9420 <p>
9421 NAD.  Will be moot once
9422 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2135.pdf">N2135</a>
9423 is adopted.
9424 </p>
9425
9426
9427
9428
9429
9430 <hr>
9431 <h3><a name="579"></a>579. erase(iterator) for unordered containers should not return an iterator</h3>
9432 <p><b>Section:</b> 23.1.5 [unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
9433  <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2006-06-13</p>
9434 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord.req">active issues</a> in [unord.req].</p>
9435 <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>
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>
9438 <p>
9439 See
9440 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
9441 for full discussion.
9442 </p>
9443
9444
9445 <p><b>Proposed resolution:</b></p>
9446 <p>
9447 Option 1:
9448 </p>
9449
9450 <p>
9451 The problem can be eliminated by omitting the requirement that <tt>a.erase(q)</tt> return an 
9452 iterator. This is, however, in contrast with the equivalent requirements for other 
9453 standard containers.
9454 </p>
9455
9456 <p>
9457 Option 2:
9458 </p>
9459
9460 <p>
9461 <tt>a.erase(q)</tt> can be made to compute the next iterator only when explicitly requested: 
9462 the technique consists in returning a proxy object implicitly convertible to <tt>iterator</tt>, so 
9463 that
9464 </p>
9465
9466 <blockquote><pre>iterator q1=a.erase(q);
9467 </pre></blockquote>
9468
9469 <p>
9470 works as expected, while
9471 </p>
9472
9473 <blockquote><pre>a.erase(q);
9474 </pre></blockquote>
9475
9476 <p>
9477 does not ever invoke the conversion-to-iterator operator, thus avoiding the associated 
9478 computation. To allow this technique, some sections of TR1 along the line "return value 
9479 is an iterator..." should be changed to "return value is an unspecified object implicitly 
9480 convertible to an iterator..." Although this trick is expected to work transparently, it can 
9481 have some collateral effects when the expression <tt>a.erase(q)</tt> is used inside generic 
9482 code.
9483 </p>
9484
9485
9486
9487 <p><b>Rationale:</b></p>
9488 <p>
9489 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a>
9490 was discussed in Portland and the consensus was that there appears to be
9491 no need for either change proposed in the paper.  The consensus opinion
9492 was that since the iterator could serve as its own proxy, there appears
9493 to be no need for the change. In general, "converts to" is undesirable
9494 because it interferes with template matching.
9495 </p>
9496
9497 <p>
9498 Post Toronto:  There does not at this time appear to be consensus with the Portland consensus. 
9499 </p>
9500
9501 <p><i>[
9502 Bellevue:
9503 ]</i></p>
9504
9505
9506 <blockquote>
9507 The Bellevue review of this issue reached consensus with the Portland
9508 consensus, in contravention of the Toronto non-consensus. Common
9509 implementations have the iterator readily available, and most common
9510 uses depend on the iterator being returned.
9511 </blockquote>
9512
9513
9514
9515
9516
9517
9518 <hr>
9519 <h3><a name="583"></a>583. div() for unsigned integral types</h3>
9520 <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>
9521  <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p>
9522 <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>
9523 <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>
9524 <p><b>Discussion:</b></p>
9525 <p>
9526 There is no div() function for unsigned integer types.
9527 </p>
9528 <p>
9529 There are several possible resolutions.  The simplest one is noted below.  Other
9530 possibilities include a templated solution.
9531 </p>
9532
9533
9534 <p><b>Proposed resolution:</b></p>
9535 <p>
9536 Add to 26.7 [lib.c.math] paragraph 8:
9537 </p>
9538
9539 <blockquote><pre>struct udiv_t div(unsigned, unsigned);
9540 struct uldiv_t div(unsigned long, unsigned long);
9541 struct ulldiv_t div(unsigned long long, unsigned long long);
9542 </pre></blockquote>
9543
9544
9545
9546 <p><b>Rationale:</b></p>
9547 Toronto:  C99 does not have these unsigned versions because
9548 the signed version exist just to define the implementation-defined behavior
9549 of signed integer division.  Unsigned integer division has no implementation-defined
9550 behavior and thus does not need this treatment.
9551
9552
9553
9554
9555
9556 <hr>
9557 <h3><a name="584"></a>584. missing int pow(int,int) functionality</h3>
9558 <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>
9559  <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p>
9560 <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>
9561 <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>
9562 <p><b>Discussion:</b></p>
9563 <p>
9564 There is no pow() function for any integral type.
9565 </p>
9566
9567
9568 <p><b>Proposed resolution:</b></p>
9569 <p>
9570 Add something like:
9571 </p>
9572
9573 <blockquote><pre>template&lt; typename T&gt;
9574 T power( T x, int n );
9575 // requires: n &gt;=0
9576 </pre></blockquote>
9577
9578
9579 <p><b>Rationale:</b></p>
9580 Toronto:  We already have double pow(integral, integral) from 26.7 [c.math] p11.
9581
9582
9583
9584
9585
9586 <hr>
9587 <h3><a name="587"></a>587. iststream ctor missing description</h3>
9588 <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>
9589  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-22</p>
9590 <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>
9591 <p><b>Discussion:</b></p>
9592         <p>
9593
9594 The  <code>iststream(char*, streamsize)</code>  ctor is  in  the class
9595 synopsis  in D.7.2  but its  signature is  missing in  the description
9596 below (in D.7.2.1).
9597
9598         </p>
9599     
9600
9601     <p><b>Proposed resolution:</b></p>
9602         <p>
9603
9604 This seems like a simple editorial issue and the missing signature can
9605 be added to the one for <code>const char*</code> in paragraph 2.
9606
9607         </p>
9608
9609 <p><i>[
9610 post Oxford: Noted that it is already fixed in
9611 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
9612 ]</i></p>
9613
9614
9615     
9616
9617
9618
9619 <hr>
9620 <h3><a name="590"></a>590. Type traits implementation latitude should be removed for C++0x</h3>
9621 <p><b>Section:</b> 20.5 [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>
9622  <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-08-10</p>
9623 <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>
9624 <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>
9625 <p><b>Discussion:</b></p>
9626 <p>
9627 20.4.9 [lib.meta.req], Implementation requirements, provides latitude for type
9628 traits implementers that is not needed in C++0x. It includes the wording:
9629 </p>
9630
9631 <blockquote><p>
9632 [<i>Note:</i> the latitude granted to implementers in this clause is temporary,
9633 and is expected to be removed in future revisions of this document. -- <i>end note</i>]
9634 </p></blockquote>
9635
9636 <p>
9637 Note:
9638 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">N2157: Minor Modifications to the type traits Wording</a>
9639 also has the intent of removing this wording from the WP.
9640 </p>
9641
9642
9643
9644 <p><b>Proposed resolution:</b></p>
9645 <p>
9646 Remove 20.4.9 [lib.meta.req] in its entirety from the WP.
9647 </p>
9648
9649 <p><i>[
9650 post-Oxford: Recommend NAD Editorial.  This resolution is now in the
9651 current working draft.
9652 ]</i></p>
9653
9654
9655
9656
9657
9658
9659
9660 <hr>
9661 <h3><a name="591"></a>591. Misleading "built-in</h3>
9662 <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>
9663  <b>Submitter:</b> whyglinux <b>Date:</b> 2006-08-08</p>
9664 <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>
9665 <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>
9666 <p><b>Discussion:</b></p>
9667 <p>
9668 18.2.1.2 numeric_limits members [lib.numeric.limits.members]
9669 Paragraph 7:
9670 </p>
9671 <blockquote><p>
9672 "For built-in integer types, the number of non-sign bits in the
9673 representation."
9674 </p></blockquote>
9675
9676 <p>
9677 26.1 Numeric type requirements [lib.numeric.requirements]
9678 Footnote:
9679 </p>
9680
9681 <blockquote><p>
9682 "In other words, value types. These include built-in arithmetic types,
9683 pointers, the library class complex, and instantiations of valarray for
9684 value types."
9685 </p></blockquote>
9686
9687 <p>
9688 Integer types (which are bool, char, wchar_t, and the signed and
9689 unsigned integer types) and arithmetic types (which are integer and
9690 floating types) are all built-in types and thus there are no
9691 non-built-in (that is, user-defined) integer or arithmetic types. Since
9692 the redundant "built-in" in the above 2 sentences can mislead that
9693 there may be built-in or user-defined integer and arithmetic types
9694 (which is not correct), the "built-in" should be removed.
9695 </p>
9696
9697
9698 <p><b>Proposed resolution:</b></p>
9699 <p>
9700 18.2.1.2 numeric_limits members [lib.numeric.limits.members]
9701 Paragraph 7:
9702 </p>
9703 <blockquote><p>
9704 "For <del>built-in</del> integer types, the number of non-sign bits in the
9705 representation."
9706 </p></blockquote>
9707
9708 <p>
9709 26.1 Numeric type requirements [lib.numeric.requirements]
9710 Footnote:
9711 </p>
9712
9713 <blockquote><p>
9714 "In other words, value types. These include <del>built-in</del> arithmetic types,
9715 pointers, the library class complex, and instantiations of valarray for
9716 value types."
9717 </p></blockquote>
9718
9719
9720 <p><b>Rationale:</b></p>
9721 <p>
9722 Recommend NAD / Editorial.  The proposed resolution is accepted as editorial.
9723 </p>
9724
9725
9726
9727
9728
9729 <hr>
9730 <h3><a name="592"></a>592. Incorrect treatment of rdbuf()-&gt;close() return type</h3>
9731 <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">NAD Editorial</a>
9732  <b>Submitter:</b> Christopher Kohlhoff <b>Date:</b> 2006-08-17</p>
9733 <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>
9734 <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>
9735 <p><b>Discussion:</b></p>
9736 <p>
9737 I just spotted a minor problem in 27.8.1.7
9738 [lib.ifstream.members] para 4 and also 27.8.1.13
9739 [lib.fstream.members] para 4. In both places it says:
9740 </p>
9741 <blockquote>
9742 <pre>void close();
9743 </pre>
9744 <p>
9745 Effects: Calls rdbuf()-&gt;close() and, if that function returns false, ...
9746 </p>
9747 </blockquote>
9748 <p>
9749 However, basic_filebuf::close() (27.8.1.2) returns a pointer to the
9750 filebuf on success, null on failure, so I think it is meant to
9751 say "if that function returns a null pointer". Oddly, it is
9752 correct for basic_ofstream.
9753 </p>
9754
9755
9756 <p><b>Proposed resolution:</b></p>
9757 <p>
9758 Change 27.8.1.9 [ifstream.members], p5:
9759 </p>
9760
9761 <blockquote><p>
9762 <i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
9763 <ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
9764 calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
9765 (27.4.4.3)).
9766 </p></blockquote>
9767
9768 <p>
9769 Change 27.8.1.17 [fstream.members], p5:
9770 </p>
9771
9772 <blockquote><p>
9773 <i>Effects:</i> Calls <tt>rdbuf()-&gt;close()</tt> and, if that function
9774 <ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>,
9775 calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>
9776 (27.4.4.3)).
9777 </p></blockquote>
9778
9779
9780
9781 <p><i>[
9782 Kona (2007): Proposed Disposition: NAD, Editorial
9783 ]</i></p>
9784
9785
9786
9787
9788
9789 <hr>
9790 <h3><a name="594"></a>594. Disadvantages of defining Swappable in terms of CopyConstructible and Assignable</h3>
9791 <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>
9792  <b>Submitter:</b> Niels Dekker <b>Date:</b> 2006-11-02</p>
9793 <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>
9794 <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>
9795 <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>
9796 <p><b>Discussion:</b></p>
9797 <p>
9798 It seems undesirable to define the Swappable requirement in terms of
9799 CopyConstructible and Assignable requirements. And likewise, once the
9800 MoveConstructible and MoveAssignable requirements (N1860) have made it
9801 into the Working Draft, it seems undesirable to define the Swappable
9802 requirement in terms of those requirements. Instead, it appears
9803 preferable to have the Swappable requirement defined exclusively in
9804 terms of the existence of an appropriate swap function.
9805 </p>
9806 <p>
9807 Section 20.1.4 [lib.swappable] of the current Working Draft (N2009)
9808 says:
9809 </p>
9810 <blockquote><p>
9811 The Swappable requirement is met by satisfying one or more of the
9812 following conditions:</p>
9813 <ul>
9814 <li>
9815 T is Swappable if T satisfies the CopyConstructible requirements
9816 (20.1.3) and the Assignable requirements (23.1);
9817 </li>
9818 <li>
9819 T is Swappable if a namespace scope function named swap exists in the
9820 same namespace as the definition of T, such that the expression
9821 swap(t,u) is valid and has the semantics described in Table 33.
9822 </li>
9823 </ul>
9824 </blockquote>
9825 I can think of three disadvantages of this definition:
9826 <ol>
9827 <li>
9828 If a client's type T satisfies the first condition (T is both
9829 CopyConstructible and Assignable), the client cannot stop T from
9830 satisfying the Swappable requirement without stopping T from
9831 satisfying the first condition.
9832 <p>
9833 A client might want to stop T from satisfying the Swappable
9834 requirement, because swapping by means of copy construction and
9835 assignment might throw an exception, and she might find a throwing
9836 swap unacceptable for her type. On the other hand, she might not feel
9837 the need to fully implement her own swap function for this type. In
9838 this case she would want to be able to simply prevent algorithms that
9839 would swap objects of type T from being used, e.g., by declaring a
9840 swap function for T, and leaving this function purposely undefined.
9841 This would trigger a link error, if an attempt would be made to use
9842 such an algorithm for this type. For most standard library
9843 implementations, this practice would indeed have the effect of
9844 stopping T from satisfying the Swappable requirement.
9845 </p>
9846 </li>
9847 <li>
9848 A client's type T that does not satisfy the first condition can not be
9849 made Swappable by providing a specialization of std::swap for T.
9850 <p>
9851 While I'm aware about the fact that people have mixed feelings about
9852 providing a specialization of std::swap, it is well-defined to do so.
9853 It sounds rather counter-intuitive to say that T is not Swappable, if
9854 it has a valid and semantically correct specialization of std::swap.
9855 Also in practice, providing such a specialization will have the same
9856 effect as satisfying the Swappable requirement.
9857 </p>
9858 </li>
9859 <li>
9860 For a client's type T that satisfies both conditions of the Swappable
9861 requirement, it is not specified which of the two conditions prevails.
9862 After reading section 20.1.4 [lib.swappable], one might wonder whether
9863 objects of T will be swapped by doing copy construction and
9864 assignments, or by calling the swap function of T.
9865 <p>
9866 I'm aware that the intention of the Draft is to prefer calling the
9867 swap function of T over doing copy construction and assignments. Still
9868 in my opinion, it would be better to make this clear in the wording of
9869 the definition of Swappable. 
9870 </p>
9871 </li>
9872 </ol>
9873 <p>
9874 I would like to have the Swappable requirement defined in such a way
9875 that the following code fragment will correctly swap two objects of a
9876 type T, if and only if T is Swappable:
9877 </p>
9878 <pre>   using std::swap;
9879    swap(t, u);  // t and u are of type T.
9880 </pre>
9881 <p>
9882 This is also the way Scott Meyers recommends calling a swap function,
9883 in Effective C++, Third Edition, item 25.
9884 </p>
9885 <p>
9886 Most aspects of this issue have been dealt with in a discussion on
9887 comp.std.c++ about the Swappable requirement, from 13 September to 4
9888 October 2006, including valuable input by David Abrahams, Pete Becker,
9889 Greg Herlihy, Howard Hinnant and others.
9890 </p>
9891
9892 <p><b>Proposed resolution:</b></p>
9893 <p>
9894 Change section 20.1.4 [lib.swappable] as follows:
9895 </p>
9896 <blockquote><p>
9897 The Swappable requirement is met by satisfying
9898 <del>one or more of the following conditions:</del>
9899 <ins>the following condition:</ins></p>
9900 <ul>
9901
9902 <li>
9903 <del>T is Swappable if T satisfies the CopyConstructible requirements
9904 (20.1.3) and the Assignable requirements (23.1);</del>
9905 </li>
9906 <li>
9907 <del>
9908 T is Swappable if a namespace scope function named swap exists in the
9909 same namespace as the definition of T, such that the expression
9910 swap(t,u) is valid and has the semantics described in Table 33.
9911 </del>
9912 T is Swappable if an unqualified function call swap(t,u) is valid
9913 within the namespace std, and has the semantics described in Table 33.
9914 </li>
9915 </ul>
9916 </blockquote>
9917
9918
9919 <p><b>Rationale:</b></p>
9920 <p>
9921 Recommend NAD.  Concepts, specifically
9922 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2082.pdf">N2082</a>
9923 and
9924 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2084.pdf">N2084</a>,
9925 will essentially rewrite this section and provide the desired semantics.
9926 </p>
9927
9928
9929
9930
9931
9932 <hr>
9933 <h3><a name="615"></a>615. Inconsistencies in Section 21.4</h3>
9934 <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>
9935  <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-11</p>
9936 <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>
9937 <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>
9938 <p><b>Discussion:</b></p>
9939 <p>
9940 In the current draft N2134, 21.4/1 says
9941 </p>
9942 <p>
9943 "Tables 59,228) 60, 61, 62,and 63 229) 230) describe headers &lt;cctype&gt;, 
9944 &lt;cwctype&gt;, &lt;cstring&gt;, &lt;cwchar&gt;, and &lt;cstdlib&gt; (character conversions), 
9945 respectively."
9946 </p>
9947 <p>
9948 Here footnote 229 applies to table 62, not table 63.
9949 </p>
9950 <p>
9951 Also, footnote 230 lists the new functions in table 63, "atoll, strtoll, 
9952 strtoull, strtof, and strtold added by TR1". However, strtof is not present 
9953 in table 63.
9954 </p>
9955
9956
9957 <p><b>Proposed resolution:</b></p>
9958 <p>
9959 </p>
9960
9961
9962 <p><b>Rationale:</b></p>
9963 <p>
9964 Recommend NAD, editorial.  Send to Pete.
9965 </p>
9966
9967
9968
9969
9970
9971 <hr>
9972 <h3><a name="625"></a>625. mixed up <i>Effects</i> and <i>Returns</i> clauses</h3>
9973 <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>
9974  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
9975 <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>
9976 <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>
9977 <p><b>Discussion:</b></p>
9978         <p>
9979
9980 Many  member functions  of  <code>basic_string</code> are  overloaded,
9981 with  some of  the  overloads taking  a <code>string</code>  argument,
9982 others  <code>value_type*</code>,  others <code>size_type</code>,  and
9983 others still <code>iterators</code>. Often, the requirements on one of
9984 the   overloads  are   expressed  in   the  form   of  <i>Effects</i>,
9985 <i>Throws</i>,      and     in      the     Working      Paper     
9986 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
9987 also <i>Remark</i> clauses,  while those on the rest  of the overloads
9988 via a reference to this overload and using a <i>Returns</i> clause.
9989
9990         </p><p>
9991         </p>
9992
9993 The  difference between  the two  forms of  specification is  that per
9994 17.3.1.3 [structure.specifications],  p3,  an  <i>Effects</i> clause  specifies
9995 <i>"actions  performed  by the  functions,"</i>  i.e., its  observable
9996 effects,  while a <i>Returns</i>  clause is  <i>"a description  of the
9997 return  value(s)   of  a  function"</i>  that  does   not  impose  any
9998 requirements on the function's observable effects.
9999
10000         <p>
10001         </p>
10002
10003 Since only  <i>Notes</i> are explicitly defined to  be informative and
10004 all  other paragraphs  are explicitly  defined to  be  normative, like
10005 <i>Effects</i> and <i>Returns</i>,  the new <i>Remark</i> clauses also
10006 impose normative requirements.
10007
10008         <p>
10009         </p>
10010
10011 So  by this  strict  reading of  the  standard there  are some  member
10012 functions of  <code>basic_string</code> that are required  to throw an
10013 exception under  some conditions or use specific  traits members while
10014 many other otherwise equivalent overloads, while obliged to return the
10015 same  values, aren't required  to follow  the exact  same requirements
10016 with regards to the observable effects.
10017
10018         <p>
10019         </p>
10020
10021 Here's an example of this  problem that was precipitated by the change
10022 from informative Notes to normative <i>Remark</i>s (presumably made to
10023 address <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#424">424</a>):
10024
10025         <p>
10026         </p>
10027
10028 In the Working  Paper, <code>find(string, size_type)</code> contains a
10029 <i>Remark</i>  clause (which  is  just a  <i>Note</i>  in the  current
10030 standard) requiring it to use <code>traits::eq()</code>.
10031
10032         <p>
10033         </p>
10034
10035 <code>find(const  charT  *s,  size_type  pos)</code> is  specified  to
10036 return  <code>find(string(s), pos)</code>  by a  <i>Returns</i> clause
10037 and so  it is not required to  use <code>traits::eq()</code>. However,
10038 the Working  Paper has  replaced the original  informative <i>Note</i>
10039 about   the  function   using  <code>traits::length()</code>   with  a
10040 normative  requirement  in  the   form  of  a  <i>Remark</i>.  Calling
10041 <code>traits::length()</code> may be  suboptimal, for example when the
10042 argument is a  very long array whose initial  substring doesn't appear
10043 anywhere in <code>*this</code>.
10044
10045         <p>
10046         </p>
10047
10048 Here's another  similar example,  one that existed  even prior  to the
10049 introduction of <i>Remark</i>s:
10050
10051         <p>
10052         </p>
10053
10054 <code> insert(size_type  pos, string, size_type,  size_type)</code> is
10055 required   to   throw   <code>out_of_range</code>   if   <code>pos   &gt;
10056 size()</code>.
10057
10058         <p>
10059         </p>
10060
10061 <code>insert(size_type pos, string  str)</code> is specified to return
10062 <code>insert(pos, str, 0, npos)</code>  by a <i>Returns</i> clause and
10063 so its  effects when <code>pos  &gt; size()</code> are  strictly speaking
10064 unspecified.
10065
10066         
10067         <p>
10068
10069 I  believe  a  careful   review  of  the  current  <i>Effects</i>  and
10070 <i>Returns</i>  clauses  is  needed  in  order to  identify  all  such
10071 problematic cases. In  addition, a review of the  Working Paper should
10072 be done to make sure that the newly introduced normative <i>Remark</i>
10073 clauses do not impose  any undesirable normative requirements in place
10074 of the original informative <i>Notes</i>.
10075
10076         </p>
10077 <p><i>[
10078 Batavia:  Alan and Pete to work.
10079 ]</i></p>
10080
10081
10082 <p><i>[
10083 Bellevue:  Marked as NAD Editorial.
10084 ]</i></p>
10085
10086
10087 <p><i>[
10088 Post-Sophia Antipolis:  Martin indicates there is still work to be done on this issue.
10089 Reopened.
10090 ]</i></p>
10091
10092
10093
10094
10095 <p><b>Proposed resolution:</b></p>
10096 <p>
10097 </p>
10098
10099
10100
10101
10102
10103 <hr>
10104 <h3><a name="626"></a>626. new <i>Remark</i> clauses not documented</h3>
10105 <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>
10106  <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p>
10107 <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>
10108 <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>
10109 <p><b>Discussion:</b></p>
10110         <p>
10111
10112 The <i>Remark</i> clauses newly  introduced into the Working Paper 
10113 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>)
10114 are  not mentioned  in  17.3.1.3 [structure.specifications] where  we list  the
10115 meaning  of <i>Effects</i>, <i>Requires</i>,  and other  clauses (with
10116 the exception  of <i>Notes</i> which are documented  as informative in
10117 17.3.1.1 [structure.summary], p2, and which they replace in many cases).
10118
10119         </p>
10120         <p>
10121
10122 Propose add a bullet for <i>Remarks</i> along with a brief description.
10123
10124         </p>
10125 <p><i>[
10126 Batavia:  Alan and Pete to work.
10127 ]</i></p>
10128
10129
10130 <p><i>[
10131 Bellevue: Already resolved in current working paper.
10132 ]</i></p>
10133
10134
10135
10136 <p><b>Proposed resolution:</b></p>
10137 <p>
10138 </p>
10139
10140
10141
10142
10143
10144 <hr>
10145 <h3><a name="627"></a>627. Low memory and exceptions</h3>
10146 <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>
10147  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2007-01-23</p>
10148 <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>
10149 <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>
10150 <p><b>Discussion:</b></p>
10151 <p>
10152 I recognize the need for nothrow guarantees in the exception reporting
10153 mechanism, but I strongly believe that implementors also need an escape hatch
10154 when memory gets really low. (Like, there's not enough heap to construct and
10155 copy exception objects, or not enough stack to process the throw.) I'd like to
10156 think we can put this escape hatch in 18.5.1.1 [new.delete.single],
10157 <tt>operator new</tt>, but I'm not sure how to do it. We need more than a
10158 footnote, but the wording has to be a bit vague. The idea is that if
10159 <tt>new</tt> can't allocate something sufficiently small, it has the right to
10160 <tt>abort</tt>/call <tt>terminate</tt>/call <tt>unexpected</tt>.
10161 </p>
10162
10163 <p><i>[
10164 Bellevue: NAD.  1.4p2 specifies a program must behave correctly "within
10165 its resource limits", so no further escape hatch is necessary.
10166 ]</i></p>
10167
10168
10169
10170 <p><b>Proposed resolution:</b></p>
10171 <p>
10172 </p>
10173
10174
10175
10176
10177
10178 <hr>
10179 <h3><a name="633"></a>633. Return clause mentions undefined "type()"</h3>
10180 <p><b>Section:</b> 20.6.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>
10181  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-03</p>
10182 <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>
10183 <p><b>Discussion:</b></p>
10184 <p>
10185 20.6.15.2.5 [func.wrap.func.targ], p4 says:
10186 </p>
10187 <blockquote><p>
10188 <i>Returns:</i> If <tt>type() == typeid(T)</tt>, a pointer to the stored
10189 function target; otherwise a null pointer.
10190 </p></blockquote>
10191
10192 <ol>
10193 <li>
10194 There exists neither a type, a typedef <tt>type</tt>, nor member
10195 function <tt>type()</tt> in class template function nor in the global or
10196 <tt>std</tt> namespace.
10197 </li>
10198 <li>
10199 Assuming that <tt>type</tt> should have been <tt>target_type()</tt>,
10200 this description would lead to false results, if <tt>T = <i>cv</i>
10201 void</tt> due to returns clause 20.6.15.2.5 [func.wrap.func.targ], p1.
10202 </li>
10203 </ol>
10204
10205
10206
10207 <p><b>Proposed resolution:</b></p>
10208 <p>
10209 Change 20.6.15.2.5 [func.wrap.func.targ], p4:
10210 </p>
10211
10212 <blockquote><p>
10213 <i>Returns:</i> If <tt><del>type()</del> <ins>target_type()</ins> == typeid(T) <ins>&amp;&amp; typeid(T) !=
10214 typeid(void)</ins></tt>, a pointer to the stored function target;
10215 otherwise a null pointer.
10216 </p></blockquote>
10217
10218 <p><i>[
10219 Pete: Agreed. It's editorial, so I'll fix it.
10220 ]</i></p>
10221
10222
10223
10224
10225
10226
10227
10228 <hr>
10229 <h3><a name="636"></a>636. 26.5.2.3 valarray::operator[]</h3>
10230 <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>
10231  <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-11</p>
10232 <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>
10233 <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>
10234 <p><b>Discussion:</b></p>
10235 <p>
10236 The signature of the const operator[] has been changed to return a const 
10237 reference.
10238 </p>
10239 <p>
10240 The description in paragraph 1 still says that the operator returns by 
10241 value.
10242 </p>
10243 <p><i>[
10244 Pete recommends editorial fix.
10245 ]</i></p>
10246
10247
10248
10249 <p><b>Proposed resolution:</b></p>
10250 <p>
10251 </p>
10252
10253
10254
10255
10256
10257 <hr>
10258 <h3><a name="637"></a>637. [c.math]/10 inconsistent return values</h3>
10259 <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>
10260  <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-13</p>
10261 <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>
10262 <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>
10263 <p><b>Discussion:</b></p>
10264 <p>
10265 26.7 [c.math], paragraph 10 has long lists of added signatures for float and long double 
10266 functions. All the signatures have float/long double return values, which is 
10267 inconsistent with some of the double functions they are supposed to 
10268 overload.
10269 </p>
10270
10271
10272 <p><b>Proposed resolution:</b></p>
10273 <p>
10274 Change 26.7 [c.math], paragraph 10,
10275 </p>
10276
10277 <blockquote><pre><del>float</del> <ins>int</ins> ilogb(float);
10278 <del>float</del> <ins>long</ins> lrint(float);
10279 <del>float</del> <ins>long</ins> lround(float);
10280 <del>float</del> <ins>long long</ins> llrint(float);
10281 <del>float</del> <ins>long long</ins> llround(float);
10282
10283 <del>long double</del> <ins>int</ins> ilogb(long double);
10284 <del>long double</del> <ins>long</ins> lrint(long double);
10285 <del>long double</del> <ins>long</ins> lround(long double);
10286 <del>long double</del> <ins>long long</ins> llrint(long double);
10287 <del>long double</del> <ins>long long</ins> llround(long double);
10288 </pre></blockquote>
10289
10290
10291
10292
10293
10294 <hr>
10295 <h3><a name="639"></a>639. Still problems with exceptions during streambuf IO</h3>
10296 <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>
10297  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-17</p>
10298 <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>
10299 <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>
10300 <p><b>Discussion:</b></p>
10301 <p>
10302 There already exist two active DR's for the wording of 27.6.1.2.3 [istream::extractors]/13
10303 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>.
10304 </p>
10305
10306 <p>
10307 Even with these proposed corrections, already maintained in N2134,
10308 I have the feeling, that the current wording does still not properly
10309 handle the "exceptional" situation. The combination of para 14
10310 </p>
10311
10312 <blockquote><p>
10313 "[..] Characters are extracted and inserted until
10314 any of the following occurs:
10315 </p>
10316 <p>
10317 [..]
10318 </p>
10319 <p>
10320 - an exception occurs (in which case the exception is caught)."
10321 </p></blockquote>
10322
10323 <p>
10324 and 15
10325 </p>
10326
10327 <blockquote><p>
10328 "If the function inserts no characters, it calls setstate(failbit),
10329 which
10330 may throw ios_base::failure (27.4.4.3). If it inserted no characters
10331 because it caught an exception thrown while extracting characters
10332 from *this and failbit is on in exceptions() (27.4.4.3), then the
10333 caught
10334 exception is rethrown."
10335 </p></blockquote>
10336
10337 <p>
10338 both in N2134 seems to imply that any exception, which occurs
10339 *after* at least one character has been inserted is caught and lost
10340 for
10341 ever. It seems that even if failbit is on in exceptions() rethrow is
10342 not
10343 allowed due to the wording "If it inserted no characters because it
10344 caught an exception thrown while extracting".
10345 </p>
10346
10347 <p>
10348 Is this behaviour by design?
10349 </p>
10350
10351 <p>
10352 I would like to add that its output counterpart in 27.6.2.6.3 [ostream.inserters]/7-9
10353 (also
10354 N2134) does not demonstrate such an exception-loss-behaviour.
10355 On the other side, I wonder concerning several subtle differences
10356 compared to input::
10357 </p>
10358 <p>
10359 1) Paragraph 8 says at its end:
10360 </p>
10361
10362 <blockquote><p>
10363 "- an exception occurs while getting a character from sb."
10364 </p></blockquote>
10365
10366 <p>
10367 Note that there is nothing mentioned which would imply that such
10368 an exception will be caught compared to 27.6.1.2.3 [istream::extractors]/14.
10369 </p>
10370
10371 <p>
10372 2) Paragraph 9 says:
10373 </p>
10374
10375 <blockquote><p>
10376 "If the function inserts no characters, it calls setstate(failbit)
10377 (which
10378 may throw ios_base::failure (27.4.4.3)). If an exception was thrown
10379 while extracting a character, the function sets failbit in error
10380 state,
10381 and if failbit is on in exceptions() the caught exception is
10382 rethrown."
10383 </p></blockquote>
10384
10385 <p>
10386 The sentence starting with "If an exception was thrown" seems to
10387 imply that such an exception *should* be caught before.
10388 </p>
10389
10390
10391 <p><b>Proposed resolution:</b></p>
10392 <p>
10393 (a) In 27.6.1.2.3 [istream::extractors]/15 (N2134) change the sentence
10394 </p>
10395
10396 <blockquote><p>
10397 If the function inserts no characters, it calls
10398 <tt>setstate(failbit)</tt>, which may throw <tt>ios_base::failure</tt>
10399 (27.4.4.3). If <del>it inserted no characters because it caught an
10400 exception thrown while extracting characters from <tt>*this</tt></del>
10401 <ins>an exception was thrown while extracting a character from
10402 <tt>*this</tt>, the function sets <tt>failbit</tt> in error state,</ins>
10403 and <tt>failbit</tt> is on in <tt>exceptions()</tt> (27.4.4.3), then the
10404 caught exception is rethrown.
10405 </p></blockquote>
10406
10407 <p>
10408 (b) In 27.6.2.6.3 [ostream.inserters]/8 (N2134) change the sentence:
10409 </p>
10410
10411 <blockquote>
10412 <p>
10413 Gets characters from <tt>sb</tt> and inserts them in <tt>*this</tt>.
10414 Characters are read from <tt>sb</tt> and inserted until any of the
10415 following occurs:
10416 </p>
10417 <ul>
10418 <li>end-of-file occurs on the input sequence;</li>
10419 <li>inserting in the output sequence fails (in which case the character to be inserted is not extracted);</li>
10420 <li>an exception occurs while getting a character from <tt>sb</tt> <ins>(in which
10421 case the exception is caught)</ins>.</li>
10422 </ul>
10423 </blockquote>
10424
10425
10426
10427 <p><b>Rationale:</b></p>
10428 This extractor is described as a formatted input function so the
10429 exception behavior is already specified. There is additional behavior
10430 described in this section that applies to the case in which failbit is
10431 set. This doesn't contradict the usual exception behavior for formatted
10432 input functions because that applies to the case in which badbit is set.
10433
10434
10435
10436
10437
10438 <hr>
10439 <h3><a name="641"></a>641. Editorial fix for 27.6.4 (N2134)</h3>
10440 <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>
10441  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-18</p>
10442 <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>
10443 <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>
10444 <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>
10445 <p><b>Discussion:</b></p>
10446 <p>
10447 The function <tt>f</tt> in para 4 (27.6.4 [ext.manip]) references an unknown <tt>strm</tt>
10448 in the following line:
10449 </p>
10450
10451 <blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, strm, err, mon);
10452 </pre></blockquote>
10453
10454
10455 <p><b>Proposed resolution:</b></p>
10456 <p>
10457 Change 27.6.4 [ext.manip], p4:
10458 </p>
10459
10460 <blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, str<del>m</del>, err, mon);
10461 </pre></blockquote>
10462
10463 <p><i>[
10464 Oxford:  Editorial.
10465 ]</i></p>
10466
10467
10468
10469
10470
10471
10472
10473 <hr>
10474 <h3><a name="642"></a>642. Invalidated fstream footnotes in N2134</h3>
10475 <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>
10476  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-20</p>
10477 <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>
10478 <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>
10479 <p><b>Discussion:</b></p>
10480 <p>
10481 The standard wording of N2134 has extended the 14882:2003(E)
10482 wording for the ifstream/ofstream/fstream open function to fix
10483 a long standing problem, see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#409">409</a>.
10484 </p>
10485
10486 <p>
10487 Now it's properly written as
10488 </p>
10489
10490 <blockquote><p>
10491 "If that function does not return a null pointer calls clear(),
10492 otherwise
10493 calls setstate(failbit)[..]"
10494 </p></blockquote>
10495
10496 <p>
10497 instead of the previous
10498 </p>
10499
10500 <blockquote><p>
10501 "If that function returns a null pointer, calls setstate(failbit)[..]
10502 </p></blockquote>
10503
10504 <p>
10505 While the old footnotes saying
10506 </p>
10507
10508 <blockquote><p>
10509 "A successful open does not change the error state."
10510 </p></blockquote>
10511
10512 <p>
10513 where correct and important, they are invalid now for ifstream and
10514 ofstream (because clear *does* indeed modify the error state) and
10515 should be removed (Interestingly fstream itself never had these,
10516 although
10517 they where needed for that time).
10518 </p>
10519
10520
10521 <p><b>Proposed resolution:</b></p>
10522 <p>
10523 In 27.8.1.9 [ifstream.members], remove footnote:
10524 </p>
10525
10526 <blockquote><p>
10527 <del><sup>334)</sup> A successful open does not change the error state.</del>
10528 </p></blockquote>
10529
10530 <p>
10531 In 27.8.1.13 [ofstream.members], remove footnote:
10532 </p>
10533
10534 <blockquote><p>
10535 <del><sup>335)</sup> A successful open does not change the error state.</del>
10536 </p></blockquote>
10537
10538
10539
10540
10541
10542
10543 <hr>
10544 <h3><a name="645"></a>645. Missing members in match_results</h3>
10545 <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>
10546  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
10547 <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>
10548 <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>
10549 <p><b>Discussion:</b></p>
10550 <p>
10551 According to the description given in 28.10 [re.results]/2 the class template
10552 match_results "shall satisfy the requirements of a Sequence, [..],
10553 except that only operations defined for const-qualified Sequences
10554 are supported".
10555 Comparing the provided operations from 28.10 [re.results]/3 with the
10556 sequence/container tables 80 and 81 one recognizes the following
10557 missing operations:
10558 </p>
10559
10560 <p>
10561 1) The members
10562 </p>
10563
10564 <blockquote><pre>const_iterator rbegin() const;
10565 const_iterator rend() const;
10566 </pre></blockquote>
10567
10568 <p>
10569 should exists because 23.1/10 demands these for containers
10570 (all sequences are containers) which support bidirectional
10571 iterators. Aren't these supported by match_result? This is not
10572 explicitely expressed, but it's somewhat implied by two arguments:
10573 </p>
10574 <p>
10575 (a) Several typedefs delegate to
10576 <tt>iterator_traits&lt;BidirectionalIterator&gt;</tt>.
10577 </p>
10578 <p>
10579 (b) The existence of <tt>const_reference operator[](size_type n) const</tt>
10580 implies even random-access iteration.
10581 I also suggest, that <tt>match_result</tt> should explicitly mention,
10582 which minimum iterator category is supported and if this does
10583 not include random-access the existence of <tt>operator[]</tt> is
10584 somewhat questionable.
10585 </p>
10586 <p>
10587 2) The new "convenience" members
10588 </p>
10589 <blockquote><pre>const_iterator cbegin() const;
10590 const_iterator cend() const;
10591 const_iterator crbegin() const;
10592 const_iterator crend() const;
10593 </pre></blockquote>
10594 <p>
10595 should be added according to tables 80/81.
10596 </p>
10597
10598
10599 <p><b>Proposed resolution:</b></p>
10600 <p>
10601 Add the following members to the <tt>match_results</tt> synopsis after <tt>end()</tt> in 28.10 [re.results]
10602 para 3:
10603 </p>
10604
10605 <blockquote><pre>const_iterator cbegin() const; 
10606 const_iterator cend() const;
10607 </pre></blockquote>
10608
10609 <p>
10610 In section 28.10.3 [re.results.acc] change:
10611 </p>
10612
10613 <blockquote>
10614 <pre>const_iterator begin() const;
10615 <ins>const_iterator cbegin() const;</ins>
10616 </pre>
10617 <blockquote>
10618 <p>
10619 -7- <i>Returns:</i> A starting iterator that enumerates over all the sub-expressions stored in <tt>*this</tt>.
10620 </p>
10621 </blockquote>
10622
10623 <pre>const_iterator end() const;
10624 <ins>const_iterator cend() const;</ins>
10625 </pre>
10626 <blockquote>
10627 <p>
10628 -8- <i>Returns:</i> A terminating iterator that enumerates over all the sub-expressions stored in <tt>*this</tt>.
10629 </p>
10630 </blockquote>
10631 </blockquote>
10632
10633
10634
10635 <p><i>[
10636 Kona (2007): Voted to adopt proposed wording in
10637 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>
10638 except removing the entry in the table container requirements.  Moved to Review.
10639 ]</i></p>
10640
10641
10642 <p><i>[
10643 Bellevue:  Proposed wording now in the WP.
10644 ]</i></p>
10645
10646
10647
10648
10649
10650 <hr>
10651 <h3><a name="647"></a>647. Inconsistent regex_search params</h3>
10652 <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>
10653  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p>
10654 <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>
10655 <p><b>Discussion:</b></p>
10656 <p>
10657 28.11.3 [re.alg.search]/5 declares
10658 </p>
10659
10660 <blockquote><pre>template &lt;class iterator, class charT, class traits&gt;
10661 bool regex_search(iterator first, iterator last,
10662                   const basic_regex&lt;charT, traits&gt;&amp; e,
10663                   regex_constants::match_flag_type flags =
10664                       regex_constants::match_default);
10665 </pre></blockquote>
10666
10667 <p>
10668 where it's not explained, which iterator category
10669 the parameter iterator belongs to. This is inconsistent
10670 to the preceding declaration in the synopsis section
10671 28.4 [re.syn], which says:
10672 </p>
10673
10674 <blockquote><pre>template &lt;class BidirectionalIterator, class charT, class traits&gt;
10675 bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
10676                   const basic_regex&lt;charT, traits&gt;&amp; e,
10677                   regex_constants::match_flag_type flags =
10678                       regex_constants::match_default);
10679 </pre></blockquote>
10680
10681
10682 <p><b>Proposed resolution:</b></p>
10683 <p>
10684 In 28.11.3 [re.alg.search]/5 replace all three occurences of param "iterator" with
10685 "BidirectionalIterator"
10686 </p>
10687
10688 <blockquote><pre>template &lt;class <del>iterator</del> <ins>BidirectionalIterator</ins>, class charT, class traits&gt;
10689   bool regex_search(<del>iterator</del> <ins>BidirectionalIterator</ins> first, <del>iterator</del> <ins>BidirectionalIterator</ins> last, 
10690                     const basic_regex&lt;charT, traits&gt;&amp; e, 
10691                     regex_constants::match_flag_type flags = 
10692                       regex_constants::match_default);
10693 </pre>
10694 <p>
10695 -6- <i>Effects:</i> Behaves "as if" by constructing an object what of
10696 type <tt>match_results&lt;<del>iterator</del>
10697 <ins>BidirectionalIterator</ins>&gt;</tt> and then returning the result
10698 of <tt>regex_search(first, last, what, e, flags)</tt>.
10699 </p>
10700 </blockquote>
10701
10702
10703 <p><b>Rationale:</b></p>
10704 Applied to working paper while issue was still in New status.
10705
10706
10707
10708
10709
10710 <hr>
10711 <h3><a name="648"></a>648. regex_iterator c'tor needs clarification/editorial fix</h3>
10712 <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>
10713  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p>
10714 <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>
10715 <p><b>Discussion:</b></p>
10716 <p>
10717 In 28.12.1.1 [re.regiter.cnstr]/2 the effects paragraph starts with:
10718 </p>
10719
10720 <blockquote>
10721 <p>
10722 <i>Effects:</i> Initializes begin and end to point to the beginning and the
10723 end of the target sequence, sets pregex to &amp;re, sets flags to f,[..]
10724 </p></blockquote>
10725
10726 <p>
10727 There are two issues with this description:
10728 </p>
10729
10730 <ol>
10731 <li>
10732 The meaning of very first part of this quote is unclear, because
10733 there is no target sequence provided, instead there are given two
10734 parameters a and b, both of type BidirectionalIterator. The mentioned
10735 part does not explain what a and b represent.
10736 </li>
10737 <li>
10738 There does not exist any parameter f, but instead a parameter
10739 m in the constructor declaration, so this is actually an editorial
10740 fix.
10741 </li>
10742 </ol>
10743
10744
10745 <p><b>Proposed resolution:</b></p>
10746 <p>
10747 In 28.12.1.1 [re.regiter.cnstr]/2 change the above quoted part by
10748 </p>
10749
10750 <blockquote><p>
10751 <i>Effects:</i> Initializes <tt>begin</tt> and <tt>end</tt> to point to
10752 the beginning and the end of the target sequence <ins>designated by the
10753 iterator range <tt>[a, b)</tt></ins>, sets <tt>pregex</tt> to
10754 <tt>&amp;re</tt>, sets <tt>flags</tt> to <tt><del>f</del>
10755 <ins>m</ins></tt>, then calls <tt>regex_search(begin, end, match,
10756 *pregex, flags)</tt>. If this call returns <tt>false</tt> the
10757 constructor sets <tt>*this</tt> to the end-of-sequence iterator.
10758 </p></blockquote>
10759
10760
10761
10762
10763
10764 <hr>
10765 <h3><a name="649"></a>649. Several typos in regex_token_iterator constructors</h3>
10766 <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>
10767  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p>
10768 <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>
10769 <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>
10770 <p><b>Discussion:</b></p>
10771 <p>
10772 In 28.12.2.1 [re.tokiter.cnstr]/1+2 both the constructor declaration
10773 and the following text shows some obvious typos:
10774 </p>
10775 <p>
10776 1) The third constructor form is written as
10777 </p>
10778 <blockquote><pre>template &lt;std::size_t N&gt;
10779   regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, 
10780                        const regex_type&amp; re, 
10781                        const int (&amp;submatches)[R], 
10782                        regex_constants::match_flag_type m = 
10783                          regex_constants::match_default);
10784 </pre></blockquote>
10785
10786 <p>
10787 where the dimensions of submatches are specified by an
10788 unknown value R, which should be N.
10789 </p>
10790 <p>
10791 2) Paragraph 2 of the same section says in its last sentence:
10792 </p>
10793
10794 <blockquote><p>
10795 The third constructor initializes the member <tt>subs</tt> to hold a
10796 copy of the sequence of integer values pointed to by the iterator range
10797 <tt>[&amp;submatches, &amp;submatches + R)</tt>.
10798 </p></blockquote>
10799
10800 <p>
10801 where again R must be replaced by N.
10802 </p>
10803
10804 <p>
10805 3) Paragraph 3 of the same section says in its first sentence:
10806 </p>
10807
10808 <blockquote><p>
10809 Each constructor then sets <tt>N</tt> to <tt>0</tt>, and
10810 <tt>position</tt> to <tt>position_iterator(a, b, re, f)</tt>.
10811 </p></blockquote>
10812
10813 <p>
10814 where a non-existing parameter "f" is mentioned, which must be
10815 replaced
10816 by the parameter "m".
10817 </p>
10818
10819
10820 <p><b>Proposed resolution:</b></p>
10821 <p>
10822 Change 28.12.2.1 [re.tokiter.cnstr]/1:
10823 </p>
10824 <blockquote><pre>template &lt;std::size_t N&gt;
10825   regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, 
10826                        const regex_type&amp; re, 
10827                        const int (&amp;submatches)[<del>R</del> <ins>N</ins>], 
10828                        regex_constants::match_flag_type m = 
10829                          regex_constants::match_default);
10830 </pre></blockquote>
10831
10832 <p>
10833 Change 28.12.2.1 [re.tokiter.cnstr]/2:
10834 </p>
10835
10836 <blockquote><p>
10837 <i>Effects:</i> The first constructor initializes the member
10838 <tt>subs</tt> to hold the single value <tt>submatch</tt>. The second
10839 constructor initializes the member <tt>subs</tt> to hold a copy of the
10840 argument <tt>submatches</tt>. The third constructor initializes the
10841 member <tt>subs</tt> to hold a copy of the sequence of integer values
10842 pointed to by the iterator range <tt>[&amp;submatches, &amp;submatches +
10843 <del>R</del> <ins>N</ins>)</tt>.
10844 </p></blockquote>
10845
10846 <p>
10847 Change 28.12.2.1 [re.tokiter.cnstr]/3:
10848 </p>
10849
10850 <blockquote><p>
10851 Each constructor then sets <tt>N</tt> to <tt>0</tt>, and
10852 <tt>position</tt> to <tt>position_iterator(a, b, re, <del>f</del>
10853 <ins>m</ins>)</tt>. If <tt>position</tt> is not an end-of-sequence
10854 iterator the constructor sets <tt>result</tt> to the address of the
10855 current match. Otherwise if any of the values stored in <tt>subs</tt> is
10856 equal to <tt>-1</tt> the constructor sets <tt>*this</tt> to a suffix
10857 iterator that points to the range <tt>[a, b)</tt>, otherwise the
10858 constructor sets <tt>*this</tt> to an end-of-sequence iterator.
10859 </p></blockquote>
10860
10861
10862
10863
10864
10865
10866 <hr>
10867 <h3><a name="653"></a>653. Library reserved names</h3>
10868 <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>
10869  <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-03-08</p>
10870 <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>
10871 <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>
10872 <p><b>Discussion:</b></p>
10873 <p>
10874 </p>
10875 <blockquote>
10876 <p>
10877 1.2 [intro.refs] Normative references
10878 </p>
10879
10880 <p>
10881 The following standards contain provisions which, through reference in
10882 this text, constitute provisions of this Interna- tional Standard. At
10883 the time of publication, the editions indicated were valid. All
10884 standards are subject to revision, and parties to agreements based on
10885 this International Standard are encouraged to investigate the
10886 possibility of applying the most recent editions of the standards
10887 indicated below. Members of IEC and ISO maintain registers of currently
10888 valid International Standards.
10889 </p>
10890
10891 <ul>
10892 <li>Ecma International, ECMAScript Language Specification, Standard
10893 Ecma-262, third edition, 1999.</li>
10894 <li>ISO/IEC 2382 (all parts), Information technology - Vocabulary</li>
10895 <li>ISO/IEC 9899:1990, Programming languages - C</li>
10896 <li>ISO/IEC 9899/Amd.1:1995, Programming languages - C, AMENDMENT 1: C
10897 Integrity</li>
10898 <li>ISO/IEC 9899:1999, Programming languages - C</li>
10899 <li>ISO/IEC 9899:1999/Cor.1:2001 Programming languages - C</li>
10900 <li>ISO/IEC 9899:1999/Cor.2:2004 Programming languages - C</li>
10901 <li>ISO/IEC 9945:2003, Information Technology-Portable Operating System
10902 Interface (POSIX)</li>
10903 <li>ISO/IEC 10646-1:1993 Information technology - Universal Multiple-Octet
10904 Coded Character Set (UCS) - Part 1: Architecture and Basic Multilingual
10905 Plane</li>
10906 </ul>
10907 </blockquote>
10908
10909 <p>
10910 I'm not sure how many of those reserve naming patterns that might affect
10911 us, but I am equally sure I don't own a copy of any of these to check!
10912 </p>
10913 <p>
10914 The point is to list the reserved naming patterns, rather than the
10915 individual names themselves - although we may want to list C keywords
10916 that are valid identifiers in C++ but likely to cause trouble in shared
10917 headers (e.g. restrict)
10918 </p>
10919
10920 <p><i>[
10921 Kona (2007): Recommend NAD.  No one has identified a specific defect, just the possibility of one.
10922 ]</i></p>
10923
10924
10925 <p><i>[
10926 Post-Kona: Alisdair request Open. A good example of the problem was a
10927 discussion of the system error proposal, where it was pointed out an all-caps
10928 identifier starting with a capital E conflicted with reserved macro names for
10929 both Posix and C.  I had absolutely no idea of this rule, and suspect I was
10930 not the only one in the room.<br>
10931 <br>
10932 Resolution will require someone with access to all the listed documents to
10933 research their respective name reservation rules, or people with access to
10934 specific documents add their rules to this issue until the list is complete.
10935 ]</i></p>
10936
10937
10938 <p><i>[
10939 Bellevue: Wording is aleady present in various standards, and no-one has come forward with wording.
10940 Suggest a formal paper rather than a defect report is the correct way to proceed.
10941 ]</i></p>
10942
10943
10944
10945
10946 <p><b>Proposed resolution:</b></p>
10947
10948
10949
10950
10951
10952 <hr>
10953 <h3><a name="656"></a>656. Typo in subtract_with_carry_engine declaration</h3>
10954 <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>
10955  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p>
10956 <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>
10957 <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>
10958 <p><b>Discussion:</b></p>
10959 <p>
10960 26.4.2 [rand.synopsis] the header <tt>&lt;random&gt;</tt> synopsis
10961 contains an unreasonable closing curly brace inside the
10962 <tt>subtract_with_carry_engine</tt> declaration.
10963 </p>
10964
10965
10966 <p><b>Proposed resolution:</b></p>
10967 <p>
10968 Change the current declaration in 26.4.2 [rand.synopsis]
10969 </p>
10970
10971 <blockquote><pre>template &lt;class UIntType, size_t w<del>}</del>, size_t s, size_t r&gt;
10972 class subtract_with_carry_engine;
10973 </pre></blockquote>
10974
10975
10976 <p><i>[
10977 Pete: Recommends editorial.
10978 ]</i></p>
10979
10980
10981
10982
10983
10984 <hr>
10985 <h3><a name="657"></a>657. unclear requirement about header inclusion</h3>
10986 <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>
10987  <b>Submitter:</b> Gennaro Prota <b>Date:</b> 2007-03-14</p>
10988 <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>
10989 <p><b>Discussion:</b></p>
10990 <p>
10991 17.4.2.1 [using.headers] states:
10992 </p>
10993
10994 <blockquote><p>
10995 A translation unit shall include a header only outside of any
10996 external declaration or definition, [...]
10997 </p></blockquote>
10998
10999 <p>
11000 I see three problems with this requirement:
11001 </p>
11002
11003 <ol type="a">
11004 <li><p>The C++ standard doesn't define what an "external declaration" or
11005 an "external definition" are (incidentally the C99 standard does, and
11006 has a sentence very similar to the above regarding header inclusion).
11007 </p><p>
11008 I think the intent is that the #include directive shall lexically
11009 appear outside *any* declaration; instead, when the issue was pointed
11010 out on comp.std.c++ at least one poster interpreted "external
11011 declaration" as "declaration of an identifier with external linkage".
11012 If this were the correct interpretation, then the two inclusions below
11013 would be legal:
11014 </p>
11015 <blockquote><pre>  // at global scope
11016   static void f()
11017   {
11018 # include &lt;cstddef&gt;
11019   }
11020
11021   static void g()
11022   {
11023 # include &lt;stddef.h&gt;
11024   }
11025 </pre></blockquote>
11026 <p>
11027 (note that while the first example is unlikely to compile correctly,
11028 the second one may well do)
11029 </p></li>
11030
11031 <li><p>as the sentence stands, violations will require a diagnostic; is
11032 this the intent? It was pointed out on comp.std.c++ (by several
11033 posters) that at least one way to ensure a diagnostic exists:
11034 </p>
11035 <blockquote><p>
11036    [If there is an actual file for each header,] one simple way
11037    to implement this would be to insert a reserved identifier
11038    such as __begin_header  at the start of each standard header.
11039    This reserved identifier would be ignored for all other
11040    purposes, except that, at the appropriate point in phase 7, if
11041    it is found inside an external definition, a diagnostic is
11042    generated. There's many other similar ways to achieve the same
11043    effect.
11044    </p>
11045 <p>                                 --James Kuyper, on comp.std.c++
11046 </p></blockquote></li>
11047
11048 <li><p>is the term "header" meant to be limited to standard headers?
11049 Clause 17 is all about the library, but still the general question is
11050 interesting and affects one of the points in the explicit namespaces
11051 proposal (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1691.html">n1691</a>):
11052 </p>
11053 <blockquote><p>
11054     Those seeking to conveniently enable argument-dependent
11055     lookups for all operators within an explicit namespace
11056     could easily create a header file that does so:
11057 </p><pre>    namespace mymath::
11058     {
11059         #include "using_ops.hpp"
11060     }
11061 </pre></blockquote>
11062 </li>
11063 </ol>
11064
11065
11066 <p><b>Proposed resolution:</b></p>
11067 <p>
11068 </p>
11069
11070
11071 <p><b>Rationale:</b></p>
11072 We believe that the existing language does not cause any real confusion
11073 and any new formulation of the rules that we could come up with are
11074 unlikely to be better than what's already in the standard.
11075
11076
11077
11078
11079
11080 <hr>
11081 <h3><a name="658"></a>658. Two unspecified function comparators in [function.objects]</h3>
11082 <p><b>Section:</b> 20.6 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
11083  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-19</p>
11084 <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>
11085 <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>
11086 <p><b>Discussion:</b></p>
11087 <p>
11088 The header <tt>&lt;functional&gt;</tt> synopsis in 20.6 [function.objects]
11089 contains the following two free comparison operator templates
11090 for the <tt>function</tt> class template
11091 </p>
11092
11093 <blockquote><pre>template&lt;class Function1, class Function2&gt;
11094 void operator==(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
11095 template&lt;class Function1, class Function2&gt;
11096 void operator!=(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
11097 </pre></blockquote>
11098
11099 <p>
11100 which are nowhere described. I assume that they are relicts before the
11101 corresponding two private and undefined member templates in the function
11102 template (see 20.6.15.2 [func.wrap.func] and X [func.wrap.func.undef]) have been introduced. The original free
11103 function templates should be removed, because using an undefined entity
11104 would lead to an ODR violation of the user.
11105 </p>
11106
11107
11108 <p><b>Proposed resolution:</b></p>
11109 <p>
11110 Remove the above mentioned two function templates from
11111 the header <tt>&lt;functional&gt;</tt> synopsis (20.6 [function.objects])
11112 </p>
11113
11114 <blockquote><pre><del>template&lt;class Function1, class Function2&gt;
11115 void operator==(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);
11116 template&lt;class Function1, class Function2&gt;
11117 void operator!=(const function&lt;Function1&gt;&amp;, const function&lt;Function2&gt;&amp;);</del>
11118 </pre></blockquote>
11119
11120
11121
11122 <p><b>Rationale:</b></p>
11123 Fixed by
11124 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2292.html">N2292</a>
11125 Standard Library Applications for Deleted Functions.
11126
11127
11128
11129
11130
11131 <hr>
11132 <h3><a name="662"></a>662. Inconsistent handling of incorrectly-placed thousands separators</h3>
11133 <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>
11134  <b>Submitter:</b> Cosmin Truta <b>Date:</b> 2007-04-05</p>
11135 <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>
11136 <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>
11137 <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>
11138 <p><b>Discussion:</b></p>
11139 <p>
11140 From Section 22.2.2.1.2 [facet.num.get.virtuals], paragraphs 11 and 12, it is implied
11141 that the value read from a stream must be stored
11142 even if the placement of thousands separators does not conform to the
11143 <code>grouping()</code> specification from the <code>numpunct</code> facet.
11144 Since incorrectly-placed thousands separators are flagged as an extraction
11145 failure (by the means of <code>failbit</code>), we believe it is better not
11146 to store the value. A consistent strategy, in which any kind of extraction
11147 failure leaves the input item intact, is conceptually cleaner, is able to avoid
11148 corner-case traps, and is also more understandable from the programmer's point
11149 of view.
11150 </p>
11151 <p>
11152 Here is a quote from <i>"The C++ Programming Language (Special Edition)"</i>
11153 by B.&nbsp;Stroustrup (Section&nbsp;D.4.2.3, pg.&nbsp;897):
11154 </p>
11155 <blockquote><p>
11156 <i>"If a value of the desired type could not be read, failbit is set in r.
11157 [...] An input operator will use r to determine how to set the state of its
11158 stream. If no error was encountered, the value read is assigned through v;
11159 otherwise, v is left unchanged."</i>
11160 </p></blockquote>
11161 <p>
11162 This statement implies that <code>rdstate()</code> alone is sufficient to
11163 determine whether an extracted value is to be assigned to the input item
11164 <i>val</i> passed to <code>do_get</code>. However, this is in disagreement
11165 with the current C++ Standard. The above-mentioned assumption is true in all
11166 cases, except when there are mismatches in digit grouping. In the latter case,
11167 the parsed value is assigned to <i>val</i>, and, at the same time, <i>err</i>
11168 is assigned to <code>ios_base::failbit</code> (essentially "lying" about the
11169 success of the operation). Is this intentional? The current behavior raises
11170 both consistency and usability concerns.
11171 </p>
11172 <p>
11173 Although digit grouping is outside the scope of <code>scanf</code> (on which
11174 the virtual methods of <code>num_get</code> are based), handling of grouping
11175 should be consistent with the overall behavior of scanf. The specification of
11176 <code>scanf</code> makes a distinction between input failures and matching
11177 failures, and yet both kinds of failures have no effect on the input items
11178 passed to <code>scanf</code>. A mismatch in digit grouping logically falls in
11179 the category of matching failures, and it would be more consistent, and less
11180 surprising to the user, to leave the input item intact whenever a failure is
11181 being signaled.
11182 </p>
11183 <p>
11184 The extraction of <code>bool</code> is another example outside the scope of
11185 <code>scanf</code>, and yet consistent, even in the event of a successful
11186 extraction of a <code>long</code> but a failed conversion from
11187 <code>long</code> to <code>bool</code>.
11188 </p>
11189 <p>
11190 Inconsistency is further aggravated by the fact that, when failbit is set,
11191 subsequent extraction operations are no-ops until <code>failbit</code> is
11192 explicitly cleared. Assuming that there is no explicit handling of
11193 <code>rdstate()</code> (as in <code>cin&gt;&gt;i&gt;&gt;j</code>) it is
11194 counter-intuitive to be able to extract an integer with mismatched digit
11195 grouping, but to be unable to extract another, properly-formatted integer
11196 that immediately follows.
11197 </p>
11198 <p>
11199 Moreover, setting <code>failbit</code>, and selectively assigning a value to
11200 the input item, raises usability problems. Either the strategy of
11201 <code>scanf</code> (when there is no extracted value in case of failure), or
11202 the strategy of the <code>strtol</code> family (when there is always an
11203 extracted value, and there are well-defined defaults in case of a failure) are
11204 easy to understand and easy to use. On the other hand, if <code>failbit</code>
11205 alone cannot consistently make a difference between a failed extraction, and a
11206 successful but not-quite-correct extraction whose output happens to be the same
11207 as the previous value, the programmer must resort to implementation tricks.
11208 Consider the following example:
11209 </p>
11210 <pre>    int i = old_i;
11211     cin &gt;&gt; i;
11212     if (cin.fail())
11213         // can the value of i be trusted?
11214         // what does it mean if i == old_i?
11215         // ...
11216 </pre>
11217 <p>
11218 Last but not least, the current behvaior is not only confusing to the casual
11219 reader, but it has also been confusing to some book authors. Besides
11220 Stroustrup's book, other books (e.g. "Standard C++ IOStreams and Locales" by
11221 Langer and Kreft) are describing the same mistaken assumption. Although books
11222 are not to be used instead of the standard reference, the readers of these
11223 books, as well as the people who are generally familiar to <code>scanf</code>,
11224 are even more likely to misinterpret the standard, and expect the input items
11225 to remain intact when a failure occurs.
11226 </p>
11227
11228
11229 <p><b>Proposed resolution:</b></p>
11230
11231 <p>
11232 Change 22.2.2.1.2 [facet.num.get.virtuals]:
11233 </p>
11234
11235 <blockquote>
11236 <p>
11237 <b>Stage 3:</b> The result of stage 2 processing can be one of
11238 </p>
11239 <ul>
11240 <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>
11241
11242 <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>
11243 </ul>
11244 <p>
11245 <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>
11246 </p>
11247 </blockquote>
11248
11249
11250 <p><b>Rationale:</b></p>
11251 post-Toronto: Changed from New to NAD at the request of the author.  The preferred solution of
11252 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2327.pdf">N2327</a>
11253 makes this resolution obsolete.
11254
11255
11256
11257
11258
11259 <hr>
11260 <h3><a name="663"></a>663. Complexity Requirements</h3>
11261 <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>
11262  <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p>
11263 <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>
11264 <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>
11265 <p><b>Discussion:</b></p>
11266 <p>
11267 17.3.1.3 [structure.specifications] para 5 says
11268 </p>
11269
11270 <blockquote><p>
11271 -5- Complexity requirements specified in the library&nbsp;
11272 clauses are upper bounds, and implementations that provide better
11273 complexity guarantees satisfy the requirements.
11274 </p></blockquote>
11275
11276 <p>
11277 The following
11278 objection has been raised:
11279 </p>
11280
11281 <blockquote><p>
11282 The library clauses suggest general
11283 guidelines regarding complexity, but we have been unable to discover
11284 any absolute hard-and-fast formulae for these requirements.&nbsp; Unless
11285 or until the Library group standardizes specific hard-and-fast
11286 formulae, we regard all the complexity requirements as subject to a&nbsp;
11287 "fudge factor" without any intrinsic upper bound.
11288 </p></blockquote>
11289
11290 <p>
11291 [Plum ref&nbsp;
11292 _23213Y31 etc]
11293 </p>
11294
11295
11296 <p><b>Proposed resolution:</b></p>
11297 <p>
11298 </p>
11299
11300
11301 <p><b>Rationale:</b></p>
11302 Kona (2007): No specific instances of underspecification have been
11303 identified, and big-O notation always involves constant factors.
11304
11305
11306
11307
11308
11309 <hr>
11310 <h3><a name="683"></a>683. regex_token_iterator summary error</h3>
11311 <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>
11312  <b>Submitter:</b> Eric Niebler <b>Date:</b> 2007-06-02</p>
11313 <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>
11314 <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>
11315 <p><b>Discussion:</b></p>
11316 <p>
11317 28.12.2 [re.tokiter], p3 says:
11318 </p>
11319 <blockquote>
11320 <p>
11321 After it is constructed, the iterator finds and stores a value
11322 <tt>match_results&lt;BidirectionalIterator&gt;</tt> position and sets the
11323 internal count <tt>N</tt> to zero.
11324 </p>
11325 </blockquote>
11326
11327 <p>
11328 Should read:
11329 </p>
11330
11331 <blockquote>
11332 <p>
11333 After it is constructed, the iterator finds and stores a value
11334 <tt><del>match_results</del><ins>regex_iterator</ins>&lt;BidirectionalIterator<ins>, charT, traits</ins>&gt;</tt>
11335 position and sets the internal count <tt>N</tt> to zero.
11336 </p>
11337 </blockquote>
11338
11339 <p><i>[
11340 John adds:
11341 ]</i></p>
11342
11343
11344 <blockquote><p>
11345 Yep, looks like a typo/administrative fix to me.
11346 </p></blockquote>
11347
11348
11349
11350 <p><b>Proposed resolution:</b></p>
11351 <p>
11352 </p>
11353
11354
11355
11356
11357
11358 <hr>
11359 <h3><a name="684"></a>684. Unclear which members of match_results should be used in comparison</h3>
11360 <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>
11361  <b>Submitter:</b> Nozomu Katoo <b>Date:</b> 2007-05-27</p>
11362 <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>
11363 <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>
11364 <p><b>Discussion:</b></p>
11365 <p>
11366 In 28.4 [re.syn] of N2284, two template functions 
11367 are declared here: 
11368 </p>
11369 <blockquote><pre>// 28.10, class template match_results: 
11370   &lt;<i>snip</i>&gt;
11371 // match_results comparisons 
11372   template &lt;class BidirectionalIterator, class Allocator&gt; 
11373     bool operator== (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, 
11374                      const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); 
11375   template &lt;class BidirectionalIterator, class Allocator&gt; 
11376     bool operator!= (const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, 
11377                      const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2); 
11378
11379 // 28.10.6, match_results swap:
11380 </pre></blockquote>
11381
11382 <p>
11383 But the details of these two bool operator functions (i.e., which members of
11384 <tt>match_results</tt> should be used in comparison) are not described in any
11385 following sections.
11386 </p>
11387
11388 <p><i>[
11389 John adds:
11390 ]</i></p>
11391
11392
11393 <blockquote><p>
11394 That looks like a bug: <tt>operator==</tt> should return <tt>true</tt> only if
11395 the two objects refer to the same match - ie if one object was constructed as a
11396 copy of the other.
11397 </p></blockquote>
11398
11399 <p><i>[
11400 Kona (2007): Bill and Pete to add minor wording to that proposed in
11401 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2409.pdf">N2409</a>.
11402 ]</i></p>
11403
11404
11405
11406 <p><b>Proposed resolution:</b></p>
11407 <p>
11408 Add a new section after 28.10.6 [re.results.swap], which reads:
11409 </p>
11410 <p>
11411 28.10.7 match_results non-member functions.
11412 </p>
11413
11414 <blockquote>
11415 <pre>template&lt;class BidirectionalIterator, class Allocator&gt; 
11416   bool operator==(const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, 
11417                   const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11418 </pre>
11419 <blockquote>
11420 <p>
11421 <i>Returns:</i> <tt>true</tt> only if the two objects refer to the same match.
11422 </p>
11423 </blockquote>
11424 </blockquote>
11425
11426 <blockquote>
11427 <pre>template&lt;class BidirectionalIterator, class Allocator&gt; 
11428   bool operator!=(const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, 
11429                   const match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11430 </pre>
11431 <blockquote>
11432 <p>
11433 <i>Returns:</i> <tt>!(m1 == m2)</tt>.
11434 </p>
11435 </blockquote>
11436 </blockquote>
11437
11438 <blockquote>
11439 <pre>template&lt;class BidirectionalIterator, class Allocator&gt; 
11440   void swap(match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m1, 
11441             match_results&lt;BidirectionalIterator, Allocator&gt;&amp; m2);
11442 </pre>
11443 <blockquote>
11444 <p>
11445 <i>Returns:</i> <tt>m1.swap(m2)</tt>.
11446 </p>
11447 </blockquote>
11448 </blockquote>
11449
11450
11451 <p><i>[
11452 Bellevue:  Proposed wording now in WP.
11453 ]</i></p>
11454
11455
11456
11457
11458
11459 <hr>
11460 <h3><a name="686"></a>686. Unique_ptr and shared_ptr fail to specify non-convertibility to int for unspecified-bool-type</h3>
11461 <p><b>Section:</b> 20.7.11.2.4 [unique.ptr.single.observers], 20.7.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>
11462  <b>Submitter:</b> Beman Dawes <b>Date:</b> 2007-06-14</p>
11463 <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>
11464 <p><b>Discussion:</b></p>
11465 <p>
11466 The standard library uses the <tt>operator <i>unspecified-bool-type</i>() const</tt> idiom in
11467 five places. In three of those places (20.6.15.2.3 [func.wrap.func.cap], function capacity 
11468 for example) the returned value is constrained to disallow
11469 unintended conversions to int. The standardese is
11470 </p>
11471 <blockquote><p>
11472 The return type shall not be convertible to <tt>int</tt>.
11473 </p></blockquote>
11474 <p>
11475 This constraint is omitted for <tt>unique_ptr</tt> and <tt>shared_ptr</tt>. It should be added for those.
11476 </p>
11477
11478 <p><i>[
11479 Bellevue:
11480 ]</i></p>
11481
11482
11483 <blockquote>
11484 Close as NAD. Accepting paper
11485 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2435.htm">N2435</a>
11486 makes it irrelevant.
11487 </blockquote>
11488
11489
11490
11491 <p><b>Proposed resolution:</b></p>
11492 <p>
11493 To the <i>Returns</i> paragraph for <tt>operator <i>unspecified-bool-type</i>()
11494 const</tt>
11495 of 20.7.11.2.4 [unique.ptr.single.observers] paragraph 11 and
11496 20.7.12.2.5 [util.smartptr.shared.obs] paragraph 16, add the sentence:
11497 </p>
11498 <blockquote><p>
11499 The return type shall not be convertible to <tt>int</tt>.
11500 </p></blockquote>
11501
11502
11503 <p><i>[
11504 Kona (2007): Uncertain if <tt>nullptr</tt> will address this issue.
11505 ]</i></p>
11506
11507
11508
11509
11510
11511 <hr>
11512 <h3><a name="690"></a>690. abs(long long) should return long long</h3>
11513 <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>
11514  <b>Submitter:</b> Niels Dekker <b>Date:</b> 2007-06-10</p>
11515 <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>
11516 <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>
11517 <p><b>Discussion:</b></p>
11518 <p>
11519 Quoting the latest draft (n2135), 26.7 [c.math]: 
11520 </p>
11521
11522 <blockquote>
11523 <p>
11524 The added signatures are:
11525 </p>
11526 <blockquote><pre>long abs(long); // labs()
11527 long abs(long long); // llabs()
11528 </pre></blockquote>
11529 </blockquote>
11530 <p>
11531 Shouldn't <tt>abs(long long)</tt> have <tt>long long</tt> as return type?
11532 </p>
11533
11534
11535 <p><b>Proposed resolution:</b></p>
11536 <p>
11537 Change 26.7 [c.math]: 
11538 </p>
11539 <blockquote><pre><ins>long </ins>long abs(long long); // llabs()
11540 </pre></blockquote>
11541
11542
11543 <p><b>Rationale:</b></p>
11544 Had already been fixed in the WP by the time the LWG reviewed this.
11545
11546
11547
11548
11549
11550 <hr>
11551 <h3><a name="697"></a>697. New <tt>&lt;system_error&gt;</tt> header leads to name clashes</h3>
11552 <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>
11553  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-06-24</p>
11554 <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>
11555 <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>
11556 <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>
11557 <p><b>Discussion:</b></p>
11558 <p>
11559 The most recent state of 
11560 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2241.html">N2241</a>
11561 as well as the current draft
11562 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a>
11563 (section 19.4 [syserr], p.2) proposes a
11564 new
11565 enumeration type <tt>posix_errno</tt> immediatly in the namespace <tt>std</tt>. One of
11566 the enumerators has the name <tt>invalid_argument</tt>, or fully qualified:
11567 <tt>std::invalid_argument</tt>. This name clashes with the exception type
11568 <tt>std::invalid_argument</tt>, see 19.1 [std.exceptions]/p.3. This clash makes
11569 e.g. the following snippet invalid:
11570 </p>
11571
11572 <blockquote><pre>#include &lt;system_error&gt;
11573 #include &lt;stdexcept&gt;
11574
11575 void foo() { throw std::invalid_argument("Don't call us - we call you!"); }
11576 </pre></blockquote>
11577
11578 <p>
11579 I propose that this enumeration type (and probably the remaining parts
11580 of
11581 <tt>&lt;system_error&gt;</tt> as well) should be moved into one additional inner
11582 namespace, e.g. <tt>sys</tt> or <tt>system</tt> to reduce foreseeable future clashes
11583 due
11584 to the great number of members that <tt>std::posix_errno</tt> already contains
11585 (Btw.: Why has the already proposed <tt>std::sys</tt> sub-namespace from
11586 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2066.html">N2066</a>
11587 been rejected?). A further clash <em>candidate</em> seems to be
11588 <tt>std::protocol_error</tt>
11589 (a reasonable name for an exception related to a std network library,
11590 I guess).
11591 </p>
11592
11593 <p>
11594 Another possible resolution would rely on the proposed strongly typed
11595 enums,
11596 as described in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2213.pdf">N2213</a>.
11597 But maybe the forbidden implicit conversion to integral types would
11598 make
11599 these enumerators less attractive in this special case?
11600 </p>
11601
11602
11603 <p><b>Proposed resolution:</b></p>
11604 <p>
11605 Fixed by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2422.htm#Issue7">issue 7 of N2422</a>.
11606 </p>
11607
11608
11609
11610
11611
11612
11613 <hr>
11614 <h3><a name="707"></a>707. null pointer constant for <tt>exception_ptr</tt></h3>
11615 <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>
11616  <b>Submitter:</b> Jens Maurer <b>Date:</b> 2007-07-20</p>
11617 <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>
11618 <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>
11619 <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>
11620 <p><b>Discussion:</b></p>
11621
11622 <p>
11623 From the Toronto Core wiki:
11624 </p>
11625
11626 <p>
11627 What do you mean by "null pointer constant"? How do you guarantee that
11628 <tt>exception_ptr() == 1</tt> doesn't work?  Do you even want to prevent that?
11629 What's the semantics?  What about <tt>void *p = 0; exception_ptr() == p</tt>?
11630 Maybe disallow those in the interface, but how do you do that with
11631 portable C++? Could specify just "make it work".
11632 </p>
11633
11634 <p>
11635 Peter's response:
11636 </p>
11637
11638 <p>
11639 null pointer constant as defined in 4.10 [conv.ptr]. Intent is "just make it
11640 work", can be implemented as assignment operator taking a unique pointer
11641 to member, as in the unspecified bool type idiom.
11642 </p>
11643
11644 <p><i>[
11645 Bellevue:
11646 ]</i></p>
11647
11648
11649 <blockquote>
11650 <p>
11651 Original implementation was possible using the "unspecified-null-pointer" idiom, similar to unspecified-bool.
11652 </p>
11653 <p>
11654 Even simpler now with nullptr_t.
11655 </p>
11656 <p>
11657 NAD Rationale : null pointer constant is a perfectly defined term, and
11658 while API is clearly implementable there is no need to spell out
11659 implementation details.
11660 </p>
11661 </blockquote>
11662
11663
11664
11665 <p><b>Proposed resolution:</b></p>
11666 <p>
11667 </p>
11668
11669
11670
11671
11672
11673 <hr>
11674 <h3><a name="717"></a>717. Incomplete <tt>valarray::operator[]</tt> specification in [valarray.access]</h3>
11675 <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>
11676  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-08-27</p>
11677 <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>
11678 <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>
11679 <p><b>Discussion:</b></p>
11680 <p>
11681 Since the return type of <tt>valarray</tt>'s <tt>operator[] const</tt> overload has been
11682 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
11683 the section 26.5.2.3 [valarray.access] are now
11684 incompletely
11685 specified, because many requirements and guarantees should now also
11686 apply to the const overload. Most notably, the address and reference
11687 guarantees should be extended to the const overload case.
11688 </p>
11689
11690
11691 <p><b>Proposed resolution:</b></p>
11692 <p>
11693 Change 26.5.2.3 [valarray.access]:
11694 </p>
11695
11696 <blockquote>
11697 <p>
11698 -1- <del>When applied to a constant array, the subscript operator returns a
11699 reference to the corresponding element of the array. When applied to a
11700 non-constant array, t</del><ins>T</ins>he subscript operator returns a
11701 reference to the corresponding element of the array.
11702 </p>
11703
11704 <p>
11705 -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>
11706 and <tt>size_t j</tt> such that <tt>i+j</tt> is less 
11707 than the length of the <del>non-constant</del> array <tt>a</tt>.
11708 </p>
11709
11710 <p>
11711 -4- Likewise, the expression <tt>&amp;a[i] != &amp;b[j]</tt> evaluates
11712 as <tt>true</tt> for any two <del>non-constant</del> arrays <tt>a</tt> and
11713 <tt>b</tt> and for any <tt>size_t i</tt> and <tt>size_t j</tt> such that
11714 <tt>i</tt> is less than the length of <tt>a</tt> and <tt>j</tt> is less
11715 than the length of <tt>b</tt>. This property indicates an absence of
11716 aliasing and may be used to advantage by optimizing
11717 compilers.<sup>281)</sup>
11718 </p>
11719
11720 <p>
11721 -5- The reference returned by the subscript operator for a<ins>n</ins> <del>non-constant</del> array is guaranteed to be valid until
11722 the member function <tt>resize(size_t, T)</tt> (26.5.2.7) is called for that array or until the lifetime 
11723 of that array ends, whichever happens first.
11724 </p>
11725
11726 </blockquote>
11727
11728
11729
11730
11731
11732
11733 <hr>
11734 <h3><a name="725"></a>725. Optional sequence container requirements column label</h3>
11735 <p><b>Section:</b> 23.1.3 [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>
11736  <b>Submitter:</b> David Abrahams <b>Date:</b> 2007-09-16</p>
11737 <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>
11738 <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>
11739 <p><b>Discussion:</b></p>
11740 <p>
11741 Table 90: (Optional sequence container operations) states the
11742 "assertion note pre/post-condition" of <tt>operator[]</tt> to be
11743 </p>
11744
11745 <blockquote><pre>*(a.begin() + n)
11746 </pre></blockquote>
11747
11748 <p>
11749 Surely that's meant to be "operational semantics?"
11750 </p>
11751
11752
11753
11754 <p><b>Proposed resolution:</b></p>
11755 <blockquote>
11756 <table border="1">
11757 <caption>Table 90: Optional sequence container operations</caption>
11758 <tbody><tr>
11759 <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>
11760 </tr>
11761 </tbody></table>
11762 </blockquote>
11763
11764
11765
11766
11767
11768
11769 <hr>
11770 <h3><a name="729"></a>729. Problem in [rand.req.eng]/3</h3>
11771 <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>
11772  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11773 <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>
11774 <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>
11775 <p><b>Discussion:</b></p>
11776 <p>
11777 The 3rd table row in 26.4.1.3 [rand.req.eng]/3 requires random number engines to accept any 
11778 arithmetic type as a seed, which is then casted to the engine's <tt>result_type</tt> and subsequently 
11779 used for seeding the state of the engine. The requirement stated as "Creates an engine with 
11780 initial state determined by <tt>static_cast&lt;X::result_type&gt;(s)</tt>" forces random number engines 
11781 to either use a seeding method that completely depends on the <tt>result_type</tt> (see the discussion 
11782 of seeding for the <tt>mersenne_twister_engine</tt> in point T2 above) or at least to throw away "bits 
11783 of randomness" in the seed value if the <tt>result_type</tt> is smaller than the seed type. This seems 
11784 to be inappropriate for many modern random number generators, in particular F2-linear or 
11785 cryptographic ones, which operate on an internal bit array that in principle is independent of the 
11786 type of numbers returned.
11787 </p>
11788
11789 <p>
11790 <b>Posible resolution:</b> I propose to change the wording to a version similar to "Creates an 
11791 engine with initial state determined by <tt>static_cast&lt;UintType&gt;(s)</tt>, where <tt>UintType</tt> is an 
11792 implementation specific unsigned integer type."
11793 </p>
11794
11795 <p>
11796 Additionally, the definition of s in 26.4.1.3 [rand.req.eng]/1 c) could be restricted to unsigned integer types.
11797 </p>
11798
11799 <p>
11800 Similarly, the type of the seed in 26.4.1.4 [rand.req.adapt]/3 e) could be left unspecified.
11801 </p>
11802
11803 <p>
11804 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11805 for further discussion.
11806 </p>
11807
11808 <p><i>[
11809 Stephan Tolksdorf adds pre-Bellevue:
11810 ]</i></p>
11811
11812
11813 <blockquote>
11814 <p>
11815 In reply to the discussion in
11816 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11817 regarding this issue:
11818 </p>
11819 <p>
11820 The descriptions of all engines and engine adaptors given in sections
11821 26.4.3 [rand.eng] and 26.4.4 [rand.adapt] already specify the concrete
11822 types of the integer arguments for seeding. Hence, relaxing the general
11823 requirement in 26.4.1.3 [rand.req.eng] would not affect portability and
11824 reproducibility of the standard library. Furthermore, it is not clear to
11825 me what exactly the guarantee "with initial state determined by
11826 <tt>static_cast&lt;X::result_type&gt;(s)</tt>" is useful for. On the other hand,
11827 relaxing the requirement would allow developers to implement  other
11828 random number engines that do not have to cast all arithmetic seed
11829 arguments to their result_types.
11830 </p>
11831 </blockquote>
11832
11833 <p><i>[
11834 Bellevue:
11835 ]</i></p>
11836
11837
11838 <blockquote>
11839 Propose close NAD for the reasons given in N2424.
11840 </blockquote>
11841
11842
11843
11844
11845 <p><b>Proposed resolution:</b></p>
11846 <p>
11847 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11848 for further discussion.
11849 </p>
11850
11851 <p><i>[
11852 Stephan Tolksdorf adds pre-Bellevue:
11853 ]</i></p>
11854
11855
11856 <blockquote>
11857 <p>
11858 Change row 3 of table 105 "Random number engine requirements" in 26.4.1.3 [rand.req.eng]/3
11859 </p>
11860
11861 <blockquote>
11862 Creates an engine with initial state determined by
11863 <tt><del>static_cast&lt;X::result_type&gt;(</del>s<del>)</del></tt>
11864 </blockquote>
11865
11866 <p>
11867 Similarly, change 26.4.1.4 [rand.req.adapt]/3 e)
11868 </p>
11869
11870 <blockquote>
11871 When <tt>X::X</tt> is invoked with <del>an <tt>X::result_type</tt></del> value <tt>s</tt>
11872 <ins>of arithmetic type (3.9.1)</ins>, ...
11873 </blockquote>
11874
11875 </blockquote>
11876
11877
11878
11879
11880
11881
11882 <hr>
11883 <h3><a name="730"></a>730. Comment on [rand.req.adapt]/3 e)</h3>
11884 <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>
11885  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11886 <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>
11887 <p><b>Discussion:</b></p>
11888 <p>
11889 If an engine adaptor is invoked with an argument of type <tt>seed_seq</tt>, then all base 
11890 engines are specified to be seeded with this <tt>seed_seq</tt>. As <tt>seed_seq</tt>'s randomization method is 
11891 qualified as constant, this procedure will ef fectively initialize all base engines with the same seed 
11892 (though the resulting state might still dif fer to a certain degree if the engines are of different types). 
11893 It is not clear whether this mode of operation is in general appropriate, hence -- as far as the 
11894 stated requirements are of general nature and not just specific to the engine adaptors provided by 
11895 the library -- it might be better to leave the behaviour unspecified, since the current definition of 
11896 <tt>seed_seq</tt> does not allow for a generally satisfying specification.
11897 </p>
11898
11899 <p>
11900 <b>Posssible resolution:</b> [As above]
11901 </p>
11902
11903 <p>
11904 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11905 for further discussion.
11906 </p>
11907
11908 <p><i>[
11909 Bellevue:
11910 ]</i></p>
11911
11912
11913 <blockquote>
11914 Close NAD for the reasons given in N2424.
11915 </blockquote>
11916
11917
11918
11919 <p><b>Proposed resolution:</b></p>
11920 <p>
11921 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11922 for the proposed resolution.
11923 </p>
11924
11925
11926
11927
11928
11929 <hr>
11930 <h3><a name="731"></a>731. proposal for a customizable <tt>seed_seq</tt></h3>
11931 <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>
11932  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
11933 <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>
11934 <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>
11935 <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>
11936 <p><b>Discussion:</b></p>
11937 <p>
11938 The proper way to seed random number engines seems to be the most frequently 
11939 discussed issue of the 26.4 [rand] proposal. While the new <tt>seed_seq</tt> approach is already rather 
11940 general and probably sufficient for most situations, it is unlikely to be optimal in every case (one 
11941 problem was pointed out in point T5 above). In some situations it might, for instance, be better to 
11942 seed the state with a cryptographic generator. 
11943 </p>
11944 <p>
11945 In my opinion this is a pretty strong argument for extending the standard with a simple facility to 
11946 customize the seeding procedure. This could, for example, be done with the following minimal 
11947 changes:
11948 </p>
11949
11950 <p>
11951 <b>Possible resolution:</b>
11952 </p>
11953
11954 <ol type="a">
11955 <li>
11956 Turn the interface specification of 26.4.7.1 [rand.util.seedseq]/2 into a "SeedSeq" requirement, where the 
11957 exact behaviour of the constructors and the randomize method are left unspecified and where the
11958 const qualification for randomize is removed. Classes implementing this interface are additionally 
11959 required to specialize the traits class in c).
11960 </li>
11961 <li>
11962 Provide the class <tt>seed_seq</tt> as a default implementation of the SeedSeq interface.
11963 </li>
11964 <li>
11965 <p>
11966 Supplement the <tt>seed_seq</tt> with a traits class
11967 </p>
11968 <blockquote><pre>template &lt;typename T&gt; 
11969 struct is_seed_seq { static const bool value = false; }
11970 </pre></blockquote>
11971 <p>and the specialization</p>
11972 <blockquote><pre>template &lt;&gt; 
11973 struct is_seed_seq&lt;seed_seq&gt; { static const bool value = true; }
11974 </pre></blockquote>
11975 <p>which users can supplement with further specializations.</p>
11976 </li>
11977 <li>
11978 Change 26.4.1.3 [rand.req.eng]/1 d) to "q is an lvalue of a type that fulfils the SeedSeq requirements", and 
11979 modify the constructors and seed methods in 26.4.3 [rand.eng] appropriately (the actual implementation 
11980 could be done using the SFINAE technique).
11981 </li>
11982 </ol>
11983
11984 <p><i>[
11985 Bellevue:
11986 ]</i></p>
11987
11988
11989 <blockquote>
11990 See N2424. Close NAD but note that "conceptizing" the library may cause
11991 this problem to be solved by that route.
11992 </blockquote>
11993
11994
11995 <p><b>Proposed resolution:</b></p>
11996 <p>
11997 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
11998 for the proposed resolution.
11999 </p>
12000
12001
12002
12003
12004
12005 <hr>
12006 <h3><a name="733"></a>733. Comment on [rand.req.dist]/9</h3>
12007 <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>
12008  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12009 <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>
12010 <p><b>Discussion:</b></p>
12011 <p>
12012 The requirement "P shall have a declaration of the form <tt>typedef X distribution_- 
12013 type</tt>" effectively makes the use of inheritance for implementing distributions very inconvenient, 
12014 because the child of a distribution class in general will not satisfy this requirement. In my opinion 
12015 the benefits of having a typedef in the parameter class pointing back to the distribution class are 
12016 not worth the hassle this requirement causes. [In my code base I never made use of the nested 
12017 typedef but on several occasions could have profited from being able to use simple inheritance for 
12018 the implementation of a distribution class.]
12019 </p>
12020
12021 <p>
12022 <b>Proposed resolution:</b> I propose to drop this requirement.
12023 </p>
12024
12025 <p><i>[
12026 Bellevue:
12027 ]</i></p>
12028
12029
12030 <blockquote>
12031 Close NAD for the reasons given in N2424. In practice it is not inconvenient to meet these requirements.
12032 </blockquote>
12033
12034
12035
12036 <p><b>Proposed resolution:</b></p>
12037 <p>
12038 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12039 for the proposed resolution.
12040 </p>
12041
12042
12043
12044
12045
12046 <hr>
12047 <h3><a name="735"></a>735. Unfortunate naming</h3>
12048 <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>
12049  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12050 <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>
12051 <p><b>Discussion:</b></p>
12052 <p>
12053 In my opinion the choice of name for the <tt>t</tt> parameter of the <tt>binomial_distribution</tt>
12054 is very unfortunate. In virtually every internet reference, book and software implementation 
12055 this parameter is called <tt>n</tt> instead, see for example Wikipedia, Mathworld, Evans et al. (1993) 
12056 Statistical Distributions, 2nd E., Wiley, p. 38, the R statistical computing language, p. 926, 
12057 Mathematica and Matlab.
12058 </p>
12059
12060 <p>
12061 Similarly, the choice of <tt>k</tt> for the parameter of the negative binomial distributions is rather unusual. 
12062 The most common choice for the negative binomial distribution seems to be <tt>r</tt> instead.
12063 </p>
12064
12065 <p>
12066 Choosing unusual names for the parameters causes confusion among users and makes the 
12067 interface unnecessarily inconvenient to use.
12068 </p>
12069
12070 <p>
12071 <b>Possible resolution:</b> For these reasons, I propose to change the name of the respective parameters
12072 to <tt>n</tt> and <tt>r</tt>.
12073 </p>
12074
12075 <p><i>[
12076 Bellevue:
12077 ]</i></p>
12078
12079
12080 <blockquote>
12081 In N2424. NAD It has been around for a while. It is hardly universal,
12082 there is prior art, and this would confuse people.
12083 </blockquote>
12084
12085
12086 <p><b>Proposed resolution:</b></p>
12087 <p>
12088 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12089 for the proposed resolution.
12090 </p>
12091
12092
12093
12094
12095
12096 <hr>
12097 <h3><a name="736"></a>736. Comment on [rand.dist.samp.discrete]</h3>
12098 <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>
12099  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12100 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#rand.dist.samp.discrete">active issues</a> in [rand.dist.samp.discrete].</p>
12101 <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>
12102 <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>
12103 <p><b>Discussion:</b></p>
12104 <ol type="a">
12105 <li>
12106 The specification for <tt>discrete_distribution</tt> requires the member <tt>probabilities()</tt>
12107 to return a vector of <i>standardized</i> probabilities, which forces the implementation every time to 
12108 divide each probability by the sum of all probabilities, as the sum will in practice almost never be 
12109 exactly 1.0. This is unnecessarily inef ficient as the implementation would otherwise not need to 
12110 compute the standardized probabilities at all and could instead work with the non-standardized 
12111 probabilities and the sum. If there was no standardization the user would just get back the 
12112 probabilities that were previously supplied to the distribution object, which to me seems to be the 
12113 more obvious solution.
12114 </li>
12115 <li>
12116 The behaviour of <tt>discrete_distribution</tt> is not specified in case the number of given
12117 probabilities is larger than the maximum number representable by the IntType.
12118 </li>
12119 </ol>
12120
12121 <p>
12122 <b>Possible resolution:</b> I propose to change the specification such that the non-standardized 
12123 probabilities need to be returned and that an additional requirement is included for the number 
12124 of probabilities to be smaller than the maximum of IntType.
12125 </p>
12126
12127 <p><i>[
12128 Stephan Tolksdorf adds pre-Bellevue:
12129 ]</i></p>
12130
12131
12132 <blockquote>
12133 <p>
12134 In reply to the discussion in 
12135 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12136 of this issue:
12137 </p>
12138 <p>
12139 Rescaled floating-point parameter vectors can not be expected to compare
12140 equal because of the limited precision of floating-point numbers.
12141 My proposal would at least guarantee that a parameter
12142 vector (of type double) passed into the distribution would compare equal
12143 with the one returned by the <tt>probabilities()</tt> method. Furthermore, I do
12144 not understand why "the changed requirement would lead to a significant
12145 increase in the amount of state in the distribution object". A typical
12146 implementation's state would increase by exactly one number: the sum of
12147 all probabilities. The textual representation for serialization would
12148 not need to grow at all. Finally, the proposed replacement "<tt>0 &lt; n &lt;=
12149 numeric_limits&lt;IntType&gt;::max() + 1</tt>" makes the implementation
12150 unnecessarily complicated, "<tt>0 &lt; n &lt;= numeric_limits&lt;IntType&gt;::max()</tt>"
12151 would be better.
12152 </p>
12153 </blockquote>
12154
12155 <p><i>[
12156 Bellevue:
12157 ]</i></p>
12158
12159
12160 <blockquote>
12161 <p>
12162 In N2424. We agree with the observation and the proposed resolution to
12163 part b). We recommend the wording n &gt; 0 be replaced with 0 &lt; n
12164 numeric_limits::max() + 1. However, we disagree with part a), as it
12165 would interfere with the definition of parameters' equality. Further,
12166 the changed requirement would lead to a significant increase in the
12167 amount of state of the distribution object.
12168 </p>
12169
12170 <p>
12171 As it stands now, it is convenient, and the changes proposed make it
12172 much less so.
12173 </p>
12174
12175 <p>
12176 NAD. Part a the current behavior is desirable. Part b, any constructor
12177 can fail, but the rules under which it can fail do not need to be listed
12178 here.
12179 </p>
12180 </blockquote>
12181
12182
12183 <p><b>Proposed resolution:</b></p>
12184 <p>
12185 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12186 for the proposed resolution.
12187 </p>
12188
12189 <p><i>[
12190 Stephan Tolksdorf adds pre-Bellevue:
12191 ]</i></p>
12192
12193
12194 <blockquote>
12195 <p>
12196 In 26.4.8.5.1 [rand.dist.samp.discrete]:
12197 </p>
12198
12199 <p>
12200 Proposed wording a):
12201 </p>
12202
12203 <blockquote>
12204 <p>
12205 Changae in para. 2
12206 </p>
12207
12208 <blockquote>
12209 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>
12210 </blockquote>
12211
12212 <p>
12213 and change in para. 5
12214 </p>
12215
12216 <blockquote>
12217 <i>Returns:</i> A <tt>vector&lt;double&gt;</tt> whose <tt>size</tt> member returns <tt>n</tt> and whose
12218 <tt>operator[]</tt> member returns <del><tt>p<sub>k</sub></tt></del>
12219 <ins>the weight <tt>w<sub>k</sub></tt> as a double value</ins>
12220 when invoked with argument <tt>k</tt> for <tt>k = 0,
12221 ..., n-1</tt>
12222 </blockquote>
12223
12224 </blockquote>
12225
12226 <p>
12227 Proposed wording b):
12228 </p>
12229
12230 <blockquote>
12231 <p>
12232 Change in para. 3:
12233 </p>
12234
12235 <blockquote>
12236 If <tt>firstW == lastW</tt>, let the sequence <tt>w</tt> have length <tt>n = 1</tt> and consist
12237 of the single value <tt>w<sub>0</sub> = 1</tt>. Otherwise, <tt>[firstW,lastW)</tt> shall form a
12238 sequence <tt>w</tt> of length <tt>n <del>&gt; 0</del></tt> 
12239 <ins>such that <tt>0 &lt; n &lt;= numeric_limits&lt;IntType&gt;::max()</tt>,</ins>
12240 and <tt>*firstW</tt> shall yield a value <tt>w<sub>0</sub></tt>
12241 convertible to <tt>double</tt>. [<i>Note:</i> The values <tt>w<sub>k</sub></tt> are commonly known
12242 as the weights . <i>-- end note</i>]
12243 </blockquote>
12244
12245 </blockquote>
12246
12247 </blockquote>
12248
12249
12250
12251
12252
12253 <hr>
12254 <h3><a name="737"></a>737. Comment on [rand.dist.samp.pconst]</h3>
12255 <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>
12256  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12257 <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>
12258 <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>
12259 <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>
12260 <p><b>Discussion:</b></p>
12261 <ol type="a">
12262 <li>
12263 The discussion in point T11 above regarding <tt>probabilities()</tt> similarly applies 
12264 to the method <tt>densities()</tt> of <tt>piecewise_constant_distribution</tt>.
12265 </li>
12266 <li>
12267 <p>
12268 The design of the constructor
12269 </p>
12270 <blockquote><pre>template &lt;class InputIteratorB, class InputIteratorW&gt; 
12271 piecewise_constant_distribution( InputIteratorB firstB, InputIteratorB lastB, 
12272                                  InputIteratorW firstW);
12273 </pre></blockquote>
12274 <p>
12275 is unnecessarily unsafe, as there is no separate end-iterator given for the weights. I can't see 
12276 any performance or convenience reasons that would justify the risks inherent in such a function 
12277 interface, in particular the risk that input error might go unnoticed.
12278 </p>
12279 </li>
12280 </ol>
12281
12282 <p>
12283 <b>Possible resolution:</b> I propose to add an <tt>InputIteratorW lastW</tt> argument to the interface.
12284 </p>
12285
12286 <p><i>[
12287 Stephan Tolksdorf adds pre-Bellevue:
12288 ]</i></p>
12289
12290 <blockquote>
12291 In reply to the discussion in
12292 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12293 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>.
12294 </blockquote>
12295
12296 <p><i>[
12297 Bellevue:
12298 ]</i></p>
12299
12300
12301 <blockquote>
12302 In N2424. There is already precedent elsewhere in the library. Follows existing convention. NAD.
12303 </blockquote>
12304
12305
12306 <p><b>Proposed resolution:</b></p>
12307 <p>
12308 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12309 for the proposed resolution.
12310 </p>
12311
12312 <p><i>[
12313 Stephan Tolksdorf adds pre-Bellevue:
12314 ]</i></p>
12315
12316
12317 <blockquote>
12318 <p>
12319 In 26.4.8.5.2 [rand.dist.samp.pconst]:
12320 </p>
12321
12322 <p>
12323 Proposed wording a)
12324 </p>
12325
12326 <blockquote>
12327 <p>
12328 Change in para. 2
12329 </p>
12330 <blockquote>
12331 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>,
12332 <tt>b<sub>0</sub> = 0</tt>, and <tt>b<sub>1</sub> = 1</tt>
12333 </blockquote>
12334
12335 <p>
12336 and change in para. 5
12337 </p>
12338
12339 <blockquote>
12340 A <tt>vector&lt;result_type&gt;</tt> whose <tt>size</tt> member returns <tt>n</tt> and whose <tt>operator[]</tt>
12341 member returns <del><tt>p<sub>k</sub></tt></del>
12342 <ins>the weight <tt>w<sub>k</sub></tt> as a double value</ins>
12343 when invoked with argument <tt>k</tt> for <tt>k = 0, ..., n-1</tt>
12344 </blockquote>
12345
12346 </blockquote>
12347
12348 <p>
12349 Proposed wording b)
12350 </p>
12351
12352 <blockquote>
12353 <p>
12354 Change both occurrences of
12355 </p>
12356
12357 <blockquote>
12358 "piecewise_constant_distribution(InputIteratorB firstB, InputIteratorB lastB,
12359                                  InputIteratorW firstW<ins>, InputIteratorW lastW</ins>)
12360 </blockquote>
12361
12362 <p>
12363 and change in para. 3
12364 </p>
12365
12366 <blockquote>
12367 <del>the length of the sequence <tt>w</tt> starting from <tt>firstW</tt> shall be at least <tt>n</tt>,
12368 <tt>*firstW</tt> shall return a value <tt>w<sub>0</sub></tt> that is convertible to <tt>double</tt>, and any
12369 <tt>w<sub>k</sub></tt> for <tt>k &gt;= n</tt> shall be ignored by the distribution</del>
12370 <ins><tt>[firstW, lastW)</tt> shall form a sequence <tt>w</tt> of length <tt>n</tt> whose leading element
12371 <tt>w<sub>0</sub></tt> shall be convertible to <tt>double</tt></ins>
12372 </blockquote>
12373
12374 </blockquote>
12375
12376
12377 </blockquote>
12378
12379
12380
12381
12382
12383
12384 <hr>
12385 <h3><a name="738"></a>738. Editorial issue in [rand.adapt.disc]/3</h3>
12386 <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>
12387  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12388 <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>
12389 <p><b>Discussion:</b></p>
12390 <p>
12391 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 
12392 exposition should have type <tt>size_t</tt>, too.
12393 </p>
12394
12395
12396 <p><b>Proposed resolution:</b></p>
12397 <p>
12398 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12399 for the proposed resolution.
12400 </p>
12401
12402
12403
12404
12405
12406 <hr>
12407 <h3><a name="739"></a>739. Defect in [rand.util.canonical]/3</h3>
12408 <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>
12409  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2007-09-21</p>
12410 <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>
12411 <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>
12412 <p><b>Discussion:</b></p>
12413 <p>
12414 The complexity of <tt>generate_canonical</tt> is specified to be "exactly k=max(1, ceil(b/log2 
12415 R)) invocations of g". This terms involves a logarithm that is not rounded and hence can not (in 
12416 general) be computed at compile time. As this function template is performance critical, I propose 
12417 to replace ceil(b/log2 R) with ceil(b/floor(log2 R)).
12418 </p>
12419
12420 <p>
12421 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12422 for further discussion.
12423 </p>
12424
12425 <p><i>[
12426 Bellevue:
12427 ]</i></p>
12428
12429
12430 <blockquote>
12431 In N2424. Close NAD as described there.
12432 </blockquote>
12433
12434
12435
12436 <p><b>Proposed resolution:</b></p>
12437 <p>
12438 See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2424.pdf">N2424</a>
12439 for the proposed resolution.
12440 </p>
12441
12442
12443
12444
12445
12446 <hr>
12447 <h3><a name="741"></a>741. Const-incorrect <tt>get_deleter</tt> function for <tt>shared_ptr</tt></h3>
12448 <p><b>Section:</b> 20.7.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>
12449  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-09-27</p>
12450 <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>
12451 <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>
12452 <p><b>Discussion:</b></p>
12453 <p>
12454 The following issue was raised by Alf P. Steinbach in c.l.c++.mod:
12455 </p>
12456
12457 <p>
12458 According to the recent draft N2369, both the header memory synopsis
12459 of 20.7 [memory] and 20.7.12.2.11 [util.smartptr.getdeleter] declare:
12460 </p>
12461
12462 <blockquote><pre>template&lt;class D, class T&gt; D* get_deleter(shared_ptr&lt;T&gt; const&amp; p);
12463 </pre></blockquote>
12464
12465 <p>
12466 This allows to retrieve the pointer to a mutable deleter of a <tt>const
12467 shared_ptr</tt> (if that owns one) and therefore contradicts the usual
12468 philosophy that associated functors are either read-only (e.g.
12469 <tt>key_comp</tt> or <tt>value_comp</tt> of <tt>std::map</tt>) or do at least reflect
12470 the mutability of the owner (as seen for the both overloads of
12471 <tt>unique_ptr::get_deleter</tt>).
12472 Even the next similar counter-part of <tt>get_deleter</tt> - the two
12473 overloads of <tt>function::target</tt> in the class template function
12474 synopsis 20.6.15.2 [func.wrap.func] or in 20.6.15.2.5 [func.wrap.func.targ] - do
12475 properly mirror the const-state of the owner.
12476 </p>
12477
12478 <b>Possible proposed resolutions:</b>
12479
12480 <p>
12481 Replace the declarations of <tt>get_deleter</tt> in the header <tt>&lt;memory&gt;</tt>
12482 synopsis of 20.7 [memory] and in 20.7.12.2.11 [util.smartptr.getdeleter] by one of the
12483 following alternatives (A) or (B):
12484 </p>
12485
12486 <ol type="A">
12487 <li>
12488 Provide <b>only</b> the immutable variant. This would reflect the
12489 current praxis of <tt>container::get_allocator()</tt>, <tt>map::key_comp()</tt>, or
12490 <tt>map::value_comp</tt>.
12491
12492 <blockquote><pre>template&lt;class D, class T&gt; const D* get_deleter(shared_ptr&lt;T&gt; const&amp; p);
12493 </pre></blockquote>
12494 </li>
12495 <li>
12496 Just remove the function.
12497 </li>
12498 </ol>
12499
12500 <p>
12501 Alberto Ganesh Barbati adds:
12502 </p>
12503
12504 <ol start="3" type="A">
12505 <li>
12506 <p>
12507 Replace it with two functions:
12508 </p>
12509 <blockquote><pre>template &lt;class D, class T&gt; D get_deleter(shared_ptr&lt;T&gt; const&amp;);
12510 template &lt;class D, class T&gt; bool has_deleter(shared_ptr&lt;T&gt; const&amp;);
12511 </pre></blockquote>
12512
12513 <p>
12514 The first one would throw if <tt>D</tt> is the wrong type, while the latter would
12515 never throw. This approach would reflect the current praxis of
12516 <tt>use_facet/has_facet</tt>, with the twist of returning the deleter by value as
12517 <tt>container::get_allocator()</tt> do.
12518 </p>
12519 </li>
12520 </ol>
12521
12522 <p>
12523 Peter Dimov adds:
12524 </p>
12525
12526 <blockquote>
12527 <p>
12528 My favorite option is "not a defect". A, B and C break useful code.
12529 </p>
12530 </blockquote>
12531
12532 <p><i>[
12533 Bellevue:
12534 ]</i></p>
12535
12536
12537 <blockquote>
12538 Concern this is similar to confusing "pointer to const" with "a constant pointer".
12539 </blockquote>
12540
12541
12542 <p><b>Proposed resolution:</b></p>
12543 <p>
12544 </p>
12545
12546
12547
12548
12549
12550 <hr>
12551 <h3><a name="745"></a>745. copy_exception API slices.</h3>
12552 <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>
12553  <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
12554 <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>
12555 <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>
12556 <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>
12557 <p><b>Discussion:</b></p>
12558 <p>
12559 It could be I did not understand the design rationale, but I thought
12560 copy_exception would produce an exception_ptr to the most-derived (dynamic)
12561 type of the passed exception.  Instead it slices, which appears to be less
12562 useful, and a likely source of FAQ questions in the future.
12563 </p>
12564 <p>
12565 (Peter Dimov suggests NAD)
12566 </p>
12567
12568 <p><i>[
12569 Bellevue: 
12570 ]</i></p>
12571
12572
12573 <blockquote>
12574 <p>
12575 How could this be implemented in a way that the dynamic type is cloned?
12576 </p>
12577 <p>
12578 The feature is designed to create an exception_ptr from an object whose
12579 static type is identical to the dynamic type and thus there is no
12580 slicing involved.
12581 </p>
12582 </blockquote>
12583
12584
12585 <p><b>Proposed resolution:</b></p>
12586 <p>
12587 </p>
12588
12589
12590
12591
12592
12593 <hr>
12594 <h3><a name="748"></a>748. The is_abstract type trait is defined by reference to 10.4.</h3>
12595 <p><b>Section:</b> 20.5.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>
12596  <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-10-10</p>
12597 <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>
12598 <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>
12599 <p><b>Discussion:</b></p>
12600 <p>
12601 I am trying to decide is a pure virtual function is a <i>necessary</i> as well as
12602 sufficient requirement to be classified as abstract?
12603 </p>
12604 <p>
12605 For instance, is the following (non-polymorphic) type considered abstract?
12606 </p>
12607 <blockquote><pre>struct abstract {
12608 protected:
12609 &nbsp;abstract(){}
12610 &nbsp;abstract( abstract const &amp; ) {}
12611 &nbsp;~abstract() {}
12612 };
12613 </pre></blockquote>
12614 <p>
12615 (Suggested that this may be NAD, with an editorial fix-up from Pete on the
12616 core wording to make clear that abstract requires a pure virtual function)
12617 </p>
12618
12619
12620 <p><b>Proposed resolution:</b></p>
12621 <p>
12622 Core has clarified that the definition abstract is adequate. Issue withdrawn by submitter. NAD.
12623 </p>
12624
12625
12626
12627
12628
12629 <hr>
12630 <h3><a name="754"></a>754. Ambiguous return clause for <tt>std::uninitialized_copy</tt></h3>
12631 <p><b>Section:</b> 20.7.10.1 [uninitialized.copy] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
12632  <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-10-15</p>
12633 <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>
12634 <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>
12635 <p><b>Discussion:</b></p>
12636 <p>
12637 14882-2003, [lib.uninitialized.copy] is currently written as follows:
12638 </p>
12639
12640 <blockquote>
12641 <pre>template &lt;class InputIterator, class ForwardIterator&gt;
12642   ForwardIterator uninitialized_copy(InputIterator <i>first</i>, InputIterator <i>last</i>,
12643                                      ForwardIterator <i>result</i>);
12644 </pre>
12645 <blockquote>
12646 <p>
12647 -1- <i>Effects:</i>
12648 </p>
12649 <blockquote><pre>for (; first != last; ++result, ++first)
12650   new (static_cast&lt;void*&gt;(&amp;*result))
12651     typename iterator_traits&lt;ForwardIterator&gt;::value_type(*first);
12652 </pre></blockquote>
12653 <p>
12654 -2- <i>Returns:</i> <tt><i>result</i></tt>
12655 </p>
12656 </blockquote>
12657 </blockquote>
12658
12659 <p>
12660 similarily for N2369, and its corresponding section
12661 20.7.10.1 [uninitialized.copy].
12662 </p>
12663
12664 <p>
12665 It's not clear to me what the return clause is supposed to mean, I see
12666 two
12667 possible interpretations:
12668 </p>
12669
12670 <ol type="a">
12671 <li>
12672 The notion of <tt><i>result</i></tt> is supposed to mean the value given by the
12673 function parameter <tt><i>result</i></tt> [Note to the issue editor: Please use italics for
12674 <tt><i>result</i></tt>].
12675 This seems somewhat implied by recognizing that both the function
12676 parameter
12677 and the name used in the clause do have the same italic font.
12678 </li>
12679 <li>
12680 The notion of "result" is supposed to mean the value of <tt><i>result</i></tt>
12681 after the
12682 preceding effects clause. This is in fact what all implementations I
12683 checked
12684 do (and which is probably it's intend, because it matches the
12685 specification of <tt>std::copy</tt>).
12686 </li>
12687 </ol>
12688
12689 <p>
12690 The problem is: I see nothing in the standard which grants that this
12691 interpretation
12692 is correct, specifically [lib.structure.specifications] or
12693 17.3.1.3 [structure.specifications]
12694 resp. do not clarify which "look-up" rules apply for names found in
12695 the elements
12696 of the detailed specifications - Do they relate to the corresponding
12697 synopsis or
12698 to the effects clause (or possibly other elements)? Fortunately most
12699 detailed
12700 descriptions are unambigious in this regard, e.g. this problem does
12701 not apply
12702 for <tt>std::copy</tt>.
12703 </p>
12704
12705
12706
12707 <p><b>Proposed resolution:</b></p>
12708 <p>
12709 Change the wording of the return clause to say (20.7.10.1 [uninitialized.copy]):
12710 </p>
12711
12712 <blockquote>
12713 <p>
12714 -2- <i>Returns:</i> <ins>The value of</ins> <tt><i>result</i></tt> <ins>after effects have taken place.</ins>
12715 </p>
12716 </blockquote>
12717
12718
12719 <p><i>[
12720 Bellevue:
12721 ]</i></p>
12722
12723
12724 <blockquote>
12725 Resolution: NAD editorial -- project editor to decide if change is
12726 worthwhile. Concern is that there are many other places this might
12727 occur.
12728 </blockquote>
12729
12730
12731
12732
12733 <hr>
12734 <h3><a name="756"></a>756. Container adaptors push</h3>
12735 <p><b>Section:</b> 23.2.5 [container.adaptors] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
12736  <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2007-10-31</p>
12737 <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>
12738 <p><b>Discussion:</b></p>
12739 <p>
12740 After n2369 we have a single <tt>push_back</tt> overload in the sequence containers,
12741 of the "emplace" type. At variance with that, still in n2461, we have
12742 two separate overloads, the C++03 one + one taking an rvalue reference
12743 in the container adaptors. Therefore, simply from a consistency point of
12744 view, I was wondering whether the container adaptors should be aligned
12745 with the specifications of the sequence container themselves: thus have
12746 a single <tt>push</tt> along the lines:
12747 </p>
12748
12749 <blockquote><pre>template&lt;typename... _Args&gt;
12750 void
12751 push(_Args&amp;&amp;... __args)
12752   { c.push_back(std::forward&lt;_Args&gt;(__args)...); }
12753 </pre></blockquote>
12754
12755 <p><i>[
12756 Related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#767">767</a>
12757 ]</i></p>
12758
12759
12760
12761 <p><b>Proposed resolution:</b></p>
12762 <p>
12763 Change 23.2.5.1.1 [queue.defn]:
12764 </p>
12765
12766 <blockquote><pre><del>void push(const value_type&amp; x) { c.push_back(x); }</del>
12767 <del>void push(value_type&amp;&amp; x) { c.push_back(std::move(x)); }</del>
12768 <ins>template&lt;class... Args&gt; void push(Args&amp;&amp;... args) { c.push_back(std::forward&lt;Args&gt;(args)...); }</ins>
12769 </pre></blockquote>
12770
12771 <p>
12772 Change 23.2.5.2 [priority.queue]:
12773 </p>
12774
12775 <blockquote><pre><del>void push(const value_type&amp; x) { c.push_back(x); }</del>
12776 <del>void push(value_type&amp;&amp; x) { c.push_back(std::move(x)); }</del>
12777 <ins>template&lt;class... Args&gt; void push(Args&amp;&amp;... args) { c.push_back(std::forward&lt;Args&gt;(args)...); }</ins>
12778 </pre></blockquote>
12779
12780 <p>
12781 Change 23.2.5.2.2 [priqueue.members]:
12782 </p>
12783
12784 <blockquote>
12785 <pre><del>void push(const value_type&amp; x);</del>
12786 </pre>
12787 <blockquote>
12788 <p>
12789 <del><i>Effects:</i></del>
12790 </p>
12791 <blockquote><pre><del>c.push_back(x);</del>
12792 <del>push_heap(c.begin(), c.end(), comp);</del>
12793 </pre></blockquote>
12794 </blockquote>
12795
12796 <pre><ins>template&lt;class... Args&gt;</ins> void push(<del>value_type</del> <ins>Args</ins>&amp;&amp;<ins>...</ins> <del>x</del> <ins>args</ins>);
12797 </pre>
12798 <blockquote>
12799 <p>
12800 <i>Effects:</i>
12801 </p>
12802 <blockquote><pre>c.push_back(std::<del>move</del><ins>forward&lt;Args&gt;</ins>(<del>x</del> <ins>args</ins>)<ins>...</ins>);
12803 push_heap(c.begin(), c.end(), comp);
12804 </pre></blockquote>
12805 </blockquote>
12806 </blockquote>
12807
12808 <p>
12809 Change 23.2.5.3.1 [stack.defn]:
12810 </p>
12811
12812 <blockquote><pre><del>void push(const value_type&amp; x) { c.push_back(x); }</del>
12813 <del>void push(value_type&amp;&amp; x) { c.push_back(std::move(x)); }</del>
12814 <ins>template&lt;class... Args&gt; void push(Args&amp;&amp;... args) { c.push_back(std::forward&lt;Args&gt;(args)...); }</ins>
12815 </pre></blockquote>
12816
12817
12818
12819 <p><b>Rationale:</b></p>
12820 <p>
12821 Addressed by
12822 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2680.pdf">N2680 Proposed Wording for Placement Insert (Revision 1)</a>.
12823 </p>
12824
12825
12826
12827
12828
12829 <hr>
12830 <h3><a name="757"></a>757. Typo in the synopsis of vector</h3>
12831 <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">NAD Editorial</a>
12832  <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2007-11-04</p>
12833 <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>
12834 <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>
12835 <p><b>Discussion:</b></p>
12836 <p>
12837 In the synopsis 23.2.6 [vector], there is the signature:
12838 </p>
12839
12840 <blockquote><pre>void insert(const_iterator position, size_type n, T&amp;&amp; x);
12841 </pre></blockquote>
12842
12843 <p>
12844 instead of:
12845 </p>
12846
12847 <blockquote><pre>iterator insert(const_iterator position, T&amp;&amp; x);
12848 </pre></blockquote>
12849
12850 <p>
12851 23.2.6.4 [vector.modifiers] is fine.
12852 </p>
12853
12854
12855
12856 <p><b>Proposed resolution:</b></p>
12857 <p>
12858 Change the synopsis in 23.2.6 [vector]:
12859 </p>
12860
12861 <blockquote><pre>iterator insert(const_iterator position, const T&amp; x); 
12862 <ins>iterator insert(const_iterator position, T&amp;&amp; x);</ins>
12863 void     insert(const_iterator position, size_type n, const T&amp; x); 
12864 <del>void     insert(const_iterator position, size_type n, T&amp;&amp; x);</del>
12865 </pre></blockquote>
12866
12867
12868
12869
12870
12871 <hr>
12872 <h3><a name="763"></a>763. Renaming <tt>emplace()</tt> overloads</h3>
12873 <p><b>Section:</b> 23.1.4 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12874  <b>Submitter:</b> Sylvain Pion <b>Date:</b> 2007-12-04</p>
12875 <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>
12876 <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>
12877 <p><b>Discussion:</b></p>
12878 <p>
12879 The associative containers provide 2 overloads of <tt>emplace()</tt>:
12880 </p>
12881
12882 <blockquote><pre>template &lt;class... Args&gt; pair&lt;iterator, bool&gt; emplace(Args&amp;&amp;... args);
12883 template &lt;class... Args&gt; iterator emplace(const_iterator position, Args&amp;&amp;... args);
12884 </pre></blockquote>
12885
12886 <p>
12887 This is a problem if you mean the first overload while passing
12888 a <tt>const_iterator</tt> as first argument.
12889 </p>
12890
12891 <p><i>[
12892 Related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#767">767</a>
12893 ]</i></p>
12894
12895
12896 <p><i>[
12897 Bellevue:
12898 ]</i></p>
12899
12900
12901 <blockquote>
12902 </blockquote>
12903 <p>
12904 This can be disambiguated by passing "begin" as the first argument in
12905 the case when the non-default choice is desired. We believe that desire
12906 will be rare.
12907 </p>
12908 <p>
12909 Resolution: Change state to NAD.
12910 </p>
12911
12912
12913 <p><b>Proposed resolution:</b></p>
12914 <p>
12915 Rename one of the two overloads.
12916 For example to <tt>emplace_here</tt>, <tt>hint_emplace</tt>...
12917 </p>
12918
12919
12920
12921
12922
12923 <hr>
12924 <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>
12925 <p><b>Section:</b> 23.1.5 [unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
12926  <b>Submitter:</b> Joe Gottman <b>Date:</b> 2007-11-29</p>
12927 <p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#unord.req">active issues</a> in [unord.req].</p>
12928 <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>
12929 <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>
12930 <p><b>Discussion:</b></p>
12931 <p>
12932     A major attribute of the unordered containers is that iterating 
12933 though them inside a bucket is very fast while iterating between buckets 
12934 can be much slower.  If an unordered container has a low load factor, 
12935 iterating between the last iterator in one bucket and the next iterator, 
12936 which is in another bucket, is <tt>O(bucket_count())</tt> which may be much 
12937 larger than <tt>O(size())</tt>.
12938 </p>
12939 <p>
12940     If <tt>b</tt> is an non-const unordered container of type <tt>B</tt> and <tt>k</tt> is an 
12941 object of it's <tt>key_type</tt>, then <tt>b.equal_range(k)</tt> currently returns 
12942 <tt>pair&lt;B::iterator, B::iterator&gt;</tt>. Consider the following code:
12943 </p>
12944
12945 <blockquote><pre>B::iterator lb, ub;
12946 tie(lb, ub) = b.equal_range(k);
12947 for (B::iterator it = lb; it != ub; ++it) {
12948         // Do something with *it
12949 }
12950 </pre></blockquote>
12951
12952 <p>
12953 If <tt>b.equal_range(k)</tt> returns a non-empty range (i.e. <tt>b</tt> contains at least 
12954 on element whose key is equivalent to <tt>k</tt>), then every iterator in the 
12955 half-open range <tt>[lb, ub)</tt> will be in the same bucket, but <tt>ub</tt> will likely 
12956 either be in a different bucket or be equal to <tt>b.end()</tt>.  In either case, 
12957 iterating between <tt>ub - 1</tt> and <tt>ub</tt> could take a much longer time than 
12958 iterating through the rest of the range.
12959 </p>
12960 <p>
12961 If instead of returning <tt>pair&lt;iterator, iterator&gt;</tt>, <tt>equal_range</tt> were to 
12962 return <tt>pair&lt;local_iterator, local_iterator&gt;</tt>, then <tt>ub</tt> (which, like <tt>lb</tt>, 
12963 would now be a <tt>local_iterator</tt>) could be guaranteed to always be in the 
12964 same bucket as <tt>lb</tt>. In the cases where currently <tt>ub</tt> is equal to <tt>b.end()</tt>
12965 or is in a different bucket, <tt>ub</tt> would be equal to <tt>b.end(b.bucket(key))</tt>. 
12966   This would make iterating between <tt>lb</tt> and <tt>ub</tt> much faster, as every 
12967 iteration would be constant time.
12968 </p>
12969
12970 <p><i>[
12971 Bellevue:
12972 ]</i></p>
12973
12974
12975 <blockquote>
12976 The proposed resolution breaks consistency with other container types
12977 for dubious benefit, and iterators are already constant time.
12978 </blockquote>
12979
12980
12981
12982 <p><b>Proposed resolution:</b></p>
12983 <p>
12984 Change the entry for <tt>equal_range</tt> in Table 93 (23.1.5 [unord.req]) as follows:
12985 </p>
12986 <table border="1">
12987 <tbody><tr>
12988 <th>expression</th> <th>return type</th> <th>assertion/note pre/post-condition</th> <th>complexity</th>
12989 </tr>
12990
12991 <tr>
12992 <td><tt>b.equal_range(k)</tt></td>
12993 <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>
12994 <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>
12995 <td>Average case &#920;<tt>(b.count(k))</tt>. Worst case &#920;<tt>(b.size())</tt>. </td>
12996 </tr>
12997 </tbody></table>
12998
12999
13000
13001
13002
13003 <hr>
13004 <h3><a name="767"></a>767. Forwarding and backward compatibility</h3>
13005 <p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
13006  <b>Submitter:</b> Sylvain Pion <b>Date:</b> 2007-12-28</p>
13007 <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>
13008 <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>
13009 <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>
13010 <p><b>Discussion:</b></p>
13011 <p>
13012 Playing with g++'s C++0X mode, I noticed that the following
13013 code, which used to compile:
13014 </p>
13015
13016 <blockquote><pre>#include &lt;vector&gt;
13017
13018 int main()
13019 {
13020     std::vector&lt;char *&gt; v;
13021     v.push_back(0);
13022 }
13023 </pre></blockquote>
13024
13025 <p>
13026 now fails with the following error message:
13027 </p>
13028
13029 <blockquote>.../include/c++/4.3.0/ext/new_allocator.h: In member
13030 function 'void __gnu_cxx::new_allocator&lt;_Tp&gt;::construct(_Tp*,
13031 _Args&amp;&amp; ...) [with _Args = int, _Tp = char*]':
13032 .../include/c++/4.3.0/bits/stl_vector.h:707: instantiated from 'void
13033 std::vector&lt;_Tp, _Alloc&gt;::push_back(_Args&amp;&amp; ...) [with
13034 _Args = int, _Tp = char*, _Alloc = std::allocator&lt;char*&gt;]'
13035 test.cpp:6: instantiated from here
13036 .../include/c++/4.3.0/ext/new_allocator.h:114: error: invalid
13037 conversion from 'int' to 'char*'
13038 </blockquote>
13039
13040 <p>
13041 As far as I know, g++ follows the current draft here.
13042 </p>
13043 <p>
13044 Does the committee really intend to break compatibility for such cases?
13045 </p>
13046
13047 <p><i>[
13048 Sylvain adds: 
13049 ]</i></p>
13050
13051
13052 <blockquote>
13053 <p>
13054 I just noticed that <tt>std::pair</tt> has the same issue.
13055 The following now fails with GCC's -std=c++0x mode:
13056 </p>
13057
13058 <blockquote><pre>#include &lt;utility&gt;
13059
13060 int main()
13061 {
13062    std::pair&lt;char *, char *&gt; p (0,0);
13063 }
13064 </pre></blockquote>
13065
13066 <p>
13067 I have not made any general audit for such problems elsewhere.
13068 </p>
13069 </blockquote>
13070
13071 <p><i>[
13072 Related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#756">756</a>
13073 ]</i></p>
13074
13075
13076 <p><i>[
13077 Bellevue:
13078 ]</i></p>
13079
13080
13081 <blockquote>
13082 <p>
13083 Motivation is to handle the old-style int-zero-valued NULL pointers.
13084 Problem: this solution requires concepts in some cases, which some users
13085 will be slow to adopt. Some discussion of alternatives involving
13086 prohibiting variadic forms and additional library-implementation
13087 complexity.
13088 </p>
13089 <p>
13090 Discussion of "perfect world" solutions, the only such solution put
13091 forward being to retroactively prohibit use of the integer zero for a
13092 NULL pointer. This approach was deemed unacceptable given the large
13093 bodies of pre-existing code that do use integer zero for a NULL pointer.
13094 </p>
13095 <p>
13096 Another approach is to change the member names. Yet another approach is
13097 to forbid the extension in absence of concepts.
13098 </p>
13099 <p>
13100 Resolution: These issues (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#756">756</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#767">767</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-closed.html#763">763</a>) will be subsumed into a
13101 paper to be produced by Alan Talbot in time for review at the 2008
13102 meeting in France. Once this paper is produced, these issues will be
13103 moved to NAD.
13104 </p>
13105 </blockquote>
13106
13107
13108
13109 <p><b>Proposed resolution:</b></p>
13110 <p>
13111 Add the following rows to Table 90 "Optional sequence container operations", 23.1.3 [sequence.reqmts]:
13112 </p>
13113
13114 <blockquote>
13115 <table border="1">
13116 <tbody><tr>
13117 <th>expression</th> <th>return type</th> <th>assertion/note<br>pre-/post-condition</th> <th>container</th>
13118 </tr>
13119
13120 <tr>
13121 <td>
13122 <tt>a.push_front(t)</tt>
13123 </td>
13124 <td>
13125 <tt>void</tt>
13126 </td>
13127 <td>
13128 <tt>a.insert(a.begin(), t)</tt><br>
13129 <i>Requires:</i> <tt>T</tt> shall be <tt>CopyConstructible</tt>.
13130 </td>
13131 <td>
13132 <tt>list, deque</tt>
13133 </td>
13134 </tr>
13135
13136 <tr>
13137 <td>
13138 <tt>a.push_front(rv)</tt>
13139 </td>
13140 <td>
13141 <tt>void</tt>
13142 </td>
13143 <td>
13144 <tt>a.insert(a.begin(), rv)</tt><br>
13145 <i>Requires:</i> <tt>T</tt> shall be <tt>MoveConstructible</tt>.
13146 </td>
13147 <td>
13148 <tt>list, deque</tt>
13149 </td>
13150 </tr>
13151
13152 <tr>
13153 <td>
13154 <tt>a.push_back(t)</tt>
13155 </td>
13156 <td>
13157 <tt>void</tt>
13158 </td>
13159 <td>
13160 <tt>a.insert(a.end(), t)</tt><br>
13161 <i>Requires:</i> <tt>T</tt> shall be <tt>CopyConstructible</tt>.
13162 </td>
13163 <td>
13164 <tt>list, deque, vector, basic_string</tt>
13165 </td>
13166 </tr>
13167
13168 <tr>
13169 <td>
13170 <tt>a.push_back(rv)</tt>
13171 </td>
13172 <td>
13173 <tt>void</tt>
13174 </td>
13175 <td>
13176 <tt>a.insert(a.end(), rv)</tt><br>
13177 <i>Requires:</i> <tt>T</tt> shall be <tt>MoveConstructible</tt>.
13178 </td>
13179 <td>
13180 <tt>list, deque, vector, basic_string</tt>
13181 </td>
13182 </tr>
13183
13184 </tbody></table>
13185 </blockquote>
13186
13187 <p>
13188 Change the synopsis in 23.2.2 [deque]:
13189 </p>
13190
13191 <blockquote><pre><ins>void push_front(const T&amp; x);</ins>
13192 <ins>void push_front(T&amp;&amp; x);</ins>
13193 <ins>void push_back(const T&amp; x);</ins>
13194 <ins>void push_back(T&amp;&amp; x);</ins>
13195 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_front(Args&amp;&amp;... args);
13196 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_back(Args&amp;&amp;... args);
13197 </pre></blockquote>
13198
13199 <p>
13200 Change 23.2.2.3 [deque.modifiers]:
13201 </p>
13202
13203 <blockquote><pre><ins>void push_front(const T&amp; x);</ins>
13204 <ins>void push_front(T&amp;&amp; x);</ins>
13205 <ins>void push_back(const T&amp; x);</ins>
13206 <ins>void push_back(T&amp;&amp; x);</ins>
13207 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_front(Args&amp;&amp;... args);
13208 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_back(Args&amp;&amp;... args);
13209 </pre></blockquote>
13210
13211 <p>
13212 Change the synopsis in 23.2.4 [list]:
13213 </p>
13214
13215 <blockquote><pre><ins>void push_front(const T&amp; x);</ins>
13216 <ins>void push_front(T&amp;&amp; x);</ins>
13217 <ins>void push_back(const T&amp; x);</ins>
13218 <ins>void push_back(T&amp;&amp; x);</ins>
13219 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_front(Args&amp;&amp;... args);
13220 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_back(Args&amp;&amp;... args);
13221 </pre></blockquote>
13222
13223 <p>
13224 Change 23.2.4.3 [list.modifiers]:
13225 </p>
13226
13227 <blockquote><pre><ins>void push_front(const T&amp; x);</ins>
13228 <ins>void push_front(T&amp;&amp; x);</ins>
13229 <ins>void push_back(const T&amp; x);</ins>
13230 <ins>void push_back(T&amp;&amp; x);</ins>
13231 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_front(Args&amp;&amp;... args);
13232 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_back(Args&amp;&amp;... args);
13233 </pre></blockquote>
13234
13235 <p>
13236 Change the synopsis in 23.2.6 [vector]:
13237 </p>
13238
13239 <blockquote><pre><ins>void push_back(const T&amp; x);</ins>
13240 <ins>void push_back(T&amp;&amp; x);</ins>
13241 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_back(Args&amp;&amp;... args);
13242 </pre></blockquote>
13243
13244 <p>
13245 Change 23.2.6.4 [vector.modifiers]:
13246 </p>
13247
13248 <blockquote><pre><ins>void push_back(const T&amp; x);</ins>
13249 <ins>void push_back(T&amp;&amp; x);</ins>
13250 template &lt;class... Args&gt; <ins>requires Constructible&lt;T, Args&amp;&amp;...&gt;</ins> void push_back(Args&amp;&amp;... args);
13251 </pre></blockquote>
13252
13253
13254
13255
13256 <p><b>Rationale:</b></p>
13257 <p>
13258 Addressed by
13259 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2680.pdf">N2680 Proposed Wording for Placement Insert (Revision 1)</a>.
13260 </p>
13261
13262 <p>
13263 If there is still an issue with pair, Howard should submit another issue.
13264 </p>
13265
13266
13267
13268
13269
13270 <hr>
13271 <h3><a name="773"></a>773. issues with random</h3>
13272 <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>
13273  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-01-14</p>
13274 <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>
13275 <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>
13276 <p><b>Discussion:</b></p>
13277 <ol>
13278 <li>
13279 26.4.8.1.1 [rand.dist.uni.int] <tt>uniform_int</tt> constructor has changed the default
13280 max constructor parameter from 9 (in TR1) to <tt>max()</tt>. The value
13281 is arbitrary at best and shouldn't be lightly changed because
13282 it breaks backward compatibility.
13283 </li>
13284
13285 <li>
13286 26.4.8.1.1 [rand.dist.uni.int] <tt>uniform_int</tt> has a parameter <tt>param</tt> that you can
13287 provide on construction or <tt>operator()</tt>, set, and get. But there
13288 is not even a hint of what this might be for.
13289 </li>
13290
13291 <li>
13292 26.4.8.1.2 [rand.dist.uni.real] <tt>uniform_real</tt>. Same issue as #2.
13293 </li>
13294 </ol>
13295
13296 <p><i>[
13297 Bellevue:
13298 ]</i></p>
13299
13300
13301 <blockquote>
13302 NAD. Withdrawn.
13303 </blockquote>
13304
13305
13306 <p><b>Proposed resolution:</b></p>
13307 <p>
13308 </p>
13309
13310
13311
13312
13313
13314 <hr>
13315 <h3><a name="784"></a>784. unique_lock::release</h3>
13316 <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>
13317  <b>Submitter:</b> Constantine Sapuntzakis <b>Date:</b> 2008-02-02</p>
13318 <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>
13319 <p><b>Discussion:</b></p>
13320 <p>
13321 <tt>unique_lock::release</tt> will probably lead to many mistakes where people
13322 call <tt>release</tt> instead of <tt>unlock</tt>. I just coded such a mistake using the
13323 boost pre-1.35 threads library last week.
13324 </p>
13325
13326 <p>
13327 In many threading libraries, a call with <tt>release</tt> in it unlocks the
13328 lock (e.g. ReleaseMutex in Win32, java.util.concurrent.Semaphore).
13329 </p>
13330
13331 <p>
13332 I don't call <tt>unique_lock::lock</tt> much at all, so I don't get to see the
13333 symmetry between <tt>::lock</tt> and <tt>::unlock</tt>. I usually use the constructor to
13334 lock the mutex. So I'm left to remember whether to call <tt>release</tt> or
13335 <tt>unlock</tt> during the few times I need to release the mutex before the scope
13336 ends. If I get it wrong, the compiler doesn't warn me.
13337 </p>
13338
13339 <p>
13340 An alternative name for release may be <tt>disown</tt>.
13341 </p>
13342
13343 <p>
13344 This might be a rare case where usability is hurt by consistency with
13345 the rest of the C++ standard (e.g. <tt>std::auto_ptr::release</tt>).
13346 </p>
13347
13348 <p><i>[
13349 Bellevue:
13350 ]</i></p>
13351
13352
13353 <blockquote>
13354 Change a name from release to disown. However prior art uses the release
13355 name. Compatibility with prior art is more important that any possible
13356 benefit such a change might make. We do not see the benefit for
13357 changing. NAD
13358 </blockquote>
13359
13360
13361 <p><b>Proposed resolution:</b></p>
13362 <p>
13363 Change the synopsis in 30.3.3.2 [thread.lock.unique]:
13364 </p>
13365
13366 <blockquote><pre>template &lt;class Mutex&gt; 
13367 class unique_lock 
13368
13369 public:
13370    ...
13371    mutex_type* <del>release</del> <ins>disown</ins>();
13372    ...
13373 };
13374 </pre></blockquote>
13375
13376 <p>
13377 Change 30.3.3.2.3 [thread.lock.unique.mod]:
13378 </p>
13379
13380 <blockquote><pre>mutex_type *<del>release</del> <ins>disown</ins>();
13381 </pre></blockquote>
13382
13383
13384
13385
13386
13387 <hr>
13388 <h3><a name="786"></a>786. Thread library timed waits, UTC and monotonic clocks</h3>
13389 <p><b>Section:</b> X [datetime.system] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a>
13390  <b>Submitter:</b> Christopher Kohlhoff, Jeff Garland <b>Date:</b> 2008-02-03</p>
13391 <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>
13392 <p><b>Discussion:</b></p>
13393 <p>
13394 The draft C++0x thread library requires that the time points of type
13395 <tt>system_time</tt> and returned by <tt>get_system_time()</tt> represent Coordinated
13396 Universal Time (UTC) (section X [datetime.system]). This can lead to
13397 surprising behavior when a library user performs a duration-based wait,
13398 such as <tt>condition_variable::timed_wait()</tt>. A complete explanation of the
13399 problem may be found in the
13400 <a href="http://www.opengroup.org/onlinepubs/009695399/xrat/xsh_chap02.html#tag_03_02_08_19">Rationale for the Monotonic Clock</a>
13401 section in POSIX, but in summary:
13402 </p>
13403
13404 <ul>
13405 <li>
13406 Operations such as <tt>condition_variable::timed_wait()</tt> (and its POSIX
13407 equivalent, <tt>pthread_cond_timedwait()</tt>) are specified using absolute times
13408 to address the problem of spurious wakeups.
13409 </li>
13410
13411 <li>
13412 The typical use of the timed wait operations is to perform a relative
13413 wait. This may be achieved by first calculating an absolute time as the
13414 sum of the current time and the desired duration. In fact, the C++0x
13415 thread library includes duration-based overloads of
13416 <tt>condition_variable::timed_wait()</tt> that behave as if by calling the
13417 corresponding absolute time overload with a time point value of
13418 <tt>get_system_time() + rel_time</tt>.
13419 </li>
13420
13421 <li>
13422 A UTC clock may be affected by changes to the system time, such as
13423 synchronization with an external source, leap seconds, or manual changes
13424 to the clock.
13425 </li>
13426
13427 <li>
13428 Should the clock change during a timed wait operation, the actual
13429 duration of the wait will not be the expected length. For example, a
13430 user may intend a timed wait of one second duration but, due to an
13431 adjustment of the system clock backwards by a minute, the wait instead
13432 takes 61 seconds.
13433 </li>
13434 </ul>
13435
13436 <p>
13437 POSIX solves the problem by introducing a new monotonic clock, which is
13438 unaffected by changes to the system time. When a condition variable is
13439 initialized, the user may specify whether the monotonic clock is to be
13440 used. (It is worth noting that on POSIX systems it is not possible to
13441 use <tt>condition_variable::native_handle()</tt> to access this facility, since
13442 the desired clock type must be specified during construction of the
13443 condition variable object.)
13444 </p>
13445
13446 <p>
13447 In the context of the C++0x thread library, there are added dimensions
13448 to the problem due to the need to support platforms other than POSIX:
13449 </p>
13450
13451 <ul>
13452 <li>
13453 Some environments (such as embedded systems) do not have a UTC clock, but do have a monotonic clock.
13454 </li>
13455
13456 <li>
13457 Some environments do not have a monotonic clock, but do have a UTC clock.
13458 </li>
13459
13460 <li>
13461 The Microsoft Windows API's synchronization functions use relative
13462 timeouts based on an implied monotonic clock. A program that switches
13463 from the Windows API to the C++0x thread library will now find itself
13464 susceptible to clock changes.
13465 </li>
13466 </ul>
13467
13468 <p>
13469 One possible minimal solution:
13470 </p>
13471
13472 <ul>
13473 <li>
13474 Strike normative references to UTC and an epoch based on 1970-01-01.
13475 </li>
13476
13477 <li>
13478 Make the semantics of <tt>system_time</tt> and <tt>get_system_time()</tt>
13479 implementation-defined (i.e standard library implementors may choose the
13480 appropriate underlying clock based on the capabilities of the target
13481 platform).
13482 </li>
13483
13484 <li>
13485 Add a non-normative note encouraging use of a monotonic clock.
13486 </li>
13487
13488 <li>
13489 Remove <tt>system_time::seconds_since_epoch()</tt>.
13490 </li>
13491
13492 <li>
13493 Change the constructor <tt>explicit system_time(time_t secs, nanoseconds ns
13494 = 0)</tt> to <tt>explicit system_time(nanoseconds ns)</tt>.
13495 </li>
13496 </ul>
13497
13498
13499
13500 <p><b>Proposed resolution:</b></p>
13501 <p>
13502 </p>
13503
13504
13505 <p><b>Rationale:</b></p>
13506 Addressed by
13507 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.html">N2661: A Foundation to Sleep On</a>.
13508
13509
13510
13511
13512
13513 <hr>
13514 <h3><a name="790"></a>790. <tt>xor_combine::seed</tt> not specified</h3>
13515 <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>
13516  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13517 <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>
13518 <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>
13519 <p><b>Discussion:</b></p>
13520 <p>
13521 <tt>xor_combine::seed(result_type)</tt> and <tt>seed(seed_seq&amp;)</tt> don't say what
13522 happens to each of the sub-engine seeds. (Should probably do the same
13523 to both, unlike TR1.)
13524 </p>
13525
13526 <p><i>[
13527 Bellevue:
13528 ]</i></p>
13529
13530
13531 <blockquote>
13532 Overcome by the previous proposal. NAD mooted by resolution of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#789">789</a>.
13533 </blockquote>
13534
13535
13536
13537 <p><b>Proposed resolution:</b></p>
13538
13539
13540
13541
13542
13543 <hr>
13544 <h3><a name="791"></a>791. <tt>piecewise_constant_distribution::densities</tt> has wrong name</h3>
13545 <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>
13546  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13547 <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>
13548 <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>
13549 <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>
13550 <p><b>Discussion:</b></p>
13551 <p>
13552 <tt>piecewise_constant_distribution::densities()</tt> should be <tt>probabilities()</tt>,
13553 just like <tt>discrete_distribution</tt>. (There's no real use for weights divided
13554 by areas.)
13555 </p>
13556
13557 <p><i>[
13558 Bellevue:
13559 ]</i></p>
13560
13561
13562 <blockquote>
13563 <p>
13564 Fermilab does not agree with this summary. As defined in the equation in
13565 26.4.8.5.2/4, the quantities are indeed probability densities not
13566 probabilities. Because we view this distribution as a parameterization
13567 of a *probability density function*, we prefer to work in terms of
13568 probability densities.
13569 </p>
13570
13571 <p>
13572 We don't think this should be changed.
13573 </p>
13574
13575 <p>
13576 If there is a technical argument about why the implementation dealing
13577 with these values can't be as efficient as one dealing with
13578 probabilities, we might reconsider. We don't care about this one member
13579 function being somewhat more or less efficient; we care about the size
13580 of the distribution object and the speed of the calls to generate
13581 variates.
13582 </p>
13583 </blockquote>
13584
13585
13586
13587 <p><b>Proposed resolution:</b></p>
13588
13589 <p>
13590 Change synopsis in 26.4.8.5.2 [rand.dist.samp.pconst]:
13591 </p>
13592
13593 <blockquote><pre>template &lt;class RealType = double&gt; 
13594 class piecewise_constant_distribution 
13595
13596 public:
13597     ...
13598     vector&lt;double&gt; <del>densities</del> <ins>probabilities</ins>() const;
13599     ...
13600 };
13601 </pre></blockquote>
13602
13603 <p>
13604 Change 26.4.8.5.2 [rand.dist.samp.pconst]/6:
13605 </p>
13606
13607 <blockquote><pre>vector&lt;double&gt; <del>densities</del> <ins>probabilities</ins>() const;
13608 </pre></blockquote>
13609
13610
13611
13612
13613
13614
13615 <hr>
13616 <h3><a name="795"></a>795. <tt>general_pdf_distribution</tt> should be dropped</h3>
13617 <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>
13618  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13619 <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>
13620 <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>
13621 <p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a></p>
13622 <p><b>Discussion:</b></p>
13623 <p>
13624 <tt>general_pdf_distribution</tt> should be dropped. (It's a research topic in
13625 adaptive numerical integration.)
13626 </p>
13627
13628 <p><i>[
13629 Stephan Tolksdorf notes:
13630 ]</i></p>
13631
13632
13633 <blockquote>
13634 This appears to be a duplicate of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#732">732</a>.
13635 </blockquote>
13636
13637
13638 <p><b>Proposed resolution:</b></p>
13639
13640
13641
13642
13643
13644
13645 <hr>
13646 <h3><a name="796"></a>796. <tt>ranlux48_base</tt> returns wrong value</h3>
13647 <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>
13648  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13649 <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>
13650 <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>
13651 <p><b>Discussion:</b></p>
13652 <p>
13653 The 10,000<sup>th</sup> value returned by <tt>ranlux48_base</tt> is supposed to be
13654 61839128582725. We get 192113843633948. (Note that the underlying
13655 generator was changed in Kona.)
13656 </p>
13657
13658 <p><i>[
13659 Bellevue:
13660 ]</i></p>
13661
13662
13663 <blockquote>
13664 Submitter withdraws defect.
13665 </blockquote>
13666
13667
13668
13669 <p><b>Proposed resolution:</b></p>
13670 <p>
13671 Change 26.4.5 [rand.predef]/p5:
13672 </p>
13673
13674 <blockquote>
13675 <pre>typedef subtract_with_carry_engine&lt;uint_fast64_t, 48, 5, 12&gt; 
13676         ranlux48_base; 
13677 </pre>
13678 <blockquote>
13679 <i>Required behavior:</i> The 10000<sup>th</sup> consecutive invocation of a default-constructed
13680 object of type <tt>ranlux48_base</tt> shall produce the value
13681 <del>61839128582725</del> <ins>192113843633948</ins>.
13682 </blockquote>
13683 </blockquote>
13684
13685
13686
13687
13688
13689 <hr>
13690 <h3><a name="797"></a>797. <tt>ranlux48</tt> returns wrong value</h3>
13691 <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>
13692  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-09</p>
13693 <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>
13694 <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>
13695 <p><b>Discussion:</b></p>
13696 <p>
13697 The 10,000<sup>th</sup> value returned by <tt>ranlux48</tt> is supposed to be
13698 249142670248501. We get 88229545517833. (Note that this depends
13699 on <tt>ranlux48_base</tt>.)
13700 </p>
13701 <p><i>[
13702 Bellevue:
13703 ]</i></p>
13704
13705
13706 <blockquote>
13707 Submitter withdraws defect.
13708 </blockquote>
13709
13710
13711
13712 <p><b>Proposed resolution:</b></p>
13713 <p>
13714 Change 26.4.5 [rand.predef]/p6:
13715 </p>
13716
13717 <blockquote>
13718 <pre>typedef discard_block_engine&lt;ranlux48_base, 389, 11&gt; 
13719         ranlux48
13720 </pre>
13721 <blockquote>
13722 <i>Required behavior:</i> The 10000<sup>th</sup> consecutive invocation of a default-constructed
13723 object of type <tt>ranlux48</tt> shall produce the value
13724 <del>249142670248501</del> <ins>88229545517833</ins>.
13725 </blockquote>
13726 </blockquote>
13727
13728
13729
13730
13731
13732 <hr>
13733 <h3><a name="799"></a>799. [tr.rand.eng.mers] and [rand.eng.mers]</h3>
13734 <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>
13735  <b>Submitter:</b> Stephan Tolksdorf <b>Date:</b> 2008-02-18</p>
13736 <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>
13737 <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>
13738 <p><b>Discussion:</b></p>
13739 <p>
13740 TR1 5.1.4.2 [tr.rand.eng.mers](10) requires that <tt>operator==</tt> for the <tt>mersenne_twister</tt>
13741 returns <tt>true</tt> if and only if the states of two <tt>mersenne_twisters</tt>,
13742 consisting each of <tt>n</tt> integers between <tt>0</tt> and <tt>2<sup>w</sup> - 1</tt>, are completely
13743 equal. This is a contradiction with TR1 5.1.1 [tr.rand.req](3) because the given
13744 definition of the state also includes the lower <tt>r</tt> bits of <tt>x(i-n)</tt>, which
13745 will never be used to generate a random number. If two <tt>mersenne_twister</tt>s
13746 only differ in the lower bits of <tt>x(i-n)</tt> they will not compare equal,
13747 although they will produce an identical sequence of random numbers.
13748 </p>
13749
13750 <p>
13751 26.4.3.2 [rand.eng.mers] in the latest C++ draft does not specify the behaviour
13752 of <tt>operator==</tt> but uses a similar definition of the state and, just like
13753 TR1 5.1.4.2 [tr.rand.eng.mers], requires the textual representation of a
13754 <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
13755 lower bits of <tt>X<sub>i-n</sub></tt>. This leads to two problems: First, the
13756 unsuspecting implementer is likely to erroneously compare the lower <tt>r</tt>
13757 bits of <tt>X<sub>i-n</sub></tt> in <tt>operator==</tt>. Second, if only the lower <tt>r</tt> bits differ,
13758 two <tt>mersenne_twister_engine</tt>s will compare equal (if correctly
13759 implemented) but have different textual representations, which
13760 conceptually is a bit ugly.
13761 </p>
13762
13763 <p>
13764 I propose that a paragraph or footnote is added to 26.4.3.2 [rand.eng.mers] which
13765 clarifies that the lower <tt>r</tt> bits of <tt>X<sub>i-n</sub></tt> are not to be compared in
13766 <tt>operator==</tt> and <tt>operator!=</tt>. It would only be consequent if furthermore
13767 the specification for the textual respresentation was changed to
13768 <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
13769 something similar.
13770 </p>
13771
13772 <p>
13773 These changes would likely have no practical effect, but would allow an
13774 implementation that does the right thing to be standard-conformant.
13775 </p>
13776
13777 <p><i>[
13778 Bellevue:
13779 ]</i></p>
13780
13781
13782 <blockquote>
13783 <p>
13784 Fermi Lab has no objection to the proposed change. However it feels that
13785 more time is needed to check the details, which would suggest a change
13786 to REVIEW.
13787 </p>
13788 <p>
13789 Bill feels that this is NAD, not enough practical importance to abandon
13790 the simple definition of equality, and someone would have to do a lot
13791 more study to ensure that all cases are covered for a very small
13792 payback. The submitter admits that "These changes would likely have no
13793 practical effect,", and according to Plum's razor this means that it is
13794 not worth the effort!
13795 </p>
13796 <p>
13797 Revisted: Agree that the fact that there is no practical difference means that no change can be justified.
13798 </p>
13799 </blockquote>
13800
13801
13802 <p><b>Proposed resolution:</b></p>
13803 <p>
13804 In 26.4.3.2 [rand.eng.mers]:
13805 </p>
13806
13807 <blockquote>
13808 <p>
13809 Insert at the end of para 2.:
13810 </p>
13811
13812 <blockquote>
13813 [<i>Note:</i> The lower <tt>r</tt> bits of <tt>X<sub>i-n</sub></tt> do not influence
13814 the state transition and hence should not be compared when comparing two
13815 <tt>mersenne_twister_engine</tt> objects. <i>-- end note</i>]
13816 </blockquote>
13817
13818 <p>
13819 In para 5. change:
13820 </p>
13821
13822 <blockquote>
13823 The textual representation of <tt>x<sub>i</sub></tt> consists of the values of
13824 <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>,
13825 ..., X<sub>i-1</sub></tt>, in that order.
13826 </blockquote>
13827 </blockquote>
13828
13829
13830
13831
13832
13833 <hr>
13834 <h3><a name="802"></a>802. <tt>knuth_b</tt> returns wrong value</h3>
13835 <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>
13836  <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2008-02-20</p>
13837 <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>
13838 <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>
13839 <p><b>Discussion:</b></p>
13840 <p>
13841 The 10,000<sup>th</sup> value returned by <tt>knuth_b</tt> is supposed to be
13842 1112339016. We get 2126698284.
13843 </p>
13844
13845
13846 <p><b>Proposed resolution:</b></p>
13847 <p>
13848 Change 26.4.5 [rand.predef]/p8:
13849 </p>
13850
13851 <blockquote>
13852 <pre>typedef shuffle_order_engine&lt;minstd_rand0, 256&gt; 
13853         knuth_b; 
13854 </pre>
13855 <blockquote>
13856 <i>Required behavior:</i> The 10000<sup>th</sup> consecutive invocation of a default-constructed
13857 object of type <tt>knuth_b</tt> shall produce the value
13858 <del>1112339016</del> <ins>2126698284</ins>.
13859 </blockquote>
13860 </blockquote>
13861
13862
13863 <p><i>[
13864 Bellevue: Submitter withdraws defect. "We got the wrong value for entirely the right reasons". NAD.
13865 ]</i></p>
13866
13867
13868
13869
13870
13871 <hr>
13872 <h3><a name="826"></a>826. Equivalent of <tt>%'d</tt>, or rather, lack thereof?</h3>
13873 <p><b>Section:</b> 22.2.2.2 [locale.nm.put] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>
13874  <b>Submitter:</b> Peter Dimov <b>Date:</b> 2008-04-07</p>
13875 <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>
13876 <p><b>Discussion:</b></p>
13877 <p>
13878 In the spirit of <tt>printf vs iostream</tt>...
13879 </p>
13880
13881 <p>
13882 POSIX <tt>printf</tt> says that <tt>%'d</tt> should insert grouping characters (and the
13883 implication is that in the absence of <tt>'</tt> no grouping characters are
13884 inserted). The <tt>num_put</tt> facet, on the other hand, seems to always insert
13885 grouping characters. Can this be considered a defect worth fixing for
13886 C++0x? Maybe <tt>ios_base</tt> needs an additional flag?
13887 </p>
13888
13889 <p><i>[
13890 Pablo Halpern:
13891 ]</i></p>
13892
13893
13894 <blockquote>
13895 I'm not sure it constitutes a defect, but I would be in favor of adding
13896 another flag (and corresponding manipulator).
13897 </blockquote>
13898
13899 <p><i>[
13900 Martin Sebor:
13901 ]</i></p>
13902
13903
13904 <blockquote>
13905 I don't know if it qualifies as a defect but I agree that there
13906 should be an easy way to control whether the thousands separator
13907 should or shouldn't be inserted. A new flag would be in line with
13908 the current design of iostreams (like <tt>boolalpha</tt>, <tt>showpos</tt>, or
13909 <tt>showbase</tt>).
13910 </blockquote>
13911
13912 <p><i>[
13913 Sophia Antipolis:
13914 ]</i></p>
13915
13916
13917 <blockquote>
13918 This is not a part of C99. LWG suggests submitting a paper may be appropriate.
13919 </blockquote>
13920
13921
13922
13923 <p><b>Proposed resolution:</b></p>
13924 <p>
13925 </p>
13926
13927
13928
13929
13930
13931 <hr>
13932 <h3><a name="831"></a>831. wrong type for not_eof()</h3>
13933 <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">NAD Editorial</a>
13934  <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2008-04-23</p>
13935 <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>
13936 <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>
13937 <p><b>Discussion:</b></p>
13938 <p>
13939   In Table 56 (Traits requirements) the <tt>not_eof()</tt> member function
13940   is using an argument of type <i>e</i> which denotes an object of
13941   type <code>X::int_type</code>. However, the specializations in
13942   21.1.3 [char.traits.specializations] all use <code>char_type</code>.
13943   This would effectively mean that the argument type actually can't
13944   represent EOF in the first place. I'm pretty sure that the type used
13945   to be <code>int_type</code> which is quite obviously the only sensible
13946   argument.
13947 </p>
13948 <p>
13949   This issue is close to being editorial. I suspect that the proposal
13950   changing this section to include the specializations for <code>char16_t</code>
13951   and <code>char32_t</code> accidentally used the wrong type.
13952 </p>
13953
13954
13955 <p><b>Proposed resolution:</b></p>
13956 <p>
13957   In 21.1.3.1 [char.traits.specializations.char],
13958   21.1.3.2 [char.traits.specializations.char16_t],
13959   21.1.3.3 [char.traits.specializations.char32_t], and
13960    [char.traits.specializations.wchar_t] correct the
13961   argument type from <code>char_type</code> to <code>int_type</code>.
13962 </p>
13963
13964
13965 <p><b>Rationale:</b></p>
13966 Already fixed in WP.
13967
13968
13969
13970
13971
13972 <hr>
13973 <h3><a name="840"></a>840. <tt>pair</tt> default template argument</h3>
13974 <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>
13975  <b>Submitter:</b> Thorsten Ottosen <b>Date:</b> 2008-05-23</p>
13976 <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>
13977 <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>
13978 <p><b>Discussion:</b></p>
13979 <p>
13980 I have one issue with <tt>std::pair</tt>. Well, it might just be a very annoying
13981 historical accident, but why is there no default template argument for
13982 the second template argument? This is so annoying when the type in
13983 question is looong and hard to write (type deduction with <tt>auto</tt> won't
13984 help those cases where we use it as a return or argument type).
13985 </p>
13986
13987
13988 <p><b>Proposed resolution:</b></p>
13989 <p>
13990 Change the synopsis in 20.2 [utility] to read:
13991 </p>
13992
13993 <blockquote><pre>template &lt;class T1, class T2 <ins>= T1</ins>&gt; struct pair;
13994 </pre></blockquote>
13995
13996 <p>
13997 Change 20.2.3 [pairs] to read:
13998 </p>
13999
14000 <blockquote><pre>namespace std {
14001  template &lt;class T1, class T2 <ins>= T1</ins>&gt;
14002  struct pair {
14003    typedef T1 first_type;
14004    typedef T2 second_type;
14005    ...
14006 </pre></blockquote>
14007
14008
14009 <p><b>Rationale:</b></p>
14010 <tt>std::pair</tt> is a heterogeneous container.
14011
14012
14013
14014
14015
14016 </body></html>