diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-08-02 17:39:51 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-08-02 17:39:51 +0000 |
commit | 2ee0c1fb57b65ecef76c0fb14c9d05c4fbec2980 (patch) | |
tree | 664197b6c07073fa32d2d6ed03dc3bba70b21eb6 /libstdc++-v3/docs | |
parent | f29d2cff888dae22fa249de4475b61a3e81a867d (diff) | |
download | gcc-2ee0c1fb57b65ecef76c0fb14c9d05c4fbec2980.zip gcc-2ee0c1fb57b65ecef76c0fb14c9d05c4fbec2980.tar.gz gcc-2ee0c1fb57b65ecef76c0fb14c9d05c4fbec2980.tar.bz2 |
DR 660, [Ready] in Toronto.
2007-08-02 Paolo Carlini <pcarlini@suse.de>
DR 660, [Ready] in Toronto.
* include/bits/stl_function.h (bit_and, bit_or, bit_xor): Add.
* testsuite/20_util/function_objects/dr660.cc: New.
* docs/html/ext/howto.html: Add an entry for DR 660, update.
* docs/html/ext/lwg-closed.html, docs/html/ext/lwg-active.html,
docs/html/ext/lwg-defects.html: Import Revision 49.
From-SVN: r127166
Diffstat (limited to 'libstdc++-v3/docs')
-rw-r--r-- | libstdc++-v3/docs/html/ext/howto.html | 12 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/ext/lwg-active.html | 10549 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/ext/lwg-closed.html | 4907 | ||||
-rw-r--r-- | libstdc++-v3/docs/html/ext/lwg-defects.html | 9613 |
4 files changed, 20278 insertions, 4803 deletions
diff --git a/libstdc++-v3/docs/html/ext/howto.html b/libstdc++-v3/docs/html/ext/howto.html index fff3410..73881ed 100644 --- a/libstdc++-v3/docs/html/ext/howto.html +++ b/libstdc++-v3/docs/html/ext/howto.html @@ -592,7 +592,7 @@ <dd>Construct a <code>linear_congruential</code> engine and seed with it. </dd> - <dt><a href="lwg-active.html#526">526</a>: + <dt><a href="lwg-closed.html#526">526</a>: <em>Is it undefined if a function in the standard changes in parameters?</em> </dt> @@ -613,17 +613,23 @@ <dd>Add an auto_ptr<void> specialization. </dd> - <dt><a href="lwg-active.html#543">543</a>: + <dt><a href="lwg-defects.html#543">543</a>: <em>valarray slice default constructor</em> </dt> <dd>Follow the straightforward proposed resolution. </dd> - <dt><a href="lwg-active.html#586">586</a>: + <dt><a href="lwg-defects.html#586">586</a>: <em>string inserter not a formatted function</em> </dt> <dd>Change it to be a formatted output function (i.e. catch exceptions). </dd> + + <dt><a href="lwg-active.html#660">660</a>: + <em>Missing bitwise operations</em> + </dt> + <dd>Add the missing operations. + </dd> <!-- <dt><a href="lwg-defects.html#"></a>: <em></em> diff --git a/libstdc++-v3/docs/html/ext/lwg-active.html b/libstdc++-v3/docs/html/ext/lwg-active.html index a4f69b6..8aec733 100644 --- a/libstdc++-v3/docs/html/ext/lwg-active.html +++ b/libstdc++-v3/docs/html/ext/lwg-active.html @@ -1,18 +1,22 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><title>C++ Standard Library Active Issues List</title> -<style>ins {background-color:#FFFFA0} -del {background-color:#FFFFA0}</style></head> +<style type="text/css"> +p {text-align:justify} +li {text-align:justify} +ins {background-color:#FFFFA0} +del {background-color:#FFFFA0} +</style></head> -<body bgcolor="#ffffff" text="#000000"> +<body> <table> <tbody><tr> <td align="left">Doc. no.</td> -<td align="left">N2130=06-0200</td> +<td align="left">N2317=07-0177</td> </tr> <tr> <td align="left">Date:</td> -<td align="left">2006-11-03</td> +<td align="left">2007-06-24</td> </tr> <tr> <td align="left">Project:</td> @@ -20,19 +24,17 @@ del {background-color:#FFFFA0}</style></head> </tr> <tr> <td align="left">Reply to:</td> -<td align="left">Howard Hinnant <howard.hinnant@gmail.com></td> +<td align="left">Howard Hinnant <<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>></td> </tr> </tbody></table> -<h1>C++ Standard Library Active Issues List (Revision R45)</h1> +<h1>C++ Standard Library Active Issues List (Revision R49)</h1> + <p>Reference ISO/IEC IS 14882:1998(E)</p> <p>Also see:</p> <ul> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li> <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li> <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a></li> </ul> @@ -89,50 +91,180 @@ del {background-color:#FFFFA0}</style></head> hyperlinks from this issues list to those files will only work for committee members who have downloaded them into the same disk directory as the issues list files. </p> + <h2>Revision History</h2> <ul> +<li>R49: +2007-06-23 pre-Toronto mailing. +<ul> +<li><b>Summary:</b><ul> +<li>158 open issues, up by 13.</li> +<li>538 closed issues, up by 7.</li> +<li>696 issues total, up by 20.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li> +<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> +<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> +<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> +<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> +</ul></li> +</ul> +</li> +<li>R48: +2007-05-06 post-Oxford mailing. +<ul> +<li><b>Summary:</b><ul> +<li>145 open issues, down by 33.</li> +<li>531 closed issues, up by 53.</li> +<li>676 issues total, up by 20.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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> +<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> +<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-closed.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> +<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> +<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> +<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-closed.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-closed.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-closed.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> +<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> +<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> +<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> +<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> +<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#646">646</a>.</li> +<li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a>.</li> +<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> +<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> +<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> +</ul></li> +</ul> +</li> +<li>R47: +2007-03-09 pre-Oxford mailing. +<ul> +<li><b>Summary:</b><ul> +<li>178 open issues, up by 37.</li> +<li>478 closed issues, up by 0.</li> +<li>656 issues total, up by 37.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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-active.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li> +<li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#626">626</a>.</li> +<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li> +<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> +<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-closed.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> +<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> +</ul></li> +</ul> +</li> +<li>R46: +2007-01-12 mid-term mailing. +<ul> +<li><b>Summary:</b><ul> +<li>141 open issues, up by 11.</li> +<li>478 closed issues, down by 1.</li> +<li>619 issues total, up by 10.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +</ul></li> +</ul> +</li> <li>R45: 2006-11-03 post-Portland mailing. -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. -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. -Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#605">605</a> to Ready. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#609">609</a>. +<ul> +<li><b>Summary:</b><ul> +<li>130 open issues, up by 0.</li> +<li>479 closed issues, up by 17.</li> +<li>609 issues total, up by 17.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +<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> +<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li> +<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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> +<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> +<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review.</li> +<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> +</ul></li> +</ul> </li> <li>R44: 2006-09-08 pre-Portland mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>. +<ul> +<li><b>Summary:</b><ul> +<li>130 open issues, up by 6.</li> +<li>462 closed issues, down by 1.</li> +<li>592 issues total, up by 5.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>.</li> +</ul></li> +</ul> </li> <li>R43: 2006-06-23 mid-term mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>. -Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>. -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. +<ul> +<li><b>Summary:</b><ul> +<li>124 open issues, up by 14.</li> +<li>463 closed issues, down by 1.</li> +<li>587 issues total, up by 13.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li> +<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> +</ul></li> +</ul> </li> <li>R42: 2006-04-21 post-Berlin mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#572">572</a>. -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. -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-active.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-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#548">548</a> to Open. -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-active.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. -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. -Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#534">534</a> to Review. +<ul> +<li><b>Summary:</b><ul> +<li>110 open issues, down by 16.</li> +<li>464 closed issues, up by 24.</li> +<li>574 issues total, up by 8.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li> +<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> +<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-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#548">548</a> to Open.</li> +<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-active.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> +<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> +<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li> +</ul></li> +</ul> </li> <li>R41: 2006-02-24 pre-Berlin mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>. -Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open. -Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>. +<ul> +<li><b>Summary:</b><ul> +<li>126 open issues, up by 31.</li> +<li>440 closed issues, up by 0.</li> +<li>566 issues total, up by 31.</li> +</ul></li> +<li><b>Details:</b><ul> +<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-active.html#566">566</a>.</li> +<li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li> +<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li> +</ul></li> +</ul> </li> <li>R40: 2005-12-16 mid-term mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>. +<ul> +<li><b>Summary:</b><ul> +<li>95 open issues.</li> +<li>440 closed issues.</li> +<li>535 issues total.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li> +</ul></li> +</ul> </li> <li>R39: 2005-10-14 post-Mont Tremblant mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#528">528</a>. +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-active.html#528">528</a>. 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. 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. 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. @@ -166,12 +298,12 @@ previously in "DR" status were moved to "WP". <li>R32: 2004-09 pre-Redmond mailing: reflects new proposed resolutions and new issues received after the 2004-07 mailing. Added -new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>. +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>. </li> <li>R31: 2004-07 mid-term mailing: reflects new proposed resolutions and new issues received after the post-Sydney mailing. Added -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>. +new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>. </li> <li>R30: Post-Sydney mailing: reflects decisions made at the Sydney meeting. @@ -223,8 +355,8 @@ All Ready issues were moved to DR status, with the exception of issues <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>. Noteworthy issues discussed at Redmond include -<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-active.html#233">233</a>, -<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-active.html#254">254</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-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>, +<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>. </li> <li>R19: Pre-Redmond mailing. Added new issues @@ -293,7 +425,7 @@ the bug in enough places. </li> <li>R15: pre-Toronto mailing. Added issues -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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 +<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 changes so that we pass Weblint tests. </li> <li>R14: @@ -366,8 +498,9 @@ Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-def format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98) </li> </ul> -<h2> -<a name="Status"></a>Issue Status</h2> + +<h2><a name="Status"></a>Issue Status</h2> + <p><b><a name="New">New</a></b> - The issue has not yet been reviewed by the LWG. Any <b>Proposed Resolution</b> is purely a suggestion from the issue submitter, and should not be construed as @@ -398,9 +531,15 @@ format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64 issue number. </p> <p><b><a name="NAD">NAD</a></b> - The LWG has reached consensus that - the issue is not a defect in the Standard, and the issue is ready to - forward to the full committee as a proposed record of response. A - <b>Rationale</b> discusses the LWG's reasoning.</p> + the issue is not a defect in the Standard.</p> + + <p><b><a name="NAD Editorial">NAD Editorial</a></b> - The LWG has reached consensus that + the issue can either be handled editorially, or is handled by a paper (usually + linked to in the rationale).</p> + + <p><b><a name="NAD Future">NAD Future</a></b> - In addition to the regular + status, the LWG believes that this issue should be revisited at the + next revision of the standard.</p> <p><b><a name="Review">Review</a></b> - Exact wording of a <b>Proposed Resolution</b> is now available for review on an issue @@ -430,26 +569,29 @@ format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64 Resolution as a Technical Corrigenda. Action on this issue is thus complete and no further action is possible under ISO rules.</p> + <p><b><a name="TRDec">TRDec</a></b> - (Decimal TR defect) - The + LWG has voted to accept the Defect Report's Proposed + Resolution into the Decimal TR. Action on this issue is thus + complete and no further action is expected.</p> + <p><b><a name="WP">WP</a></b> - (Working Paper) - The proposed resolution has not been accepted as a Technical Corrigendum, but the full WG21 committee has voted to apply the Defect Report's Proposed Resolution to the working paper.</p> - <p><b><a name="RR">RR</a></b> - (Record of Response) - The full WG21 - committee has determined that this issue is not a defect in the - Standard. Action on this issue is thus complete and no further - action is possible under ISO rules.</p> + <p><b>Pending</b> - This is a <i>status qualifier</i>. When prepended to + a status this indicates the issue has been + processed by the committee, and a decision has been made to move the issue to + the associated unqualified status. However for logistical reasons the indicated + outcome of the issue has not yet appeared in the latest working paper. - <p><b><a name="Future">Future</a></b> - In addition to the regular - status, the LWG believes that this issue should be revisited at the - next revision of the standard. It is usually paired with NAD.</p> - - <p>Issues are always given the status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> when + </p><p>Issues are always given the status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> when they first appear on the issues list. They may progress to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> while the LWG is actively working on them. When the LWG has reached consensus on the disposition of an issue, the status will then change to - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>, or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> as appropriate. Once the full J16 committee votes to + <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a>, or + <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> as appropriate. Once the full J16 committee votes to forward Ready issues to the Project Editor, they are given the status of Defect Report ( <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>). These in turn may become the basis for Technical Corrigenda (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>), @@ -459,9 +601,16 @@ format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64 formal ISO DR status. </p> + <h2>Active Issues</h2> <hr> -<a name="23"><h3>23. Num_get overflow result</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="23"></a>23. Num_get overflow result</h3> +<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#Open">Open</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>The current description of numeric input does not account for the possibility of overflow. This is an implicit result of changing the description to rely on the definition of scanf() (which fails to @@ -486,7 +635,7 @@ and hard to trace, so I will describe it briefly: <ul> <li> - According to 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> + According to 22.2.2.1.2 [facet.num.get.virtuals] paragraph 11 <tt>failbit</tt> is set if <tt>scanf()</tt> would return an input error; otherwise a value is converted to the rules of <tt>scanf</tt>. @@ -545,8 +694,6 @@ upon overflow. We considered three options based on this:</p> <p>Straw poll: (1) 5; (2) 0; (3) 8.</p> -<p><b>Proposed resolution:</b></p> - <p>Discussed at Lillehammer. General outline of what we want the solution to look like: we want to say that overflow is an error, and provide a way to distinguish overflow from other kinds of errors. @@ -556,8 +703,22 @@ upon overflow. We considered three options based on this:</p> value, then set failbit and assign the nearest representable value. Bill will provide wording.</p> + + +<p><b>Proposed resolution:</b></p> + + + + + + <hr> -<a name="96"><h3>96. Vector<bool> is not a container</h3></a><p><b>Section:</b> 23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="96"></a>96. Vector<bool> is not a container</h3> +<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p><tt>vector<bool></tt> is not a container as its reference and pointer types are not references and pointers. </p> @@ -566,14 +727,15 @@ speed one.</p> <p><b>See also:</b> 99-0008 == N1185 Vector<bool> is Nonconforming, Forces Optimization Choice.</p> -<p><b>Proposed resolution:</b></p> <p><i>[In Santa Cruz the LWG felt that this was Not A Defect.]</i></p> + <p><i>[In Dublin many present felt that failure to meet Container requirements was a defect. There was disagreement as to whether or not the optimization requirements constituted a defect.]</i></p> + <p><i>[The LWG looked at the following resolutions in some detail: <br> * Not A Defect.<br> @@ -591,14 +753,17 @@ There was also mention of a transition scheme something like (1) add vector_bool and deprecate vector<bool> in the next standard. (2) Remove vector<bool> in the following standard.]</i></p> + <p><i>[Modifying container requirements to permit returning proxies (thus allowing container requirements conforming vector<bool>) was also discussed.]</i></p> + <p><i>[It was also noted that there is a partial but ugly workaround in that vector<bool> may be further specialized with a customer allocator.]</i></p> + <p><i>[Kona: Herb Sutter presented his paper J16/99-0035==WG21/N1211, vector<bool>: More Problems, Better Solutions. Much discussion of a two step approach: a) deprecate, b) provide replacement under a @@ -607,6 +772,7 @@ my dead body. This resolution was mentioned in the LWG report to the full committee, where several additional committee members indicated over-my-dead-body positions.]</i></p> + <p>Discussed at Lillehammer. General agreement that we should deprecate vector<bool> and introduce this functionality under a different name, e.g. bit_vector. This might make it possible to @@ -619,316 +785,37 @@ over-my-dead-body positions.]</i></p> <p>We need a paper for the new bit_vector class.</p> -<hr> -<a name="201"><h3>201. Numeric limits terminology wrong</h3></a><p><b>Section:</b> 18.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.limits"> [lib.limits]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Stephen Cleary <b>Date:</b> 21 Dec 1999</p> -<p> -In some places in this section, the terms "fundamental types" and -"scalar types" are used when the term "arithmetic types" is intended. -The current usage is incorrect because void is a fundamental type and -pointers are scalar types, neither of which should have -specializations of numeric_limits. -</p> -<p><b>Proposed resolution:</b></p> -<p><i>[Lillehammer: it remains true that numeric_limits is using - imprecise language. However, none of the proposals for changed - wording are clearer. A redesign of numeric_limits is needed, but this - is more a task than an open issue.]</i></p> -<hr> -<a name="206"><h3>206. operator new(size_t, nothrow) may become unlinked to ordinary operator new if ordinary version replaced</h3></a><p><b>Section:</b> 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 29 Aug 1999</p> -<p>As specified, the implementation of the nothrow version of operator -new does not necessarily call the ordinary operator new, but may -instead simply call the same underlying allocator and return a null -pointer instead of throwing an exception in case of failure.</p> - -<p>Such an implementation breaks code that replaces the ordinary -version of new, but not the nothrow version. If the ordinary version -of new/delete is replaced, and if the replaced delete is not -compatible with pointers returned from the library versions of new, -then when the replaced delete receives a pointer allocated by the -library new(nothrow), crash follows.</p> -<p>The fix appears to be that the lib version of new(nothrow) must -call the ordinary new. Thus when the ordinary new gets replaced, the -lib version will call the replaced ordinary new and things will -continue to work.</p> -<p>An alternative would be to have the ordinary new call -new(nothrow). This seems sub-optimal to me as the ordinary version of -new is the version most commonly replaced in practice. So one would -still need to replace both ordinary and nothrow versions if one wanted -to replace the ordinary version.</p> - -<p>Another alternative is to put in clear text that if one version is -replaced, then the other must also be replaced to maintain -compatibility. Then the proposed resolution below would just be a -quality of implementation issue. There is already such text in -paragraph 7 (under the new(nothrow) version). But this nuance is -easily missed if one reads only the paragraphs relating to the -ordinary new.</p> <p><b>Proposed resolution:</b></p> -<p><b>Rationale:</b></p> -<p>Yes, they may become unlinked, and that is by design. If a user -replaces one, the user should also replace the other.</p> - -<p><i>[ -Reopened due to a gcc conversation between Howard, Martin and Gaby. Forwarding -or not is visible behavior to the client and it would be useful for the client -to know which behavior it could depend on. -]</i></p> - -<hr> -<a name="233"><h3>233. Insertion hints in associative containers</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 30 Apr 2000</p> -<p> -If <tt>mm</tt> is a multimap and <tt>p</tt> is an iterator -into the multimap, then <tt>mm.insert(p, x)</tt> inserts -<tt>x</tt> into <tt>mm</tt> with <tt>p</tt> as a hint as -to where it should go. Table 69 claims that the execution time is -amortized constant if the insert winds up taking place adjacent to -<tt>p</tt>, but does not say when, if ever, this is guaranteed to -happen. All it says it that <tt>p</tt> is a hint as to where to -insert. -</p> <p> -The question is whether there is any guarantee about the relationship -between <tt>p</tt> and the insertion point, and, if so, what it -is. -</p> -<p> -I believe the present state is that there is no guarantee: The user -can supply <tt>p</tt>, and the implementation is allowed to -disregard it entirely. -</p> - -<p><b>Additional comments from Nathan:</b><br> - -The vote [in Redmond] was on whether to elaborately specify the use of -the hint, or to require behavior only if the value could be inserted -adjacent to the hint. I would like to ensure that we have a chance to -vote for a deterministic treatment: "before, if possible, otherwise -after, otherwise anywhere appropriate", as an alternative to the -proposed "before or after, if possible, otherwise [...]". +We now have: +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2050.pdf">N2050</a> +and +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2160.html">N2160</a>. </p> - -<p><b>Proposed resolution:</b></p> - -<p>In table 69 "Associative Container Requirements" in 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, in the row for <tt>a.insert(p, t)</tt>, -change</p> - -<blockquote> -iterator p is a hint pointing to where the insert -should start to search. -</blockquote> - -<p>to</p> - -<blockquote> -insertion adjacent to iterator p is preferred if -more than one insertion point is valid. -</blockquote> - -<p>and change</p> - -<blockquote> -logarithmic in general, but amortized constant if -t is inserted right after p. -</blockquote> - -<p>to</p> - -<blockquote> -logarithmic in general, but amortized constant if -t is inserted adjacent to iterator p. -</blockquote> - -<p><i>[Toronto: there was general agreement that this is a real defect: -when inserting an element x into a multiset that already contains -several copies of x, there is no way to know whether the hint will be -used. The proposed resolution was that the new element should always -be inserted as close to the hint as possible. So, for example, if -there is a subsequence of equivalent values, then providing a.begin() -as the hint means that the new element should be inserted before the -subsequence even if a.begin() is far away. JC van Winkel supplied -precise wording for this proposed resolution, and also for an -alternative resolution in which hints are only used when they are -adjacent to the insertion point.]</i></p> - -<p><i>[Copenhagen: the LWG agreed to the original proposed resolution, -in which an insertion hint would be used even when it is far from the -insertion point. This was contingent on seeing a reference -implementation showing that it is possible to implement this -requirement without loss of efficiency. John Potter provided such a -reference implementation.]</i></p> - -<p><i>[Redmond: The LWG was reluctant to adopt the proposal that -emerged from Copenhagen: it seemed excessively complicated, and went -beyond fixing the defect that we identified in Toronto. PJP provided -the new wording described in this issue. Nathan agrees that we -shouldn't adopt the more detailed semantics, and notes: "we know that -you can do it efficiently enough with a red-black tree, but there are -other (perhaps better) balanced tree techniques that might differ -enough to make the detailed semantics hard to satisfy."]</i></p> - -<p><i>[Curaçao: Nathan should give us the alternative wording he -suggests so the LWG can decide between the two options.]</i></p> - -<p><i>[Lillehammer: The LWG previously rejected the more detailed - semantics, because it seemed more loike a new feature than like - defect fixing. We're now more sympathetic to it, but we (especially - Bill) are still worried about performance. N1780 describes a naive - algorithm, but it's not clear whether there is a non-naive - implementation. Is it possible to implement this as efficently as - the current version of insert?]</i></p> - -<p><i>[Post Lillehammer: N1780 updated in post meeting mailing with -feedback from Lillehammer with more information regarding performance. +<p><i>[ +Batavia: The LWG feels we need something closer to SGI's <tt>bitvector</tt> to ease migration +from <tt>vector<bool></tt>. Although some of the funcitonality from +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2050.pdf">N2050</a> +could well be used in such a template. The concern is easing the API migration for those +users who want to continue using a bit-packed container. Alan and Beman to work. ]</i></p> -<hr> -<a name="254"><h3>254. Exception types in clause 19 are constructed from <tt>std::string</tt> -</h3></a><p><b>Section:</b> 19.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.std.exceptions"> [lib.std.exceptions]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 01 Aug 2000</p> -<p> -Many of the standard exception types which implementations are -required to throw are constructed with a const std::string& -parameter. For example: -</p> - -<pre> 19.1.5 Class out_of_range [lib.out.of.range] - namespace std { - class out_of_range : public logic_error { - public: - explicit out_of_range(const string& what_arg); - }; - } - - 1 The class out_of_range defines the type of objects thrown as excep- - tions to report an argument value not in its expected range. - - out_of_range(const string& what_arg); - - Effects: - Constructs an object of class out_of_range. - Postcondition: - strcmp(what(), what_arg.c_str()) == 0. -</pre> - -<p> -There are at least two problems with this: -</p> -<ol> -<li>A program which is low on memory may end up throwing -std::bad_alloc instead of out_of_range because memory runs out while -constructing the exception object.</li> -<li>An obvious implementation which stores a std::string data member -may end up invoking terminate() during exception unwinding because the -exception object allocates memory (or rather fails to) as it is being -copied.</li> -</ol> - -<p> -There may be no cure for (1) other than changing the interface to -out_of_range, though one could reasonably argue that (1) is not a -defect. Personally I don't care that much if out-of-memory is reported -when I only have 20 bytes left, in the case when out_of_range would -have been reported. People who use exception-specifications might care -a lot, though. -</p> - -<p> -There is a cure for (2), but it isn't completely obvious. I think a -note for implementors should be made in the standard. Avoiding -possible termination in this case shouldn't be left up to chance. The -cure is to use a reference-counted "string" implementation -in the exception object. I am not necessarily referring to a -std::string here; any simple reference-counting scheme for a NTBS -would do. -</p> - -<p><b>Further discussion, in email:</b></p> - -<p> -...I'm not so concerned about (1). After all, a library implementation -can add const char* constructors as an extension, and users don't -<i>need</i> to avail themselves of the standard exceptions, though this is -a lame position to be forced into. FWIW, std::exception and -std::bad_alloc don't require a temporary basic_string. -</p> - -<p> -...I don't think the fixed-size buffer is a solution to the problem, -strictly speaking, because you can't satisfy the postcondition -<br> - <tt> strcmp(what(), what_arg.c_str()) == 0</tt> -<br> -For all values of what_arg (i.e. very long values). That means that -the only truly conforming solution requires a dynamic allocation. -</p> - -<p><b>Further discussion, from Redmond:</b></p> - -<p>The most important progress we made at the Redmond meeting was -realizing that there are two separable issues here: the const -string& constructor, and the copy constructor. If a user writes -something like <tt>throw std::out_of_range("foo")</tt>, the const -string& constructor is invoked before anything gets thrown. The -copy constructor is potentially invoked during stack unwinding.</p> -<p>The copy constructor is a more serious problem, becuase failure -during stack unwinding invokes <tt>terminate</tt>. The copy -constructor must be nothrow. <i>Curaçao: Howard thinks this -requirement may already be present.</i></p> -<p>The fundamental problem is that it's difficult to get the nothrow -requirement to work well with the requirement that the exception -objects store a string of unbounded size, particularly if you also try -to make the const string& constructor nothrow. Options discussed -include:</p> -<ul> -<li>Limit the size of a string that exception objects are required to -throw: change the postconditions of 19.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.domain.error"> [lib.domain.error]</a> paragraph 3 -and 19.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.runtime.error"> [lib.runtime.error]</a> paragraph 3 to something like this: -"strncmp(what(), what_arg._str(), N) == 0, where N is an -implementation defined constant no smaller than 256".</li> -<li>Allow the const string& constructor to throw, but not the -copy constructor. It's the implementor's responsibility to get it -right. (An implementor might use a simple refcount class.)</li> -<li>Compromise between the two: an implementation is not allowed to -throw if the string's length is less than some N, but, if it doesn't -throw, the string must compare equal to the argument.</li> -<li>Add a new constructor that takes a const char*</li> -</ul> - -<p>(Not all of these options are mutually exclusive.)</p> - -<p><b>Proposed resolution:</b></p> -<p><b>Rationale:</b></p> - -<p>Throwing a bad_alloc while trying to construct a message for another -exception-derived class is not necessarily a bad thing. And the -bad_alloc constructor already has a no throw spec on it (18.4.2.1).</p> - -<p><b>Future:</b></p> - -<p>All involved would like to see const char* constructors added, but -this should probably be done for C++0X as opposed to a DR.</p> -<p>I believe the no throw specs currently decorating these functions -could be improved by some kind of static no throw spec checking -mechanism (in a future C++ language). As they stand, the copy -constructors might fail via a call to unexpected. I think what is -intended here is that the copy constructors can't fail.</p> - -<p><i>[Pre-Sydney: reopened at the request of Howard Hinnant. - Post-Redmond: James Kanze noticed that the copy constructors of - exception-derived classes do not have nothrow clauses. Those - classes have no copy constructors declared, meaning the - compiler-generated implicit copy constructors are used, and those - compiler-generated constructors might in principle throw anything.]</i></p> <hr> -<a name="255"><h3>255. Why do <tt>basic_streambuf<>::pbump()</tt> and <tt>gbump()</tt> take an int?</h3></a><p><b>Section:</b> 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 12 Aug 2000</p> +<h3><a name="255"></a>255. Why do <tt>basic_streambuf<>::pbump()</tt> and <tt>gbump()</tt> take an int?</h3> +<p><b>Section:</b> 27.5.2 [streambuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-12</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf">issues</a> in [streambuf].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The basic_streambuf members gbump() and pbump() are specified to take an int argument. This requirement prevents the functions from effectively @@ -943,6 +830,8 @@ usage of a native type in the functions signatures is inconsistent with other member functions (such as sgetn() and sputn()) that manipulate the underlying character buffer. Those functions take a streamsize argument. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the signatures of these functions in the synopsis of template @@ -971,19 +860,21 @@ signed. But the standard has this to say about streamsize (27.4.1/2/Footnote): </p> -<blockquote> +<blockquote><p> [Footnote: streamsize is used in most places where ISO C would use size_t. Most of the uses of streamsize could use size_t, except for the strstreambuf constructors, which require negative values. It should probably be the signed type corresponding to size_t (which is what Posix.2 calls ssize_t). --- end footnote] -</blockquote> +</p></blockquote> <p> This seems a little weak for the argument to pbump and gbump. Should we ever really get rid of strstream, this footnote might go with it, along with the reason to make streamsize signed. </p> + + <p><b>Rationale:</b></p> <p>The LWG believes this change is too big for now. We may wish to reconsider this for a future revision of the standard. One @@ -992,77 +883,18 @@ signature.</p> <p><i>[ [2006-05-04: Reopened at the request of Chris (Krzysztof ?elechowski)] ]</i></p> -<hr> -<a name="258"><h3>258. Missing allocator requirement</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 22 Aug 2000</p> -<p> -From lib-7752: -</p> - -<p> -I've been assuming (and probably everyone else has been assuming) that -allocator instances have a particular property, and I don't think that -property can be deduced from anything in Table 32. -</p> - -<p> -I think we have to assume that allocator type conversion is a -homomorphism. That is, if x1 and x2 are of type X, where -X::value_type is T, and if type Y is X::template -rebind<U>::other, then Y(x1) == Y(x2) if and only if x1 == x2. -</p> - -<p> -Further discussion: Howard Hinnant writes, in lib-7757: -</p> - -<p> -I think I can prove that this is not provable by Table 32. And I agree -it needs to be true except for the "and only if". If x1 != x2, I see no -reason why it can't be true that Y(x1) == Y(x2). Admittedly I can't -think of a practical instance where this would happen, or be valuable. -But I also don't see a need to add that extra restriction. I think we -only need: -</p> - -<blockquote> - if (x1 == x2) then Y(x1) == Y(x2) -</blockquote> -<p> -If we decide that == on allocators is transitive, then I think I can -prove the above. But I don't think == is necessarily transitive on -allocators. That is: -</p> -<p> -Given x1 == x2 and x2 == x3, this does not mean x1 == x3. -</p> -<p>Example:</p> -<blockquote> -<p> -x1 can deallocate pointers from: x1, x2, x3 <br> -x2 can deallocate pointers from: x1, x2, x4 <br> -x3 can deallocate pointers from: x1, x3 <br> -x4 can deallocate pointers from: x2, x4 -</p> - -<p> -x1 == x2, and x2 == x4, but x1 != x4 -</p> -</blockquote> -<p><b>Proposed resolution:</b></p> -<p><i>[Toronto: LWG members offered multiple opinions. One -opinion is that it should not be required that <tt>x1 == x2</tt> -implies <tt>Y(x1) == Y(x2)</tt>, and that it should not even be -required that <tt>X(x1) == x1</tt>. Another opinion is that -the second line from the bottom in table 32 already implies the -desired property. This issue should be considered in light of -other issues related to allocator instances.]</i></p> <hr> -<a name="290"><h3>290. Requirements to for_each and its function object</h3></a><p><b>Section:</b> 25.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.foreach"> [lib.alg.foreach]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 03 Jan 2001</p> +<h3><a name="290"></a>290. Requirements to for_each and its function object</h3> +<p><b>Section:</b> 25.1.1 [alg.foreach] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 2001-01-03</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.foreach">issues</a> in [alg.foreach].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>The specification of the for_each algorithm does not have a "Requires" section, which means that there are no restrictions imposed on the function object whatsoever. In essence it @@ -1087,24 +919,37 @@ programmers shooting themselves in the foot this way, and they did not understand that there are restrictions even if the description of the algorithm does not say so. </p> -<p><b>Proposed resolution:</b></p> <p><i>[Lillehammer: This is more general than for_each. We don't want the function object in transform invalidiating iterators either. There should be a note somewhere in clause 17 (17, not 25) saying that user code operating on a range may not invalidate iterators unless otherwise specified. Bill will provide wording.]</i></p> + + +<p><b>Proposed resolution:</b></p> + + + + + + <hr> -<a name="299"><h3>299. Incorrect return types for iterator dereference</h3></a><p><b>Section:</b> 24.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.bidirectional.iterators"> [lib.bidirectional.iterators]</a>, 24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> John Potter <b>Date:</b> 22 Jan 2001</p> -<p> -In section 24.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.bidirectional.iterators"> [lib.bidirectional.iterators]</a>, +<h3><a name="299"></a>299. Incorrect return types for iterator dereference</h3> +<p><b>Section:</b> 24.1.4 [bidirectional.iterators], 24.1.5 [random.access.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> John Potter <b>Date:</b> 2001-01-22</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bidirectional.iterators">issues</a> in [bidirectional.iterators].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In section 24.1.4 [bidirectional.iterators], Table 75 gives the return type of *r-- as convertible to T. This is not consistent with Table 74 which gives the return type of *r++ as T&. *r++ = t is valid while *r-- = t is invalid. </p> <p> -In section 24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a>, +In section 24.1.5 [random.access.iterators], Table 76 gives the return type of a[n] as convertible to T. This is not consistent with the semantics of *(a + n) which returns T& by Table 74. *(a + n) = t is valid while a[n] = t is invalid. @@ -1177,6 +1022,8 @@ resolution, <tt>a[n] = t</tt> will be required to have the same operational semantics as <tt>*(a + n) = t</tt>. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -1197,12 +1044,25 @@ with a return type of convertible to <tt>T</tt> and operational semantics of <p><i>[Lillehammer: Real problem, but should be addressed as part of iterator redesign]</i></p> + + + + + + + <hr> -<a name="309"><h3>309. Does sentry catch exceptions?</h3></a><p><b>Section:</b> 27.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.format"> [lib.iostream.format]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 19 Mar 2001</p> +<h3><a name="309"></a>309. Does sentry catch exceptions?</h3> +<p><b>Section:</b> 27.6 [iostream.format] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-03-19</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iostream.format">active issues</a> in [iostream.format].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.format">issues</a> in [iostream.format].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The descriptions of the constructors of basic_istream<>::sentry -(27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>) and basic_ostream<>::sentry -(27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>) do not explain what the functions do in +(27.6.1.1.3 [istream::sentry]) and basic_ostream<>::sentry +(27.6.2.4 [ostream::sentry]) do not explain what the functions do in case an exception is thrown while they execute. Some current implementations allow all exceptions to propagate, others catch them and set ios_base::badbit instead, still others catch some but let @@ -1215,14 +1075,14 @@ The text also mentions that the functions may call setstate(failbit) argument is meant). That may have been fine for basic_istream<>::sentry prior to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a>, since the function performs an input operation which may fail. However, -issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a> amends 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a>, p2 to +issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#195">195</a> amends 27.6.1.1.3 [istream::sentry], p2 to clarify that the function should actually call setstate(failbit | eofbit), so the sentence in p3 is redundant or even somewhat contradictory. </p> <p> -The same sentence that appears in 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a>, p3 +The same sentence that appears in 27.6.2.4 [ostream::sentry], p3 doesn't seem to be very meaningful for basic_istream<>::sentry which performs no input. It is actually rather misleading since it would appear to guide library implementers to calling @@ -1484,33 +1344,48 @@ told that the bug cannot be fixed until issue #309 is resolved by the committee. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG agrees there is minor variation between implementations, but believes that it doesn't matter. This is a rarely used corner case. There is no evidence that this has any commercial importance or that it causes actual portability problems for customers trying to write code that runs on multiple implementations.</p> + + + + + <hr> -<a name="342"><h3>342. seek and eofbit</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 09 Oct 2001</p> +<h3><a name="342"></a>342. seek and eofbit</h3> +<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#Open">Open</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-10-09</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>I think we have a defect.</p> <p>According to lwg issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a> which is now a dr, the -description of seekg in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> paragraph 38 now looks +description of seekg in 27.6.1.3 [istream.unformatted] paragraph 38 now looks like:</p> -<blockquote> +<blockquote><p> Behaves as an unformatted input function (as described in 27.6.1.3, paragraph 1), except that it does not count the number of characters extracted and does not affect the value returned by subsequent calls to gcount(). After constructing a sentry object, if fail() != true, -executes rdbuf()>pubseekpos( pos). -</blockquote> +executes rdbuf()->pubseekpos( pos). +</p></blockquote> <p>And according to lwg issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#243">243</a> which is also now a dr, 27.6.1.3, paragraph 1 looks like:</p> -<blockquote> +<blockquote><p> Each unformatted input function begins execution by constructing an object of class sentry with the default argument noskipws (second) argument true. If the sentry object returns true, when converted to a @@ -1528,14 +1403,14 @@ the number of characters extracted. If no exception has been thrown it ends by storing the count in a member object and returning the value specified. In any event the sentry object is destroyed before leaving the unformatted input function. -</blockquote> +</p></blockquote> <p>And finally 27.6.1.1.2/5 says this about sentry:</p> -<blockquote> +<blockquote><p> If, after any preparation is completed, is.good() is true, ok_ != false otherwise, ok_ == false. -</blockquote> +</p></blockquote> <p> So although the seekg paragraph says that the operation proceeds if @@ -1564,16 +1439,18 @@ Ready state: <li>It should apply to both overloads of seekg.</li> <li>tellg has similar issues, except that it should not call clear().</li> <li>The point about clear() seems to apply to seekp().</li> -<li>Depending on the outcome of -<a href="file:///Volumes/Data/lwg/lwg-active.html#419">419</a> if the sentry +<li>Depending on the outcome of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#419">419</a> +if the sentry sets <tt>failbit</tt> when it finds <tt>eofbit</tt> already set, then you can never seek away from the end of stream.</li> </ul> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> to:</p> -<blockquote> +<p>Change 27.6.1.3 [istream.unformatted] to:</p> +<blockquote><p> Behaves as an unformatted input function (as described in 27.6.1.3, paragraph 1), except that it does not count the number of characters extracted, does not affect the value returned by subsequent calls to @@ -1583,10 +1460,13 @@ true</tt>, executes <tt>rdbuf()->pubseekpos(pos)</tt>. In case of success, the function calls clear(). In case of failure, the function calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>). -</blockquote> +</p></blockquote> <p><i>[Lillehammer: Matt provided wording.]</i></p> + + + <p><b>Rationale:</b></p> <p>In C, fseek does clear EOF. This is probably what most users would expect. We agree that having eofbit set should not deter a seek, @@ -1594,8 +1474,243 @@ In case of failure, the function calls <tt>setstate(failbit)</tt> that <tt>fail()</tt> is true only if <tt>failbit</tt> or <tt>badbit</tt> is set, so using <tt>!fail()</tt>, rather than <tt>good()</tt>, satisfies this goal.</p> + + + + + <hr> -<a name="382"></a><h3><a name="382">382. codecvt do_in/out result</a></h3><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 30 Aug 2002</p> +<h3><a name="343"></a>343. Unspecified library header dependencies</h3> +<p><b>Section:</b> 21 [strings], 23 [containers], 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-10-09</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The synopses of the C++ library headers clearly show which names are +required to be defined in each header. Since in order to implement the +classes and templates defined in these headers declarations of other +templates (but not necessarily their definitions) are typically +necessary the standard in 17.4.4, p1 permits library implementers to +include any headers needed to implement the definitions in each header. +</p> + +<p> +For instance, although it is not explicitly specified in the synopsis of +<string>, at the point of definition of the std::basic_string template +the declaration of the std::allocator template must be in scope. All +current implementations simply include <memory> from within <string>, +either directly or indirectly, to bring the declaration of +std::allocator into scope. +</p> + +<p> +Additionally, however, some implementation also include <istream> and +<ostream> at the top of <string> to bring the declarations of +std::basic_istream and std::basic_ostream into scope (which are needed +in order to implement the string inserter and extractor operators +(21.3.7.9 [lib.string.io])). Other implementations only include +<iosfwd>, since strictly speaking, only the declarations and not the +full definitions are necessary. +</p> + +<p> +Obviously, it is possible to implement <string> without actually +providing the full definitions of all the templates std::basic_string +uses (std::allocator, std::basic_istream, and std::basic_ostream). +Furthermore, not only is it possible, doing so is likely to have a +positive effect on compile-time efficiency. +</p> + +<p> +But while it may seem perfectly reasonable to expect a program that uses +the std::basic_string insertion and extraction operators to also +explicitly include <istream> or <ostream>, respectively, it doesn't seem +reasonable to also expect it to explicitly include <memory>. Since +what's reasonable and what isn't is highly subjective one would expect +the standard to specify what can and what cannot be assumed. +Unfortunately, that isn't the case. +</p> + +<p>The examples below demonstrate the issue.</p> + +<p>Example 1:</p> + +<p>It is not clear whether the following program is complete:</p> + +<pre>#include <string> + +extern std::basic_ostream<char> &strm; + +int main () { + strm << std::string ("Hello, World!\n"); +} +</pre> + +<p>or whether one must explicitly include <memory> or +<ostream> (or both) in addition to <string> in order for +the program to compile.</p> + + +<p>Example 2:</p> + +<p>Similarly, it is unclear whether the following program is complete:</p> + +<pre>#include <istream> + +extern std::basic_iostream<char> &strm; + +int main () { + strm << "Hello, World!\n"; +} +</pre> + +<p> +or whether one needs to explicitly include <ostream>, and +perhaps even other headers containing the definitions of other +required templates:</p> + +<pre>#include <ios> +#include <istream> +#include <ostream> +#include <streambuf> + +extern std::basic_iostream<char> &strm; + +int main () { + strm << "Hello, World!\n"; +} +</pre> + +<p>Example 3:</p> + +<p>Likewise, it seems unclear whether the program below is complete:</p> +<pre>#include <iterator> + +bool foo (std::istream_iterator<int> a, std::istream_iterator<int> b) +{ + return a == b; +} + +int main () { } +</pre> + +<p>or whether one should be required to include <istream>.</p> + +<p>There are many more examples that demonstrate this lack of a +requirement. I believe that in a good number of cases it would be +unreasonable to require that a program explicitly include all the +headers necessary for a particular template to be specialized, but I +think that there are cases such as some of those above where it would +be desirable to allow implementations to include only as much as +necessary and not more.</p> + + +<p><b>Proposed resolution:</b></p> +<p> +For every C++ library header, supply a minimum set of other C++ library +headers that are required to be included by that header. The proposed +list is below (C++ headers for C Library Facilities, table 12 in +17.4.1.2, p3, are omitted): +</p> + +<pre>+------------+--------------------+ +| C++ header |required to include | ++============+====================+ +|<algorithm> | | ++------------+--------------------+ +|<bitset> | | ++------------+--------------------+ +|<complex> | | ++------------+--------------------+ +|<deque> |<memory> | ++------------+--------------------+ +|<exception> | | ++------------+--------------------+ +|<fstream> |<ios> | ++------------+--------------------+ +|<functional>| | ++------------+--------------------+ +|<iomanip> |<ios> | ++------------+--------------------+ +|<ios> |<streambuf> | ++------------+--------------------+ +|<iosfwd> | | ++------------+--------------------+ +|<iostream> |<istream>, <ostream>| ++------------+--------------------+ +|<istream> |<ios> | ++------------+--------------------+ +|<iterator> | | ++------------+--------------------+ +|<limits> | | ++------------+--------------------+ +|<list> |<memory> | ++------------+--------------------+ +|<locale> | | ++------------+--------------------+ +|<map> |<memory> | ++------------+--------------------+ +|<memory> | | ++------------+--------------------+ +|<new> |<exception> | ++------------+--------------------+ +|<numeric> | | ++------------+--------------------+ +|<ostream> |<ios> | ++------------+--------------------+ +|<queue> |<deque> | ++------------+--------------------+ +|<set> |<memory> | ++------------+--------------------+ +|<sstream> |<ios>, <string> | ++------------+--------------------+ +|<stack> |<deque> | ++------------+--------------------+ +|<stdexcept> | | ++------------+--------------------+ +|<streambuf> |<ios> | ++------------+--------------------+ +|<string> |<memory> | ++------------+--------------------+ +|<strstream> | | ++------------+--------------------+ +|<typeinfo> |<exception> | ++------------+--------------------+ +|<utility> | | ++------------+--------------------+ +|<valarray> | | ++------------+--------------------+ +|<vector> |<memory> | ++------------+--------------------+ +</pre> + + +<p><b>Rationale:</b></p> +<p>The portability problem is real. A program that works correctly on +one implementation might fail on another, because of different header +dependencies. This problem was understood before the standard was +completed, and it was a conscious design choice.</p> +<p>One possible way to deal with this, as a library extension, would +be an <all> header.</p> + +<p> +Hinnant: It's time we dealt with this issue for C++0X. Reopened. +</p> + + + + + + + +<hr> +<h3><a name="382"></a>382. codecvt do_in/out result</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-08-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> It seems that the descriptions of codecvt do_in() and do_out() leave sufficient room for interpretation so that two implementations of @@ -1620,7 +1735,7 @@ the following seems less than adequately specified: <ol> <li> - <font color="red">22.2.1.5.2</font>, p2 says this about the effects of the + 22.2.1.4.2 [locale.codecvt.virtuals], p2 says this about the effects of the function: ...Stops if it encounters a character it cannot convert... This assumes that there *is* a character to convert. What happens when there is a sequence that doesn't form a @@ -1653,21 +1768,21 @@ the following seems less than adequately specified: </li> </ol> <p> -Finally, the conditions described at the end of <font color="red">22.2.1.5.2</font>, p4 don't seem to be possible: +Finally, the conditions described at the end of 22.2.1.4.2 [locale.codecvt.virtuals], p4 don't seem to be possible: </p> -<blockquote> +<blockquote><p> "A return value of partial, if (from_next == from_end), indicates that either the destination sequence has not absorbed all the available destination elements, or that additional source elements are needed before another destination element can be produced." -</blockquote> +</p></blockquote> <p> If the value is partial, it's not clear to me that (from_next ==from_end) could ever hold if there isn't enough room in the destination buffer. In order for (from_next==from_end) to hold, all characters in that range must have been successfully -converted (according to <font color="red">22.2.1.5.2</font>, p2) and since there are no +converted (according to 22.2.1.4.2 [locale.codecvt.virtuals], p2) and since there are no further source characters to convert, no more room in the destination buffer can be needed. </p> @@ -1684,15 +1799,13 @@ Could it be that the intended qualifying condition was actually (from_next != from_end), i.e., that the sentence was supposed to read </p> -<blockquote> +<blockquote><p> "A return value of partial, if (from_next != from_end),..." -</blockquote> +</p></blockquote> <p> which would make perfect sense, since, as far as I understand it, partial can only occur if (from_next != from_end)? </p> -<p><b>Proposed resolution:</b></p> - <p><i>[Lillehammer: Defer for the moment, but this really needs to be fixed. Right now, the description of codecvt is too vague for it to be a useful contract between providers and clients of codecvt @@ -1706,44 +1819,21 @@ partial can only occur if (from_next != from_end)? seem sufficient for C++0x. Bill supports general N-to-M conversions; we need to make sure Martin and Howard agree.]</i></p> -<hr> -<a name="385"><h3>385. Does call by value imply the CopyConstructible requirement?</h3></a><p><b>Section:</b> 17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 23 Oct 2002</p> -<p> -Many function templates have parameters that are passed by value; -a typical example is <tt>find_if</tt>'s <i>pred</i> parameter in -25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a>. Are the corresponding template parameters -(<tt>Predicate</tt> in this case) implicitly required to be -CopyConstructible, or does that need to be spelled out explicitly? -</p> -<p> -This isn't quite as silly a question as it might seem to be at first -sight. If you call <tt>find_if</tt> in such a way that template -argument deduction applies, then of course you'll get call by value -and you need to provide a copy constructor. If you explicitly provide -the template arguments, however, you can force call by reference by -writing something like <tt>find_if<my_iterator, -my_predicate&></tt>. The question is whether implementation -are required to accept this, or whether this is ill-formed because -my_predicate& is not CopyConstructible. -</p> -<p> -The scope of this problem, if it is a problem, is unknown. Function -object arguments to generic algorithms in clauses 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> -and 26 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numerics"> [lib.numerics]</a> are obvious examples. A review of the whole -library is necessary. -</p> <p><b>Proposed resolution:</b></p> -<p><i>[ -This is really two issues. First, predicates are typically passed by -value but we don't say they must be Copy Constructible. They should -be. Second: is specialization allowed to transform value arguments -into references? References aren't copy constructible, so this should -not be allowed. -]</i></p> + + + + <hr> -<a name="387"><h3>387. std::complex over-encapsulated</h3></a><p><b>Section:</b> 26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 8 Nov 2002</p> +<h3><a name="387"></a>387. std::complex over-encapsulated</h3> +<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#Open">Open</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#complex.numbers">active issues</a> in [complex.numbers].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The absence of explicit description of std::complex<T> layout makes it imposible to reuse existing software developed in traditional @@ -1774,8 +1864,10 @@ coordinates. Therefore the over-encapsulation put in the specification of std::complex<> is not justified. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following requirements to 26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a> as 26.3/4:</p> +<p>Add the following requirements to 26.3 [complex.numbers] as 26.3/4:</p> <blockquote> <p>If z is an lvalue expression of type cv std::complex<T> then</p> @@ -1802,7 +1894,7 @@ imaginary part of a[i].</li> </ul> </blockquote> -<p>In the header synopsis in 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a>, replace</p> +<p>In the header synopsis in 26.3.1 [complex.synopsis], replace</p> <pre> template<class T> T real(const complex<T>&); template<class T> T imag(const complex<T>&); </pre> @@ -1815,7 +1907,7 @@ imaginary part of a[i].</li> template<class T> T& imag( complex<T>&); </pre> -<p>In 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> paragraph 1, change</p> +<p>In 26.3.7 [complex.value.ops] paragraph 1, change</p> <pre> template<class T> T real(const complex<T>&); </pre> <p>to</p> @@ -1823,9 +1915,9 @@ imaginary part of a[i].</li> template<class T> T& real( complex<T>&); </pre> <p>and change the <b>Returns</b> clause to "<b>Returns:</b> The real -part of <i>x</i></p>. +part of <i>x</i>.</p> -<p>In 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> paragraph 2, change</p> +<p>In 26.3.7 [complex.value.ops] paragraph 2, change</p> <pre> template<class T> T imag(const complex<T>&); </pre> <p>to</p> @@ -1833,7 +1925,7 @@ part of <i>x</i></p>. template<class T> T& imag( complex<T>&); </pre> <p>and change the <b>Returns</b> clause to "<b>Returns:</b> The imaginary -part of <i>x</i></p>. +part of <i>x</i>.</p> <p><i>[Kona: The layout guarantee is absolutely necessary for C compatibility. However, there was disagreement about the other part @@ -1846,14 +1938,83 @@ part of <i>x</i></p>. doing it? Howard will try to resolve this issue for the next meeting.]</i></p> + <p><i>[pre-Sydney: Howard summarized the options in n1589.]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG believes that C99 compatibility would be enough justification for this change even without other considerations. All existing implementations already have the layout proposed here.</p> + + + + + +<hr> +<h3><a name="393"></a>393. do_in/do_out operation on state unclear</h3> +<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#New">New</a> + <b>Submitter:</b> Alberto Barbati <b>Date:</b> 2002-12-24</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.codecvt.virtuals">active issues</a> in [locale.codecvt.virtuals].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +this DR follows the discussion on the previous thread "codecvt::do_in +not consuming external characters". It's just a clarification issue +and not a request for a change. +</p> +<p> +Can do_in()/do_out() produce output characters without consuming input +characters as a result of operation on state? +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add a note at the end of 22.2.1.5.2 [lib.locale.codecvt.virtuals], +paragraph 3: +</p> + +<p> +[Note: As a result of operations on state, it can return ok or partial +and set from_next == from and to_next != to. --end note] +</p> + + +<p><b>Rationale:</b></p> +<p> +The submitter believes that standard already provides an affirmative +answer to the question. However, the current wording has induced a few +library implementors to make the incorrect assumption that +do_in()/do_out() always consume at least one internal character when +they succeed. +</p> + +<p> +The submitter also believes that the proposed resolution is not in +conflict with the related issue 76. Moreover, by explicitly allowing +operations on state to produce characters, a codecvt implementation +may effectively implement N-to-M translations without violating the +"one character at a time" principle described in such issue. On a side +note, the footnote in the proposed resolution of issue 76 that +informally rules out N-to-M translations for basic_filebuf should be +removed if this issue is accepted as valid. +</p> + + + + + + <hr> -<a name="394"><h3>394. behavior of formatted output on failure</h3></a><p><b>Section:</b> 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 27 Dec 2002</p> +<h3><a name="394"></a>394. behavior of formatted output on failure</h3> +<p><b>Section:</b> 27.6.2.6.1 [ostream.formatted.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-12-27</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> There is a contradiction in Formatted output about what bit is supposed to be set if the formatting fails. On sentence says it's @@ -1862,10 +2023,10 @@ badbit and another that it's failbit. <p> 27.6.2.5.1, p1 says in the Common Requirements on Formatted output functions: -</p><pre> ... If the generation fails, then the formatted output function +</p> +<pre> ... If the generation fails, then the formatted output function does setstate(ios::failbit), which might throw an exception. </pre> -<p></p> <p> 27.6.2.5.2, p1 goes on to say this about Arithmetic Inserters: </p> @@ -1873,15 +2034,13 @@ functions: ... The formatting conversion occurs as if it performed the following code fragment: </p> -<p> -</p><pre> bool failed = +<pre> bool failed = use_facet<num_put<charT,ostreambuf_iterator<charT,traits> > > (getloc()).put(*this, *this, fill(), val). failed(); ... If failed is true then does setstate(badbit) ... </pre> -<p></p> <p> The original intent of the text, according to Jerry Schwarz (see c++std-lib-10500), is captured in the following paragraph: @@ -1925,9 +2084,6 @@ char) will set failbit under the same conditions. To make the behavior consistent, the Common requirements sections for the Formatted output functions should be changed as proposed below. </p> -<p><b>Proposed resolution:</b></p> - - <p><i>[Kona: There's agreement that this is a real issue. What we decided at Kona: 1. An error from the buffer (which can be detected either directly from streambuf's member functions or by examining a @@ -1945,10 +2101,26 @@ functions should be changed as proposed below. Most people thought it was supposed to refer to buffer errors; if so, we should say so. Martin will provide wording.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> + + + + + <hr> -<a name="396"><h3>396. what are characters zero and one</h3></a><p><b>Section:</b> 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Jan 2003</p> +<h3><a name="396"></a>396. what are characters zero and one</h3> +<p><b>Section:</b> 23.3.5.1 [bitset.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.cons">issues</a> in [bitset.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> 23.3.5.1, p6 [lib.bitset.cons] talks about a generic character having the value of 0 or 1 but there is no definition of what @@ -1980,9 +2152,11 @@ http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#303 Also note the typo in 23.3.5.1, p6: the object under construction is a bitset, not a string. </p> - <p><b>Proposed resolution:</b></p> + + +<p><b>Proposed resolution:</b></p> <p>Change the constructor's function declaration immediately before -23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> p3 to:</p> +23.3.5.1 [bitset.cons] p3 to:</p> <pre> template <class charT, class traits, class Allocator> explicit bitset(const basic_string<charT, traits, Allocator>& str, @@ -1991,7 +2165,7 @@ is a bitset, not a string. basic_string<charT, traits, Allocator>::npos, charT zero = charT('0'), charT one = charT('1')) </pre> -<p>Change the first two sentences of 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> p6 to: "An +<p>Change the first two sentences of 23.3.5.1 [bitset.cons] p6 to: "An element of the constructed string has value 0 if the corresponding character in <i>str</i>, beginning at position <i>pos</i>, is <i>zero</i>. Otherwise, the element has the value 1.</p> @@ -2004,20 +2178,22 @@ is <i>zero</i>. Otherwise, the element has the value 1.</p> </p> <p>Change the declaration of the <tt>to_string</tt> member function - immediately before 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> p33 to:</p> + immediately before 23.3.5.2 [bitset.members] p33 to:</p> <pre> template <class charT, class traits, class Allocator> basic_string<charT, traits, Allocator> to_string(charT zero = charT('0'), charT one = charT('1')) const; </pre> -<p>Change the last sentence of 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> p33 to: "Bit +<p>Change the last sentence of 23.3.5.2 [bitset.members] p33 to: "Bit value 0 becomes the character <tt><i>zero</i></tt>, bit value 1 becomes the character <tt><i>one</i></tt>.</p> -<p>Change 23.3.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.operators"> [lib.bitset.operators]</a> p8 to:</p> +<p>Change 23.3.5.3 [bitset.operators] p8 to:</p> <p><b>Returns</b>:</p> <pre> os << x.template to_string<charT,traits,allocator<charT> >( use_facet<ctype<charT> >(<i>os</i>.getloc()).widen('0'), use_facet<ctype<charT> >(<i>os</i>.getloc()).widen('1')); </pre> + + <p><b>Rationale:</b></p> <p>There is a real problem here: we need the character values of '0' and '1', and we have no way to get them since strings don't have @@ -2030,8 +2206,19 @@ is <i>zero</i>. Otherwise, the element has the value 1.</p> <p>We fix the inserter to use the new arguments. Note that we already fixed the analogous problem with the extractor in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a>.</p> + + + + + <hr> -<a name="397"><h3>397. ostream::sentry dtor throws exceptions</h3></a><p><b>Section:</b> 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Jan 2003</p> +<h3><a name="397"></a>397. ostream::sentry dtor throws exceptions</h3> +<p><b>Section:</b> 27.6.2.4 [ostream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ostream::sentry">active issues</a> in [ostream::sentry].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream::sentry">issues</a> in [ostream::sentry].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> 17.4.4.8, p3 prohibits library dtors from throwing exceptions. </p> @@ -2052,7 +2239,6 @@ is <i>zero</i>. Otherwise, the element has the value 1.</p> That seems like a defect, since both pubsync() and setstate() can throw an exception. </p> - <p><b>Proposed resolution:</b></p> <p><i>[ The contradiction is real. Clause 17 says destructors may never throw exceptions, and clause 27 specifies a destructor that does @@ -2062,8 +2248,23 @@ clause, and then putting in a footnote saying the sentry destructor is the only one that can throw. PJP suggests specifying that sentry::~sentry() should internally catch any exceptions it might cause. ]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="398"><h3>398. effects of end-of-file on unformatted input functions</h3></a><p><b>Section:</b> 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Jan 2003</p> +<h3><a name="398"></a>398. effects of end-of-file on unformatted input functions</h3> +<p><b>Section:</b> 27.6.2.4 [ostream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ostream::sentry">active issues</a> in [ostream::sentry].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream::sentry">issues</a> in [ostream::sentry].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> While reviewing unformatted input member functions of istream for their behavior when they encounter end-of-file during input @@ -2077,55 +2278,41 @@ The following unformatted input member functions set eofbit if they encounter an end-of-file (this is the expected behavior, and also the behavior of all major implementations): </p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& get (char_type*, streamsize, char_type); </pre> - <p></p> <p> Also sets failbit if it fails to extract any characters. </p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& get (char_type*, streamsize); </pre> - <p></p> <p> Also sets failbit if it fails to extract any characters. </p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& getline (char_type*, streamsize, char_type); </pre> - <p></p> <p> Also sets failbit if it fails to extract any characters. </p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& getline (char_type*, streamsize); </pre> - <p></p> <p> Also sets failbit if it fails to extract any characters. </p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& ignore (int, int_type); </pre> - <p></p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& read (char_type*, streamsize); </pre> - <p></p> <p> Also sets failbit if it encounters end-of-file. </p> - <p> - </p><pre> streamsize readsome (char_type*, streamsize); + <pre> streamsize readsome (char_type*, streamsize); </pre> - <p></p> <p> The following unformated input member functions set failbit but @@ -2135,15 +2322,11 @@ failure from a failure due to end-of-file; the requirement is also in conflict with all major implementation which set both eofbit and failbit): </p> - <p> - </p><pre> int_type get(); + <pre> int_type get(); </pre> - <p></p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& get (char_type&); </pre> - <p></p> <p> These functions only set failbit of they extract no characters, otherwise they don't set any bits, even on failure (I find this @@ -2151,36 +2334,42 @@ inconsistency quite unexpected; the requirement is also in conflict with all major implementations which set eofbit whenever they encounter end-of-file): </p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& get (basic_streambuf<charT, traits>&, char_type); </pre> - <p></p> - <p> - </p><pre> basic_istream<charT, traits>& + <pre> basic_istream<charT, traits>& get (basic_streambuf<charT, traits>&); </pre> - <p></p> <p> This function sets no bits (all implementations except for STLport and Classic Iostreams set eofbit when they encounter end-of-file): </p> - <p> - </p><pre> int_type peek (); + <pre> int_type peek (); </pre> - <p></p> - <p><b>Proposed resolution:</b></p> <p>Informally, what we want is a global statement of intent saying that eofbit gets set if we trip across EOF, and then we can take away the specific wording for individual functions. A full review is necessary. The wording currently in the standard is a mishmash, and changing it on an individual basis wouldn't make things better. Dietmar will do this work.</p> + + +<p><b>Proposed resolution:</b></p> + + + + <hr> -<a name="401"><h3>401. incorrect type casts in table 32 in lib.allocator.requirements</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Markus Mauhart <b>Date:</b> 27 Feb 2003</p> -<p> -I think that in par2 of 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> the last two +<h3><a name="401"></a>401. incorrect type casts in table 32 in lib.allocator.requirements</h3> +<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#Open">Open</a> + <b>Submitter:</b> Markus Mauhart <b>Date:</b> 2003-02-27</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p> +I think that in par2 of [default.con.req] the last two lines of table 32 contain two incorrect type casts. The lines are ... </p> @@ -2207,17 +2396,39 @@ alloc<T>::pointer, so it would implicitely introduce extra requirements for alloc<T>::pointer, additionally to the only current requirement (being a random access iterator). </p> + + <p><b>Proposed resolution:</b></p> <p> -"(void*)p" should be replaced with "(void*)&*p" and that -"((T*)p)?->" should be replaced with "(*p)." or with -"(&*p)->". +Change 20.1.2 [allocator.requirements], Table 35: Allocator requirements +last column of the row describing "a.construct(p,t)" to: +</p> + +<blockquote> +<p> +<del>Effect: <tt>::new((void*)p) T(t)</tt></del> +<ins>Constructs a copy of <tt>t</tt> at <tt>p</tt>. If <tt>t</tt> is an +rvalue, it is forwarded to <tt>T</tt>'s constructor as an rvalue, else it +is forwarded as an lvalue.</ins> +</p> +</blockquote> + +<p> +Change 20.1.2 [allocator.requirements], Table 35: Allocator requirements +last column of the row describing "a.destroy(p)" to: +</p> + +<blockquote> +<p> +<del>Effect: ((T*)p)->~T()</del> +<ins>Destroys the object at p.</ins> </p> +</blockquote> <p> Note: Actually I would prefer to replace "((T*)p)?->dtor_name" with "p?->dtor_name", but AFAICS this is not possible cause of an omission -in 13.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/over.html#over.ref"> [over.ref]</a> (for which I have filed another DR on 29.11.2002). +in 13.5.6 [over.ref] (for which I have filed another DR on 29.11.2002). </p> <p><i>[Kona: The LWG thinks this is somewhere on the border between @@ -2228,25 +2439,47 @@ in 13.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/over.html#over.re a thorough review of allocators, and, in particular, allocators with non-default pointer types.]</i></p> + +<p><i>[ +Batavia: Proposed resolution changed to less code and more description. +]</i></p> + + +<p><i>[ +post Oxford: This would be rendered NAD Editorial by acceptance of +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>. +]</i></p> + + + + + + + <hr> -<a name="408"><h3>408. Is vector<reverse_iterator<char*> > forbidden?</h3></a><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 3 June 2003</p> +<h3><a name="408"></a>408. Is vector<reverse_iterator<char*> > forbidden?</h3> +<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#Open">Open</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 2003-06-03</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> I've been discussing iterator semantics with Dave Abrahams, and a surprise has popped up. I don't think this has been discussed before. </p> <p> -24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> says that the only operation that can be performed on "singular" +24.1 [iterator.requirements] says that the only operation that can be performed on "singular" iterator values is to assign a non-singular value to them. (It doesn't say they can be destroyed, and that's probably a defect.) Some implementations have taken this to imply that there is no need to initialize the data member of a reverse_iterator<> in the default constructor. As a result, code like </p> -<blockquote> - std::vector<std::reverse_iterator<char*> > v(7); +<blockquote><pre> std::vector<std::reverse_iterator<char*> > v(7); v.reserve(1000); -</blockquote> +</pre></blockquote> <p> invokes undefined behavior, because it must default-initialize the vector elements, and then copy them to other storage. Of course many @@ -2268,9 +2501,8 @@ One question is whether the standard iterator adaptors have defined copy semantics. Another is whether they have defined destructor semantics: is </p> -<blockquote> - { std::vector<std::reverse_iterator<char*> > v(7); } -</blockquote> +<blockquote><pre> { std::vector<std::reverse_iterator<char*> > v(7); } +</pre></blockquote> <p> undefined too? </p> @@ -2294,15 +2526,13 @@ However, it is not the whole story. <p> The issue was whether </p> -<blockquote> - reverse_iterator() { } -</blockquote> +<blockquote><pre> reverse_iterator() { } +</pre></blockquote> <p> is allowed, vs. </p> -<blockquote> - reverse_iterator() : current() { } -</blockquote> +<blockquote><pre> reverse_iterator() : current() { } +</pre></blockquote> <p> The difference is when T is char*, where the first leaves the member @@ -2321,10 +2551,9 @@ But that only takes care of reverse_iterator, and doesn't establish a policy for all iterators. (The reverse iterator adapter was just an example.) In particular, does my function </p> -<blockquote> - template <typename Iterator> +<blockquote><pre> template <typename Iterator> void f() { std::vector<Iterator> v(7); } -</blockquote> +</pre></blockquote> <p> evoke undefined behavior for some conforming iterator definitions? I think it does, now, because vector<> will destroy those singular @@ -2340,8 +2569,6 @@ iterator value, singular or not, default-initialized or not. </p> <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#407">407</a></p> -<p><b>Proposed resolution:</b></p> - <p><i>[ We don't want to require all singular iterators to be copyable, because that is not the case for pointers. However, default @@ -2352,57 +2579,22 @@ constructed pointers are required to be copyable; if not, it would be wrong to impose so strict a requirement for iterators. ]</i></p> -<hr> -<a name="416"><h3>416. definitions of XXX_MIN and XXX_MAX macros in climits</h3></a><p><b>Section:</b> 18.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.c.limits"> [lib.c.limits]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> - <p> -Given two overloads of the function foo(), one taking an argument of type -int and the other taking a long, which one will the call foo(LONG_MAX) -resolve to? The expected answer should be foo(long), but whether that -is true depends on the #defintion of the LONG_MAX macro, specifically -its type. This issue is about the fact that the type of these macros -is not actually required to be the same as the the type each respective -limit. -<br> -Section 18.2.2 of the C++ Standard does not specify the exact types of -the XXX_MIN and XXX_MAX macros #defined in the <climits> and <limits.h> -headers such as INT_MAX and LONG_MAX and instead defers to the C standard. -<br> -Section 5.2.4.2.1, p1 of the C standard specifies that "The values [of -these constants] shall be replaced by constant expressions suitable for use -in #if preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX, -the following shall be replaced by expressions that have the same type as -would an expression that is an object of the corresponding type converted -according to the integer promotions." -<br> +<p><b>Proposed resolution:</b></p> -The "corresponding type converted according to the integer promotions" for -LONG_MAX is, according to 6.4.4.1, p5 of the C standard, the type of long -converted to the first of the following set of types that can represent it: -int, long int, long long int. So on an implementation where (sizeof(long) -== sizeof(int)) this type is actually int, while on an implementation where -(sizeof(long) > sizeof(int)) holds this type will be long. -<br> -This is not an issue in C since the type of the macro cannot be detected -by any conforming C program, but it presents a portability problem in C++ -where the actual type is easily detectable by overload resolution. - </p> - <p><b>Proposed resolution:</b></p> -<p><i>[Kona: the LWG does not believe this is a defect. The C macro - definitions are what they are; we've got a better - mechanism, <tt>std::numeric_limits</tt>, that is specified more - precisely than the C limit macros. At most we should add a - nonnormative note recommending that users who care about the exact - types of limit quantities should use <limits> instead of - <climits>.]</i></p> <hr> -<a name="417"><h3>417. what does ctype::do_widen() return on failure</h3></a><p><b>Section:</b> 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="417"></a>417. what does ctype::do_widen() return on failure</h3> +<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The Effects and Returns clauses of the do_widen() member function of the ctype facet fail to specify the behavior of the function on failure. @@ -2413,7 +2605,6 @@ use mbtowc() and UTF-8 as the native encoding (e.g., GNU glibc) will fail when the argument's MSB is set. There is no way for the the rest of locale and iostream to reliably detect this failure. </p> -<p><b>Proposed resolution:</b></p> <p><i>[Kona: This is a real problem. Widening can fail. It's unclear what the solution should be. Returning WEOF works for the wchar_t specialization, but not in general. One option might be to add a @@ -2423,8 +2614,20 @@ and iostream to reliably detect this failure. have <i>widen</i> throw an exception, but that's a scary option; existing library components aren't written with the assumption that <i>widen</i> can throw.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + <hr> -<a name="418"><h3>418. exceptions thrown during iostream cleanup</h3></a><p><b>Section:</b> 27.4.2.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::Init"> [lib.ios::Init]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="418"></a>418. exceptions thrown during iostream cleanup</h3> +<p><b>Section:</b> 27.4.2.1.6 [ios::Init] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The dtor of the ios_base::Init object is supposed to call flush() on the 6 standard iostream objects cout, cerr, clog, wcout, wcerr, and wclog. @@ -2441,7 +2644,6 @@ to flush() ends up throwing an exception? This can happen quite easily if one of the facets installed in the locale imbued in the iostream object throws. </p> -<p><b>Proposed resolution:</b></p> <p><i>[Kona: We probably can't do much better than what we've got, so the LWG is leaning toward NAD. At the point where the standard stream objects are being cleaned up, the usual error reporting @@ -2449,13 +2651,26 @@ object throws. point will definitely cause problems. A quality implementation might reasonably swallow the exception, or call abort, or do something even more drastic.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + <hr> -<a name="419"><h3>419. istream extractors not setting failbit if eofbit is already set</h3></a><p><b>Section:</b> 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="419"></a>419. istream extractors not setting failbit if eofbit is already set</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> -27.6.1.1.2, p2 says that istream::sentry ctor prepares for input if is.good() +27.6.1.1.3 [istream::sentry], p2 says that istream::sentry ctor prepares for input if is.good() is true. p4 then goes on to say that the ctor sets the sentry::ok_ member to -true if the stream state is good after any preparation. 27.6.1.2.1, p1 then +true if the stream state is good after any preparation. 27.6.1.2.1 [istream.formatted.reqmts], p1 then says that a formatted input function endeavors to obtain the requested input if the sentry's operator bool() returns true. @@ -2521,21 +2736,44 @@ corrected. </p> <p> -Pre Berlin: This issue is related to -<a href="file:///Volumes/Data/lwg/lwg-active.html#342">342</a>. If the sentry +Pre Berlin: This issue is related to <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a>. If the sentry sets <tt>failbit</tt> when it finds <tt>eofbit</tt> already set, then you can never seek away from the end of stream. </p> - - <p><b>Proposed resolution:</b></p> <p>Kona: Possibly NAD. If eofbit is set then good() will return false. We then set <i>ok</i> to false. We believe that the sentry's constructor should always set failbit when <i>ok</i> is false, and we also think the standard already says that. Possibly it could be clearer.</p> - + + + +<p><b>Proposed resolution:</b></p> +<p> +Change 27.6.1.1.3 [istream::sentry], p2 to: +</p> + +<blockquote> +<pre>explicit sentry(basic_istream<charT,traits>& <i>is</i> , bool <i>noskipws</i> = false);</pre> +<p> +-2- <i>Effects:</i> If <tt>is.good()</tt> is <del><tt>true</tt></del> +<ins><tt>false</tt></ins>, <ins>calls <tt>is.setstate(failbit)</tt>. +Otherwise</ins> prepares for formatted or unformatted input. ... +</p> +</blockquote> + + + + + + <hr> -<a name="421"><h3>421. is basic_streambuf copy-constructible?</h3></a><p><b>Section:</b> 27.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.cons"> [lib.streambuf.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="421"></a>421. is basic_streambuf copy-constructible?</h3> +<p><b>Section:</b> 27.5.2.1 [streambuf.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.cons">issues</a> in [streambuf.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The reflector thread starting with c++std-lib-11346 notes that the class template basic_streambuf, along with basic_stringbuf and basic_filebuf, @@ -2556,6 +2794,8 @@ only types for which this is actually a problem (i.e. types where the compiler-generated default may be inappropriate and may not have been intended) are locale facets. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#439">439</a>. </p> + + <p><b>Proposed resolution:</b></p> <p> 27.5.2 [lib.streambuf]: Add into the synopsis, public section, just above the destructor declaration: @@ -2603,7 +2843,7 @@ basic_streambuf& operator=(const basic_streambuf& sb); <p>27.7.1 [lib.stringbuf]:</p> -<b>Option A:</b> +<p><b>Option A:</b></p> <blockquote> <p>Insert into the basic_stringbuf synopsis in the private section:</p> @@ -2613,7 +2853,7 @@ basic_stringbuf& operator=(const basic_stringbuf&); // not defined </pre> </blockquote> -<b>Option B:</b> +<p><b>Option B:</b></p> <blockquote> <p>Insert into the basic_stringbuf synopsis in the public section:</p> @@ -2669,6 +2909,7 @@ which may in turn effect the value of epptr(). the streambuf derived classes should be copyable. Howard will write up a proposal.]</i></p> + <p><i>[Sydney: Dietmar presented a new argument against basic_streambuf being copyable: it can lead to an encapsulation violation. Filebuf inherits from streambuf. Now suppose you inhert a my_hijacking_buf @@ -2681,6 +2922,22 @@ which may in turn effect the value of epptr(). is. Move this issue to open for now. ]</i></p> + +<p><i>[ +2007-01-12, Howard: +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1862.html#27.5.2%20-%20Class%20template%20basic_streambuf%3CcharT,traits%3E">Rvalue Reference Recommendations for Chapter 27</a> +recommends protected copy constructor and assignment for <tt>basic_streambuf</tt> with the same semantics +as would be generated by the compiler. These members aid in derived classes implementing move semantics. +A protected copy constructor and copy assignment operator do not expose encapsulation more so than it is +today as each data member of a <tt>basic_streambuf</tt> is already both readable and writable by derived +classes via various get/set protected member functions (<tt>eback()</tt>, <tt>setp()</tt>, etc.). Rather +a protected copy constructor and copy assignment operator simply make the job of derived classes implementing +move semantics less tedious and error prone. +]</i></p> + + + + <p><b>Rationale:</b></p> <p> 27.5.2 [lib.streambuf]: The proposed basic_streambuf copy constructor @@ -2706,46 +2963,18 @@ into account. basic_filebuf. </p> -<hr> -<a name="422"><h3>422. explicit specializations of member functions of class templates</h3></a><p><b>Section:</b> 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> -<p> -It has been suggested that 17.4.3.1, p1 may or may not allow programs to -explicitly specialize members of standard templates on user-defined types. -The answer to the question might have an impact where library requirements -are given using the "as if" rule. I.e., if programs are allowed to specialize -member functions they will be able to detect an implementation's strict -conformance to Effects clauses that describe the behavior of the function -in terms of the other member function (the one explicitly specialized by -the program) by relying on the "as if" rule. -</p> -<p><b>Proposed resolution:</b></p> -<p> - Add the following sentence immediately after the text of 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a>, p1: -</p> - -<blockquote> - The behavior of a program that declares explicit specializations - of any members of class templates or explicit specializations of - any member templates of classes or class templates defined in - this library is undefined. -</blockquote> -<p><i>[Kona: straw poll was 6-1 that user programs should not be - allowed to specialize individual member functions of standard - library class templates, and that doing so invokes undefined - behavior. Post-Kona: Martin provided wording.]</i></p> -<p><i>[Sydney: The LWG agrees that the standard shouldn't permit users -to specialize individual member functions unless they specialize the -whole class, but we're not sure these words say what we want them to; -they could be read as prohibiting the specialization of any standard -library class templates. We need to consult with CWG to make sure we -use the right wording.]</i></p> <hr> -<a name="423"><h3>423. effects of negative streamsize in iostreams</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="423"></a>423. effects of negative streamsize in iostreams</h3> +<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> A third party test suite tries to exercise istream::ignore(N) with @@ -2760,6 +2989,8 @@ see what the effects of such calls should be, either (this applies to a number of unformatted input functions as well as some member functions of the basic_streambuf template). </p> + + <p><b>Proposed resolution:</b></p> <p> I propose that we add to each function in clause 27 that takes an argument, @@ -2774,8 +3005,17 @@ ostream::write(). arguments of type streamsize that shouldn't be allowed to go negative. Martin will do that review.]</i></p> + + + + + <hr> -<a name="424"><h3>424. normative notes</h3></a><p><b>Section:</b> 17.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.summary"> [lib.structure.summary]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="424"></a>424. normative notes</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The text in 17.3.1.1, p1 says: @@ -2789,34 +3029,44 @@ The library section makes heavy use of paragraphs labeled "Notes(s)," some of which are clearly intended to be normative (see list 1), while some others are not (see list 2). There are also those where the intent is not so clear (see list 3). -<br> +<br><br> List 1 -- Examples of (presumably) normative Notes: <br> -20.4.1.1, p3, 20.4.1.1, p10, 21.3.1, p11, 22.1.1.2, p11, 23.2.1.3, p2, -25.3.7, p3, 26.2.6, p14a, 27.5.2.4.3, p7. +20.6.1.1 [allocator.members], p3,<br> +20.6.1.1 [allocator.members], p10,<br> +21.3.2 [string.cons], p11,<br> +22.1.1.2 [locale.cons], p11,<br> +23.2.2.3 [deque.modifiers], p2,<br> +25.3.7 [alg.min.max], p3,<br> +26.3.6 [complex.ops], p15,<br> +27.5.2.4.3 [streambuf.virt.get], p7.<br> <br> List 2 -- Examples of (presumably) informative Notes: <br> -18.4.1.3, p3, 21.3.5.6, p14, 22.2.1.5.2, p3, 25.1.1, p4, 26.2.5, p1, -27.4.2.5, p6. +18.5.1.3 [new.delete.placement], p3,<br> +21.3.6.6 [string::replace], p14,<br> +22.2.1.4.2 [locale.codecvt.virtuals], p3,<br> +25.1.1 [alg.foreach], p4,<br> +26.3.5 [complex.member.ops], p1,<br> +27.4.2.5 [ios.base.storage], p6.<br> <br> List 3 -- Examples of Notes that are not clearly either normative or informative: <br> -22.1.1.2, p8, 22.1.1.5, p6, 27.5.2.4.5, p4. +22.1.1.2 [locale.cons], p8,<br> +22.1.1.5 [locale.statics], p6,<br> +27.5.2.4.5 [streambuf.virt.put], p4.<br> <br> None of these lists is meant to be exhaustive. </p> -<p><b>Proposed resolution:</b></p> - <p><i>[Definitely a real problem. The big problem is there's material that doesn't quite fit any of the named paragraph categories (e.g. <b>Effects</b>). Either we need a new kind of named @@ -2825,8 +3075,31 @@ None of these lists is meant to be exhaustive. about how to do this. ]</i></p> + + +<p><b>Proposed resolution:</b></p> +<p><i>[Pete: I changed the paragraphs marked "Note" and "Notes" to use "Remark" and "Remarks". +Fixed as editorial. This change has been in the WD since the post-Redmond mailing, in 2004. +Recommend NAD.]</i></p> + +<p><i>[ +Batavia: We feel that the references in List 2 above should be changed from <i>Remarks</i> +to <i>Notes</i>. We also feel that those items in List 3 need to be double checked for +the same change. Alan and Pete to review. +]</i></p> + + + + + <hr> -<a name="427"><h3>427. stage 2 and rationale of DR 221</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="427"></a>427. stage 2 and rationale of DR 221</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The requirements specified in Stage 2 and reiterated in the rationale of DR 221 (and echoed again in DR 303) specify that num_get<charT>:: @@ -2847,7 +3120,7 @@ the comparisons (some other popular implementations do that). This diversity of approaches makes it difficult to write portable programs that attempt to instantiate the num_get template on user-defined types. </p> -<p><b>Proposed resolution:</b></p> + <p><i>[Kona: the heart of the problem is that we're theoretically supposed to use traits classes for all fundamental character operations like assignment and comparison, but facets don't have @@ -2865,15 +3138,26 @@ instantiate the num_get template on user-defined types. traits classes with the same <tt>char_type</tt> must necessarily have the same behavior.]</i></p> + <p>Informally, one possibility: require that some of the basic character operations, such as <tt>eq</tt>, <tt>lt</tt>, and <tt>assign</tt>, must behave the same way for all traits classes with the same <tt>char_type</tt>. If we accept that limitation on traits classes, then the facet could reasonably be required to -use <tt>char_traits<charT></tt></p>. +use <tt>char_traits<charT></tt>.</p> + + +<p><b>Proposed resolution:</b></p> + + + <hr> -<a name="430"><h3>430. valarray subset operations</h3></a><p><b>Section:</b> 26.5.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.sub"> [lib.valarray.sub]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="430"></a>430. valarray subset operations</h3> +<p><b>Section:</b> 26.5.2.4 [valarray.sub] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard fails to specify the behavior of valarray::operator[](slice) and other valarray subset operations when they are passed an "invalid" @@ -2881,14 +3165,27 @@ slice object, i.e., either a slice that doesn't make sense at all (e.g., slice (0, 1, 0) or one that doesn't specify a valid subset of the valarray object (e.g., slice (2, 1, 1) for a valarray of size 1). </p> -<p><b>Proposed resolution:</b></p> <p><i>[Kona: the LWG believes that invalid slices should invoke undefined behavior. Valarrays are supposed to be designed for high performance, so we don't want to require specific checking. We need wording to express this decision.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + <hr> -<a name="431"><h3>431. Swapping containers with unequal allocators</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 20 Sep 2003</p> -<p>Clause 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> paragraph 4 says that implementations +<h3><a name="431"></a>431. Swapping containers with unequal allocators</h3> +<p><b>Section:</b> 20.1.2 [allocator.requirements], 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-09-20</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p>Clause 20.1.2 [allocator.requirements] paragraph 4 says that implementations are permitted to supply containers that are unable to cope with allocator instances and that container implementations may assume that all instances of an allocator type compare equal. We gave @@ -2926,15 +3223,45 @@ object (e.g., slice (2, 1, 1) for a valarray of size 1). </pre> </blockquote> -<p><b>Proposed resolution:</b></p> - <p><i>[Kona: This is part of a general problem. We need a paper saying how to deal with unequal allocators in general.]</i></p> -<p><i>[pre-Sydney: Howard argues for option 3 in n1599.]</i></p> + +<p><i>[pre-Sydney: Howard argues for option 3 in +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1599.html">N1599</a>. +]</i></p> + + +<p><i>[ +2007-01-12, Howard: This issue will now tend to come up more often with move constructors +and move assignment operators. For containers, these members transfer resources (i.e. +the allocated memory) just like swap. +]</i></p> + + +<p><i>[ +Batavia: There is agreement to overload the container <tt>swap</tt> on the allocator's Swappable +requirement using concepts. If the allocator supports Swappable, then container's swap will +swap allocators, else it will perform a "slow swap" using copy construction and copy assignment. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + + + + <hr> -<a name="446"><h3>446. Iterator equality between different containers</h3></a><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>, 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Andy Koenig <b>Date:</b> 16 Dec 2003</p> +<h3><a name="446"></a>446. Iterator equality between different containers</h3> +<p><b>Section:</b> 24.1 [iterator.requirements], 23.1 [container.requirements] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Andy Koenig <b>Date:</b> 2003-12-16</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> What requirements does the standard place on equality comparisons between iterators that refer to elements of different containers. For example, if @@ -2945,8 +3272,6 @@ Is it allowed to throw an exception? <p> The standard appears to be silent on both questions. </p> -<p><b>Proposed resolution:</b></p> - <p><i>[Sydney: The intention is that comparing two iterators from different containers is undefined, but it's not clear if we say that, or even whether it's something we should be saying in clause 23 or in @@ -2957,8 +3282,24 @@ in terms of equality, so we can't also define equality in terms of reachability. ]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + + + <hr> -<a name="454"><h3>454. basic_filebuf::open should accept wchar_t names</h3></a><p><b>Section:</b> 27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> +<h3><a name="454"></a>454. basic_filebuf::open should accept wchar_t names</h3> +<p><b>Section:</b> 27.8.1.4 [filebuf.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#filebuf.members">active issues</a> in [filebuf.members].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.members">issues</a> in [filebuf.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <pre> basic_filebuf *basic_filebuf::open(const char *, ios_base::open_mode); </pre> @@ -2976,6 +3317,9 @@ actual filename. <p><i>[Sydney: Yes, we want to allow wchar_t filenames. Bill will provide wording.]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change from:</p> @@ -3021,6 +3365,8 @@ rules as the first argument to open.) </p> </blockquote> + + <p><b>Rationale:</b></p> <p> Slightly controversial, but by a 7-1 straw poll the LWG agreed to move @@ -3036,92 +3382,21 @@ possibly other things too). (2) Why not also constructors that take std::basic_string? (3) We might want to wait until we see Beman's filesystem library; we might decide that it obviates this.]</i></p> -<hr> -<a name="456"><h3>456. Traditional C header files are overspecified</h3></a><p><b>Section:</b> 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> - -<p>The C++ Standard effectively requires that the traditional C headers -(of the form <xxx.h>) be defined in terms of the newer C++ -headers (of the form <cxxx>). Clauses 17.4.1.2/4 and D.5 combine -to require that:</p> - -<ul> - <li>Including the header <cxxx> declares a C name in namespace std.</li> - - <li> Including the header <xxx.h> declares a C name in namespace std - (effectively by including <cxxx>), then imports it into the global - namespace with an individual using declaration.</li> -</ul> - -<p> -The rules were left in this form despited repeated and heated objections -from several compiler vendors. The C headers are often beyond the direct -control of C++ implementors. In some organizations, it's all they can do -to get a few #ifdef __cplusplus tests added. Third-party library vendors -can perhaps wrap the C headers. But neither of these approaches supports -the drastic restructuring required by the C++ Standard. As a result, it is -still widespread practice to ignore this conformance requirement, nearly -seven years after the committee last debated this topic. Instead, what is -often implemented is: -</p> - -<ul> - <li> Including the header <xxx.h> declares a C name in the - global namespace.</li> - - <li> Including the header <cxxx> declares a C name in the - global namespace (effectively by including <xxx.h>), then - imports it into namespace std with an individual using declaration.</li> -</ul> -<p> -The practical benefit for implementors with the second approach is that -they can use existing C library headers, as they are pretty much obliged -to do. The practical cost for programmers facing a mix of implementations -is that they have to assume weaker rules:</p> -<ul> - <li> If you want to assuredly declare a C name in the global - namespace, include <xxx.h>. You may or may not also get the - declaration in namespace std.</li> - <li> If you want to assuredly declare a C name in namespace std, - include <cxxx.h>. You may or may not also get the declaration in - the global namespace.</li> -</ul> -<p> -There also exists the <i>possibility</i> of subtle differences due to -Koenig lookup, but there are so few non-builtin types defined in the C -headers that I've yet to see an example of any real problems in this -area. -</p> -<p> -It is worth observing that the rate at which programmers fall afoul of -these differences has remained small, at least as measured by newsgroup -postings and our own bug reports. (By an overwhelming margin, the -commonest problem is still that programmers include <string> and can't -understand why the typename string isn't defined -- this a decade after -the committee invented namespace std, nominally for the benefit of all -programmers.) -</p> -<p> -We should accept the fact that we made a serious mistake and rectify it, -however belatedly, by explicitly allowing either of the two schemes for -declaring C names in headers. -</p> -<p><i>[Sydney: This issue has been debated many times, and will - certainly have to be discussed in full committee before any action - can be taken. However, the preliminary sentiment of the LWG was in - favor of the change. (6 yes, 0 no, 2 abstain) Robert Klarer - suggests that we might also want to undeprecate the - C-style <tt>.h</tt> headers.]</i></p> -<p><b>Proposed resolution:</b></p> <hr> -<a name="458"><h3>458. 24.1.5 contains unintented limitation for operator-</h3></a><p><b>Section:</b> 24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Daniel Frey <b>Date:</b> 27 Feb 2004</p> +<h3><a name="458"></a>458. 24.1.5 contains unintented limitation for operator-</h3> +<p><b>Section:</b> 24.1.5 [random.access.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Daniel Frey <b>Date:</b> 2004-02-27</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#random.access.iterators">issues</a> in [random.access.iterators].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> In 24.1.5 [lib.random.access.iterators], table 76 the operational semantics for the expression "r -= n" are defined as "return r += -n". @@ -3135,22 +3410,35 @@ to be a signed integer type. However, the wording in the standard may be less clear than we would like. ]</i></p> + + + <p><b>Proposed resolution:</b></p> <p> To remove this limitation, I suggest to change the operational semantics for this column to: </p> -<code> - { Distance m = n; +<blockquote><pre> { Distance m = n; if (m >= 0) while (m--) --r; else while (m++) ++r; return r; } -</code> +</pre></blockquote> + + + + + <hr> -<a name="459"><h3>459. Requirement for widening in stage 2 is overspecification</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 16 Mar 2004</p> +<h3><a name="459"></a>459. Requirement for widening in stage 2 is overspecification</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-03-16</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>When parsing strings of wide-character digits, the standard requires the library to widen narrow-character "atoms" and compare the widened atoms against the characters that are being parsed. @@ -3194,11 +3482,13 @@ drastic. Existing implementations with the exception of libstdc++ currently already use narrow() so the impact of the change on programs would presumably be isolated to just a single implementation. Further, since narrow() is not required to translate alternate wide digit -representations such as those mentioned in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> to +representations such as those mentioned in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#303">303</a> +to their narrow equivalents (i.e., the portable source characters '0' through '9'), the change does not necessarily imply that these alternate digits would be treated as ordinary digits and accepted as -part of numbers during parsing. In fact, the requirement in 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>, p13 forbids narrow() to translate an alternate +part of numbers during parsing. In fact, the requirement in 22.2.1.1.2 +[locale.ctype.virtuals], p13 forbids narrow() to translate an alternate digit character, wc, to an ordinary digit in the basic source character set unless the expression (ctype<charT>::is(ctype_base::digit, wc) == true) holds. This in @@ -3213,6 +3503,9 @@ stable character set, so you don't really need either 'widen' or widen-vs-narrow is the right question; arguably we should be using codecvt instead.]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change stage 2 so that implementations are permitted to use either technique to perform the comparison:</p> @@ -3226,8 +3519,17 @@ technique to perform the comparison:</p> respectively; i.e., avoid calling widen or narrow if it the source and destination types are the same</li> </ol> + + + + + <hr> -<a name="462"><h3>462. Destroying objects with static storage duration</h3></a><p><b>Section:</b> 3.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.start.term"> [basic.start.term]</a>, 18.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.cstdint"> [lib.cstdint]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 23 Mar 2004</p> +<h3><a name="462"></a>462. Destroying objects with static storage duration</h3> +<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#Open">Open</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-03-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> 3.6.3 Termination spells out in detail the interleaving of static destructor calls and calls to functions registered with atexit. To @@ -3249,7 +3551,6 @@ behavior, but one that is likely visible only to perverse test suites. At the very least, we should <i>permit</i> deferred destruction even if we don't require it. </p> -<p><b>Proposed resolution:</b></p> <p><i>[If this is to be changed, it should probably be changed by CWG. At this point, however, the LWG is leaning toward NAD. Implementing @@ -3258,325 +3559,124 @@ even if we don't require it. behavior would be a user-visible change, and would break at least one real application.]</i></p> -<p> -</p> -<hr> -<a name="463"><h3>463. auto_ptr usability issues</h3></a><p><b>Section:</b> 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Rani Sharoni <b>Date:</b> 7 Dec 2003</p> - -<p> -TC1 CWG DR #84 effectively made the template<class Y> operator auto_ptr<Y>() -member of auto_ptr (20.4.5.3/4) obsolete. -</p> - -<p> -The sole purpose of this obsolete conversion member is to enable copy -initialization base from r-value derived (or any convertible types like -cv-types) case: -</p> -<pre>#include <memory> -using std::auto_ptr; - -struct B {}; -struct D : B {}; - -auto_ptr<D> source(); -int sink(auto_ptr<B>); -int x1 = sink( source() ); // #1 EDG - no suitable copy constructor -</pre> - -<p> -The excellent analysis of conversion operations that was given in the final -auto_ptr proposal -(http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/1997/N1128.pdf) -explicitly specifies this case analysis (case 4). DR #84 makes the analysis -wrong and actually comes to forbid the loophole that was exploited by the -auto_ptr designers. -</p> - -<p> -I didn't encounter any compliant compiler (e.g. EDG, GCC, BCC and VC) that -ever allowed this case. This is probably because it requires 3 user defined -conversions and in fact current compilers conform to DR #84. -</p> - -<p> -I was surprised to discover that the obsolete conversion member actually has -negative impact of the copy initialization base from l-value derived -case:</p> -<pre>auto_ptr<D> dp; -int x2 = sink(dp); // #2 EDG - more than one user-defined conversion applies -</pre> - -<p> -I'm sure that the original intention was allowing this initialization using -the template<class Y> auto_ptr(auto_ptr<Y>& a) constructor (20.4.5.1/4) but -since in this copy initialization it's merely user defined conversion (UDC) -and the obsolete conversion member is UDC with the same rank (for the early -overloading stage) there is an ambiguity between them. -</p> - -<p> -Removing the obsolete member will have impact on code that explicitly -invokes it: -</p> -<pre>int y = sink(source().operator auto_ptr<B>()); -</pre> - -<p> -IMHO no one ever wrote such awkward code and the reasonable workaround for -#1 is: -</p> -<pre>int y = sink( auto_ptr<B>(source()) ); -</pre> - -<p> -I was even more surprised to find out that after removing the obsolete -conversion member the initialization was still ill-formed: -int x3 = sink(dp); // #3 EDG - no suitable copy constructor -</p> - -<p> -This copy initialization semantically requires copy constructor which means -that both template conversion constructor and the auto_ptr_ref conversion -member (20.4.5.3/3) are required which is what was explicitly forbidden in -DR #84. This is a bit amusing case in which removing ambiguity results with -no candidates. -</p> - -<p> -I also found exception safety issue with auto_ptr related to auto_ptr_ref: -</p> -<pre>int f(auto_ptr<B>, std::string); -auto_ptr<B> source2(); - -// string constructor throws while auto_ptr_ref -// "holds" the pointer -int x4 = f(source2(), "xyz"); // #4 -</pre> -<p> -The theoretic execution sequence that will cause a leak: -</p> -<ol> -<li>call auto_ptr<B>::operator auto_ptr_ref<B>()</li> -<li>call string::string(char const*) and throw</li> -</ol> - -<p> -According to 20.4.5.3/3 and 20.4.5/2 the auto_ptr_ref conversion member -returns auto_ptr_ref<Y> that holds *this and this is another defect since -the type of *this is auto_ptr<X> where X might be different from Y. Several -library vendors (e.g. SGI) implement auto_ptr_ref<Y> with Y* as member which -is much more reasonable. Other vendor implemented auto_ptr_ref as -defectively required and it results with awkward and catastrophic code: -int oops = sink(auto_ptr<B>(source())); // warning recursive on all control -paths -</p> - -<p> -Dave Abrahams noticed that there is no specification saying that -auto_ptr_ref copy constructor can't throw. -</p> +<p><i>[ +Batavia: Send to core with our recommendation that we should permit deferred +destruction but not require it. +]</i></p> -<p> -My proposal comes to solve all the above issues and significantly simplify -auto_ptr implementation. One of the fundamental requirements from auto_ptr -is that it can be constructed in an intuitive manner (i.e. like ordinary -pointers) but with strict ownership semantics which yield that source -auto_ptr in initialization must be non-const. My idea is to add additional -constructor template with sole propose to generate ill-formed, diagnostic -required, instance for const auto_ptr arguments during instantiation of -declaration. This special constructor will not be instantiated for other -types which is achievable using 14.8.2/2 (SFINAE). Having this constructor -in hand makes the constructor template<class Y> auto_ptr(auto_ptr<Y> const&) -legitimate since the actual argument can't be const yet non const r-value -are acceptable. -</p> -<p> -This implementation technique makes the "private auxiliary class" -auto_ptr_ref obsolete and I found out that modern C++ compilers (e.g. EDG, -GCC and VC) consume the new implementation as expected and allow all -intuitive initialization and assignment cases while rejecting illegal cases -that involve const auto_ptr arguments. -</p> +<p><i>[ +Howard: The course of action recommended in Batavia would undo LWG +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 +singleton". Search the net for "phoenix singleton atexit" to get a feel +for the size of the adverse impact this change would have. Below is +sample code which implements the phoenix singleton and would break if +<tt>atexit</tt> is changed in this way: +]</i></p> -<p>The proposed auto_ptr interface:</p> -<pre>namespace std { - template<class X> class auto_ptr { - public: - typedef X element_type; +<blockquote><pre>#include <cstdlib> +#include <iostream> +#include <type_traits> +#include <new> - // 20.4.5.1 construct/copy/destroy: - explicit auto_ptr(X* p=0) throw(); - auto_ptr(auto_ptr&) throw(); - template<class Y> auto_ptr(auto_ptr<Y> const&) throw(); - auto_ptr& operator=(auto_ptr&) throw(); - template<class Y> auto_ptr& operator=(auto_ptr<Y>) throw(); - ~auto_ptr() throw(); +class A +{ + bool alive_; + A(const A&); + A& operator=(const A&); +public: + A() : alive_(true) {std::cout << "A()\n";} + ~A() {alive_ = false; std::cout << "~A()\n";} + void use() + { + if (alive_) + std::cout << "A is alive\n"; + else + std::cout << "A is dead\n"; + } +}; - // 20.4.5.2 members: - X& operator*() const throw(); - X* operator->() const throw(); - X* get() const throw(); - X* release() throw(); - void reset(X* p=0) throw(); +void deallocate_resource(); - private: - template<class U> - auto_ptr(U& rhs, typename -unspecified_error_on_const_auto_ptr<U>::type = 0); - }; +// This is the phoenix singleton pattern +A& get_resource(bool create = true) +{ + static std::aligned_storage<sizeof(A), std::alignment_of<A>::value>::type buf; + static A* a; + if (create) + { + if (a != (A*)&buf) + { + a = ::new (&buf) A; + std::atexit(deallocate_resource); + } + } + else + { + a->~A(); + a = (A*)&buf + 1; + } + return *a; } -</pre> - -<p> -One compliant technique to implement the unspecified_error_on_const_auto_ptr -helper class is using additional private auto_ptr member class template like -the following: -</p> -<pre>template<typename T> struct unspecified_error_on_const_auto_ptr; - -template<typename T> -struct unspecified_error_on_const_auto_ptr<auto_ptr<T> const> -{ typedef typename auto_ptr<T>::const_auto_ptr_is_not_allowed type; }; -</pre> - -<p> -There are other techniques to implement this helper class that might work -better for different compliers (i.e. better diagnostics) and therefore I -suggest defining its semantic behavior without mandating any specific -implementation. IMO, and I didn't found any compiler that thinks otherwise, -14.7.1/5 doesn't theoretically defeat the suggested technique but I suggest -verifying this with core language experts. -</p> - -<p><b>Further changes in standard text:</b></p> -<p>Remove section 20.4.5.3</p> -<p>Change 20.4.5/2 to read something like: -Initializing auto_ptr<X> from const auto_ptr<Y> will result with unspecified -ill-formed declaration that will require unspecified diagnostic.</p> - -<p>Change 20.4.5.1/4,5,6 to read:</p> - -<pre>template<class Y> auto_ptr(auto_ptr<Y> const& a) throw();</pre> -<p> 4 Requires: Y* can be implicitly converted to X*.</p> -<p> 5 Effects: Calls const_cast<auto_ptr<Y>&>(a).release().</p> -<p> 6 Postconditions: *this holds the pointer returned from a.release().</p> - -<p>Change 20.4.5.1/10</p> -<pre>template<class Y> auto_ptr& operator=(auto_ptr<Y> a) throw(); -</pre> -<p> -10 Requires: Y* can be implicitly converted to X*. The expression delete -get() is well formed. -</p> +void deallocate_resource() +{ + get_resource(false); +} -<p>LWG TC DR #127 is obsolete.</p> +void use_A(const char* message) +{ + A& a = get_resource(); + std::cout << "Using A " << message << "\n"; + a.use(); +} -<p> -Notice that the copy constructor and copy assignment operator should remain -as before and accept non-const auto_ptr& since they have effect on the form -of the implicitly declared copy constructor and copy assignment operator of -class that contains auto_ptr as member per 12.8/5,10: -</p> -<pre>struct X { - // implicit X(X&) - // implicit X& operator=(X&) - auto_ptr<D> aptr_; +struct B +{ + ~B() {use_A("from ~B()");} }; -</pre> -<p> -In most cases this indicates about sloppy programming but preserves the -current auto_ptr behavior. -</p> +B b; -<p> -Dave Abrahams encouraged me to suggest fallback implementation in case that -my suggestion that involves removing of auto_ptr_ref will not be accepted. -In this case removing the obsolete conversion member to auto_ptr<Y> and -20.4.5.3/4,5 is still required in order to eliminate ambiguity in legal -cases. The two constructors that I suggested will co exist with the current -members but will make auto_ptr_ref obsolete in initialization contexts. -auto_ptr_ref will be effective in assignment contexts as suggested in DR -#127 and I can't see any serious exception safety issues in those cases -(although it's possible to synthesize such). auto_ptr_ref<X> semantics will -have to be revised to say that it strictly holds pointer of type X and not -reference to an auto_ptr for the favor of cases in which auto_ptr_ref<Y> is -constructed from auto_ptr<X> in which X is different from Y (i.e. assignment -from r-value derived to base). -</p> +int main() +{ + use_A("from main()"); +} +</pre></blockquote> -<p><b>Proposed resolution:</b></p> -<p><i>[Redmond: punt for the moment. We haven't decided yet whether we - want to fix auto_ptr for C++-0x, or remove it and replace it with - move_ptr and unique_ptr.]</i></p> -<hr> -<a name="466"><h3>466. basic_string ctor should prevent null pointer error</h3></a><p><b>Section:</b> 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Daniel Frey <b>Date:</b> 10 Jun 2004</p> <p> -Today, my colleagues and me wasted a lot of time. After some time, I -found the problem. It could be reduced to the following short example: +The correct output is: </p> -<pre> #include <string> - int main() { std::string( 0 ); } -</pre> +<blockquote><pre>A() +Using A from main() +A is alive +~A() +A() +Using A from ~B() +A is alive +~A() +</pre></blockquote> -<p>The problem is that the tested compilers (GCC 2.95.2, GCC 3.3.1 and -Comeau online) compile the above without errors or warnings! The -programs (at least for the GCC) resulted in a SEGV.</p> -<p>I know that the standard explicitly states that the ctor of string -requires a char* which is not zero. STLs could easily detect the above -case with a private ctor for basic_string which takes a single 'int' -argument. This would catch the above code at compile time and would not -ambiguate any other legal ctors.</p> <p><b>Proposed resolution:</b></p> -<p><i>[Redmond: No great enthusiasm for doing this. If we do, - however, we want to do it for all places that take <tt>charT*</tt> - pointers, not just the single-argument constructor. The other - question is whether we want to catch this at compile time (in which - case we catch the error of a literal 0, but not an expression whose - value is a null pointer), at run time, or both.]</i></p> - -<hr> -<a name="470"><h3>470. accessing containers from their elements' special functions</h3></a><p><b>Section:</b> 23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jun 2004</p> - <p> -The standard doesn't prohibit the destructors (or any other special -functions) of containers' elements invoked from a member function -of the container from "recursively" calling the same (or any other) -member function on the same container object, potentially while the -container is in an intermediate state, or even changing the state -of the container object while it is being modified. This may result -in some surprising (i.e., undefined) behavior. </p> -<p>Read email thread starting with c++std-lib-13637 for more.</p> -<p><b>Proposed resolution:</b></p> -<p>Add to Container Requirements the following new paragraph:</p> -<pre> Unless otherwise specified, the behavior of a program that - invokes a container member function f from a member function - g of the container's value_type on a container object c that - called g from its mutating member function h, is undefined. - I.e., if v is an element of c, directly or indirectly calling - c.h() from v.g() called from c.f(), is undefined. -</pre> - -<p><i>[Redmond: This is a real issue, but it's probably a clause 17 - issue, not clause 23. We get the same issue, for example, if we - try to destroy a stream from one of the stream's callback functions.]</i></p> - <hr> -<a name="471"><h3>471. result of what() implementation-defined</h3></a><p><b>Section:</b> 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jun 2004</p> +<h3><a name="471"></a>471. result of what() implementation-defined</h3> +<p><b>Section:</b> 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#type.info">issues</a> in [type.info].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>[lib.exception] specifies the following:</p> <pre> exception (const exception&) throw(); @@ -3613,9 +3713,51 @@ ctor was called). <p><i>[Redmond: Yes, this is fuzzy. The issue of derived classes is fuzzy too.]</i></p> + +<p><i>[ +Batavia: Howard provided wording. +]</i></p> + + + + <p><b>Proposed resolution:</b></p> + +<p> +Change 18.7.1 [exception] to: +</p> + +<blockquote> +<pre>exception(const exception& <ins><i>e</i></ins>) throw(); +exception& operator=(const exception& <ins><i>e</i></ins>) throw();</pre> +<blockquote> +<p> +-4- <i>Effects:</i> Copies an exception object. +</p> +<p> +<del> -5- <i>Remarks:</i> The effects of calling what() after assignment are implementation-defined.</del> +</p> +<p> +<ins>-5- <i>Throws:</i> Nothing. This also applies +to all standard library-defined classes that derive from <tt>exception</tt>.</ins> +</p> +<p> +<ins>-7- <i>Postcondition:</i> <tt>strcmp(what(), <i>e</i>.what()) == 0</tt>. This also applies +to all standard library-defined classes that derive from <tt>exception</tt>.</ins> +</p> + +</blockquote> +</blockquote> + + + + <hr> -<a name="473"><h3>473. underspecified ctype calls</h3></a><p><b>Section:</b> 22.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype"> [lib.locale.ctype]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 1 Jul 2004</p> +<h3><a name="473"></a>473. underspecified ctype calls</h3> +<p><b>Section:</b> 22.2.1.1 [locale.ctype] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-07-01</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Most ctype member functions come in two forms: one that operates on a single character at a time and another form that operates @@ -3675,8 +3817,6 @@ it calls the other form which then calls the base member might end up in an infinite loop if the called form of the base implementation of the function in turn calls the other form. </p> -<p><b>Proposed resolution:</b></p> - <p> Lillehammer: Part of this isn't a real problem. We already talk about caching. 22.1.1/6 But part is a real problem. ctype virtuals may call @@ -3689,54 +3829,20 @@ facets. The LWG is leaning toward a blanket prohibition, that a facet's virtuals may never call each other. We might want to do that in clause 27 too, for that matter. A review is necessary. Bill will provide wording.</p> -<hr> -<a name="479"><h3>479. Container requirements and placement new</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Herb Sutter <b>Date:</b> 1 Aug 2004</p> -<p>Nothing in the standard appears to make this program ill-formed:</p> - -<pre> struct C { - void* operator new( size_t s ) { return ::operator new( s ); } - // NOTE: this hides in-place and nothrow new - }; - - int main() { - vector<C> v; - v.push_back( C() ); - } -</pre> -<p>Is that intentional? We should clarify whether or not we intended - to require containers to support types that define their own special - versions of <tt>operator new</tt>.</p> - -<p><i>[ -Lillehammer: A container will definitely never use this overridden -operator new, but whether it will fail to compile is unclear from the -standard. Are containers supposed to use qualified or unqualified -placement new? 20.4.1.1 is somewhat relevant, but the standard -doesn't make it completely clear whether containers have to use -Allocator::construct(). If containers don't use it, the details of how -containers use placement new are unspecified. That is the real bug, -but it needs to be fixed as part of the allocator overhaul. Weak -support that the eventual solution should make this code well formed. -]</i></p> <p><b>Proposed resolution:</b></p> -<hr> -<a name="482"><h3>482. Swapping pairs</h3></a><p><b>Section:</b> 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a>, 25.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.swap"> [lib.alg.swap]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 14 Sep 2004</p> -<p>(Based on recent comp.std.c++ discussion)</p> -<p>Pair (and tuple) should specialize std::swap to work in terms of -std::swap on their components. For example, there's no obvious reason -why swapping two objects of type pair<vector<int>, -list<double> > should not take O(1).</p> -<p><b>Proposed resolution:</b></p> -<p><i>[Lillehammer: We agree it should be swappable. Howard will - provide wording.]</i></p> <hr> -<a name="484"><h3>484. Convertible to T</h3></a><p><b>Section:</b> 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Chris Jefferson <b>Date:</b> 16 Sep 2004</p> +<h3><a name="484"></a>484. Convertible to T</h3> +<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#Open">Open</a> + <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-09-16</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>From comp.std.c++:</p> <p> @@ -3774,13 +3880,26 @@ class I expect?</p> expect), then we'll need to tighten up what we mean by "convertible to T".</p> -<p><b>Proposed resolution:</b></p> <p><i>[Lillehammer: The first part is NAD, since "convertible" is well-defined in core. The second part is basically about pathological overloads. It's a minor problem but a real one. So leave open for now, hope we solve it as part of iterator redesign.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="485"><h3>485. output iterator insufficently constrained</h3></a><p><b>Section:</b> 24.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.output.iterators"> [lib.output.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Chris Jefferson <b>Date:</b> 13 Oct 2004</p> +<h3><a name="485"></a>485. output iterator insufficently constrained</h3> +<p><b>Section:</b> 24.1.2 [output.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-10-13</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#output.iterators">issues</a> in [output.iterators].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The note on 24.1.2 Output iterators insufficently limits what can be performed on output iterators. While it requires that each iterator is @@ -3807,12 +3926,24 @@ wording (I believe) x,a,b,c could be written to in any order. </p> <p>I do not believe this was the intension of the standard?</p> -<p><b>Proposed resolution:</b></p> <p><i>[Lillehammer: Real issue. There are lots of constraints we intended but didn't specify. Should be solved as part of iterator redesign.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="488"><h3>488. rotate throws away useful information</h3></a><p><b>Section:</b> 25.2.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.rotate"> [lib.alg.rotate]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 22 Nov 2004</p> +<h3><a name="488"></a>488. rotate throws away useful information</h3> +<p><b>Section:</b> 25.2.11 [alg.rotate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2004-11-22</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> rotate takes 3 iterators: first, middle and last which point into a sequence, and rearranges the sequence such that the subrange [middle, @@ -3848,6 +3979,8 @@ is very small (similar to that of lwg <a href="http://www.open-std.org/jtc1/sc22 a significant benefit to the change. </p> + + <p><b>Proposed resolution:</b></p> <p>In 25p2, change:</p> <pre> template<class ForwardIterator> @@ -3890,10 +4023,22 @@ advance is observable behavior, since users can specialize it for their own iterators.) Howard will provide wording. ]</i></p> + <p><i>[Howard provided wording for mid-meeting-mailing Jun. 2005.]</i></p> + + + + + + <hr> -<a name="492"><h3>492. Invalid iterator arithmetic expressions</h3></a><p><b>Section:</b> 23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a>, 24 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterators"> [lib.iterators]</a>, 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Thomas Mang <b>Date:</b> 12 Dec 2004</p> +<h3><a name="492"></a>492. Invalid iterator arithmetic expressions</h3> +<p><b>Section:</b> 23 [containers], 24 [iterators], 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p>Various clauses other than clause 25 make use of iterator arithmetic not supported by the iterator category in question. Algorithms in clause 25 are exceptional because of 25 [lib.algorithms], @@ -4052,6 +4197,7 @@ See DR 225. See DR 237. The resolution could then also read "Linear in last - first". </p> + <p><b>Proposed resolution:</b></p> <p><i>[Lillehammer: Minor issue, but real. We have a blanket statement @@ -4059,8 +4205,18 @@ about this in 25/11. But (a) it should be in 17, not 25; and (b) it's not quite broad enough, because there are some arithmetic expressions it doesn't cover. Bill will provide wording.]</i></p> + + + + + + <hr> -<a name="498"><h3>498. Requirements for partition() and stable_partition() too strong</h3></a><p><b>Section:</b> 25.2.12 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.partitions"> [lib.alg.partitions]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Sean Parent, Joe Gottman <b>Date:</b> 4 May 2005</p> +<h3><a name="498"></a>498. Requirements for partition() and stable_partition() too strong</h3> +<p><b>Section:</b> 25.2.13 [alg.partitions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Sean Parent, Joe Gottman <b>Date:</b> 2005-05-04</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Problem: The iterator requirements for partition() and stable_partition() [25.2.12] @@ -4071,6 +4227,8 @@ since before the standard existed. The SGI implementation includes these (see and <a href="http://www.sgi.com/tech/stl/stable_partition.html">http://www.sgi.com/tech/stl/stable_partition.html</a>). </p> + + <p><b>Proposed resolution:</b></p> <p> Change 25.2.12 from </p> @@ -4100,7 +4258,10 @@ swaps are done; otherwise at most (last - first) swaps are done. Exactly (last - first) applications of the predicate are done. </p></blockquote> + + <p><b>Rationale:</b></p> +<p> Partition is a "foundation" algorithm useful in many contexts (like sorting as just one example) - my motivation for extending it to include forward iterators is slist - without this extension you can't partition an slist @@ -4110,13 +4271,25 @@ to provide a library that would refine std::partition() to other concepts without fear of conflicting with other libraries doing the same - but that is a digression). I consider the fact that partition isn't defined to work for ForwardIterator a minor embarrassment. +</p> <p><i>[Mont Tremblant: Moved to Open, request motivation and use cases by next meeting. Sean provided further rationale by post-meeting mailing.]</i></p> + + + + + + <hr> -<a name="502"><h3>502. Proposition: Clarification of the interaction between a facet and an iterator</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Christopher Conrade Zseleghovski <b>Date:</b> 7 Jun 2005</p> +<h3><a name="502"></a>502. Proposition: Clarification of the interaction between a facet and an iterator</h3> +<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#Open">Open</a> + <b>Submitter:</b> Christopher Conrade Zseleghovski <b>Date:</b> 2005-06-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Motivation: </p> @@ -4127,6 +4300,8 @@ I have complained to Mr. Plauger that the Dinkumware library does not observe this principle but he objected that this behaviour is not covered in the standard. </p> + + <p><b>Proposed resolution:</b></p> <p> Append the following point to 22.1.1.1.1: @@ -4147,8 +4322,21 @@ Berlin: Moved to Open, Need to clean up this area to make it clear locales don't have to contain open ended sets of facets. Jack, Howard, Bill. ]</i></p> + + + + + + + <hr> -<a name="503"><h3>503. more on locales</h3></a><p><b>Section:</b> 22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> P.J. Plauger <b>Date:</b> 20 Jun 2005</p> +<h3><a name="503"></a>503. more on locales</h3> +<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#Open">Open</a> + <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2005-06-20</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> a) In 22.2.1.1 para. 2 we refer to "the instantiations required in Table 51" to refer to the facet *objects* associated with a locale. And we @@ -4240,84 +4428,87 @@ other facets, for that matter? 4) As an almost aside, we spell out when a facet needs to use the ctype facet, but several also need to use a codecvt facet and we don't say so. </p> -<p><b>Proposed resolution:</b></p> -<p> -</p> <p><i>[ Berlin: Bill to provide wording. ]</i></p> -<hr> -<a name="515"><h3>515. Random number engine traits</h3></a><p><b>Section:</b> TR1 5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.synopsis"> [tr.rand.synopsis]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> -<p> -To accompany the concept of a pseudo-random number engine as defined in Table 17, -we propose and recommend an adjunct template, engine_traits, to be declared in -[tr.rand.synopsis] as: -</p> -<blockquote><pre>template< class PSRE > -class engine_traits; -</pre></blockquote> -<p> -This templateÕs primary purpose would be as an aid to generic programming involving -pseudo-random number engines. Given only the facilities described in tr1, it would -be very difficult to produce any algorithms involving the notion of a generic engine. -The intent of this proposal is to provide, via engine_traits<>, sufficient -descriptive information to allow an algorithm to employ a pseudo-random number engine -without regard to its exact type, i.e., as a template parameter. -</p> -<p> -For example, today it is not possible to write an efficient generic function that -requires any specific number of random bits. More specifically, consider a -cryptographic application that internally needs 256 bits of randomness per call: -</p> -<blockquote><pre>template< class Eng, class InIter, class OutIter > -void crypto( Eng& e, InIter in, OutIter out ); -</pre></blockquote> -<p> -Without knowning the number of bits of randomness produced per call to a provided -engine, the algorithm has no means of determining how many times to call the engine. -</p> -<p> -In a new section [tr.rand.eng.traits], we proposed to define the engine_traits -template as: -</p> -<blockquote><pre>template< class PSRE > -class engine_traits -{ - static std::size_t bits_of_randomness = 0u; - static std::string name() { return "unknown_engine"; } - // TODO: other traits here -}; -</pre></blockquote> -<p> -Further, each engine described in [tr.rand.engine] would be accompanied by a -complete specialization of this new engine_traits template. -</p> + + + <p><b>Proposed resolution:</b></p> <p> - </p> -<p><i>[ -Berlin: Walter: While useful for implementation per TR1, N1932 has no need for this -feature. -]</i></p> + + + <hr> -<a name="518"><h3>518. Are insert and erase stable for unordered_multiset and unordered_multimap?</h3></a><p><b>Section:</b> TR1 6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.hash"> [tr.hash]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 3 Jul 2005</p> +<h3><a name="518"></a>518. Are insert and erase stable for unordered_multiset and unordered_multimap?</h3> +<p><b>Section:</b> 23.1.3 [unord.req], TR1 6.3.1 [tr.unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2005-07-03</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Issue 371 deals with stability of multiset/multimap under insert and erase (i.e. do they preserve the relative order in ranges of equal elements). The same issue applies to unordered_multiset and unordered_multimap. </p> -<p><b>Proposed resolution:</b></p> <p><i>[ Moved to open (from review): There is no resolution. ]</i></p> + + +<p><b>Proposed resolution:</b></p> +<p> +Wording for the proposed resolution is taken from the equivalent text for associative containers. +</p> + +<p> +Change 23.1.3 [unord.req], Unordered associative containers, paragraph 6 to: +</p> + +<blockquote><p> +An unordered associative container supports <i>unique</i> keys if it may +contain at most one element for each key. Otherwise, it supports <i>equivalent +keys</i>. <tt>unordered_set</tt> and <tt>unordered_map</tt> support +unique keys. <tt>unordered_multiset</tt> and <tt>unordered_multimap</tt> +support equivalent keys. In containers that support equivalent keys, elements +with equivalent keys are adjacent to each other. <ins>For +<tt>unordered_multiset</tt> +and <tt>unordered_multimap</tt>,<tt> insert</tt> and <tt>erase</tt> +preserve the relative ordering of equivalent elements.</ins> +</p></blockquote> + <p> +Change 23.1.3 [unord.req], Unordered associative containers, paragraph 8 to: </p> + +<blockquote> +<p>The elements of an unordered associative container are organized into <i> +buckets</i>. Keys with the same hash code appear in the same bucket. The number +of buckets is automatically increased as elements are added to an unordered +associative container, so that the average number of elements per bucket is kept +below a bound. Rehashing invalidates iterators, changes ordering between +elements, and changes which buckets elements appear in, but does not invalidate +pointers or references to elements. <ins>For <tt>unordered_multiset</tt> +and <tt>unordered_multimap</tt>, rehashing +preserves the relative ordering of equivalent elements.</ins></p> +</blockquote> + + + + + + <hr> -<a name="522"><h3>522. Tuple doesn't define swap</h3></a><p><b>Section:</b> TR1 6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.tuple"> [tr.tuple]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Andy Koenig <b>Date:</b> 3 Jul 2005</p> +<h3><a name="522"></a>522. Tuple doesn't define swap</h3> +<p><b>Section:</b> 20.3 [tuple], TR1 6.1 [tr.tuple] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Andy Koenig <b>Date:</b> 2005-07-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Tuple doesn't define swap(). It should. </p> @@ -4325,9 +4516,27 @@ Tuple doesn't define swap(). It should. Berlin: Doug to provide wording. ]</i></p> +<p><i>[ +Batavia: Howard to provide wording. +]</i></p> + + + + <p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="523"><h3>523. regex case-insensitive character ranges are unimplementable as specified</h3></a><p><b>Section:</b> TR1 7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.re"> [tr.re]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Eric Niebler <b>Date:</b> 1 Jul 2005</p> +<h3><a name="523"></a>523. regex case-insensitive character ranges are unimplementable as specified</h3> +<p><b>Section:</b> 28 [re] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Eric Niebler <b>Date:</b> 2005-07-01</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re">active issues</a> in [re].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re">issues</a> in [re].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> A problem with TR1 regex is currently being discussed on the Boost developers list. It involves the handling of case-insensitive matching @@ -4386,6 +4595,7 @@ with the existing ctype facet. What a mess! John Maddock adds: ]</i></p> + <p> One small correction, I have since found that ICU's regex package does implement this correctly, using a similar mechanism to the current @@ -4444,9 +4654,23 @@ Portland: Alisdair: Detect as invalid, throw an exception. Pete: Possible general problem with case insensitive ranges. ]</i></p> + + + <p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="524"><h3>524. regex named character classes and case-insensitivity don't mix</h3></a><p><b>Section:</b> TR1 7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.re"> [tr.re]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Eric Niebler <b>Date:</b> 1 Jul 2005</p> +<h3><a name="524"></a>524. regex named character classes and case-insensitivity don't mix</h3> +<p><b>Section:</b> 28 [re] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Eric Niebler <b>Date:</b> 2005-07-01</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re">active issues</a> in [re].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#re">issues</a> in [re].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> This defect is also being discussed on the Boost developers list. The full discussion can be found here: @@ -4500,9 +4724,20 @@ pattern is compiled rather than when it is executed. For what it's worth, John has also expressed his preference for option (1) above. </p> + + <p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="525"><h3>525. type traits definitions not clear</h3></a><p><b>Section:</b> TR1 4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.meta.unary"> [tr.meta.unary]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Robert Klarer <b>Date:</b> 11 Jul 2005</p> +<h3><a name="525"></a>525. type traits definitions not clear</h3> +<p><b>Section:</b> 20.4.4 [meta.unary], TR1 4.5 [tr.meta.unary] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Robert Klarer <b>Date:</b> 2005-07-11</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> It is not completely clear how the primary type traits deal with cv-qualified types. And several of the secondary type traits @@ -4512,128 +4747,27 @@ seem to be lacking a definition. <p><i>[ Berlin: Howard to provide wording. ]</i></p> -<p><b>Proposed resolution:</b></p> -<hr> -<a name="526"><h3>526. Is it undefined if a function in the standard changes in parameters?</h3></a><p><b>Section:</b> 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Chris Jefferson <b>Date:</b> 14 Sep 2005</p> -<p> -Problem: There are a number of places in the C++ standard library where -it is possible to write what appear to be sensible ways of calling -functions, but which can cause problems in some (or all) -implementations, as they cause the values given to the function to be -changed in a way not specified in standard (and therefore not coded to -correctly work). These fall into two similar categories. -</p> - -<p> -1) Parameters taken by const reference can be changed during execution -of the function -</p> - -<p> -Examples: -</p> - -<p> -Given std::vector<int> v: -</p> -<p> -v.insert(v.begin(), v[2]); -</p> -<p> -v[2] can be changed by moving elements of vector -</p> - - -<p> -Given std::list<int> l: -</p> -<p> -l.remove(*l.begin()); -</p> -<p> -Will delete the first element, and then continue trying to access it. -This is particularily vicious, as it will appear to work in almost all -cases. -</p> - -<p> -2) A range is given which changes during the execution of the function: -Similarly, -</p> - -<p> -v.insert(v.begin(), v.begin()+4, v.begin()+6); -</p> - -<p> -This kind of problem has been partly covered in some cases. For example -std::copy(first, last, result) states that result cannot be in the range -[first, last). However, does this cover the case where result is a -reverse_iterator built from some iterator in the range [first, last)? -Also, std::copy would still break if result was reverse_iterator(last + -1), yet this is not forbidden by the standard -</p> - -<p> -Solution: -</p> - -<p> -One option would be to try to more carefully limit the requirements of -each function. There are many functions which would have to be checked. -However as has been shown in the std::copy case, this may be difficult. -A simpler, more global option would be to somewhere insert text similar to: -</p> - -<p> -If the execution of any function would change either any values passed -by reference or any value in any range passed to a function in a way not -defined in the definition of that function, the result is undefined. -</p> -<p> -Such code would have to at least cover chapters 23 and 25 (the sections -I read through carefully). I can see no harm on applying it to much of -the rest of the standard. -</p> -<p> -Some existing parts of the standard could be improved to fit with this, -for example the requires for 25.2.1 (Copy) could be adjusted to: -</p> +<p><b>Proposed resolution:</b></p> <p> -Requires: For each non-negative integer n < (last - first), assigning to -*(result + n) must not alter any value in the range [first + n, last). +Wording provided in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2028.html">N2028</a>. +A +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">revision (N2157)</a> +provides more detail for motivation. </p> -<p> -However, this may add excessive complication. -</p> -<p> -One other benefit of clearly introducing this text is that it would -allow a number of small optimisations, such as caching values passed -by const reference. -</p> -<p> -Matt Austern adds that this issue also exists for the <tt>insert</tt> and -<tt>erase</tt> members of the ordered and unordered associative containers. -</p> -<p><i>[ -Berlin: Lots of controversey over how this should be solved. Lots of confusion -as to whether we're talking about self referencing iterators or references. -Needs a good survey as to the cases where this matters, for which -implementations, and how expensive it is to fix each case. -]</i></p> -<p><b>Proposed resolution:</b></p> -<p> -</p> <hr> -<a name="527"><h3>527. tr1::bind has lost its Throws clause</h3></a><p><b>Section:</b> TR1 3.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.func.bind.bind"> [tr.func.bind.bind]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Peter Dimov <b>Date:</b> 01 Oct 2005</p> +<h3><a name="527"></a>527. tr1::bind has lost its Throws clause</h3> +<p><b>Section:</b> 20.5.10.1.3 [func.bind.bind], TR1 3.6.3 [tr.func.bind.bind] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2005-10-01</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The original bind proposal gives the guarantee that tr1::bind(f, t1, ..., tN) does not throw when the copy constructors of f, t1, ..., tN @@ -4652,34 +4786,51 @@ I'm pretty certain that we never removed it on purpose. Editorial omission? :-) Berlin: not quite editorial, needs proposed wording. ]</i></p> +<p><i>[ +Batavia: Doug to translate wording to variadic templates. +]</i></p> + + + <p><b>Proposed resolution:</b></p> <p> In 20.5.10.1.3 [lib.func.bind.bind] ([tr.func.bind.bind]), add a new paragraph after p2: </p> -<blockquote> +<blockquote><p> <i>Throws:</i> Nothing unless one of the copy constructors of <tt>f, t1, t2, ..., tN</tt> throws an exception. -</blockquote> +</p></blockquote> <p> Add a new paragraph after p4: </p> -<blockquote> +<blockquote><p> <i>Throws:</i> nothing unless one of the copy constructors of <tt>f, t1, t2, ..., tN</tt> throws an exception. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="528"><h3>528. TR1: issue 6.19 vs 6.3.4.3/2 (and 6.3.4.5/2)</h3></a><p><b>Section:</b> TR1 6.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.unord.unord"> [tr.unord.unord]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 12 Oct 2005</p> +<h3><a name="528"></a>528. TR1: issue 6.19 vs 6.3.4.3/2 (and 6.3.4.5/2)</h3> +<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#Open">Open</a> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2005-10-12</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> while implementing the resolution of issue 6.19 I'm noticing the following: according to 6.3.4.3/2 (and 6.3.4.5/2), for unordered_set and unordered_multiset: </p> -<blockquote> +<blockquote><p> "The iterator and const_iterator types are both const types. It is unspecified whether they are the same type" -</blockquote> +</p></blockquote> <p> Now, according to the resolution of 6.19, we have overloads of insert @@ -4694,6 +4845,8 @@ iterators should be added only to unordered_map and unordered_multimap? Or, of course, I'm missing something? </p> + + <p><b>Proposed resolution:</b></p> <p> Add to 6.3.4.3p2 (and 6.3.4.5p2): @@ -4725,18 +4878,28 @@ An implementation shall not supply an overloaded function Post-Berlin: Beman supplied wording. ]</i></p> + + + + + + <hr> -<a name="529"><h3>529. The standard encourages redundant and confusing preconditions</h3></a><p><b>Section:</b> 17.4.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.required"> [lib.res.on.required]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> David Abrahams <b>Date:</b> 25 Oct 2005</p> +<h3><a name="529"></a>529. The standard encourages redundant and confusing preconditions</h3> +<p><b>Section:</b> 17.4.3.8 [res.on.required] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-10-25</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> 17.4.3.8/1 says: </p> -<blockquote> +<blockquote><p> Violation of the preconditions specified in a function's Required behavior: paragraph results in undefined behavior unless the function's Throws: paragraph specifies throwing an exception when the precondition is violated. -</blockquote> +</p></blockquote> <p> This implies that a precondition violation can lead to defined @@ -4768,17 +4931,23 @@ without changing 17.4.3.8/1; the wording there just seems to encourage the redundant and error-prone Requires: clause. </p> +<p><i>[ +Batavia: Alan and Pete to work. +]</i></p> + + + <p><b>Proposed resolution:</b></p> <p> 1. Change 17.4.3.8/1 to read: </p> -<blockquote> +<blockquote><p> Violation of the preconditions specified in a function's <i>Required behavior:</i> paragraph results in undefined behavior <del>unless the function's <i>Throws:</i> paragraph specifies throwing an exception when the precondition is violated</del>. -</blockquote> +</p></blockquote> <p> 2. Go through and remove redundant Requires: clauses. Specifics to be @@ -4789,8 +4958,26 @@ an exception when the precondition is violated</del>. Berlin: The LWG requests a detailed survey of part 2 of the proposed resolution. ]</i></p> + +<p><i>[ +Alan provided the survey +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2121.html">N2121</a>. +]</i></p> + + + + + + + <hr> -<a name="531"><h3>531. array forms of unformatted input functions</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 23 Nov 2005</p> +<h3><a name="531"></a>531. array forms of unformatted input functions</h3> +<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#Ready">Ready</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-11-23</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> <p> The array forms of unformatted input functions don't seem to have well-defined semantics for zero-element arrays in a couple of cases. The affected ones @@ -4799,43 +4986,41 @@ terminate when <tt>(n - 1)</tt> characters are stored, which obviously can never be true when <tt>(n == 0)</tt> holds to start with. See c++std-lib-16071. </p> + + <p><b>Proposed resolution:</b></p> <p> I suggest changing 27.6.1.3, p7 (<tt>istream::get()</tt>), bullet 1 to read: </p> - <p> - </p><ul> + <ul> <li> <tt>(n < 1)</tt> is true or <tt>(n - 1)</tt> characters are stored; </li> </ul> - <p></p> <p> Change 27.6.1.3, p9: </p> -<blockquote> +<blockquote><p> If the function stores no characters, it calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt> (27.4.4.3)). In any case, <ins>if <tt>(n > 0)</tt> is true</ins> it then stores a null character into the next successive location of the array. -</blockquote> +</p></blockquote> <p> and similarly p17 (<tt>istream::getline()</tt>), bullet 3 to: </p> - <p> - </p><ul> + <ul> <li> <tt>(n < 1)</tt> is true or <tt>(n - 1)</tt> characters are stored (in which case the function calls <tt>setstate(failbit)</tt>). </li> </ul> - <p></p> <p> @@ -4844,256 +5029,30 @@ terminating NUL character unless the the array has non-zero size, Robert Klarer suggests in c++std-lib-16082 to change 27.6.1.3, p20 to read: </p> - <p> - </p><blockquote> + <blockquote><p> In any case, provided <tt>(n > 0)</tt> is true, it then stores a null character (using charT()) into the next successive location of the array. - </blockquote> - <p></p> + </p></blockquote> <p><i>[ post-Redmond: Pete noticed that the current resolution for <tt>get</tt> requires writing to out of bounds memory when <tt>n == 0</tt>. Martin provided fix. ]</i></p> -<hr> -<a name="532"><h3>532. Tuple comparison</h3></a><p><b>Section:</b> TR1 6.1.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.tuple.rel"> [tr.tuple.rel]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> David Abrahams <b>Date:</b> 29 Nov 2005</p> -<p> -Where possible, tuple comparison operators <,<=,=>, and > ought to be -defined in terms of std::less rather than operator<, in order to -support comparison of tuples of pointers. -</p> -<p><b>Proposed resolution:</b></p> -<p> -change 6.1.3.5/5 from: -</p> - -<blockquote> - Returns: The result of a lexicographical comparison between t and - u. The result is defined as: (bool)(get<0>(t) < get<0>(u)) || - (!(bool)(get<0>(u) < get<0>(t)) && ttail < utail), where rtail for - some tuple r is a tuple containing all but the first element of - r. For any two zero-length tuples e and f, e < f returns false. -</blockquote> - -<p> -to: -</p> -<blockquote> -<p> - Returns: The result of a lexicographical comparison between t and - u. For any two zero-length tuples e and f, e < f returns false. - Otherwise, the result is defined as: cmp( get<0>(t), get<0>(u)) || - (!cmp(get<0>(u), get<0>(t)) && ttail < utail), where rtail for some - tuple r is a tuple containing all but the first element of r, and - cmp(x,y) is an unspecified function template defined as follows. -</p> -<p> - Where T is the type of x and U is the type of y: -</p> -<p> - if T and U are pointer types and T is convertible to U, returns - less<U>()(x,y) -</p> -<p> - otherwise, if T and U are pointer types, returns less<T>()(x,y) -</p> -<p> - otherwise, returns (bool)(x < y) -</p> -</blockquote> -<p><i>[ -Berlin: This issue is much bigger than just tuple (pair, containers, -algorithms). Dietmar will survey and work up proposed wording. -]</i></p> <hr> -<a name="534"><h3>534. Missing basic_string members</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 16 Nov 2005</p> -<p> -OK, we all know std::basic_string is bloated and already has way too -many members. However, I propose it is missing 3 useful members that -are often expected by users believing it is a close approximation of the -container concept. All 3 are listed in table 71 as 'optional' -</p> - -<p> -i/ pop_back. -</p> - -<p> -This is the one I feel most strongly about, as I only just discovered it -was missing as we are switching to a more conforming standard library -<g> -</p> - -<p> -I find it particularly inconsistent to support push_back, but not -pop_back. -</p> - -<p> -ii/ back. -</p> - -<p> -There are certainly cases where I want to examine the last character of -a string before deciding to append, or to trim trailing path separators -from directory names etc. *rbegin() somehow feels inelegant. -</p> - -<p> -iii/ front -</p> - -<p> -This one I don't feel strongly about, but if I can get the first two, -this one feels that it should be added as a 'me too' for consistency. -</p> - -<p> -I believe this would be similarly useful to the data() member recently -added to vector, or at() member added to the maps. -</p> -<p><b>Proposed resolution:</b></p> -<p> -Add the following members to definition of class template basic_string, 21.3p7 -</p> -<blockquote><pre>void pop_back () - -const charT & front() const -charT & front() - -const charT & back() const -charT & back() -</pre></blockquote> -<p> -Add the following paragraphs to basic_string description -</p> - -<p> -21.3.4p5 -</p> -<blockquote> -<pre>const charT & front() const -charT & front() -</pre> -<p> -<i>Precondition:</i> <tt>!empty()</tt> -</p> -<p> -<i>Effects:</i> Equivalent to <tt>operator[](0)</tt>. -</p> -</blockquote> - -<p> -21.3.4p6 -</p> -<blockquote> -<pre>const charT & back() const -charT & back() -</pre> -<p> -<i>Precondition:</i> <tt>!empty()</tt> -</p> -<p> -<i>Effects:</i> Equivalent to <tt>operator[]( size() - 1)</tt>. -</p> -</blockquote> - -<p> -21.3.5.5p10 -</p> -<blockquote> -<pre>void pop_back () -</pre> -<p> -<i>Precondition:</i> <tt>!empty()</tt> -</p> -<p> -<i>Effects:</i> Equivalent to <tt>erase( size() - 1, 1 )</tt>. -</p> -</blockquote> - -<p> -Update Table 71: (optional sequence operations) -Add basic_string to the list of containers for the following operations. -</p> -<blockquote><pre>a.front() -a.back() -a.push_back() -a.pop_back() -a[n] -</pre></blockquote> - -<p><i>[ -Berlin: Has support. Alisdair provided wording. -]</i></p> -<hr> -<a name="536"><h3>536. Container iterator constructor and explicit convertibility</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 17 Dec 2005</p> -<p> -The iterator constructor X(i,j) for containers as defined in 23.1.1 and -23.2.2 does only require that i and j be input iterators but -nothing is said about their associated value_type. There are three -sensible -options: -</p> -<ol> -<li>iterator's value_type is exactly X::value_type (modulo cv).</li> -<li>iterator's value_type is *implicitly* convertible to X::value_type.</li> -<li>iterator's value_type is *explicitly* convertible to X::value_type.</li> -</ol> -<p> -The issue has practical implications, and stdlib vendors have -taken divergent approaches to it: Dinkumware follows 2, -libstdc++ follows 3. -</p> -<p> -The same problem applies to the definition of insert(p,i,j) for -sequences and insert(i,j) for associative contianers, as well as -assign. -</p> - -<p><i>[ -The following added by Howard and the example code was originally written by -Dietmar. -]</i></p> -<p> -Valid code below? -</p> - -<blockquote><pre>#include <vector> -#include <iterator> -#include <iostream> - -struct foo -{ - explicit foo(int) {} -}; - -int main() -{ - std::vector<int> v_int; - std::vector<foo> v_foo1(v_int.begin(), v_int.end()); - std::vector<foo> v_foo2((std::istream_iterator<int>(std::cin)), - std::istream_iterator<int>()); -} -</pre></blockquote> - -<p><b>Proposed resolution:</b></p> -<p> -</p> -<p><i>[ -Berlin: Some support, not universal, for respecting the explicit qualifier. -]</i></p> -<hr> -<a name="539"><h3>539. partial_sum and adjacent_difference should mention requirements</h3></a><p><b>Section:</b> 26.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand"> [lib.rand]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Marc Schoolderman <b>Date:</b> 6 Feb 2006</p> +<h3><a name="539"></a>539. partial_sum and adjacent_difference should mention requirements</h3> +<p><b>Section:</b> 26.6.3 [partial.sum] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Marc Schoolderman <b>Date:</b> 2006-02-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> There are some problems in the definition of partial_sum and adjacent_difference in 26.4 [lib.numeric.ops] @@ -5105,9 +5064,10 @@ parametrized on a "type T", instead, 26.4.3 [lib.partial.sum] simply specifies the effects clause as; </p> -<blockquote> +<blockquote><p> Assigns to every element referred to by iterator <tt>i</tt> in the range <tt>[result,result + (last - first))</tt> a value correspondingly equal to +</p> <blockquote><pre>((...(* first + *( first + 1)) + ...) + *( first + ( i - result ))) </pre></blockquote> </blockquote> @@ -5165,11 +5125,11 @@ like this should be added to the "Requires" clause of 26.4.3/4 [lib.partial.sum]: </p> -<blockquote> +<blockquote><p> The type of <tt>*i + *(i+1)</tt> or <tt>binary_op(*i, *(i+1))</tt> shall meet the requirements of <tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types. -</blockquote> +</p></blockquote> <p> (As also required for <tt>T</tt> in 26.4.1 [lib.accumulate] and 26.4.2 @@ -5189,12 +5149,12 @@ If the intent is that operations happen in the <tt>input type</tt>, then something like this should be added instead; </p> -<blockquote> +<blockquote><p> The type of *first shall meet the requirements of <tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types. The result of <tt>*i + *(i+1)</tt> or <tt>binary_op(*i, *(i+1))</tt> shall be convertible to this type. -</blockquote> +</p></blockquote> <p> The 'widening' behaviour can then be obtained by writing a custom proxy @@ -5227,176 +5187,60 @@ In any case, <tt>adjacent_difference</tt> doesn't mention the requirements on th [lib.adjacent.difference]: </p> -<blockquote> +<blockquote><p> The type of <tt>*first</tt> shall meet the requirements of <tt>CopyConstructible</tt> (20.1.3) and <tt>Assignable</tt> (23.1) types." -</blockquote> - -<p><b>Proposed resolution:</b></p> -<p> -</p> +</p></blockquote> <p><i>[ Berlin: Giving output iterator's value_types very controversial. Suggestion of adding signatures to allow user to specify "accumulator". ]</i></p> -<hr> -<a name="542"><h3>542. shared_ptr observers</h3></a><p><b>Section:</b> TR1 2.2.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared.obs"> [tr.util.smartptr.shared.obs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Oct 2005</p> -<p> -Peter Dimov wrote: -To: C++ libraries mailing list -Message c++std-lib-15614 -[...] -The intent is for both use_count() and unique() to work in a threaded environment. -They are intrinsically prone to race conditions, but they never return garbage. -</p> - -<p> -This is a crucial piece of information that I really wish were -captured in the text. Having this in a non-normative note would -have made everything crystal clear to me and probably stopped -me from ever starting this discussion :) Instead, the sentence -in p12 "use only for debugging and testing purposes, not for -production code" very strongly suggests that implementations -can and even are encouraged to return garbage (when threads -are involved) for performance reasons. -</p> -<p> -How about adding an informative note along these lines: -</p> -<blockquote> - Note: Implementations are encouraged to provide well-defined - behavior for use_count() and unique() even in the presence of - multiple threads. -</blockquote> -<p> -I don't necessarily insist on the exact wording, just that we -capture the intent. -</p> -<p><b>Proposed resolution:</b></p> -<p> -</p> -<hr> -<a name="543"><h3>543. valarray slice default constructor</h3></a><p><b>Section:</b> 26.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.members"> [lib.complex.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 3 Nov 2005</p> -<p> -If one explicitly constructs a slice or glice with the default -constructor, does the standard require this slice to have any usable -state? It says "creates a slice which specifies no elements", which -could be interpreted two ways: -</p> -<ol> -<li>There are no elements to which the slice refers (i.e. undefined).</li> -<li>The slice specifies an array with no elements in it (i.e. defined).</li> -</ol> -<p> -Here is a bit of code to illustrate: -</p> -<blockquote><pre>#include <iostream> -#include <valarray> -int main() -{ - std::valarray<int> v(10); - std::valarray<int> v2 = v[std::slice()]; - std::cout << "v[slice()].size() = " << v2.size() << '\n'; -} -</pre></blockquote> -<p> -Is the behavior undefined? Or should the output be: -</p> -<blockquote> -v[slice()].size() = 0 -</blockquote> -<p> -There is a similar question and wording for gslice at 26.3.6.1p1. -</p> <p><b>Proposed resolution:</b></p> <p> -Change 26.5.4.1 [cons.slice]: </p> -<blockquote> -1 - <del>The default constructor for <tt>slice</tt> creates a <tt>slice</tt> -which specifies no elements.</del> <ins>The default constructor is equivalent to -<tt>slice(0, 0, 0)</tt>.</ins> A default constructor is provided only to permit -the declaration of arrays of slices. The constructor with arguments for a slice -takes a start, length, and stride parameter. -</blockquote> -<p> -Change 26.3.6.1 [gslice.cons]: -</p> -<blockquote> -1 - <del>The default constructor creates a <tt>gslice</tt> which specifies no -elements.</del> <ins>The default constructor is equivalent to <tt>gslice(0, -valarray<size_t>(), valarray<size_t>())</tt>.</ins> The constructor -with arguments builds a <tt>gslice</tt> based on a specification of start, -lengths, and strides, as explained in the previous section. -</blockquote> + <hr> -<a name="545"><h3>545. When is a deleter deleted?</h3></a><p><b>Section:</b> TR1 2.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared.dest"> [tr.util.smartptr.shared.dest]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 10 Jan 2006</p> -<p> -The description of ~shared_ptr doesn't say when the shared_ptr's deleter, if -any, is destroyed. In principle there are two possibilities: it is destroyed -unconditionally whenever ~shared_ptr is executed (which, from an implementation -standpoint, means that the deleter is copied whenever the shared_ptr is copied), -or it is destroyed immediately after the owned pointer is destroyed (which, from -an implementation standpoint, means that the deleter object is shared between -instances). We should say which it is. -</p> -<p><b>Proposed resolution:</b></p> -<p> -Add after the first sentence of [lib.util.smartptr.getdeleter]/1: -</p> -<blockquote> -<p> -The returned pointer remains valid as long as there exists a <tt>shared_ptr</tt> instance -that owns <tt><i>d</i></tt>. -</p> -<p> -[<i>Note:</i> it is unspecified whether the pointer remains valid longer than that. -This can happen if the implementation doesn't destroy the deleter until all -<tt>weak_ptr</tt> instances in the ownership group are destroyed. <i>-- end note</i>] -</p> -</blockquote> -<hr> -<a name="546"><h3>546. _Longlong and _ULonglong are integer types</h3></a><p><b>Section:</b> TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 10 Jan 2006</p> +<h3><a name="546"></a>546. _Longlong and _ULonglong are integer types</h3> +<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#New">New</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> The TR sneaks in two new integer types, _Longlong and _Ulonglong, in [tr.c99]. -The rest of the TR should use that type. I believe this affects two places. +The rest of the TR should use that type. I believe this affects two places. First, the random number requirements, 5.1.1/10-11, lists all of the types with which template parameters named IntType and UIntType may be instantiated. _Longlong (or "long long", assuming it is added to C++0x) should be added to the IntType list, and UIntType (again, or "unsigned long long") should be added to -the UIntType list. Second, 6.3.2 lists the types for which hash<> is +the UIntType list. Second, 6.3.2 lists the types for which hash<> is required to be instantiable. _Longlong and _Ulonglong should be added to that list, so that people may use long long as a hash key. </p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + + + + <hr> -<a name="547"><h3>547. division should be floating-point, not integer</h3></a><p><b>Section:</b> TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 10 Jan 2006</p> -<p> -Paragraph 10 describes how a variate generator uses numbers produced by an -engine to pass to a generator. The sentence that concerns me is: "Otherwise, if -the value for engine_value_type::result_type is true and the value for -Distribution::input_type is false [i.e. if the engine produces integers and the -engine wants floating-point values], then the numbers in s_eng are divided by -engine().max() - engine().min() + 1 to obtain the numbers in s_e." Since the -engine is producing integers, both the numerator and the denominator are -integers and we'll be doing integer division, which I don't think is what we -want. Shouldn't we be performing a conversion to a floating-point type first? -</p> -<p><b>Proposed resolution:</b></p> -<p> -</p> -<hr> -<a name="548"><h3>548. May random_device block?</h3></a><p><b>Section:</b> TR1 5.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.device"> [tr.rand.device]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 10 Jan 2006</p> +<h3><a name="548"></a>548. May random_device block?</h3> +<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#Open">Open</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Class random_device "produces non-deterministic random numbers", using some external source of entropy. In most real-world systems, the amount of available @@ -5415,11 +5259,25 @@ Berlin: Walter: N1932 considers this NAD. Does the standard specify whether std: may block? ]</i></p> + + + <p><b>Proposed resolution:</b></p> <p> </p> + + + + + <hr> -<a name="550"><h3>550. What should the return type of pow(float,int) be?</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 12 Jan 2006</p> +<h3><a name="550"></a>550. What should the return type of pow(float,int) be?</h3> +<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#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-12</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> Assuming we adopt the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf">C @@ -5467,11 +5325,22 @@ Fortran, C and TR1 and make the return type of <tt>pow(float,int)</tt> be <tt>double</tt>. </p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + + + + <hr> -<a name="551"></a><h3><a name="551">551. <ccomplex></a></h3><p><b>Section:</b> TR1 8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.ccmplx"> [tr.c99.ccmplx]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 23 Jan 2006</p> +<h3><a name="551"></a>551. <ccomplex></h3> +<p><b>Section:</b> 26.3.11 [cmplxh], TR1 8.3 [tr.c99.cmplxh] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> <p> Previously xxx.h was parsable by C++. But in the case of C99's <complex.h> it isn't. Otherwise we could model it just like <string.h>, <cstring>, <string>: @@ -5503,6 +5372,8 @@ The ? can't refer to the C API. TR1 currently says: <li><complex.h> : C++ API in global namespace</li> </ul> + + <p><b>Proposed resolution:</b></p> <p> Change 26.3.11 [cmplxh]: @@ -5520,8 +5391,17 @@ note</i>]</ins> </p> </blockquote> + + + + + <hr> -<a name="552"><h3>552. random_shuffle and its generator</h3></a><p><b>Section:</b> 25.2.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.random.shuffle"> [lib.alg.random.shuffle]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 25 Jan 2006</p> +<h3><a name="552"></a>552. random_shuffle and its generator</h3> +<p><b>Section:</b> 25.2.12 [alg.random.shuffle] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-01-25</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> ...is specified to shuffle its range by calling swap but not how (or even that) it's supposed to use the RandomNumberGenerator @@ -5532,24 +5412,23 @@ Shouldn't we require that the generator object actually be used by the algorithm to obtain a series of random numbers and specify how many times its operator() should be invoked by the algorithm? </p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + + + + <hr> -<a name="553"><h3>553. very minor editorial change intptr_t / uintptr_t</h3></a><p><b>Section:</b> TR1 8.22.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.cstdint.syn"> [tr.c99.cstdint.syn]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 30 Jan 2006</p> -<p> -In the synopsis, some types are identified as optional: int8_t, int16_t, -and so on, consistently with C99, indeed. -</p> -<p> -On the other hand, intptr_t and uintptr_t, are not marked as such and -probably should, consistently with C99, 7.18.1.4. -</p> -<p><b>Proposed resolution:</b></p> -<p> -</p> -<hr> -<a name="556"><h3>556. is Compare a BinaryPredicate?</h3></a><p><b>Section:</b> 25.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.sorting"> [lib.alg.sorting]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Feb 2006</p> +<h3><a name="556"></a>556. is Compare a BinaryPredicate?</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> In 25, p8 we allow BinaryPredicates to return a type that's convertible to bool but need not actually be bool. That allows predicates to return @@ -5562,26 +5441,28 @@ convertible to bool). <p> Here's the text for reference: </p> -<blockquote> +<blockquote><p> ...if an algorithm takes BinaryPredicate binary_pred as its argument and first1 and first2 as its iterator arguments, it should work correctly in the construct if (binary_pred(*first1, first2)){...}. -</blockquote> +</p></blockquote> <p> In 25.3, p2 we require that the Compare function object return true of false, which would seem to preclude such proxies. The relevant text is here: </p> -<blockquote> +<blockquote><p> Compare is used as a function object which returns true if the first argument is less than the second, and false otherwise... -</blockquote> +</p></blockquote> + + <p><b>Proposed resolution:</b></p> <p> I think we could fix this by rewording 25.3, p2 to read somthing like: </p> -<blockquote> +<blockquote><p> -2- <tt>Compare</tt> is <del>used as a function object which returns <tt>true</tt> if the first argument</del> <ins>a <tt>BinaryPredicate</tt>. The return value of the function call operator applied to an object of type @@ -5590,9 +5471,25 @@ if the first argument of the call</ins> is less than the second, and <tt>false</tt> otherwise. <tt>Compare <i>comp</i></tt> is used throughout for algorithms assuming an ordering relation. It is assumed that <tt><i>comp</i></tt> will not apply any non-constant function through the dereferenced iterator. -</blockquote> +</p></blockquote> + + +<p><i>[ +Portland: Jack to define "convertible to bool" such that short circuiting isn't +destroyed. +]</i></p> + + + + + <hr> -<a name="557"><h3>557. TR1: div(_Longlong, _Longlong) vs div(intmax_t, intmax_t)</h3></a><p><b>Section:</b> TR1 8.11.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.cinttypes.syn"> [tr.c99.cinttypes.syn]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 6 Feb 2006</p> +<h3><a name="557"></a>557. TR1: div(_Longlong, _Longlong) vs div(intmax_t, intmax_t)</h3> +<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#Open">Open</a> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> I'm seeing a problem with such overloads: when, _Longlong == intmax_t == long long we end up, essentially, with the same arguments and different @@ -5610,205 +5507,63 @@ particular no mention in 8.11.2 (at variance with 8.25.2). <p> I'm wondering whether we really, really, want div and abs for intmax_t... </p> -<p><b>Proposed resolution:</b></p> -<p> -Change the <tt><cstdint></tt> synopsis in 8.11.1: -</p> -<blockquote><pre>... -intmax_t imaxabs(intmax_t i); -<del>intmax_t abs(intmax_t i);</del> - -imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); -<del>imaxdiv_t div(intmax_t numer, intmax_t denom);</del> -... -</pre></blockquote> - -<p><i>[ -Portland: no consensus. -]</i></p> -<hr> -<a name="559"><h3>559. numeric_limits<const T></h3></a><p><b>Section:</b> 18.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.limits"> [lib.support.limits]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 19 Feb 2006</p> - <p> - -18.2.1, p2 requires implementations to provide specializations of the -<code>numeric_limits</code> template for each scalar type. While this -could be interepreted to include cv-qualified forms of such types such -an interepretation is not reflected in the synopsis of the -<code><limits></code> header. - </p> - <p> -The absence of specializations of the template on cv-qualified forms -of fundamental types makes <code>numeric_limits</code> difficult to -use in generic code where the constness (or volatility) of a type is -not always immediately apparent. In such contexts, the primary -template ends up being instantiated instead of the provided -specialization, typically yielding unexpected behavior. - - </p> <p><b>Proposed resolution:</b></p> - <p> -Require that specializations of <code>numeric_limits</code> on -cv-qualified fundamental types have the same semantics as those on the -unqualifed forms of the same types. - </p> - <p> -Add to the synopsis of the <code><limits></code> header, -immediately below the declaration of the primary template, the -following: +<p><i>[ +Portland: no consensus. +]</i></p> -</p><pre> -template <class T> class numeric_limits<const T>; -template <class T> class numeric_limits<volatile T>; -template <class T> class numeric_limits<const volatile T>; -</pre> +<p><b>Rationale:</b></p> +<p><i>[ +Batavia, Bill: The <tt><cstdint></tt> synopsis in TR1 8.11.1 [tr.c99.cinttypes.syn] contains: +]</i></p> - <p></p> - <p> +<blockquote><pre>intmax_t imaxabs(intmax_t i); +intmax_t abs(intmax_t i); -Add a new paragraph to the end of 18.2.1.1, with the following -text: +imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); +imaxdiv_t div(intmax_t numer, intmax_t denom); +</pre></blockquote> - </p> - <p> +<p><i>[ +and in TR1 8.11.2 [tr.c99.cinttypes.def]: +]</i></p> --new-para- The value of each member of a <code>numeric_limits</code> -specialization on a cv-qualified T is equal to the value of the same -member of <code>numeric_limits<T></code>. - </p> +<blockquote><p> +The header defines all functions, types, and macros the same as C99 +subclause 7.8. +</p></blockquote> <p><i>[ -Portland: Martin will clarify that user-defined types get cv-specializations -automatically. +This is as much definition as we give for most other C99 functions, +so nothing need change. We might, however, choose to add the footnote: ]</i></p> -<hr> -<a name="560"><h3>560. User-defined allocators without default constructor</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Sergey P. Derevyago <b>Date:</b> 17 Feb 2006</p> -<h4>1. The essence of the problem.</h4> -<p> -User-defined allocators without default constructor are not explicitly -supported by the standard but they can be supported just like std::vector -supports elements without default constructor. -</p> -<p> -As a result, there exist implementations that work well with such allocators -and implementations that don't. -</p> -<h4>2. The cause of the problem.</h4> -<p> -1) The standard doesn't explicitly state this intent but it should. In -particular, 20.1.5p5 explicitly state the intent w.r.t. the allocator -instances that compare non-equal. So it can similarly state the intent w.r.t. -the user-defined allocators without default constructor. -</p> -<p> -2) Some container operations are obviously underspecified. In particular, -21.3.7.1p2 tells: -</p> -<blockquote> -<pre>template<class charT, class traits, class Allocator> - basic_string<charT,traits,Allocator> operator+( - const charT* lhs, - const basic_string<charT,traits,Allocator>& rhs - ); -</pre> -Returns: <tt>basic_string<charT,traits,Allocator>(lhs) + rhs</tt>. -</blockquote> -<p> -That leads to the basic_string<charT,traits,Allocator>(lhs, Allocator()) call. -Obviously, the right requirement is: -</p> -<blockquote> -Returns: <tt>basic_string<charT,traits,Allocator>(lhs, rhs.get_allocator()) + rhs</tt>. -</blockquote> -<p> -It seems like a lot of DRs can be submitted on this "Absent call to -get_allocator()" topic. -</p> +<blockquote><p> +[<i>Note:</i> These overloads for <tt>abs</tt> and <tt>div</tt> may well be equivalent to +those that take <tt>long long</tt> arguments. If so, the implementation is +responsible for avoiding conflicting declarations. -- <i>end note</i>] +</p></blockquote> + -<h4>3. Proposed actions.</h4> -<p> -1) Explicitly state the intent to allow for user-defined allocators without -default constructor in 20.1.5 Allocator requirements. -</p> -<p> -2) Correct all the places, where a correct allocator object is available -through the get_allocator() call but default Allocator() gets passed instead. -</p> -<h4>4. Code sample.</h4> -<p> -Let's suppose that the following memory pool is available: -</p> -<blockquote><pre>class mem_pool { - // ... - void* allocate(size_t size); - void deallocate(void* ptr, size_t size); -}; -</pre></blockquote> -<p> -So the following allocator can be implemented via this pool: -</p> -<blockquote><pre>class stl_allocator { - mem_pool& pool; - public: - explicit stl_allocator(mem_pool& mp) : pool(mp) {} - stl_allocator(const stl_allocator& sa) : pool(sa.pool) {} - template <class U> - stl_allocator(const stl_allocator<U>& sa) : pool(sa.get_pool()) {} - ~stl_allocator() {} - pointer allocate(size_type n, std::allocator<void>::const_pointer = 0) - { - return (n!=0) ? static_cast<pointer>(pool.allocate(n*sizeof(T))) : 0; - } - void deallocate(pointer p, size_type n) - { - if (n!=0) pool.deallocate(p, n*sizeof(T)); - } - // ... -}; -</pre></blockquote> -<p> -Then the following code works well on some implementations and doesn't work on -another: -</p> -<blockquote><pre>typedef basic_string<char, char_traits<char>, stl_allocator<char> > - tl_string; -mem_pool mp; -tl_string s1("abc", stl_allocator<int>(mp)); -printf("(%s)\n", ("def"+s1).c_str()); -</pre></blockquote> -<p> -In particular, on some implementations the code can't be compiled without -default stl_allocator() constructor. -</p> -<p> -The obvious way to solve the compile-time problems is to intentionally define -a NULL pointer dereferencing default constructor -</p> -<blockquote><pre>stl_allocator() : pool(*static_cast<mem_pool*>(0)) {} -</pre></blockquote> -<p> -in a hope that it will not be called. The problem is that it really gets -called by operator+(const char*, const string&) under the current 21.3.7.1p2 -wording. -</p> -<p><b>Proposed resolution:</b></p> -<p> -</p> <hr> -<a name="561"><h3>561. inserter overly generic</h3></a><p><b>Section:</b> 24.4.2.6.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.inserter"> [lib.inserter]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 21 Feb 2006</p> +<h3><a name="561"></a>561. inserter overly generic</h3> +<p><b>Section:</b> 24.4.2.6.5 [inserter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-02-21</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> The declaration of <tt>std::inserter</tt> is: </p> @@ -5911,13 +5666,16 @@ It seems unfortunate that such simple changes in the client's code can result in such radically differing behavior. </p> + + <p><b>Proposed resolution:</b></p> <p> Change 24.2: </p> -<blockquote> +<blockquote><p> <b>24.2 Header</b> <tt><iterator></tt> <b>synopsis</b> +</p> <blockquote><pre>... template <class Container<del>, class Iterator</del>> insert_iterator<Container> inserter(Container& x, <del>Iterator</del> <ins>typename Container::iterator</ins> i); @@ -5929,8 +5687,8 @@ template <class Container<del>, class Iterator</del>> Change 24.4.2.5: </p> -<blockquote> -<b>24.4.2.5 Class template</b> <tt>insert_iterator</tt> +<blockquote><p> +<b>24.4.2.5 Class template</b> <tt>insert_iterator</tt></p> <blockquote><pre>... template <class Container<del>, class Iterator</del>> insert_iterator<Container> inserter(Container& x, <del>Iterator</del> <ins>typename Container::iterator</ins> i); @@ -5949,13 +5707,23 @@ Change 24.4.2.6.5: <pre>template <class Container<del>, class Inserter</del>> insert_iterator<Container> inserter(Container& x, <del>Inserter</del> <ins>typename Container::iterator</ins> i); </pre> -<blockquote> +<blockquote><p> -1- <i>Returns:</i> <tt>insert_iterator<Container>(x,<del>typename Container::iterator(</del>i<del>)</del>)</tt>. +</p></blockquote> </blockquote> -</blockquote> + + + + + <hr> -<a name="562"><h3>562. stringbuf ctor inefficient</h3></a><p><b>Section:</b> 27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 23 Feb 2006</p> +<h3><a name="562"></a>562. stringbuf ctor inefficient</h3> +<p><b>Section:</b> 27.7 [string.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.streams">issues</a> in [string.streams].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> For better efficiency, the requirement on the stringbuf ctor that @@ -5968,6 +5736,8 @@ allowed to do (see issue 432). That way the first call to string overload of the <code>str()</code> member function. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -5975,8 +5745,7 @@ Change 27.7.1.1, p3 of the Working Draft, N1804, as follows: </p> -<blockquote> -<pre>explicit basic_stringbuf(const basic_string<charT,traits,Allocator>& <i>s<del>tr</del></i>, +<blockquote><pre>explicit basic_stringbuf(const basic_string<charT,traits,Allocator>& <i>s<del>tr</del></i>, ios_base::openmode <i>which</i> = ios_base::in | ios_base::out); </pre> @@ -6033,8 +5802,19 @@ s.size())</code> hold.</ins> </p> </blockquote> + + + + + <hr> -<a name="563"><h3>563. stringbuf seeking from end</h3></a><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 23 Feb 2006</p> +<h3><a name="563"></a>563. stringbuf seeking from end</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> According to Table 92 (unchanged by issue 432), when <code>(way == end)</code> the <code>newoff</code> value in out mode is computed as @@ -6061,6 +5841,8 @@ for <code>newoff</code>: <code>epptr() - pbase()</code> and <code>egptr() - eback()</code>. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6068,14 +5850,25 @@ Change the <code>newoff</code> column in the last row of Table 94 to read: </p> -<blockquote> +<blockquote><p> the <del>end</del> <ins>high mark</ins> pointer minus the beginning pointer (<code><del>xend</del> <ins>high_mark</ins> - xbeg</code>). -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="564"><h3>564. stringbuf seekpos underspecified</h3></a><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 23 Feb 2006</p> +<h3><a name="564"></a>564. stringbuf seekpos underspecified</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> The effects of the <code>seekpos()</code> member function of <code>basic_stringbuf</code> simply say that the function positions @@ -6083,6 +5876,8 @@ the input and/or output sequences but fail to spell out exactly how. This is in contrast to the detail in which <code>seekoff()</code> is described. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6106,8 +5901,17 @@ functions (<tt>seekoff</tt>, <tt>seekpos</tt>, <tt>tellg</tt>, <tt>tellp</tt>) the effect is undefined.</del></li> </ul> </blockquote> + + + + + <hr> -<a name="565"><h3>565. xsputn inefficient</h3></a><p><b>Section:</b> 27.5.2.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.put"> [lib.streambuf.virt.put]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 23 Feb 2006</p> +<h3><a name="565"></a>565. xsputn inefficient</h3> +<p><b>Section:</b> 27.5.2.4.5 [streambuf.virt.put] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> <tt>streambuf::xsputn()</tt> is specified to have the effect of @@ -6133,6 +5937,8 @@ to mention in <tt>xsputn()</tt> that the function is not actually required to cause a call to <tt>overflow()</tt>. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6159,8 +5965,19 @@ same text as Footnote 292 to make it extra clear that derived classes are permitted to override <tt>xsputn()</tt> for efficiency. </p> + + + + + <hr> -<a name="566"><h3>566. array forms of unformatted input function undefined for zero-element arrays</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 23 Feb 2006</p> +<h3><a name="566"></a>566. array forms of unformatted input function undefined for zero-element arrays</h3> +<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#Ready">Ready</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-23</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> <p> The array forms of unformatted input functions don't have well-defined @@ -6170,6 +5987,8 @@ terminate when <tt>(n - 1)</tt> characters are stored, which obviously can never be true when <tt>(n == 0)</tt> to start with. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6219,8 +6038,19 @@ location of the array. </p> </blockquote> + + + + + <hr> -<a name="567"><h3>567. streambuf inserter and extractor should be unformatted</h3></a><p><b>Section:</b> 27.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.format"> [lib.iostream.format]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 25 Feb 2006</p> +<h3><a name="567"></a>567. streambuf inserter and extractor should be unformatted</h3> +<p><b>Section:</b> 27.6 [iostream.format] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-25</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#iostream.format">active issues</a> in [iostream.format].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.format">issues</a> in [iostream.format].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> Issue 60 explicitly made the extractor and inserter operators that @@ -6231,6 +6061,8 @@ and discarding whitespace. The extractor should not discard any characters. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6245,41 +6077,65 @@ Specifically, change 27.6.1.2.3, p14 as follows: </p> + <blockquote> <p> - </p><blockquote> <i>Effects</i>: Behaves as a<ins>n un</ins>formatted input function (as described in <del>27.6.1.2.1</del><ins>27.6.1.3, paragraph 1</ins>). + </p> </blockquote> - <p></p> <p> And change 27.6.2.5.3, p7 as follows: </p> + <blockquote> <p> - </p><blockquote> <i>Effects</i>: Behaves as a<ins>n un</ins>formatted output function (as described in <del>27.6.2.5.1</del><ins>27.6.2.6, paragraph 1</ins>). + </p> </blockquote> - <p></p> + + + + + <hr> -<a name="568"><h3>568. log2 overloads missing</h3></a><p><b>Section:</b> TR1 8.16.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.cmath.over"> [tr.c99.cmath.over]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 7 Mar 2006</p> +<h3><a name="568"></a>568. log2 overloads missing</h3> +<p><b>Section:</b> TR1 8.16.4 [tr.c99.cmath.over] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-03-07</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +<tt>log2</tt> is missing from the list of "additional overloads" in TR1 8.16.4 [tr.c99.cmath.over] p1. +</p> + <p> -<tt>log2</tt> is missing from the list of "additional overloads" in 8.16.4p1. +Hinnant: This is a TR1 issue only. It is fixed in the current (N2135) WD. </p> + + <p><b>Proposed resolution:</b></p> <p> -Add <tt>log2</tt> to the list of functions in 8.16.4p1. +Add <tt>log2</tt> to the list of functions in TR1 8.16.4 [tr.c99.cmath.over] p1. </p> + + + + + <hr> -<a name="570"><h3>570. Request adding additional explicit specializations of char_traits</h3></a><p><b>Section:</b> 21.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits"> [lib.char.traits]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Jack Reeves <b>Date:</b> 6 Apr 2006</p> +<h3><a name="570"></a>570. Request adding additional explicit specializations of char_traits</h3> +<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#Open">Open</a> + <b>Submitter:</b> Jack Reeves <b>Date:</b> 2006-04-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> Currently, the Standard Library specifies only a declaration for template class char_traits<> and requires the implementation provide two explicit @@ -6288,50 +6144,32 @@ should require explicit specializations for all built-in character types, i.e. char, wchar_t, unsigned char, and signed char. </p> <p> -I have put together a paper (N1985) that describes this in more detail and +I have put together a paper +(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1985.htm">N1985</a>) +that describes this in more detail and includes all the necessary wording. </p> -<p><b>Proposed resolution:</b></p> -<p> -</p> -<hr> -<a name="571"><h3>571. Update C90 references to C99?</h3></a><p><b>Section:</b> 1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.refs"> [intro.refs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 8 Apr 2006</p> -<p> -1.2 Normative references [intro.refs] of the WP currently refers to ISO/IEC -9899:1990, Programming languages - C. Should that be changed to ISO/IEC -9899:1999? -</p> -<p> -What impact does this have on the library? -</p> -<p><b>Proposed resolution:</b></p> -<p> -In 1.2/1 [intro.refs] of the WP, change: -</p> -<blockquote> -<ul> -<li>ISO/IEC 9899:<del>1990</del><ins>1999 + TC1 + TC2</ins>, <i>Programming languages - C</i> -</li> -</ul> -</blockquote> - -<hr> -<a name="572"><h3>572. Oops, we gave 507 WP status</h3></a><p><b>Section:</b> TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 11 Apr 2006</p> -<p> -In Berlin, as a working group, we voted in favor of N1932 which makes issue 507 moot: -variate_generator has been eliminated. Then in full committee we voted to give -this issue WP status (mistakenly). -</p> -<p><b>Proposed resolution:</b></p> -<p> -Strike the proposed resolution of issue 507. -</p> <p><i>[ -post-Portland: Howard recommends NAD. The proposed resolution of 507 no longer -exists in the current WD. +Portland: Jack will rewrite +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1985.htm">N1985</a> +to propose a primary template that will work with other integral types. ]</i></p> + + + +<p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="573"><h3>573. C++0x file positioning should handle modern file sizes</h3></a><p><b>Section:</b> 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 12 Apr 2006</p> +<h3><a name="573"></a>573. C++0x file positioning should handle modern file sizes</h3> +<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#New">New</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-04-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> There are two deficiencies related to file sizes: </p> @@ -6363,11 +6201,23 @@ sufficient. But they seem a useful starting place for discussions, and they do represent existing practice. </p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + + + + <hr> -<a name="574"><h3>574. DR 369 Contradicts Text</h3></a><p><b>Section:</b> 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Pete Becker <b>Date:</b> 18 Apr 2006</p> +<h3><a name="574"></a>574. DR 369 Contradicts Text</h3> +<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Pete Becker <b>Date:</b> 2006-04-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> lib.iostream.objects requires that the standard stream objects are never destroyed, and it requires that they be destroyed. @@ -6379,119 +6229,22 @@ stream objects shall be destroyed after the destruction of dynamically ...". However, the rule for destruction is stated in the standard: "The objects are not destroyed during program execution." </p> -<p><b>Proposed resolution:</b></p> -<p> -</p> -<hr> -<a name="575"><h3>575. the specification of ~shared_ptr is MT-unfriendly, makes implementation assumptions</h3></a><p><b>Section:</b> 20.6.6.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.util.smartptr.shared.dest"> [lib.util.smartptr.shared.dest]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Peter Dimov <b>Date:</b> 23 Apr 2006</p> -<p> -[tr.util.smartptr.shared.dest] says in its second bullet: -</p> - -<p> -"If *this shares ownership with another shared_ptr instance (use_count() > 1), -decrements that instance's use count." -</p> - -<p> -The problem with this formulation is that it presupposes the existence of an -"use count" variable that can be decremented and that is part of the state of a -shared_ptr instance (because of the "that instance's use count".) -</p> - -<p> -This is contrary to the spirit of the rest of the specification that carefully -avoids to require an use count variable. Instead, use_count() is specified to -return a value, a number of instances. -</p> - -<p> -In multithreaded code, the usual implicit assumption is that a shared variable -should not be accessed by more than one thread without explicit synchronization, -and by introducing the concept of an "use count" variable, the current wording -implies that two shared_ptr instances that share ownership cannot be destroyed -simultaneously. -</p> -<p> -In addition, if we allow the interpretation that an use count variable is part -of shared_ptr's state, this would lead to other undesirable consequences WRT -multiple threads. For example, -</p> -<blockquote><pre>p1 = p2; -</pre></blockquote> - -<p> -would now visibly modify the state of p2, a "write" operation, requiring a lock. -</p> <p><b>Proposed resolution:</b></p> <p> -Change the first two bullets of [lib.util.smartptr.shared.dest]/1 to: -</p> - -<blockquote><p> -</p><ul> -<li>If <tt>*this</tt> is <i>empty</i> <ins>or shares ownership with another -<tt>shared_ptr</tt> instance (<tt>use_count() > 1</tt>)</ins>, there are no side effects.</li> -<li><del>If <tt>*this</tt> <i>shares ownership</i> with another <tt>shared_ptr</tt> instance -(<tt>use_count() > 1</tt>), decrements that instance's use count.</del></li> -</ul> -<p></p></blockquote> - -<p> -Add the following paragraph after [lib.util.smartptr.shared.dest]/1: </p> -<blockquote><p> -[<i>Note:</i> since the destruction of <tt>*this</tt> decreases the number of instances in -<tt>*this</tt>'s ownership group by one, all <tt>shared_ptr</tt> instances that share ownership -with <tt>*this</tt> will report an <tt>use_count()</tt> that is one lower than its previous value -after <tt>*this</tt> is destroyed. <i>--end note</i>] -</p></blockquote> -<hr> -<a name="576"><h3>576. find_first_of is overconstrained</h3></a><p><b>Section:</b> 25.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find.first.of"> [lib.alg.find.first.of]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Doug Gregor <b>Date:</b> 25 Apr 2006</p> -<p> -In 25.1.4 Find First [lib.alg.find.first], the two iterator type parameters to -find_first_of are specified to require Forward Iterators, as follows: -</p> -<blockquote><pre>template<class ForwardIterator1, class ForwardIterator2> - ForwardIterator1 - find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2); -template<class ForwardIterator1, class ForwardIterator2, - class BinaryPredicate> -ForwardIterator1 - find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); -</pre></blockquote> -<p> -However, ForwardIterator1 need not actually be a Forward Iterator; an Input -Iterator suffices, because we do not need the multi-pass property of the Forward -Iterator or a true reference. -</p> -<p><b>Proposed resolution:</b></p> -<p> -Change the declarations of <tt>find_first_of</tt> to: -</p> -<blockquote><pre>template<class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2> - <del>ForwardIterator1</del><ins>InputIterator1</ins> - find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1, - ForwardIterator2 first2, ForwardIterator2 last2); -template<class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2, - class BinaryPredicate> -<del>ForwardIterator1</del><ins>InputIterator1</ins> - find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred); -</pre></blockquote> <hr> -<a name="577"><h3>577. upper_bound(first, last, ...) cannot return last</h3></a><p><b>Section:</b> 25.3.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.upper.bound"> [lib.upper.bound]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 3 May 2006</p> +<h3><a name="577"></a>577. upper_bound(first, last, ...) cannot return last</h3> +<p><b>Section:</b> 25.3.3.2 [upper.bound] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 2006-05-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> ISO/IEC 14882:2003 says: </p> @@ -6515,6 +6268,8 @@ value is greater than or equal to any other values in the range, or if the range is empty, returning last seems to be the intended behaviour. The corresponding interval for lower_bound is also [first, last]. </p> + + <p><b>Proposed resolution:</b></p> <p> Change [lib.upper.bound]: @@ -6529,58 +6284,26 @@ conditions hold: <tt>!(value < *j)</tt> or <tt><i>comp</i>(<i>value</i>, *j) </p> </blockquote> -<hr> -<a name="578"><h3>578. purpose of hint to allocator::allocate()</h3></a><p><b>Section:</b> 20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 17 May 2006</p> - <p> - -The description of the allocator member function -<code>allocate()</code> requires that the <i>hint</i> argument be -either 0 or a value previously returned from <code>allocate()</code>. -Footnote 227 further suggests that containers may pass the address of -an adjacent element as this argument. - - </p> - <p> - -I believe that either the footnote is wrong or the normative -requirement that the argument be a value previously returned from a -call to <code>allocate()</code> is wrong. The latter is supported by -the resolution to issue 20-004 proposed in c++std-lib-3736 by Nathan -Myers. In addition, the <i>hint</i> is an ordinary void* and not the -<code>pointer</code> type returned by <code>allocate()</code>, with -the two types potentially being incompatible and the requirement -impossible to satisfy. - - </p> - <p> -See also c++std-lib-14323 for some more context on where this came up -(again). - </p> - <p><b>Proposed resolution:</b></p> - <p> -Remove the requirement in 20.6.1.1, p4 that the hint be a value -previously returned from <code>allocate()</code>. Specifically, change -the paragraph as follows: - </p> - <p> -<i>Requires</i>: <i>hint</i> <ins>is </ins>either 0 or <del>previously -obtained from member <code>allocate</code> and not yet passed to -member <code>deallocate</code></del><ins> the address of a byte in -memory (1.7)</ins>. - - </p> - <hr> -<a name="579"><h3>579. erase(iterator) for unordered containers should not return an iterator</h3></a><p><b>Section:</b> 23.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.unord.req"> [lib.unord.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 13 Jun 2006</p> +<hr> +<h3><a name="579"></a>579. erase(iterator) for unordered containers should not return an iterator</h3> +<p><b>Section:</b> 23.1.3 [unord.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2006-06-13</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2023.pdf">N2023</a> for full discussion. </p> + + <p><b>Proposed resolution:</b></p> <p> Option 1: @@ -6621,8 +6344,20 @@ have some collateral effects when the expression <tt>a.erase(q)</tt> is used ins code. </p> + + + + + <hr> -<a name="580"><h3>580. unused allocator members</h3></a><p><b>Section:</b> 20.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.requirements"> [lib.allocator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 14 June 2006</p> +<h3><a name="580"></a>580. unused allocator members</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-14</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#479">479</a></p> +<p><b>Discussion:</b></p> <p> C++ Standard Library templates that take an allocator as an argument @@ -6635,7 +6370,6 @@ allocator members such as <code>construct()</code>, useful in portable programs. </p> - <p><b>Proposed resolution:</b></p> <p> It's unclear to me whether the absence of the requirement to use these @@ -6653,8 +6387,126 @@ I propose that all containers be required to make use of these functions. </p> - <hr> -<a name="581"><h3>581. <code>flush()</code> not unformatted function</h3></a><p><b>Section:</b> 27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 14 June 2006</p> +<p><i>[ +Batavia: We support this resolution. Martin to provide wording. +]</i></p> + +<p><i>[ +pre-Oxford: Martin provided wording. +]</i></p> + + + + <p><b>Proposed resolution:</b></p> + <p> + +Specifically, I propose to change 23.1 [container.requirements], +p9 as follows: + + </p> + <blockquote> +<p> +-9- Copy constructors for all container types defined in this clause +<ins>that are parametrized on <code>Allocator</code></ins> copy +<del>an</del><ins>the</ins> allocator argument from their respective +first parameters. + +All other constructors for these container types take a<del>n</del> +<ins>const</ins> <code>Allocator&</code> argument (20.1.6), an +allocator whose <code>value_type</code> is the same as the container's +<code>value_type</code>. + +A copy of this argument <del>is</del><ins>shall be</ins> used for any +memory allocation <ins> and deallocation</ins> performed<del>,</del> +by these constructors and by all member functions<del>,</del> during +the lifetime of each container object. <ins>Allocation shall be +performed "as if" by calling the <code>allocate()</code> member +function on a copy of the allocator object of the appropriate type +<sup>New Footnote)</sup>, and deallocation "as if" by calling +<code>deallocate()</code> on a copy of the same allocator object of +the corresponding type.</ins> + +<ins>A copy of this argument shall also be used to construct and +destroy objects whose lifetime is managed by the container, including +but not limited to those of the container's <code>value_type</code>, +and to obtain their address. All objects residing in storage +allocated by a container's allocator shall be constructed "as if" by +calling the <code>construct()</code> member function on a copy of the +allocator object of the appropriate type. The same objects shall be +destroyed "as if" by calling <code>destroy()</code> on a copy of the +same allocator object of the same type. The address of such objects +shall be obtained "as if" by calling the <code>address()</code> member +function on a copy of the allocator object of the appropriate +type.</ins> + +<ins>Finally, a copy of this argument shall be used by its container +object to determine the maximum number of objects of the container's +<code>value_type</code> the container may store at the same time. The +container member function <code>max_size()</code> +obtains this number +from the + value + returned by + a call + to +<code>get_allocator().max_size()</code>.</ins> + +In all container types defined in this clause <ins>that are +parametrized on <code>Allocator</code></ins>, the member +<code>get_allocator()</code> returns + a copy + of the +<code>Allocator</code> object + used to + construct the +container.<sup>258)</sup> +</p> +<p> +New Footnote: This type may be different from <code>Allocator</code>: +it may be + derived from + <code>Allocator</code> via +<code>Allocator::rebind<U>::other</code> for the appropriate +type <code>U</code>. +</p> + </blockquote> + <p> +The proposed wording seems cumbersome but I couldn't think of a better +way to describe the + requirement that containers use + their +<code>Allocator</code> to manage only objects (regardless of their +type) that persist over their lifetimes and not, for example, +temporaries created on the stack. That is, containers shouldn't be +required to call <code>Allocator::construct(Allocator::allocate(1), +elem)</code> just to construct a temporary copy of an element, or +<code>Allocator::destroy(Allocator::address(temp), 1)</code> to +destroy temporaries. + + </p> + + +<p><i>[ +Howard: This same paragraph will need some work to accommodate <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431">431</a>. +]</i></p> + + +<p><i>[ +post Oxford: This would be rendered NAD Editorial by acceptance of +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>. +]</i></p> + + + + + +<hr> +<h3><a name="581"></a>581. <code>flush()</code> not unformatted function</h3> +<p><b>Section:</b> 27.6.2.7 [ostream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-14</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.unformatted">issues</a> in [ostream.unformatted].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> The resolution of issue 60 changed <code>basic_ostream::flush()</code> @@ -6678,6 +6530,8 @@ events. That doesn't seem right either, as most other stream functions do so. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6687,6 +6541,7 @@ as follows: </p> +<p> Effects: <ins>Behaves as an unformatted output function (as described in 27.6.2.6, paragraph 1). </ins>If <code>rdbuf()</code> is not a null pointer, <ins>constructs a sentry object. If this object returns @@ -6697,28 +6552,45 @@ pointer, <ins>constructs a sentry object. If this object returns sentry object returns <code>false</code>, does nothing.</ins><del>Does not behave as an unformatted output function (as described in 27.6.2.6, paragraph 1).</del> +</p> - <hr> -<a name="582"><h3>582. specialized algorithms and volatile storage</h3></a><p><b>Section:</b> 20.6.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.uninitialized.copy"> [lib.uninitialized.copy]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 14 June 2006</p> + + + + +<hr> +<h3><a name="582"></a>582. specialized algorithms and volatile storage</h3> +<p><b>Section:</b> 20.6.4.1 [uninitialized.copy] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-14</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> The specialized algorithms [lib.specialized.algorithms] are specified as having the general effect of invoking the following expression: </p> - <p> - </p><pre> + <pre> new (static_cast<void*>(&*i)) typename iterator_traits<ForwardIterator>::value_type (x) </pre> - <p></p> <p> This expression is ill-formed when the type of the subexpression <code>&*i</code> is some volatile-qualified <code>T</code>. </p> + +<p><i>[ +Batavia: Lack of support for proposed resolution but agree there is a +defect. Howard to look at wording. Concern that move semantics +properly expressed if iterator returns rvalue. +]</i></p> + + + + <p><b>Proposed resolution:</b></p> <p> @@ -6728,8 +6600,7 @@ pointers to volatile types. Specifically, I propose the following changes to clauses 20 and 24. Change 20.6.4.1, p1 to read: </p> - <p> - </p><pre> + <pre> <i>Effects</i>: typedef typename iterator_traits<ForwardIterator>::pointer pointer; @@ -6740,14 +6611,12 @@ for (; first != last; ++result, ++first) value_type (*first); </pre> - <p></p> <p> change 20.6.4.2, p1 to read </p> - <p> - </p><pre> + <pre> <i>Effects</i>: typedef typename iterator_traits<ForwardIterator>::pointer pointer; @@ -6758,14 +6627,12 @@ for (; first != last; ++result, ++first) value_type (*x); </pre> - <p></p> <p> and change 20.6.4.3, p1 to read </p> - <p> - </p><pre> + <pre> <i>Effects</i>: typedef typename iterator_traits<ForwardIterator>::pointer pointer; @@ -6776,7 +6643,6 @@ for (; n--; ++first) value_type (*x); </pre> - <p></p> <p> In addition, since there is no partial specialization for @@ -6790,8 +6656,7 @@ propose to add the following text to the end of 24.3.1, p3: and for pointers to volatile as </p> - <p> - </p><pre> + <pre> namespace std { template<class T> struct iterator_traits<volatile T*> { typedef ptrdiff_t difference_type; @@ -6803,7 +6668,6 @@ typedef random_access_iterator_tag iterator_category; } </pre> - <p></p> <p> Note that the change to <code>iterator_traits</code> isn't necessary @@ -6814,8 +6678,18 @@ is done here. Implementations can (and some do) achieve the same effect by means of function template overloading. </p> - <hr> -<a name="583"><h3>583. div() for unsigned integral types</h3></a><p><b>Section:</b> 26.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.c.math"> [lib.c.math]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 15 Jun 2006</p> + + + + +<hr> +<h3><a name="583"></a>583. div() for unsigned integral types</h3> +<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#New">New</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> There is no div() function for unsigned integer types. </p> @@ -6823,6 +6697,8 @@ There is no div() function for unsigned integer types. There are several possible resolutions. The simplest one is noted below. Other possibilities include a templated solution. </p> + + <p><b>Proposed resolution:</b></p> <p> Add to 26.7 [lib.c.math] paragraph 8: @@ -6833,11 +6709,24 @@ struct uldiv_t div(unsigned long, unsigned long); struct ulldiv_t div(unsigned long long, unsigned long long); </pre></blockquote> + + + + + <hr> -<a name="584"><h3>584. missing int pow(int,int) functionality</h3></a><p><b>Section:</b> 26.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.c.math"> [lib.c.math]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 15 Jun 2006</p> +<h3><a name="584"></a>584. missing int pow(int,int) functionality</h3> +<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#New">New</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-06-15</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> There is no pow() function for any integral type. </p> + + <p><b>Proposed resolution:</b></p> <p> Add something like: @@ -6847,8 +6736,19 @@ Add something like: T power( T x, int n ); // requires: n >=0 </pre></blockquote> + + + + + <hr> -<a name="585"><h3>585. facet error reporting</h3></a><p><b>Section:</b> 22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor, Paolo Carlini <b>Date:</b> 22 June 2006</p> +<h3><a name="585"></a>585. facet error reporting</h3> +<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#New">New</a> + <b>Submitter:</b> Martin Sebor, Paolo Carlini <b>Date:</b> 2006-06-22</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> Section 22.2, paragraph 2 requires facet <code>get()</code> members @@ -6901,6 +6801,8 @@ value by ORing it with either <code>ios_base::failbit</code> or with<code>ios_base::eofbit | ios_base::failbit</code>. </p> + + <p><b>Proposed resolution:</b></p> <p> @@ -6908,8 +6810,7 @@ We believe the intent is for all facet member functions that take an <code>ios_base::iostate&</code> argument to: </p> - <p> - </p><ul> + <ul> <li> ignore the initial value of the <code><i>err</i></code> argument, @@ -6930,7 +6831,6 @@ error, or both. </li> </ul> - <p></p> <p> To that effect we propose to change 22.2, p2 as follows: @@ -6952,96 +6852,18 @@ ios_base::failbit</code> in response to reaching the end-of-file or in case of a parse error, or both, respectively.</ins> </p> - <hr> -<a name="586"><h3>586. string inserter not a formatted function</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 22 June 2006</p> - <p> - -Section and paragraph numbers in this paper are relative to the -working draft document number N2009 from 4/21/2006. - - </p> - - <p> - -The <code>basic_string</code> extractor in 21.3.7.9, p1 is clearly -required to behave as a formatted input function, as is the -<code>std::getline()</code> overload for string described in p7. - - </p> - <p> - -However, the <code>basic_string</code> inserter described in p5 of the -same section has no such requirement. This has implications on how the -operator responds to exceptions thrown from <code>xsputn()</code> -(formatted output functions are required to set <code>badbit</code> -and swallow the exception unless <code>badbit</code> is also set in -<code>exceptions()</code>; the string inserter doesn't have any such -requirement). - - </p> - <p> - -I don't see anything in the spec for the string inserter that would -justify requiring it to treat exceptions differently from all other -similar operators. (If it did, I think it should be made this explicit -by saying that the operator "does not behave as a formatted output -function" as has been made customary by the adoption of the resolution -of issue 60). - - </p> - <p><b>Proposed resolution:</b></p> - <p> - -I propose to change the Effects clause in 21.3.7.9, p5, as follows: - - </p> - <p> - </p><blockquote> - -<i>Effects</i>: <del>Begins by constructing a sentry object k as if k -were constructed by typename <code>basic_ostream<charT, -traits>::sentry k (os)</code>. If <code>bool(k)</code> is -<code>true</code>, </del><ins>Behaves as a formatted output function -(27.6.2.5.1). After constructing a <code>sentry</code> object, if -this object returns <code>true</code> when converted to a value of -type <code>bool</code>, determines padding as described in -22.2.2.2.2</ins>, then inserts the resulting sequence of characters -<code><i>seq</i></code> as if by calling <code>os.rdbuf()->sputn(seq , -n)</code>, where <code><i>n</i></code> is the larger of -<code>os.width()</code> and <code>str.size()</code>; then calls -<code>os.width(0)</code>. <del>If the call to sputn fails, calls -<code>os.setstate(ios_base::failbit)</code>.</del> - - </blockquote> - <p></p> - <p> + -This proposed resilution assumes the resolution of issue 394 (i.e., -that all formatted output functions are required to set -<code>ios_base::badbit</code> in response to any kind of streambuf -failure), and implicitly assumes that a return value of -<code>sputn(seq, <i>n</i>)</code> other than <code><i>n</i></code> -indicates a failure. - </p> - <hr> -<a name="587"><h3>587. iststream ctor missing description</h3></a><p><b>Section:</b> D.7.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.istrstream.cons"> [depr.istrstream.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 22 June 2006</p> - <p> -The <code>iststream(char*, streamsize)</code> ctor is in the class -synopsis in D.7.2 but its signature is missing in the description -below (in D.7.2.1). - - </p> - <p><b>Proposed resolution:</b></p> - <p> - -This seems like a simple editorial issue and the missing signature can -be added to the one for <code>const char*</code> in paragraph 2. - - </p> - <hr> -<a name="588"><h3>588. requirements on zero sized tr1::arrays and other details</h3></a><p><b>Section:</b> 23.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array"> [lib.array]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Gennaro Prota <b>Date:</b> 18 Jul 2006</p> +<hr> +<h3><a name="588"></a>588. requirements on zero sized tr1::arrays and other details</h3> +<p><b>Section:</b> 23.2.1 [array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Gennaro Prota <b>Date:</b> 2006-07-18</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> The wording used for section 23.2.1 [lib.array] seems to be subtly ambiguous about zero sized arrays (N==0). Specifically: @@ -7169,127 +6991,23 @@ through constructors, destructors, *insert and erase* operations" it relies on table 80: "size() of the largest possible container" which, again, doesn't seem to consider fixed size containers </p> -<p><b>Proposed resolution:</b></p> -<p> -</p> -<hr> -<a name="589"><h3>589. Requirements on iterators of member template functions of containers</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Peter Dimov <b>Date:</b> 2 Aug 2006</p> -<p> -There appears to be no requirements on the InputIterators used in sequences in 23.1.1 in -terms of their value_type, and the requirements in 23.1.2 appear to be overly strict -(requires InputIterator::value_type be the same type as the container's value_type). -</p> -<p><b>Proposed resolution:</b></p> -<p> -Change 23.1.1 p3: -</p> -<blockquote> -In Tables 82 and 83, <tt>X</tt> denotes a sequence class, <tt>a</tt> denotes a -value of <tt>X</tt>, <tt>i</tt> and <tt>j</tt> denote iterators satisfying input -iterator requirements <ins>and refer to elements <ins>implicitly -convertible to</ins> <tt>value_type</tt></ins>, <tt>[i, j)</tt> denotes a valid -range, <tt>n</tt> denotes a value of <tt>X::size_type</tt>, <tt>p</tt> denotes a -valid iterator to <tt>a</tt>, <tt>q</tt> denotes a valid dereferenceable -iterator to <tt>a</tt>, <tt>[q1, q2)</tt> denotes a valid range in <tt>a</tt>, -and <tt>t</tt> denotes a value of <tt>X::value_type</tt>. -</blockquote> - -<p> -Change 23.1.2 p7: -</p> - -<blockquote> -In Table 84, <tt>X</tt> is an associative container class, <tt>a</tt> is a value -of <tt>X</tt>, <tt>a_uniq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports -unique keys, and <tt>a_eq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports -multiple keys, <tt>i</tt> and <tt>j</tt> satisfy input iterator requirements and -refer to elements <del>of</del> <ins>implicitly convertible to</ins> -<tt>value_type</tt>, <tt>[i, j)</tt> is a valid range, <tt>p</tt> is a valid -iterator to <tt>a</tt>, <tt>q</tt> is a valid dereferenceable iterator to -<tt>a</tt>, <tt>[q1, q2)</tt> is a valid range in <tt>a</tt>, <tt>t</tt> is a -value of <tt>X::value_type</tt>, <tt>k</tt> is a value of <tt>X::key_type</tt> -and <tt>c</tt> is a value of type <tt>X::key_compare</tt>. -</blockquote> - -<hr> -<a name="590"><h3>590. Type traits implementation latitude should be removed for C++0x</h3></a><p><b>Section:</b> <font color="red">20.4.9</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 10 Aug 2006</p> -<p> -20.4.9 [lib.meta.req], Implementation requirements, provides latitude for type -traits implementers that is not needed in C++0x. It includes the wording: -</p> - -<blockquote> -[<i>Note:</i> the latitude granted to implementers in this clause is temporary, -and is expected to be removed in future revisions of this document. -- <i>end note</i>] -</blockquote> - -<p> -Note: -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2028.html">N2028: -Minor Modifications to the type traits Wording</a> -also has the intent of removing this wording from the WP. -</p> <p><b>Proposed resolution:</b></p> <p> -Remove 20.4.9 [lib.meta.req] in its entirety from the WP. </p> -<hr> -<a name="591"><h3>591. Misleading "built-in</h3></a><p><b>Section:</b> 18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> whyglinux <b>Date:</b> 8 Aug 2006</p> -<p> -18.2.1.2 numeric_limits members [lib.numeric.limits.members] -Paragraph 7: -</p> -<blockquote> -"For built-in integer types, the number of non-sign bits in the -representation." -</blockquote> -<p> -26.1 Numeric type requirements [lib.numeric.requirements] -Footnote: -</p> -<blockquote> -"In other words, value types. These include built-in arithmetic types, -pointers, the library class complex, and instantiations of valarray for -value types." -</blockquote> -<p> -Integer types (which are bool, char, wchar_t, and the signed and -unsigned integer types) and arithmetic types (which are integer and -floating types) are all built-in types and thus there are no -non-built-in (that is, user-defined) integer or arithmetic types. Since -the redundant "built-in" in the above 2 sentences can mislead that -there may be built-in or user-defined integer and arithmetic types -(which is not correct), the "built-in" should be removed. -</p> -<p><b>Proposed resolution:</b></p> -<p> -</p><p> -18.2.1.2 numeric_limits members [lib.numeric.limits.members] -Paragraph 7: -</p> -<blockquote> -"For <del>built-in</del> integer types, the number of non-sign bits in the -representation." -</blockquote> -<p> -26.1 Numeric type requirements [lib.numeric.requirements] -Footnote: -</p> -<blockquote> -"In other words, value types. These include <del>built-in</del> arithmetic types, -pointers, the library class complex, and instantiations of valarray for -value types." -</blockquote> -<p></p> <hr> -<a name="592"><h3>592. Incorrect treatment of rdbuf()->close() return type</h3></a><p><b>Section:</b> 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Christopher Kohlhoff <b>Date:</b> 17 Aug 2006</p> +<h3><a name="592"></a>592. Incorrect treatment of rdbuf()->close() return type</h3> +<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#New">New</a> + <b>Submitter:</b> Christopher Kohlhoff <b>Date:</b> 2006-08-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> I just spotted a minor problem in 27.8.1.7 [lib.ifstream.members] para 4 and also 27.8.1.13 @@ -7308,183 +7026,44 @@ filebuf on success, null on failure, so I think it is meant to say "if that function returns a null pointer". Oddly, it is correct for basic_ofstream. </p> + + <p><b>Proposed resolution:</b></p> <p> Change 27.8.1.7 [lib.ifstream.members], p5: </p> -<blockquote> +<blockquote><p> <i>Effects:</i> Calls <tt>rdbuf()->close()</tt> and, if that function <ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>, calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt> (27.4.4.3)). -</blockquote> +</p></blockquote> <p> Change 27.8.1.13 [lib.fstream.members], p5: </p> -<blockquote> +<blockquote><p> <i>Effects:</i> Calls <tt>rdbuf()->close()</tt> and, if that function <ins>fails (</ins>returns <del><tt>false</tt></del> <ins>a null pointer)</ins>, calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt> (27.4.4.3)). -</blockquote> +</p></blockquote> + + -<hr> -<a name="593"><h3>593. __STDC_CONSTANT_MACROS</h3></a><p><b>Section:</b> 18.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.cstdint"> [lib.cstdint]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 28 Aug 2006</p> -<p> -Clause 18.3 of the current Working Paper (N2009) deals with the new C++ headers -<cstdint> and <stdint.h>. These are of course based on the C99 header -<stdint.h>, and were part of TR1. -</p> -<p> -Per 18.3.1/1, these headers define a number of macros and function macros. -While the WP does not mention __STDC_CONSTANT_MACROS in this context, C99 -footnotes do mention __STDC_CONSTANT_MACROS. Further, 18.3.1/2 states that "The -header defines all ... macros the same as C99 subclause 7.18." -</p> -<p> -Therefore, if I wish to have the above-referenced macros and function macros -defined, must I #define __STDC_CONSTANT_MACROS before I #include <cstdint>, or -does the C++ header define these macros/function macros unconditionally? -</p> -<p><b>Proposed resolution:</b></p> -<p> -To put this issue to rest for C++0X, I propose the following addition to -18.3.1/2 of the Working Paper N2009: -</p> -<blockquote> -[Note: The macros defined by <cstdint> are provided unconditionally: in -particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS -(mentioned in C99 footnotes 219, 220, and 222) play no role in C++. --end note] -</blockquote> -<hr> -<a name="594"><h3>594. Disadvantages of defining Swappable in terms of -CopyConstructible and Assignable</h3></a><p><b>Section:</b> 20.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.swappable"> [lib.swappable]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Niels Dekker <b>Date:</b> 2 Nov 2006</p> -<p> -It seems undesirable to define the Swappable requirement in terms of -CopyConstructible and Assignable requirements. And likewise, once the -MoveConstructible and MoveAssignable requirements (N1860) have made it -into the Working Draft, it seems undesirable to define the Swappable -requirement in terms of those requirements. Instead, it appears -preferable to have the Swappable requirement defined exclusively in -terms of the existence of an appropriate swap function. -</p> -<p> -Section 20.1.4 [lib.swappable] of the current Working Draft (N2009) -says: -</p><blockquote> -The Swappable requirement is met by satisfying one or more of the -following conditions: -<ul> -<li> -T is Swappable if T satisfies the CopyConstructible requirements -(20.1.3) and the Assignable requirements (23.1); -</li> -<li> -T is Swappable if a namespace scope function named swap exists in the -same namespace as the definition of T, such that the expression -swap(t,u) is valid and has the semantics described in Table 33. -</li> -</ul> -</blockquote> -I can think of three disadvantages of this definition: -<ol> -<li> -If a client's type T satisfies the first condition (T is both -CopyConstructible and Assignable), the client cannot stop T from -satisfying the Swappable requirement without stopping T from -satisfying the first condition. -<p> -A client might want to stop T from satisfying the Swappable -requirement, because swapping by means of copy construction and -assignment might throw an exception, and she might find a throwing -swap unacceptable for her type. On the other hand, she might not feel -the need to fully implement her own swap function for this type. In -this case she would want to be able to simply prevent algorithms that -would swap objects of type T from being used, e.g., by declaring a -swap function for T, and leaving this function purposely undefined. -This would trigger a link error, if an attempt would be made to use -such an algorithm for this type. For most standard library -implementations, this practice would indeed have the effect of -stopping T from satisfying the Swappable requirement. -</p> -</li> -<li> -A client's type T that does not satisfy the first condition can not be -made Swappable by providing a specialization of std::swap for T. -<p> -While I'm aware about the fact that people have mixed feelings about -providing a specialization of std::swap, it is well-defined to do so. -It sounds rather counter-intuitive to say that T is not Swappable, if -it has a valid and semantically correct specialization of std::swap. -Also in practice, providing such a specialization will have the same -effect as satisfying the Swappable requirement. -</p> -</li> -<li> -For a client's type T that satisfies both conditions of the Swappable -requirement, it is not specified which of the two conditions prevails. -After reading section 20.1.4 [lib.swappable], one might wonder whether -objects of T will be swapped by doing copy construction and -assignments, or by calling the swap function of T. -<p> -I'm aware that the intention of the Draft is to prefer calling the -swap function of T over doing copy construction and assignments. Still -in my opinion, it would be better to make this clear in the wording of -the definition of Swappable. -</p> -</li> -</ol> -<p></p> -<p> -I would like to have the Swappable requirement defined in such a way -that the following code fragment will correctly swap two objects of a -type T, if and only if T is Swappable: -</p><pre> using std::swap; - swap(t, u); // t and u are of type T. -</pre> -This is also the way Scott Meyers recommends calling a swap function, -in Effective C++, Third Edition, item 25. -<p></p> -<p> -Most aspects of this issue have been dealt with in a discussion on -comp.std.c++ about the Swappable requirement, from 13 September to 4 -October 2006, including valuable input by David Abrahams, Pete Becker, -Greg Herlihy, Howard Hinnant and others. -</p> -<p><b>Proposed resolution:</b></p> -<p> -Change section 20.1.4 [lib.swappable] as follows: -</p> -<blockquote> -The Swappable requirement is met by satisfying -<del>one or more of the following conditions:</del> -<ins>the following condition:</ins> -<ul> -<del> -<li> -T is Swappable if T satisfies the CopyConstructible requirements -(20.1.3) and the Assignable requirements (23.1); -</li> -</del> -<li> -<del> -T is Swappable if a namespace scope function named swap exists in the -same namespace as the definition of T, such that the expression -swap(t,u) is valid and has the semantics described in Table 33. -</del> -T is Swappable if an unqualified function call swap(t,u) is valid -within the namespace std, and has the semantics described in Table 33. -</li> -</ul> -</blockquote> <hr> -<a name="595"><h3>595. TR1/C++0x: fabs(complex<T>) redundant / wrongly specified</h3></a><p><b>Section:</b> 26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Stefan Große Pawig <b>Date:</b> 24 Sep 2006</p> +<h3><a name="595"></a>595. TR1/C++0x: fabs(complex<T>) redundant / wrongly specified</h3> +<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#New">New</a> + <b>Submitter:</b> Stefan Große Pawig <b>Date:</b> 2006-09-24</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#complex.numbers">active issues</a> in [complex.numbers].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> TR1 introduced, in the C compatibility chapter, the function fabs(complex<T>): @@ -7550,6 +7129,8 @@ document n2009.pdf). So either the return value of fabs() is specified wrongly, or fabs() does not behave the same as C99's cabs*(). </p> + + <p><b>Proposed resolution:</b></p> <p> This depends on the intention behind the introduction of fabs(). @@ -7584,8 +7165,19 @@ functionality of C99, fabs() should be either declared deprecated or (for C++0X) removed from the standard, since the functionality is already provided by the corresponding overloads of abs(). </p> + + + + + <hr> -<a name="596"><h3>596. 27.8.1.3 Table 112 omits "a+" and "a+b" modes</h3></a><p><b>Section:</b> 27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Thomas Plum <b>Date:</b> 26 Sep 2006</p> +<h3><a name="596"></a>596. 27.8.1.3 Table 112 omits "a+" and "a+b" modes</h3> +<p><b>Section:</b> 27.8.1.4 [filebuf.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2006-09-26</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#filebuf.members">active issues</a> in [filebuf.members].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.members">issues</a> in [filebuf.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> In testing 27.8.1.3, Table 112 (in the latest N2009 draft), we invoke </p> @@ -7595,16 +7187,15 @@ In testing 27.8.1.3, Table 112 (in the latest N2009 draft), we invoke and we expect the open to fail, because out|in|app is not listed in Table 92, and just before the table we see very specific words: </p> -<blockquote> +<blockquote><p> If mode is not some combination of flags shown in the table then the open fails. -</blockquote> +</p></blockquote> <p> But the corresponding table in the C standard, 7.19.5.3, provides two modes "a+" and "a+b", to which the C++ modes out|in|app and out|in|app|binary would presumably apply. </p> -<p><b>Proposed resolution:</b></p> <p> We would like to argue that the intent of Table 112 was to match the semantics of 7.19.5.3 and that the omission of "a+" and "a+b" was @@ -7616,8 +7207,36 @@ valid functional reason.) We further request that the missing modes be explicitly restored to the WP, for inclusion in C++0x. </p> + +<p><i>[ +Martin adds: +]</i></p> + + +<p> +...besides "a+" and "a+b" the C++ table is also missing a row +for a lone app bit which in at least two current implementation +as well as in Classic Iostreams corresponds to the C stdio "a" +mode and has been traditionally documented as implying ios::out. +Which means the table should also have a row for in|app meaning +the same thing as "a+" already proposed in the issue. +</p> + + +<p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="597"><h3>597. Decimal: The notion of 'promotion' cannot be emulated by user-defined types.</h3></a><p><b>Section:</b> <font color="red">Decimal 3.2</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Daveed Vandevoorde <b>Date:</b> 5 April 2006</p> +<h3><a name="597"></a>597. Decimal: The notion of 'promotion' cannot be emulated by user-defined types.</h3> +<p><b>Section:</b> TRDecimal 3.2 [trdec.types.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Daveed Vandevoorde <b>Date:</b> 2006-04-05</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#trdec.types.types">active issues</a> in [trdec.types.types].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types.types">issues</a> in [trdec.types.types].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> <p> In a private email, Daveed writes: </p> @@ -7690,598 +7309,5948 @@ POD types, but builtins will be. <p>Note that neither example above implies any problems with respect to C-to-C++ compatibility, since neither example can be expressed in C. </p> + + <p><b>Proposed resolution:</b></p> + + + + + <hr> -<a name="598"><h3>598. Decimal: Conversion to integral should truncate, not round.</h3></a><p><b>Section:</b> <font color="red">Decimal 3.2</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Daniel Krugler <b>Date:</b> 28 May 2006</p> +<h3><a name="604"></a>604. Decimal: Storing a reference to a facet unsafe.</h3> +<p><b>Section:</b> TRDecimal 3 [trdec.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-05-28</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types">issues</a> in [trdec.types].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In c++std-lib-17197, Martin writes: +</p> +<blockquote><p> +The extended_num_get and extended_num_put facets are designed +to store a reference to a num_get or num_put facet which the +extended facets delegate the parsing and formatting of types +other than decimal. One form of the extended facet's ctor (the +default ctor and the size_t overload) obtains the reference +from the global C++ locale while the other form takes this +reference as an argument. +</p></blockquote> +<blockquote><p> +The problem with storing a reference to a facet in another +object (as opposed to storing the locale object in which the +facet is installed) is that doing so bypasses the reference +counting mechanism designed to prevent a facet that is still +being referenced (i.e., one that is still installed in some +locale) from being destroyed when another locale that contains +it is destroyed. Separating a facet reference from the locale +it comes from van make it cumbersome (and in some cases might +even make it impossible) for programs to prevent invalidating +the reference. (The danger of this design is highlighted in +the paper.) +</p></blockquote> +<blockquote><p> +This problem could be easily avoided by having the extended +facets store a copy of the locale from which they would extract +the base facet either at construction time or when needed. To +make it possible, the forms of ctors of the extended facets that +take a reference to the base facet would need to be changed to +take a locale argument instead. +</p></blockquote> + + +<p><b>Proposed resolution:</b></p> +<p> +1. Change the <code>extended_num_get</code> synopsis in 3.10.2 as follows: +</p> +<pre> extended_num_get(const <del>std::num_get<charT, InputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); + + /* ... */ + <del>// <i>const std::num_get<charT, InputIterator> & <b>base</b></i>; <i><b>exposition only</b></i></del> + <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins> +</pre> <p> -In a private email, Daniel writes: +2. Change the description of the above constructor in 3.10.2.1: </p> +<pre> extended_num_get(const <del>std::num_get<charT, InputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); + +</pre> <blockquote> <p> -I would like to -ask, what where the reason for the decision to -define the semantics of the integral conversion of the decimal types, namely +<b>Effects:</b> Constructs an <code>extended_num_get</code> facet as if by: +</p> +<pre> extended_num_get(const <del>std::num_get<charT, InputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0) + : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>) + { /* ... */ } + +</pre> +<p> +<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_get</code> facet.</del> +</p> +</blockquote> +<p> +3. Change the <b>Returns:</b> clause for <code>do_get(iter_type, iter_type, ios_base &, ios_base::iostate &, bool &) const</code>, <i>et al</i> to +</p> +<blockquote><p> +<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet<std::num_get<charT, InputIterator> >(<i>baseloc</i>)</ins>.get(<i>in</i>, <i>end</i>, <i>str</i>, <i>err</i>, <i>val</i>)</code>. +</p></blockquote> +<p> +4. Change the <code>extended_num_put</code> synopsis in 3.10.3 as follows: </p> -<pre>"operator long long() const; +<pre> extended_num_put(const <del>std::num_put<charT, OutputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); + + /* ... */ - Returns: Returns the result of the -conversion of *this to the type long long, as if -performed by the expression llrounddXX(*this)." + <del>// <i>const std::num_put<charT, OutputIterator> & <b>base</b></i>; <i><b>exposition only</b></i></del> + <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins> </pre> <p> -where XX stands for either 32, 64, or 128, -corresponding to the proper decimal type. The -exact meaning of llrounddXX is not given in that -paper, so I compared it to the corresponding -definition given in C99, 2nd edition (ISO 9899), which says in 7.12.9.7 p. 2: +5. Change the description of the above constructor in 3.10.3.1: </p> +<pre> extended_num_put(const <del>std::num_put<charT, OutputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); +</pre> +<blockquote> <p> -"The lround and llround functions round their -argument to the nearest integer value, -rounding halfway cases away from zero, regardless -of the current rounding direction. [..]" +<b>Effects:</b> Constructs an <code>extended_num_put</code> facet as if by: </p> +<pre> extended_num_put(const <del>std::num_put<charT, OutputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0) + : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>) + { /* ... */ } + +</pre> <p> -Now considering the fact that integral conversion -of the usual floating-point types ("4.9 -Floating-integral conversions") has truncation -semantic I wonder why this conversion behaviour -has not been transferred for the decimal types. +<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_put</code> facet.</del> </p> </blockquote> <p> -Robert comments: +6. Change the <b>Returns:</b> clause for <code>do_put(iter_type, ios_base &, char_type, bool &) const</code>, <i>et al</i> to +</p> +<blockquote><p> +<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet<std::num_put<charT, OutputIterator> >(<i>baseloc</i>)</ins>.put(<i>s</i>, <i>f</i>, <i>fill</i>, <i>val</i>)</code>. +</p></blockquote> + +<p><i>[ +Redmond: We would prefer to rename "extended" to "decimal". +]</i></p> + + + + + + +<hr> +<h3><a name="606"></a>606. Decimal: allow narrowing conversions</h3> +<p><b>Section:</b> TRDecimal 3.2 [trdec.types.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-15</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#trdec.types.types">active issues</a> in [trdec.types.types].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types.types">issues</a> in [trdec.types.types].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In c++std-lib-17205, Martin writes: +</p> +<blockquote><p>...was it a deliberate design choice to make narrowing +assignments ill-formed while permitting narrowing compound assignments? +For instance: +</p></blockquote> +<pre> decimal32 d32; + decimal64 d64; + + d32 = 64; // error + d32 += 64; // okay +</pre> +<p> +In c++std-lib-17229, Robert responds: +</p> +<blockquote><p>It is a vestige of an old idea that I forgot to remove +from the paper. Narrowing assignments should be permitted. The bug is +that the converting constructors that cause narrowing should not be +explicit. Thanks for pointing this out. +</p></blockquote> + +<p><b>Proposed resolution:</b></p> +<p> +1. In "3.2.2 Class <code>decimal32</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversions: +</p> +<pre> // <i>3.2.2.2 conversion from floating-point type:</i> + <del>explicit</del> decimal32(decimal64 <i>d64</i>); + <del>explicit</del> decimal32(decimal128 <i>d128</i>); +</pre> +<p> +2. Do the same thing in "3.2.2.2. Conversion from floating-point type." +</p> +<p> +3. In "3.2.3 Class <code>decimal64</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversion: +</p> +<pre> // <i>3.2.3.2 conversion from floating-point type:</i> + <del>explicit</del> decimal64(decimal128 <i>d128</i>); +</pre> +<p> +4. Do the same thing in "3.2.3.2. Conversion from floating-point type." +</p> + +<p><i>[ +Redmond: We prefer explicit conversions for narrowing and implicit for widening. +]</i></p> + + + + + + +<hr> +<h3><a name="607"></a>607. Concern about short seed vectors</h3> +<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Charles Karney <b>Date:</b> 2006-10-26</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Short seed vectors of 32-bit quantities all result in different states. However +this is not true of seed vectors of 16-bit (or smaller) quantities. For example +these two seeds +</p> + +<blockquote><pre>unsigned short seed = {1, 2, 3}; +unsigned short seed = {1, 2, 3, 0}; +</pre></blockquote> + +<p> +both pack to +</p> + +<blockquote><pre>unsigned seed = {0x20001, 0x3}; +</pre></blockquote> + +<p> +yielding the same state. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +In 26.4.7.1[rand.util.seedseq]/8a, replace +</p> + +<blockquote> +<p> +Set <tt>begin[0]</tt> to <tt>5489 + <del>s</del><ins>N</ins></tt>. +</p> +<p> +where <tt>N</tt> is the bit length of the sequence used to construct the +seed_seq in 26.4.7.1/6 [rand.util.seedseq]. (This quantity is called <tt>n</tt> +in 26.4.7.1/6 [rand.util.seedseq], but <tt>n</tt> has a different meaning in +26.4.7.1/8 [rand.util.seedseq]. We have <tt>32^(s-1) < N <= 32^s</tt>.) Now +</p> + +<blockquote><pre>unsigned short seed = {1, 2, 3, 0}; +unsigned seed = {0x20001, 0x3}; +</pre></blockquote> + +<p> +are equivalent (<tt>N = 64</tt>), but +</p> + +<blockquote><pre>unsigned short seed = {1, 2, 3}; +</pre></blockquote> + +<p> +gives a distinct state (<tt>N = 48</tt>). +</p> +</blockquote> + + + + + + +<hr> +<h3><a name="608"></a>608. Unclear seed_seq construction details</h3> +<p><b>Section:</b> 26.4.7.1 [rand.util.seedseq], TR1 5.1 [tr.rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Charles Karney <b>Date:</b> 2006-10-26</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In 26.4.7.1 [rand.util.seedseq] /6, the order of packing the inputs into b and the +treatment of signed quantities is unclear. Better to spell it out. +</p> + + +<p><b>Proposed resolution:</b></p> +<blockquote><pre>b = sum( unsigned(begin[i]) 2^(w i), 0 <= i < end-begin ) +</pre></blockquote> + +<p> +where <tt>w</tt> is the bit-width of the InputIterator. +</p> + + + + + +<hr> +<h3><a name="612"></a>612. numeric_limits::is_modulo insufficently defined</h3> +<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#Open">Open</a> + <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2006-11-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p> +18.2.1.2 55 states that "A type is modulo if it is possible to add two +positive numbers together and have a result that wraps around to a +third number that is less". +This seems insufficent for the following reasons: +</p> + +<ol> +<li>Doesn't define what that value recieved is.</li> +<li>Doesn't state the result is repeatable</li> +<li> Doesn't require that doing addition, subtraction and other +operations on all values is defined behaviour.</li> +</ol> + +<p><i>[ +Batavia: Related to +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2144.pdf">N2144</a>. +Pete: is there an ISO definition of modulo? Underflow on signed behavior is undefined. +]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Suggest 18.2.1.2 [numeric.limits.members[numeric.limits.members], paragraph 57 is ammeded to: +</p> + +<blockquote><p> +A type is modulo if<ins>,</ins> <del>it is possible to add two positive numbers +and have a result that wraps around to a third number that is less.</del> +<ins>given any operation involving +,- or * on values of that type whose value +would fall outside the range <tt>[min(), max()]</tt>, then the value returned +differs from the true value by an integer multiple of <tt>(max() - min() + +1)</tt>.</ins> +</p></blockquote> + + + + + + +<hr> +<h3><a name="614"></a>614. std::string allocator requirements still inconsistent</h3> +<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#Open">Open</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> +<p> +This is based on N2134, where 21.3.1/2 states: +"... The Allocator object used shall be a copy of the Allocator object +passed to the basic_string object's constructor or, if the constructor does +not take an Allocator argument, a copy of a default-constructed Allocator +object." +</p> +<p> +Section 21.3.2/1 lists two constructors: +</p> +<blockquote><pre>basic_string(const basic_string<charT,traits,Allocator>& str ); + +basic_string(const basic_string<charT,traits,Allocator>& str , + size_type pos , size_type n = npos, + const Allocator& a = Allocator()); +</pre></blockquote> +<p> +and then says "In the first form, the Allocator value used is copied from +str.get_allocator().", which isn't an option according to 21.3.1. +</p> +<p><i>[ +Batavia: We need blanket statement to the effect of: +]</i></p> + + +<ol> +<li>If an allocator is passed in, use it, or,</li> +<li>If a string is passed in, use its allocator.</li> +</ol> +<p><i>[ +Review constructors and functions that return a string; make sure we follow these +rules (substr, operator+, etc.). Howard to supply wording. +]</i></p> + + +<p><i>[ +Bo adds: The new container constructor which takes only a <tt>size_type</tt> is not +consistent with 23.1 [container.requirements], p9 which says in part: + +<blockquote> +All other constructors for these container types take an +<tt>Allocator&</tt> argument (20.1.2), an allocator whose value type +is the same as the container's value type. A copy of this argument is +used for any memory allocation performed, by these constructors and by +all member functions, during the lifetime of each container object. +</blockquote> +]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="617"></a>617. std::array is a sequence that doesn't satisfy the sequence requirements?</h3> +<p><b>Section:</b> 23.2.1 [array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-30</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The <tt><array></tt> header is given under 23.2 [sequences]. +23.2.1 [array]/paragraph 3 says: +</p> +<blockquote><p> +"Unless otherwise specified, all array operations are as described in +23.1 [container.requirements]". +</p></blockquote> +<p> +However, array isn't mentioned at all in section 23.1 [container.requirements]. +In particular, Table 82 "Sequence requirements" lists several operations (insert, erase, clear) +that std::array does not have in 23.2.1 [array]. +</p> +<p> +Also, Table 83 "Optional sequence operations" lists several operations that +std::array does have, but array isn't mentioned. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="618"></a>618. valarray::cshift() effects on empty array</h3> +<p><b>Section:</b> 26.5.2.7 [valarray.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2007-01-10</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +I would respectfully request an issue be opened with the intention to +clarify the wording for <tt>size() == 0</tt> for <tt>cshift</tt>. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 26.5.2.7 [valarray.members], paragraph 7: +</p> + +<p> +This function returns an object of class <tt>valarray<T></tt>, of +length <tt>size()</tt><ins>.</ins><del>, each of whose elements <tt>I</tt> is +<tt>(*this)[(I + n ) % size()]</tt>. Thus, if element zero is taken as +the leftmost element, a positive value of <i>n</i> shifts the elements +circularly left <i>n</i> places.</del> <ins>When +<tt>size()</tt> is positive, each element at index <tt>I</tt> of the +returned valarray is equivalent to <tt>(*this)[(I + n) % size()]</tt>. +Therefore <tt>cshift()</tt> returns an <i>n</i>-fold left cyclic +rotation of the elements of <tt>*this</tt>.</ins> +</p> + + + + + +<hr> +<h3><a name="620"></a>620. valid uses of empty valarrays</h3> +<p><b>Section:</b> 26.5.2.1 [valarray.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#valarray.cons">active issues</a> in [valarray.cons].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.cons">issues</a> in [valarray.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +The <i>Effects</i> clause for the default <code>valarray</code> ctor +suggests that it is possible to increase the size of an empty +<code>valarray</code> object by calling other non-const member +functions of the class besides <code>resize()</code>. However, such an +interpretation would be contradicted by the requirement on the copy +assignment operator (and apparently also that on the computed +assignments) that the assigned arrays be the same size. See the +reflector discussion starting with c++std-lib-17871. + + </p> + <p> + +In addition, <i>Footnote</i> 280 uses some questionable normative +language. + + </p> + + +<p><b>Proposed resolution:</b></p> + <p> + +Reword the <i>Effects</i> clause and <i>Footnote 280</i> as follows (26.5.2.1 [valarray.cons]): + + </p> + <blockquote> + <p> + +<code>valarray();</code> + + </p> + <p> + +<i>Effects</i>: Constructs an object of class +<code>valarray<T></code>,<sup>279)</sup> which has zero +length<del> until it is passed into a library function as a modifiable +lvalue or through a non-constant this pointer</del>.<sup>280)</sup> + + </p> + <p> + +<ins><i>Postcondition</i>: <code>size() == 0</code>.</ins> + + </p> + <p> + +<i>Footnote 280</i>: This default constructor is essential, since +arrays of <code>valarray</code> <del>are likely to prove useful. +There shall also be a way to change the size of an array after +initialization; this is supplied by the semantics</del> <ins>may be +useful. The length of an empty array can be increased after +initialization by means</ins> of the <code>resize()</code> member +function. + + </p> + </blockquote> + + + + + +<hr> +<h3><a name="621"></a>621. non-const copy assignment operators of helper arrays</h3> +<p><b>Section:</b> 26.5 [numarray] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +The computed and "fill" assignment operators of <code>valarray</code> +helper array class templates (<code>slice_array</code>, +<code>gslice_array</code>, <code>mask_array</code>, and +<code>indirect_array</code>) are const member functions of each class +template (the latter by the resolution of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#123">123</a> +since they have reference semantics and thus do not affect +the state of the object on which they are called. However, the copy +assignment operators of these class templates, which also have +reference semantics, are non-const. The absence of constness opens +the door to speculation about whether they really are intended to have +reference semantics (existing implementations vary widely). + + </p> + + +<p><b>Proposed resolution:</b></p> + <p> + +Declare the copy assignment operators of all four helper array +class templates const. + + </p> + <p> + +Specifically, make the following edits: + + </p> + <p> + +Change the signature in 26.5.5 [template.slice.array] and +26.5.5.2 [slice.arr.assign] as follows: + + </p> + <blockquote><pre> +<code>slice_array& operator= (const slice_array&)<ins> const</ins>;</code> + + </pre></blockquote> + <p> + +Change the signature in 26.5.7 [template.gslice.array] and +26.5.7.2 [gslice.array.assign] as follows: + + </p> + <blockquote><pre> +<code>gslice_array& operator= (const gslice_array&)<ins> const</ins>;</code> + + </pre></blockquote> + <p> + +Change the signature in 26.5.8 [template.mask.array] and 26.5.8.2 [mask.array.assign] as +follows: + + </p> + <blockquote><pre> +<code>mask_array& operator= (const mask_array&)<ins> const</ins>;</code> + + </pre></blockquote> + <p> + +Change the signature in 26.5.9 [template.indirect.array] and +26.5.9.2 [indirect.array.assign] as follows: + + </p> + <blockquote><pre> +<code>indirect_array& operator= (const indirect_array&)<ins> const</ins>;</code> + + </pre></blockquote> + + + + + +<hr> +<h3><a name="622"></a>622. behavior of <code>filebuf</code> dtor and <code>close</code> on error</h3> +<p><b>Section:</b> 27.8.1.17 [fstream.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +<code>basic_filebuf</code> dtor is specified to have the following +straightforward effects: + + </p> + <blockquote><p> + +<i>Effects</i>: Destroys an object of class +<code>basic_filebuf</code>. Calls <code>close()</code>. + + </p></blockquote> + <p> + +<code>close()</code> does a lot of potentially complicated processing, +including calling <code>overflow()</code> to write out the termination +sequence (to bring the output sequence to its initial shift +state). Since any of the functions called during the processing can +throw an exception, what should the effects of an exception be on the +dtor? Should the dtor catch and swallow it or should it propagate it +to the caller? The text doesn't seem to provide any guidance in this +regard other than the general restriction on throwing (but not +propagating) exceptions from destructors of library classes in +17.4.4.8 [res.on.exception.handling]. + + </p> + <p> + +Further, the last thing <code>close()</code> is specified to do is +call <code>fclose()</code> to close the <code>FILE</code> pointer. The +last sentence of the <i>Effects</i> clause reads: + + </p> + <blockquote><p> + +... If any of the calls to <code>overflow</code> or +<code>std::fclose</code> fails then <code>close</code> fails. + + </p></blockquote> + <p> + +This suggests that <code>close()</code> might be required to call +<code>fclose()</code> if and only if none of the calls to +<code>overflow()</code> fails, and avoid closing the <code>FILE</code> +otherwise. This way, if <code>overflow()</code> failed to flush out +the data, the caller would have the opportunity to try to flush it +again (perhaps after trying to deal with whatever problem may have +caused the failure), rather than losing it outright. + + </p> + <p> + +On the other hand, the function's <i>Postcondition</i> specifies that +<code>is_open() == false</code>, which suggests that it should call +<code>fclose()</code> unconditionally. However, since +<i>Postcondition</i> clauses are specified for many functions in the +standard, including constructors where they obviously cannot apply +after an exception, it's not clear whether this <i>Postcondition</i> +clause is intended to apply even after an exception. + + </p> + <p> + +It might be worth noting that the traditional behavior (Classic +Iostreams <code>fstream::close()</code> and C <code>fclose()</code>) +is to close the <code>FILE</code> unconditionally, regardless of +errors. + + </p> + + +<p><b>Proposed resolution:</b></p> + <p> + +After discussing this on the reflector (see the thread starting with +c++std-lib-17650) we propose that <code>close()</code> be clarified to +match the traditional behavior, that is to close the <code>FILE</code> +unconditionally, even after errors or exceptions. In addition, we +propose the dtor description be amended so as to explicitly require it +to catch and swallow any exceptions thrown by <code>close()</code>. + + </p> + <p> + +Specifically, we propose to make the following edits in +27.8.1.4 [filebuf.members]: + + </p> + <blockquote> + <pre> +<code>basic_filebuf<charT,traits>* close();</code> + + </pre> + <p> + +<i>Effects</i>: If <code>is_open() == false</code>, returns a null +pointer. If a put area exists, calls +<code>overflow(traits::eof())</code> to flush characters. If the last +virtual member function called on <code>*this</code> (between +<code>underflow</code>, <code>overflow</code>, <code>seekoff</code>, +and <code>seekpos</code>) was <code>overflow</code> then calls +<code>a_codecvt.unshift</code> (possibly several times) to determine a +termination sequence, inserts those characters and calls +<code>overflow(traits::eof())</code> again. Finally<ins>, regardless +of whether any of the preceding calls fails or throws an exception, +the function</ins> <del>it</del> closes the file ("as if" by calling +<code>std::fclose(file)</code>).<sup>334)</sup> If any of the calls +<ins>made by the function</ins><del>to <code>overflow</code> +or</del><ins>, including </ins><code>std::fclose</code><ins>, </ins> +fails then <code>close</code> fails<ins> by returning a null pointer. +If one of these calls throws an exception, the exception is caught and +rethrown after closing the file.</ins> + + </p> + </blockquote> + <p> + +And to make the following edits in 27.8.1.2 [filebuf.cons]. + + </p> + <blockquote> + <pre> +<code>virtual ~basic_filebuf();</code> + + </pre> + <p> + +<i>Effects</i>: Destroys an object of class +<code>basic_filebuf<charT,traits></code>. Calls +<code>close()</code>. <ins>If an exception occurs during the +destruction of the object, including the call to <code>close()</code>, +the exception is caught but not rethrown (see +17.4.4.8 [res.on.exception.handling]).</ins> + + </p> + </blockquote> + + + + + +<hr> +<h3><a name="623"></a>623. <code>pubimbue</code> forbidden to call <code>imbue</code></h3> +<p><b>Section:</b> 27.1.1 [iostream.limits.imbue] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +27.1.1 [iostream.limits.imbue] specifies that "no function described in +clause 27 except for <code>ios_base::imbue</code> causes any instance +of <code>basic_ios::imbue</code> or +<code>basic_streambuf::imbue</code> to be called." + + </p> + <p> + +That contradicts the <i>Effects</i> clause for +<code>basic_streambuf::pubimbue()</code> which requires the function +to do just that: call <code>basic_streambuf::imbue()</code>. + + </p> + + +<p><b>Proposed resolution:</b></p> + <p> + +To fix this, rephrase the sentence above to allow +<code>pubimbue</code> to do what it was designed to do. Specifically. +change 27.1.1 [iostream.limits.imbue], p1 to read: + + </p> + <blockquote><p> + +No function described in clause 27 except for +<code>ios_base::imbue</code> <ins>and <code>basic_filebuf::pubimbue</code></ins> +causes any instance of <code>basic_ios::imbue</code> or +<code>basic_streambuf::imbue</code> to be called. ... + + </p></blockquote> + + + + + +<hr> +<h3><a name="624"></a>624. <code>valarray</code> assignment and arrays of unequal length</h3> +<p><b>Section:</b> 26.5.2.2 [valarray.assign] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +The behavior of the <code>valarray</code> copy assignment operator is +defined only when both sides have the same number of elements and the +spec is explicit about assignments of arrays of unequal lengths having +undefined behavior. + + </p> + <p> + +However, the generalized subscripting assignment operators overloaded +on <code>slice_array</code> et al (26.5.2.2 [valarray.assign]) don't have any +such restriction, leading the reader to believe that the behavior of +these overloads is well defined regardless of the lengths of the +arguments. + + </p> + <p> + +For example, based on the reading of the spec the behavior of the +snippet below can be expected to be well-defined: + + </p> + <pre> const std::slice from_0_to_3 (0, 3, 1); // refers to elements 0, 1, 2 + const std::valarray<int> a (1, 3); // a = { 1, 1, 1 } + std::valarray<int> b (2, 4); // b = { 2, 2, 2, 2 } + + b = a [from_0_to_3]; + </pre> + <p> + +In practice, <code>b</code> may end up being <code>{ 1, 1, 1 }</code>, +<code>{ 1, 1, 1, 2 }</code>, or anything else, indicating that +existing implementations vary. + + </p> + +<p> +Quoting from Section 3.4, Assignment operators, of Al Vermeulen's +Proposal for Standard C++ Array Classes (see c++std-lib-704; +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/N0308.asc">N0308</a>): +</p> +<blockquote><p> + ...if the size of the array on the right hand side of the equal + sign differs from the size of the array on the left, a run time + error occurs. How this error is handled is implementation + dependent; for compilers which support it, throwing an exception + would be reasonable. +</p></blockquote> + +<p> +And see more history in +<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/1993/N0280.pdf">N0280</a>. +</p> + + + +<p><b>Proposed resolution:</b></p> + <p> + +It has been argued in discussions on the committee's reflector that +the semantics of all <code>valarray</code> assignment operators should +be permitted to be undefined unless the length of the arrays being +assigned is the same as the length of the one being assigned from. See +the thread starting at c++std-lib-17786. + + </p> + <p> + +In order to reflect such views, the standard must specify that the +size of the array referred to by the argument of the assignment must +match the size of the array under assignment, for example by adding a +<i>Requires</i> clause to 26.5.2.2 [valarray.assign] as follows: + + </p> + <blockquote><p> + +<i>Requires</i>: The length of the array to which the argument refers +equals <code>size()</code>. + + </p></blockquote> + + <p> + +Note that it's far from clear that such leeway is necessary in order +to implement <code>valarray</code> efficiently. + + </p> + + + + + +<hr> +<h3><a name="625"></a>625. mixed up <i>Effects</i> and <i>Returns</i> clauses</h3> +<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +Many member functions of <code>basic_string</code> are overloaded, +with some of the overloads taking a <code>string</code> argument, +others <code>value_type*</code>, others <code>size_type</code>, and +others still <code>iterators</code>. Often, the requirements on one of +the overloads are expressed in the form of <i>Effects</i>, +<i>Throws</i>, and in the Working Paper +(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>) +also <i>Remark</i> clauses, while those on the rest of the overloads +via a reference to this overload and using a <i>Returns</i> clause. + + </p><p> + </p> + +The difference between the two forms of specification is that per +17.3.1.3 [structure.specifications], p3, an <i>Effects</i> clause specifies +<i>"actions performed by the functions,"</i> i.e., its observable +effects, while a <i>Returns</i> clause is <i>"a description of the +return value(s) of a function"</i> that does not impose any +requirements on the function's observable effects. + + <p> + </p> + +Since only <i>Notes</i> are explicitly defined to be informative and +all other paragraphs are explicitly defined to be normative, like +<i>Effects</i> and <i>Returns</i>, the new <i>Remark</i> clauses also +impose normative requirements. + + <p> + </p> + +So by this strict reading of the standard there are some member +functions of <code>basic_string</code> that are required to throw an +exception under some conditions or use specific traits members while +many other otherwise equivalent overloads, while obliged to return the +same values, aren't required to follow the exact same requirements +with regards to the observable effects. + + <p> + </p> + +Here's an example of this problem that was precipitated by the change +from informative Notes to normative <i>Remark</i>s (presumably made to +address <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#424">424</a>): + + <p> + </p> + +In the Working Paper, <code>find(string, size_type)</code> contains a +<i>Remark</i> clause (which is just a <i>Note</i> in the current +standard) requiring it to use <code>traits::eq()</code>. + + <p> + </p> + +<code>find(const charT *s, size_type pos)</code> is specified to +return <code>find(string(s), pos)</code> by a <i>Returns</i> clause +and so it is not required to use <code>traits::eq()</code>. However, +the Working Paper has replaced the original informative <i>Note</i> +about the function using <code>traits::length()</code> with a +normative requirement in the form of a <i>Remark</i>. Calling +<code>traits::length()</code> may be suboptimal, for example when the +argument is a very long array whose initial substring doesn't appear +anywhere in <code>*this</code>. + + <p> + </p> + +Here's another similar example, one that existed even prior to the +introduction of <i>Remark</i>s: + + <p> + </p> + +<code> insert(size_type pos, string, size_type, size_type)</code> is +required to throw <code>out_of_range</code> if <code>pos > +size()</code>. + + <p> + </p> + +<code>insert(size_type pos, string str)</code> is specified to return +<code>insert(pos, str, 0, npos)</code> by a <i>Returns</i> clause and +so its effects when <code>pos > size()</code> are strictly speaking +unspecified. + + + <p> + +I believe a careful review of the current <i>Effects</i> and +<i>Returns</i> clauses is needed in order to identify all such +problematic cases. In addition, a review of the Working Paper should +be done to make sure that the newly introduced normative <i>Remark</i> +clauses do not impose any undesirable normative requirements in place +of the original informative <i>Notes</i>. + + </p> +<p><i>[ +Batavia: Alan and Pete to work. +]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="626"></a>626. new <i>Remark</i> clauses not documented</h3> +<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#Open">Open</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#structure.specifications">active issues</a> in [structure.specifications].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Open">Open</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +The <i>Remark</i> clauses newly introduced into the Working Paper +(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf">N2134</a>) +are not mentioned in 17.3.1.3 [structure.specifications] where we list the +meaning of <i>Effects</i>, <i>Requires</i>, and other clauses (with +the exception of <i>Notes</i> which are documented as informative in +17.3.1.1 [structure.summary], p2, and which they replace in many cases). + + </p> + <p> + +Propose add a bullet for <i>Remarks</i> along with a brief description. + + </p> +<p><i>[ +Batavia: Alan and Pete to work. +]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="627"></a>627. Low memory and exceptions</h3> +<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#New">New</a> + <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2007-01-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +I recognize the need for nothrow guarantees in the exception reporting +mechanism, but I strongly believe that implementors also need an escape hatch +when memory gets really low. (Like, there's not enough heap to construct and +copy exception objects, or not enough stack to process the throw.) I'd like to +think we can put this escape hatch in 18.5.1.1 [new.delete.single], +<tt>operator new</tt>, but I'm not sure how to do it. We need more than a +footnote, but the wording has to be a bit vague. The idea is that if +<tt>new</tt> can't allocate something sufficiently small, it has the right to +<tt>abort</tt>/call <tt>terminate</tt>/call <tt>unexpected</tt>. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> </p> + + + + + +<hr> +<h3><a name="628"></a>628. Inconsistent definition of basic_regex constructor</h3> +<p><b>Section:</b> 28.8 [re.regex] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-01-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Section 28.8 [re.regex] lists a constructor +</p> + +<blockquote><pre>template<class InputIterator> +basic_regex(InputIterator first, InputIterator last, + flag_type f = regex_constants::ECMAScript); +</pre></blockquote> + <p> -Also, there is a further error in the <b>Returns:</b> clause for converting <code>decimal::decimal128</code> to <code>long long</code>. It currently calls <code>llroundd64</code>, not <code>llroundd128</code>. +However, in section 28.8.2 [re.regex.construct], this constructor takes a +pair of <tt>ForwardIterator</tt>. </p> + <p><b>Proposed resolution:</b></p> <p> -Change the <b>Returns:</b> clause in 3.2.2.4 to: +Change 28.8.2 [re.regex.construct]: +</p> + +<blockquote><pre>template <class <del>ForwardIterator</del> <ins>InputIterator</ins>> + basic_regex(<del>ForwardIterator</del> <ins>InputIterator</ins> first, <del>ForwardIterator</del> <ins>InputIterator</ins> last, + flag_type f = regex_constants::ECMAScript); +</pre></blockquote> + + + + + + +<hr> +<h3><a name="629"></a>629. complex<t> insertion and locale dependence</t></h3> +<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#New">New</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2007-01-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +is there an issue opened for (0,3) as complex number with +the French local? With the English local, the above parses as an +imaginery complex number. With the French locale it parses as a +real complex number. </p> + +<p> +Further notes/ideas from the lib-reflector, messages 17982-17984: +</p> + <blockquote> -<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd32(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>. +<p> +Add additional entries in num_punct to cover the complex separator (French would be ';'). +</p> +<p> +Insert a space before the comma, which should eliminate the ambiguity. +</p> +<p> +Solve the problem for ordered sequences in general, perhaps with a +dedicated facet. Then complex should use that solution. +</p> </blockquote> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="630"></a>630. arrays of valarray</h3> +<p><b>Section:</b> 26.5.2.1 [valarray.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-01-28</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#valarray.cons">active issues</a> in [valarray.cons].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.cons">issues</a> in [valarray.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +Section 26.1 [numeric.requirements], p1 suggests that a +<code>valarray</code> specialization on a type <code>T</code> that +satisfies the requirements enumerated in the paragraph is itself a +valid type on which <code>valarray</code> may be instantiated +(Footnote 269 makes this clear). I.e., +<code>valarray<valarray<T> ></code> is valid as long as +<code>T</code> is valid. However, since implementations of +<code>valarray</code> are permitted to initialize storage allocated by +the class by invoking the default ctor of <code>T</code> followed by +the copy assignment operator, such implementations of +<code>valarray</code> wouldn't work with (perhaps user-defined) +specializations of <code>valarray</code> whose assignment operator had +undefined behavior when the size of its argument didn't match the size +of <code>*this</code>. By <i>"wouldn't work"</i> I mean that it would +be impossible to resize such an array of arrays by calling the +<code>resize()</code> member function on it if the function used the +copy assignment operator after constructing all elements using the +default ctor (e.g., by invoking <code>new value_type[N]</code>) to +obtain default-initialized storage) as it's permitted to do. + + </p> + <p> + +Stated more generally, the problem is that +<code>valarray<valarray<T> >::resize(size_t)</code> isn't +required or guaranteed to have well-defined semantics for every type +<code>T</code> that satisfies all requirements in +26.1 [numeric.requirements]. + + </p> + <p> + +I believe this problem was introduced by the adoption of the +resolution outlined in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1996/N0857.asc">N0857</a>, +<i>Assignment of valarrays</i>, from 1996. The copy assignment +operator of the original numerical array classes proposed in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/N0280.pdf">N0280</a>, +as well as the one proposed in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/N0308.asc">N0308</a> +(both from 1993), had well-defined semantics for arrays of unequal +size (the latter explicitly only when <code>*this</code> was empty; +assignment of non empty arrays of unequal size was a runtime error). + + </p> + <p> + +The justification for the change given in N0857 was the "loss of +performance [deemed] only significant for very simple operations on +small arrays or for architectures with very few registers." + + </p> + <p> + +Since tiny arrays on a limited subset of hardware architectures are +likely to be an exceedingly rare case (despite the continued +popularity of x86) I propose to revert the resolution and make the +behavior of all <code>valarray</code> assignment operators +well-defined even for non-conformal arrays (i.e., arrays of unequal +size). I have implemented this change and measured no significant +degradation in performance in the common case (non-empty arrays of +equal size). I have measured a 50% (and in some cases even greater) +speedup in the case of assignments to empty arrays versus calling +<code>resize()</code> first followed by an invocation of the copy +assignment operator. + + </p> + + +<p><b>Proposed resolution:</b></p> + <p> + +Change 26.5.2.2 [valarray.assign], p1 as follows: + + </p> + <blockquote> + <p> + <code> + +valarray<T>& operator=(const valarray<T>&<ins> x</ins>); + + </code> + </p> + <p> + +-1- Each element of the <code>*this</code> array is assigned the value +of the corresponding element of the argument array. <del>The +resulting behavior is undefined if </del><ins>When </ins>the length of +the argument array is not equal to the length of the *this +array<del>.</del><ins> resizes <code>*this</code> to make the two +arrays the same length, as if by calling +<code>resize(x.size())</code>, before performing the assignment.</ins> + + </p> + </blockquote> + <p> + +And add a new paragraph just below paragraph 1 with the following +text: + + </p> + <blockquote> + <p> + +<ins>-2- <i>Postcondition</i>: <code>size() == x.size()</code>.</ins> + + </p> + </blockquote> + <p> + +Also add the following paragraph to 26.5.2.2 [valarray.assign], immediately after p4: + + </p> + <blockquote> + <p> + +<ins>-?- When the length, <i><code>N</code></i> of the array referred +to by the argument is not equal to the length of <code>*this</code>, +the operator resizes <code>*this</code> to make the two arrays the +same length, as if by calling <code>resize(<i>N</i>)</code>, before +performing the assignment.</ins> + + </p> + </blockquote> + + + + + +<hr> +<h3><a name="631"></a>631. conflicting requirements for <tt>BinaryPredicate</tt></h3> +<p><b>Section:</b> 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> James Kanze <b>Date:</b> 2007-01-31</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#algorithms">issues</a> in [algorithms].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The general requirements for <tt><tt>BinaryPredicate</tt></tt> (in 25 [algorithms]/8) contradict the implied specific requirements for +some functions. In particular, it says that: +</p> + +<blockquote><p> +[...] if an algorithm takes <tt>BinaryPredicate <i>binary_pred</i></tt> +as its argument and <tt><i>first1</i></tt> and <i>first2</i> as its +iterator arguments, it should work correctly in the construct <tt>if +(binary_pred (*<i>first1</i> , *<i>first2</i> )){...}</tt>. +<tt>BinaryPredicate</tt> always takes the first iterator type as its +first argument, that is, in those cases when <tt>T <i>value</i></tt> is +part of the signature, it should work correctly in the context of <tt>if +(binary_pred (*<i>first1</i> , <i>value</i>)){...}</tt>. +</p></blockquote> + +<p> +In the description of <tt>upper_bound</tt> (25.3.3.2 [upper.bound]/2), however, the use is described as +"<tt>!comp(<i>value</i>, <i>e</i>)</tt>", where <tt><i>e</i></tt> is an +element of the sequence (a result of dereferencing +<tt>*<i>first</i></tt>). +</p> + <p> -Change the <b>Returns:</b> clause in 3.2.3.4 to: +In the description of <tt>lexicographical_compare</tt>, we have both +"<tt>*<i>first1</i> < *<i>first2</i></tt>" and "<tt>*<i>first2</i> +< *<i>first1</i></tt>" (which presumably implies "<tt>comp( +*<i>first1</i>, *<i>first2</i> )</tt>" and "<tt>comp( *<i>first2</i>, +*<i>first1</i> )</tt>". </p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Logically, the <tt>BinaryPredicate</tt> is used as an ordering +relationship, with the semantics of "less than". Depending on the +function, it may be used to determine equality, or any of the inequality +relationships; doing this requires being able to use it with either +parameter first. I would thus suggest that the requirement be: +</p> + +<blockquote><p> +[...] <tt>BinaryPredicate</tt> always takes the first iterator +<tt>value_type</tt> as one of its arguments, it is unspecified which. If +an algorithm takes <tt>BinaryPredicate <i>binary_pred</i></tt> as its +argument and <tt><i><i>first1</i></i></tt> and <i>first2</i> as its +iterator arguments, it should work correctly both in the construct +<tt>if (binary_pred (*<i>first1</i> , *<i>first2</i> )){...}</tt> and +<tt>if (binary_pred (*<i>first2</i>, *<i>first1</i>)){...}</tt>. In +those cases when <tt>T <i>value</i></tt> is part of the signature, it +should work correctly in the context of <tt>if (binary_pred +(*<i>first1</i> , <i>value</i>)){...}</tt> and of <tt>if (binary_pred +(<i>value</i>, *<i>first1</i>)){...}</tt>. [<i>Note:</i> if the two +types are not identical, and neither is convertable to the other, this +may require that the <tt>BinaryPredicate</tt> be a functional object +with two overloaded <tt>operator()()</tt> functions. <i>--end note</i>] +</p></blockquote> + +<p> +Alternatively, one could specify an order for each function. IMHO, this +would be more work for the committee, more work for the implementors, +and of no real advantage for the user: some functions, such as +<tt>lexicographical_compare</tt> or <tt>equal_range</tt>, will still require both +functions, and it seems like a much easier rule to teach that both +functions are always required, rather than to have a complicated list of +when you only need one, and which one. +</p> + + + + + +<hr> +<h3><a name="632"></a>632. Time complexity of size() for std::set</h3> +<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#New">New</a> + <b>Submitter:</b> Lionel B <b>Date:</b> 2007-02-01</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +A recent news group discussion: +</p> +<blockquote> +<p> +Anyone know if the Standard has anything to say about the time complexity +of size() for std::set? I need to access a set's size (/not/ to know if it is empty!) heavily +during an algorithm and was thus wondering whether I'd be better off +tracking the size "manually" or whether that'd be pointless. +</p> +<p> +That would be pointless. size() is O(1). +</p> +<p> +Nit: the standard says "should" have constant time. Implementations may take +license to do worse. I know that some do this for <tt>std::list<></tt> as a part of +some trade-off with other operation. +</p> + +<p> +I was aware of that, hence my reluctance to use size() for std::set. +</p> +<p> +However, this reason would not apply to <tt>std::set<></tt> as far as I can see. +</p> +<p> +Ok, I guess the only option is to try it and see... +</p> +</blockquote> + +<p> +If I have any recommendation to the C++ Standards Committee it is that +implementations must (not "should"!) document clearly[1], where known, the +time complexity of *all* container access operations. +</p> +<p> +[1] In my case (gcc 4.1.1) I can't swear that the time complexity of size() +for std::set is not documented... but if it is it's certainly well hidden +away. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="634"></a>634. <tt>allocator.address()</tt> doesn't work for types overloading <tt>operator&</tt></h3> +<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-02-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#350">350</a></p> +<p><b>Discussion:</b></p> + +<p> +20.6.1.1 [allocator.members] says: +</p> +<blockquote> +<pre>pointer address(reference <i>x</i>) const;</pre> <blockquote> -<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd64(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>. +<p> +-1- <i>Returns:</i> <tt>&<i>x</i></tt>. +</p> +</blockquote> </blockquote> + +<p> +20.6.1.1 [allocator.members] defines <tt>CopyConstructible</tt> which currently not +only defines the semantics of copy construction, but also restricts what an overloaded +<tt>operator&</tt> may do. I believe proposals are in the works (such as concepts +and rvalue reference) to decouple these two requirements. Indeed it is not evident +that we should disallow overloading <tt>operator&</tt> to return something other +than the address of <tt>*this</tt>. +</p> + <p> -Change the <b>Returns:</b> clause in 3.2.4.4 to: +An example of when you want to overload <tt>operator&</tt> to return something +other than the object's address is proxy references such as <tt>vector<bool></tt> +(or its replacement, currently code-named <tt>bit_vector</tt>). Taking the address of +such a proxy reference should logically yield a proxy pointer, which when dereferenced, +yields a copy of the original proxy reference again. </p> + +<p> +On the other hand, some code truly needs the address of an object, and not a proxy +(typically for determining the identity of an object compared to a reference object). +<a href="http://www.boost.org/">boost</a> has long recognized this dilemma and solved it with +<a href="http://www.boost.org/libs/utility/utility.htm#addressof"><tt>boost::addressof</tt></a>. +It appears to me that this would be useful functionality for the default allocator. Adopting +this definition for <tt>allocator::address</tt> would free the standard of requiring +anything special from types which overload <tt>operator&</tt>. Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a> +is expected to make use of <tt>allocator::address</tt> mandatory for containers. +</p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Change 20.6.1.1 [allocator.members]: +</p> + +<blockquote> +<pre>pointer address(reference <i>x</i>) const;</pre> <blockquote> -<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <del><code>llroundd64(*this)</code></del> <ins><code>llroundd128(*this)</code> while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>. +<p> +-1- <i>Returns:</i> <del><tt>&<i>x</i></tt>.</del> <ins>The actual address of <tt><i>x</i></tt>, +even in the presence of an overloaded <tt>operator&</tt>.</ins> +</p> +</blockquote> + +<pre>const_pointer address(address(const_reference <i>x</i>) const;</pre> +<blockquote> +<p> +-2- <i>Returns:</i> <del><tt>&<i>x</i></tt>.</del> <ins>The actual address of <tt><i>x</i></tt>, +even in the presence of an overloaded <tt>operator&</tt>.</ins> +</p> </blockquote> +</blockquote> + +<p><i>[ +post Oxford: This would be rendered NAD Editorial by acceptance of +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>. +]</i></p> + + + + + + <hr> -<a name="599"><h3>599. Decimal: Say "octets" instead of "bytes."</h3></a><p><b>Section:</b> <font color="red">Decimal 3.1</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Daniel Krugler <b>Date:</b> 28 May 2006</p> +<h3><a name="635"></a>635. domain of <tt>allocator::address</tt></h3> +<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#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-02-08</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The table of allocator requirements in 20.1.2 [allocator.requirements] describes +<tt>allocator::address</tt> as: +</p> +<blockquote><pre>a.address(r) +a.address(s) +</pre></blockquote> +<p> +where <tt>r</tt> and <tt>s</tt> are described as: +</p> +<blockquote><p> +a value of type <tt>X::reference</tt> obtained by the expression <tt>*p</tt>. +</p></blockquote> + +<p> +and <tt>p</tt> is +</p> + +<blockquote><p> +a value of type <tt>X::pointer</tt>, obtained by calling <tt>a1.allocate</tt>, +where <tt>a1 == a</tt> +</p></blockquote> + +<p> +This all implies that to get the address of some value of type <tt>T</tt> that +value must have been allocated by this allocator or a copy of it. +</p> + +<p> +However sometimes container code needs to compare the address of an external value of +type <tt>T</tt> with an internal value. For example <tt>list::remove(const T& t)</tt> +may want to compare the address of the external value <tt>t</tt> with that of a value +stored within the list. Similarly <tt>vector</tt> or <tt>deque insert</tt> may +want to make similar comparisons (to check for self-referencing calls). +</p> + <p> -Daniel writes in a private email: +Mandating that <tt>allocator::address</tt> can only be called for values which the +allocator allocated seems overly restrictive. +</p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Change 20.1.2 [allocator.requirements]: </p> <blockquote> <p> -- 3.1 'Decimal type encodings' says in its note: +<tt>r</tt> : a value of type <tt>X::reference</tt> <del>obtained by the expression *p</del>. </p> <p> -"this implies that -sizeof(std::decimal::decimal32) == 4, -sizeof(std::decimal::decimal64) == 8, and -sizeof(std::decimal::decimal128) == 16." -</p><p> +<tt>s</tt> : a value of type <tt>X::const_reference</tt> <del>obtained by the +expression <tt>*q</tt> or by conversion from a value <tt>r</tt></del>. </p> -This is a wrong assertion, because the definition -of 'byte' in 1.7 'The C+ + memory model' of ISO -14882 (2nd edition) does not specify that a byte -must be necessarily 8 bits large, which would be -necessary to compare with the specified bit sizes -of the types decimal32, decimal64, and decimal128. -<p></p> </blockquote> + +<p><i>[ +post Oxford: This would be rendered NAD Editorial by acceptance of +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2257.html">N2257</a>. +]</i></p> + + + + + + + +<hr> +<h3><a name="637"></a>637. [c.math]/10 inconsistent return values</h3> +<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#New">New</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-13</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +26.7 [c.math], paragraph 10 has long lists of added signatures for float and long double +functions. All the signatures have float/long double return values, which is +inconsistent with some of the double functions they are supposed to +overload. +</p> + + <p><b>Proposed resolution:</b></p> <p> -Change 3.1 as follows: +Change 26.7 [c.math], paragraph 10, +</p> + +<blockquote><pre><del>float</del> <ins>int</ins> ilogb(float); +<del>float</del> <ins>long</ins> lrint(float); +<del>float</del> <ins>long</ins> lround(float); +<del>float</del> <ins>long long</ins> llrint(float); +<del>float</del> <ins>long long</ins> llround(float); + +<del>long double</del> <ins>int</ins> ilogb(long double); +<del>long double</del> <ins>long</ins> lrint(long double); +<del>long double</del> <ins>long</ins> lround(long double); +<del>long double</del> <ins>long long</ins> llrint(long double); +<del>long double</del> <ins>long long</ins> llround(long double); +</pre></blockquote> + + + + + +<hr> +<h3><a name="638"></a>638. deque end invalidation during erase</h3> +<p><b>Section:</b> 23.2.2.3 [deque.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Steve LoBasso <b>Date:</b> 2007-02-17</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The standard states at 23.2.2.3 [deque.modifiers]/4: +</p> +<blockquote><pre>deque erase(...) +</pre> + <p> +<i>Effects:</i> ... An erase at either end of the deque invalidates only +the iterators and the references to the erased elements. +</p> +</blockquote> +<p> +This does not state that iterators to end will be invalidated. +It needs to be amended in such a way as to account for end invalidation. +</p> +<p> +Something like: </p> +<blockquote><p> +Any time the last element is erased, iterators to end are invalidated. +</p></blockquote> + +<p> +This would handle situations like: +</p> +<blockquote><pre>erase(begin(), end()) +erase(end() - 1) +pop_back() +resize(n, ...) where n < size() +pop_front() with size() == 1 + +</pre></blockquote> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="639"></a>639. Still problems with exceptions during streambuf IO</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +There already exist two active DR's for the wording of 27.6.1.2.3 [istream::extractors]/13 +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>. +</p> + +<p> +Even with these proposed corrections, already maintained in N2134, +I have the feeling, that the current wording does still not properly +handle the "exceptional" situation. The combination of para 14 +</p> + +<blockquote><p> +"[..] Characters are extracted and inserted until +any of the following occurs: +</p> +<p> +[..] +</p> +<p> +- an exception occurs (in which case the exception is caught)." +</p></blockquote> + +<p> +and 15 +</p> + +<blockquote><p> +"If the function inserts no characters, it calls setstate(failbit), +which +may throw ios_base::failure (27.4.4.3). If it inserted no characters +because it caught an exception thrown while extracting characters +from *this and failbit is on in exceptions() (27.4.4.3), then the +caught +exception is rethrown." +</p></blockquote> + +<p> +both in N2134 seems to imply that any exception, which occurs +*after* at least one character has been inserted is caught and lost +for +ever. It seems that even if failbit is on in exceptions() rethrow is +not +allowed due to the wording "If it inserted no characters because it +caught an exception thrown while extracting". +</p> + +<p> +Is this behaviour by design? +</p> + +<p> +I would like to add that its output counterpart in 27.6.2.6.3 [ostream.inserters]/7-9 +(also +N2134) does not demonstrate such an exception-loss-behaviour. +On the other side, I wonder concerning several subtle differences +compared to input:: +</p> +<p> +1) Paragraph 8 says at its end: +</p> + +<blockquote><p> +"- an exception occurs while getting a character from sb." +</p></blockquote> + +<p> +Note that there is nothing mentioned which would imply that such +an exception will be caught compared to 27.6.1.2.3 [istream::extractors]/14. +</p> + +<p> +2) Paragraph 9 says: +</p> + +<blockquote><p> +"If the function inserts no characters, it calls setstate(failbit) +(which +may throw ios_base::failure (27.4.4.3)). If an exception was thrown +while extracting a character, the function sets failbit in error +state, +and if failbit is on in exceptions() the caught exception is +rethrown." +</p></blockquote> + +<p> +The sentence starting with "If an exception was thrown" seems to +imply that such an exception *should* be caught before. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +(a) In 27.6.1.2.3 [istream::extractors]/15 (N2134) change the sentence +</p> + +<blockquote><p> +If the function inserts no characters, it calls +<tt>setstate(failbit)</tt>, which may throw <tt>ios_base::failure</tt> +(27.4.4.3). If <del>it inserted no characters because it caught an +exception thrown while extracting characters from <tt>*this</tt></del> +<ins>an exception was thrown while extracting a character from +<tt>*this</tt>, the function sets <tt>failbit</tt> in error state,</ins> +and <tt>failbit</tt> is on in <tt>exceptions()</tt> (27.4.4.3), then the +caught exception is rethrown. +</p></blockquote> + +<p> +(b) In 27.6.2.6.3 [ostream.inserters]/8 (N2134) change the sentence: +</p> + <blockquote> <p> -The three decimal encoding formats defined in IEEE-754R correspond to the three decimal floating types as follows: +Gets characters from <tt>sb</tt> and inserts them in <tt>*this</tt>. +Characters are read from <tt>sb</tt> and inserted until any of the +following occurs: </p> <ul> +<li>end-of-file occurs on the input sequence;</li> +<li>inserting in the output sequence fails (in which case the character to be inserted is not extracted);</li> +<li>an exception occurs while getting a character from <tt>sb</tt> <ins>(in which +case the exception is caught)</ins>.</li> +</ul> +</blockquote> + + + + + + +<hr> +<h3><a name="640"></a>640. 27.6.2.5.2 does not handle (unsigned) long long</h3> +<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#Ready">Ready</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The arithmetic inserters are described in 27.6.2.6.2 [ostream.inserters.arithmetic]. +Although the section starts with a listing of the inserters including +the new ones: +</p> + +<blockquote><pre>operator<<(long long val ); +operator<<(unsigned long long val ); +</pre></blockquote> + +<p> +the text in paragraph 1, which describes the corresponding effects +of the inserters, depending on the actual type of val, does not +handle the types <tt>long long</tt> and <tt>unsigned long long</tt>. +</p> + +<p><i>[ +Alisdair: In addition to the (unsigned) long long problem, that whole paragraph +misses any reference to extended integral types supplied by the +implementation - one of the additions by core a couple of working papers +back. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> +<p> +In 27.6.2.6.2 [ostream.inserters.arithmetic]/1 change the third sentence +</p> + +<blockquote> +When val is of type <tt>bool</tt>, <tt>long</tt>, <tt>unsigned +long</tt>, <ins>long long, unsigned long long,</ins> <tt>double</tt>, +<tt>long double</tt>, or <tt>const void*</tt>, the formatting conversion +occurs as if it performed the following code fragment: +</blockquote> + + + + + +<hr> +<h3><a name="643"></a>643. Impossible "as if" clauses</h3> +<p><b>Section:</b> 27.8.1.1 [filebuf], 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#Ready">Ready</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The current standard 14882:2003(E) as well as N2134 have the +following +defects: +</p> + +<p> +27.8.1.1 [filebuf]/5 says: +</p> + +<blockquote> +<p> +In order to support file I/O and multibyte/wide character conversion, conversions are performed using members of a +facet, referred to as <tt><i>a_codecvt</i></tt> in following sections, obtained "as if" by +</p> +<blockquote><pre>codecvt<charT,char,typename traits::state_type> <i>a_codecvt</i> = + use_facet<codecvt<charT,char,typename traits::state_type> >(getloc()); +</pre></blockquote> +</blockquote> + +<p> +<tt>use_facet</tt> returns a <tt>const facet</tt> reference and no facet is +copyconstructible, so the codecvt construction should fail to compile. +</p> + +<p> +A similar issue arises in 22.2.2.2.2 [facet.num.put.virtuals]/15 for <tt>num_punct</tt>. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +In 27.8.1.1 [filebuf]/5 change the "as if" code +</p> + +<blockquote><pre><ins>const </ins>codecvt<charT,char,typename traits::state_type><ins>&</ins> <i>a_codecvt</i> = + use_facet<codecvt<charT,char,typename traits::state_type> >(getloc()); +</pre></blockquote> + +<p> +In 22.2.2.2.2 [facet.num.put.virtuals]/15 (This is para 5 in N2134) change +</p> + +<blockquote> +<p> +A local variable <tt><i>punct</i></tt> is initialized via +</p> +<blockquote><pre><ins>const </ins>numpunct<charT><ins>&</ins> <i>punct</i> = use_facet< numpunct<charT> >(<i>str</i>.getloc() )<ins>;</ins> +</pre></blockquote> +</blockquote> + +<p> +(Please note also the additional provided trailing semicolon) +</p> + + + + + + +<hr> +<h3><a name="644"></a>644. Possible typos in 'function' description</h3> +<p><b>Section:</b> 20.5.14.2.6 [func.wrap.func.undef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-25</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> +<p> +20.5.14.2.6 [func.wrap.func.undef] +</p> +<p> +The note in paragraph 2 refers to 'undefined void operators', while the +section declares a pair of operators returning bool. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 20.5.14.2 [func.wrap.func] +</p> + +<blockquote><pre>... +private: + // 20.5.14.2.6 [func.wrap.func.undef], undefined operators: + template<class Function2> <del>bool</del> <ins>void</ins> operator==(const function<Function2>&); + template<class Function2> <del>bool</del> <ins>void</ins> operator!=(const function<Function2>&); +}; +</pre></blockquote> + +<p> +Change 20.5.14.2.6 [func.wrap.func.undef] +</p> + +<blockquote><pre>template<class Function2> <del>bool</del> <ins>void</ins> operator==(const function<Function2>&); +template<class Function2> <del>bool</del> <ins>void</ins> operator!=(const function<Function2>&); +</pre></blockquote> + + + + + +<hr> +<h3><a name="645"></a>645. Missing members in match_results</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re.results">active issues</a> in [re.results].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +According to the description given in 28.10 [re.results]/2 the class template +match_results "shall satisfy the requirements of a Sequence, [..], +except that only operations defined for const-qualified Sequences +are supported". +Comparing the provided operations from 28.10 [re.results]/3 with the +sequence/container tables 80 and 81 one recognizes the following +missing operations: +</p> + +<p> +1) The members +</p> + +<blockquote><pre>const_iterator rbegin() const; +const_iterator rend() const; +</pre></blockquote> + +<p> +should exists because 23.1/10 demands these for containers +(all sequences are containers) which support bidirectional +iterators. Aren't these supported by match_result? This is not +explicitely expressed, but it's somewhat implied by two arguments: +</p> +<p> +(a) Several typedefs delegate to +<tt>iterator_traits<BidirectionalIterator></tt>. +</p> +<p> +(b) The existence of <tt>const_reference operator[](size_type n) const</tt> +implies even random-access iteration. +I also suggest, that <tt>match_result</tt> should explicitly mention, +which minimum iterator category is supported and if this does +not include random-access the existence of <tt>operator[]</tt> is +somewhat questionable. +</p> +<p> +2) The new "convenience" members +</p> +<blockquote><pre>const_iterator cbegin() const; +const_iterator cend() const; +const_iterator crbegin() const; +const_iterator crend() const; +</pre></blockquote> +<p> +should be added according to tables 80/81. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="646"></a>646. const incorrect match_result members</h3> +<p><b>Section:</b> 28.10.4 [re.results.form] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#Ready">Ready</a> status.</p> +<p><b>Discussion:</b></p> +<p> +28.10.4 [re.results.form] (root and para 3) in N2134 defines the two function template +members format as non-const functions, although they are declared +as const in 28.10 [re.results]/3. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add the missing <tt>const</tt> specifier to both <tt>format</tt> overloads described +in section 28.10.4 [re.results.form]. +</p> + + + + + +<hr> +<h3><a name="647"></a>647. Inconsistent regex_search params</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-26</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +28.11.3 [re.alg.search]/5 declares +</p> + +<blockquote><pre>template <class iterator, class charT, class traits> +bool regex_search(iterator first, iterator last, + const basic_regex<charT, traits>& e, + regex_constants::match_flag_type flags = + regex_constants::match_default); +</pre></blockquote> + +<p> +where it's not explained, which iterator category +the parameter iterator belongs to. This is inconsistent +to the preceding declaration in the synopsis section +28.4 [re.syn], which says: +</p> + +<blockquote><pre>template <class BidirectionalIterator, class charT, class traits> +bool regex_search(BidirectionalIterator first, BidirectionalIterator last, + const basic_regex<charT, traits>& e, + regex_constants::match_flag_type flags = + regex_constants::match_default); +</pre></blockquote> + + +<p><b>Proposed resolution:</b></p> +<p> +In 28.11.3 [re.alg.search]/5 replace all three occurences of param "iterator" with +"BidirectionalIterator" +</p> + +<blockquote><pre>template <class <del>iterator</del> <ins>BidirectionalIterator</ins>, class charT, class traits> + bool regex_search(<del>iterator</del> <ins>BidirectionalIterator</ins> first, <del>iterator</del> <ins>BidirectionalIterator</ins> last, + const basic_regex<charT, traits>& e, + regex_constants::match_flag_type flags = + regex_constants::match_default); +</pre> +<p> +-6- <i>Effects:</i> Behaves "as if" by constructing an object what of +type <tt>match_results<<del>iterator</del> +<ins>BidirectionalIterator</ins>></tt> and then returning the result +of <tt>regex_search(first, last, what, e, flags)</tt>. +</p> +</blockquote> + + + + + +<hr> +<h3><a name="650"></a>650. regex_token_iterator and const correctness</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p>Both the class definition of regex_token_iterator (28.12.2 +[re.tokiter]/6) and the latter member specifications (28.12.2.2 +[re.tokiter.comp]/1+2) declare both comparison operators as +non-const functions. Furtheron, both dereference operators are +unexpectedly also declared as non-const in 28.12.2 [re.tokiter]/6 +as well as in (28.12.2.3 [re.tokiter.deref]/1+2). +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +1) In (28.12.2 [re.tokiter]/6) change the current declarations +</p> + +<blockquote><pre>bool operator==(const regex_token_iterator&) <ins>const</ins>; +bool operator!=(const regex_token_iterator&) <ins>const</ins>; +const value_type& operator*() <ins>const</ins>; +const value_type* operator->() <ins>const</ins>; +</pre></blockquote> + +<p> +2) In 28.12.2.2 [re.tokiter.comp] change the following declarations +</p> + +<blockquote><pre>bool operator==(const regex_token_iterator& right) <ins>const</ins>; +bool operator!=(const regex_token_iterator& right) <ins>const</ins>; +</pre></blockquote> + +<p> +3) In 28.12.2.3 [re.tokiter.deref] change the following declarations +</p> + +<blockquote><pre>const value_type& operator*() <ins>const</ins>; +const value_type* operator->() <ins>const</ins>; +</pre></blockquote> + + + + + +<hr> +<h3><a name="651"></a>651. Missing preconditions for regex_token_iterator c'tors</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The text provided in 28.12.2.1 [re.tokiter.cnstr]/2+3 describes +the effects of the three non-default constructors of class +template regex_token_iterator but is does not clarify which values +are legal values for submatch/submatches. This becomes +an issue, if one takes 28.12.2 [re.tokiter]/9 into account, which explains +the notion of a "current match" by saying: +</p> + +<blockquote><p> +The <i>current match</i> is <tt>(*position).prefix()</tt> if <tt>subs[N] +== -1</tt>, or <tt>(*position)[subs[N]]</tt> for any other value of +<tt>subs[N]</tt>. +</p></blockquote> + +<p> +It's not clear to me, whether other negative values except -1 +are legal arguments or not - it seems they are not. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add the following precondition paragraph just before the current +28.12.2.1 [re.tokiter.cnstr]/2: +</p> + +<blockquote><p> +<i>Requires:</i> Each of the initialization values of <tt>subs</tt> must be <tt>>= -1</tt>. +</p></blockquote> + + + + + +<hr> +<h3><a name="652"></a>652. regex_iterator and const correctness</h3> +<p><b>Section:</b> 28.12.1 [re.regiter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-05</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p>Both the class definition of regex_iterator (28.12.1 [re.regiter]/1) +and the latter member specification (28.12.1.2 [re.regiter.comp]/1+2) +declare both comparison operators as +non-const functions. Furtheron, both dereference operators are +unexpectedly also declared as non-const in 28.12.1 [re.regiter]/1 +as well as in (28.12.1.3 [re.regiter.deref]/1+2). +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +1) In (28.12.1 [re.regiter]/1) change the current declarations +</p> + +<blockquote><pre>bool operator==(const regex_iterator&) <ins>const</ins>; +bool operator!=(const regex_iterator&) <ins>const</ins>; +const value_type& operator*() <ins>const</ins>; +const value_type* operator->() <ins>const</ins>; +</pre></blockquote> + +<p> +2) In 28.12.1.3 [re.regiter.deref] change the following declarations +</p> + +<blockquote><pre>const value_type& operator*() <ins>const</ins>; +const value_type* operator->() <ins>const</ins>; +</pre></blockquote> + +<p> +3) In 28.12.1.2 [re.regiter.comp] change the following declarations +</p> + +<blockquote><pre>bool operator==(const regex_iterator& right) <ins>const</ins>; +bool operator!=(const regex_iterator& right) <ins>const</ins>; +</pre></blockquote> + + + + + +<hr> +<h3><a name="653"></a>653. Library reserved names</h3> +<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#New">New</a> + <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2007-03-08</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +</p> +<blockquote> +<p> +1.2 [intro.refs] Normative references +</p> + +<p> +The following standards contain provisions which, through reference in +this text, constitute provisions of this Interna- tional Standard. At +the time of publication, the editions indicated were valid. All +standards are subject to revision, and parties to agreements based on +this International Standard are encouraged to investigate the +possibility of applying the most recent editions of the standards +indicated below. Members of IEC and ISO maintain registers of currently +valid International Standards. +</p> + +<ul> +<li>Ecma International, ECMAScript Language Specification, Standard +Ecma-262, third edition, 1999.</li> +<li>ISO/IEC 2382 (all parts), Information technology - Vocabulary</li> +<li>ISO/IEC 9899:1990, Programming languages - C</li> +<li>ISO/IEC 9899/Amd.1:1995, Programming languages - C, AMENDMENT 1: C +Integrity</li> +<li>ISO/IEC 9899:1999, Programming languages - C</li> +<li>ISO/IEC 9899:1999/Cor.1:2001 Programming languages - C</li> +<li>ISO/IEC 9899:1999/Cor.2:2004 Programming languages - C</li> +<li>ISO/IEC 9945:2003, Information Technology-Portable Operating System +Interface (POSIX)</li> +<li>ISO/IEC 10646-1:1993 Information technology - Universal Multiple-Octet +Coded Character Set (UCS) - Part 1: Architecture and Basic Multilingual +Plane</li> +</ul> +</blockquote> + +<p> +I'm not sure how many of those reserve naming patterns that might affect +us, but I am equally sure I don't own a copy of any of these to check! +</p> +<p> +The point is to list the reserved naming patterns, rather than the +individual names themselves - although we may want to list C keywords +that are valid identifiers in C++ but likely to cause trouble in shared +headers (e.g. restrict) +</p> + + +<p><b>Proposed resolution:</b></p> + + + + + +<hr> +<h3><a name="654"></a>654. Missing IO roundtrip for random number engines</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#rand.req.eng">active issues</a> in [rand.req.eng].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Table 98 and para 5 in 26.4.1.3 [rand.req.eng] specify +the IO insertion and extraction semantic of random +number engines. It can be shown, v.i., that the specification +of the extractor cannot guarantee to fulfill the requirement +from para 5: +</p> + +<blockquote><p> +If a textual representation written via os << x was +subsequently read via is >> v, then x == v provided that +there have been no intervening invocations of x or of v. +</p></blockquote> + +<p> +The problem is, that the extraction process described in +table 98 misses to specify that it will initially set the +if.fmtflags to ios_base::dec, see table 104: +</p> + +<blockquote><p> +dec: converts integer input or generates integer output +in decimal base +</p></blockquote> + +<p> +Proof: The following small program demonstrates the violation +of requirements (exception safety not fulfilled): +</p> + +<blockquote><pre>#include <cassert> +#include <ostream> +#include <iostream> +#include <iomanip> +#include <sstream> + +class RanNumEngine { + int state; +public: + RanNumEngine() : state(42) {} + + bool operator==(RanNumEngine other) const { + return state == other.state; + } + + template <typename Ch, typename Tr> + friend std::basic_ostream<Ch, Tr>& operator<<(std::basic_ostream<Ch, Tr>& os, RanNumEngine engine) { + Ch old = os.fill(os.widen(' ')); // Sets space character + std::ios_base::fmtflags f = os.flags(); + os << std::dec << std::left << engine.state; // Adds ios_base::dec|ios_base::left + os.fill(old); // Undo + os.flags(f); + return os; + } + + template <typename Ch, typename Tr> + friend std::basic_istream<Ch, Tr>& operator>>(std::basic_istream<Ch, Tr>& is, RanNumEngine& engine) { + // Uncomment only for the fix. + + //std::ios_base::fmtflags f = is.flags(); + //is >> std::dec; + is >> engine.state; + //is.flags(f); + return is; + } +}; + +int main() { + std::stringstream s; + s << std::setfill('#'); // No problem + s << std::oct; // Yikes! + // Here starts para 5 requirements: + RanNumEngine x; + s << x; + RanNumEngine v; + s >> v; + assert(x == v); // Fails: 42 == 34 +} +</pre></blockquote> + +<p> +A second, minor issue seems to be, that the insertion +description from table 98 unnecessarily requires the +addition of ios_base::fixed (which only influences floating-point +numbers). Its not entirely clear to me whether the proposed +standard does require that the state of random number engines +is stored in integral types or not, but I have the impression +that this is the indent, see e.g. p. 3 +</p> + +<blockquote><p> +The specification of each random number engine defines the +size of its state in multiples of the size of its result_type. +</p></blockquote> + +<p> +If other types than integrals are supported, then I wonder why +no requirements are specified for the precision of the stream. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +1) In table 98 from 26.4.1.3 [rand.req.eng] in column "pre/post-condition", +row expression "<tt>is >> x</tt>" change +</p> + +<blockquote><p> +Sets <tt>v</tt>'s state as determined by +reading its textual representation +<ins>with <tt>is.fmtflags</tt> set to <tt>ios_base::dec</tt></ins> +from <tt>is</tt>. +</p></blockquote> + +<p> +2) In table 98 from 26.4.1.3 [rand.req.eng] in column "pre/post-condition", +row expression "<tt>os << x</tt>" change +</p> + +<blockquote><p> +With <tt>os.fmtflags</tt> set to +<tt>ios_base::dec|<del>ios_base::fixed|</del>ios_base::left</tt> and[..] +</p></blockquote> + + + + + +<hr> +<h3><a name="655"></a>655. Signature of generate_canonical not useful</h3> +<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#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In 26.4.2 [rand.synopsis] we have the declaration +</p> + +<blockquote><pre>template<class RealType, class UniformRandomNumberGenerator, + size_t bits> +result_type generate_canonical(UniformRandomNumberGenerator& g); +</pre></blockquote> + +<p> +Besides the "result_type" issue (already recognized by Bo Persson +at Sun, 11 Feb 2007 05:26:47 GMT in this group) it's clear, that +the template parameter order is not reasonably choosen: Obviously +one always needs to specify all three parameters, although usually +only two are required, namely the result type RealType and the +wanted bits, because UniformRandomNumberGenerator can usually +be deduced. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +In the header <tt><random></tt> synopsis 26.4.2 [rand.synopsis] as well as in the corresponding +function description in 26.4.7.2 [rand.util.canonical]26.4.7.2 between para 2 and 3 change the +declaration +</p> + +<blockquote><pre>template<class RealType<del>, class UniformRandomNumberGenerator</del>, size_t bits<ins>, class UniformRandomNumberGenerator</ins>> +RealType generate_canonical(UniformRandomNumberGenerator& g); +</pre></blockquote> + + + + + + +<hr> +<h3><a name="657"></a>657. unclear requirement about header inclusion</h3> +<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#New">New</a> + <b>Submitter:</b> Gennaro Prota <b>Date:</b> 2007-03-14</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +17.4.2.1 [using.headers] states: +</p> + +<blockquote><p> +A translation unit shall include a header only outside of any +external declaration or definition, [...] +</p></blockquote> + +<p> +I see three problems with this requirement: +</p> + +<ol type="a"> +<li><p>The C++ standard doesn't define what an "external declaration" or +an "external definition" are (incidentally the C99 standard does, and +has a sentence very similar to the above regarding header inclusion). +</p><p> +I think the intent is that the #include directive shall lexically +appear outside *any* declaration; instead, when the issue was pointed +out on comp.std.c++ at least one poster interpreted "external +declaration" as "declaration of an identifier with external linkage". +If this were the correct interpretation, then the two inclusions below +would be legal: +</p> +<blockquote><pre> // at global scope + static void f() + { +# include <cstddef> + } + + static void g() + { +# include <stddef.h> + } +</pre></blockquote> +<p> +(note that while the first example is unlikely to compile correctly, +the second one may well do) +</p></li> + +<li><p>as the sentence stands, violations will require a diagnostic; is +this the intent? It was pointed out on comp.std.c++ (by several +posters) that at least one way to ensure a diagnostic exists: +</p> +<blockquote><p> + [If there is an actual file for each header,] one simple way + to implement this would be to insert a reserved identifier + such as __begin_header at the start of each standard header. + This reserved identifier would be ignored for all other + purposes, except that, at the appropriate point in phase 7, if + it is found inside an external definition, a diagnostic is + generated. There's many other similar ways to achieve the same + effect. + </p> +<p> --James Kuyper, on comp.std.c++ +</p></blockquote></li> + +<li><p>is the term "header" meant to be limited to standard headers? +Clause 17 is all about the library, but still the general question is +interesting and affects one of the points in the explicit namespaces +proposal (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1691.html">n1691</a>): +</p> +<blockquote><p> + Those seeking to conveniently enable argument-dependent + lookups for all operators within an explicit namespace + could easily create a header file that does so: +</p><pre> namespace mymath:: + { + #include "using_ops.hpp" + } +</pre></blockquote> +</li> +</ol> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="658"></a>658. Two unspecified function comparators in [function.objects]</h3> +<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-19</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#function.objects">active issues</a> in [function.objects].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The header <tt><functional></tt> synopsis in 20.5 [function.objects] +contains the following two free comparison operator templates +for the <tt>function</tt> class template +</p> + +<blockquote><pre>template<class Function1, class Function2> +void operator==(const function<Function1>&, const function<Function2>&); +template<class Function1, class Function2> +void operator!=(const function<Function1>&, const function<Function2>&); +</pre></blockquote> + +<p> +which are nowhere described. I assume that they are relicts before the +corresponding two private and undefined member templates in the function +template (see 20.5.14.2 [func.wrap.func] and 20.5.14.2.6 [func.wrap.func.undef]) have been introduced. The original free +function templates should be removed, because using an undefined entity +would lead to an ODR violation of the user. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Remove the above mentioned two function templates from +the header <tt><functional></tt> synopsis (20.5 [function.objects]) +</p> + +<blockquote><pre><del>template<class Function1, class Function2> +void operator==(const function<Function1>&, const function<Function2>&); +template<class Function1, class Function2> +void operator!=(const function<Function1>&, const function<Function2>&);</del> +</pre></blockquote> + + + + + + +<hr> +<h3><a name="659"></a>659. istreambuf_iterator should have an operator->()</h3> +<p><b>Section:</b> 24.5.3 [istreambuf.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Niels Dekker <b>Date:</b> 2007-03-25</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istreambuf.iterator">issues</a> in [istreambuf.iterator].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Greg Herlihy has clearly demonstrated that a user defined input +iterator should have an operator->(), even if its +value type is a built-in type (comp.std.c++, "Re: Should any iterator +have an operator->() in C++0x?", March 2007). And as Howard +Hinnant remarked in the same thread that the input iterator +<tt>istreambuf_iterator</tt> doesn't have one, this must be a +defect! +</p> +<p> +Based on Greg's example, the following code demonstrates the issue: +</p><pre> #include <iostream> + #include <fstream> + #include <streambuf> + + typedef char C; + int main () + { + std::ifstream s("filename", std::ios::in); + std::istreambuf_iterator<char> i(s); + + (*i).~C(); // This is well-formed... + i->~C(); // ... so this should be supported! + } +</pre> + +<p> +Of course, operator-> is also needed when the value_type of +istreambuf_iterator is a class. +</p> +<p> +The operator-> could be implemented in various ways. For instance, +by storing the current value inside the iterator, and returning its +address. Or by returning a proxy, like operator_arrow_proxy, from +<a href="http://www.boost.org/boost/iterator/iterator_facade.hpp">http://www.boost.org/boost/iterator/iterator_facade.hpp</a> +</p> +<p> +I hope that the resolution of this issue will contribute to getting a +clear and consistent definition of iterator concepts. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add to the synopsis in 24.5.3 [istreambuf.iterator]: +</p> + +<blockquote><pre>charT operator*() const; +<ins>pointer operator->() const;</ins> +istreambuf_iterator<charT,traits>& operator++(); +</pre></blockquote> + +<p> +Change 24.5.3 [istreambuf.iterator], p1: +</p> + +<blockquote><p> +The class template <tt>istreambuf_iterator</tt> reads successive +characters from the <tt>streambuf</tt> for which it was constructed. +<tt>operator*</tt> provides access to the current input character, if +any. <ins><tt>operator-></tt> may return a proxy.</ins> Each time +<tt>operator++</tt> is evaluated, the iterator advances to the next +input character. If the end of stream is reached +(<tt>streambuf_type::sgetc()</tt> returns <tt>traits::eof()</tt>), the +iterator becomes equal to the end of stream iterator value. The default +constructor <tt>istreambuf_iterator()</tt> and the constructor +<tt>istreambuf_iterator(0)</tt> both construct an end of stream iterator +object suitable for use as an end-of-range. +</p></blockquote> + + + + + + +<hr> +<h3><a name="660"></a>660. Missing Bitwise Operations</h3> +<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2007-04-02</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#function.objects">active issues</a> in [function.objects].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p>Section 20.5 [function.objects] provides <span id="st" name="st" class="st">function</span> +<span id="st" name="st" class="st">objects</span> for some unary and binary +operations, but others are missing. In a LWG reflector discussion, beginning +with c++std-lib-18078, pros and cons of adding some of the missing operations +were discussed. Bjarne Stroustrup commented "Why standardize what isn't used? +Yes, I see the chicken and egg problems here, but it would be nice to see a +couple of genuine uses before making additions."</p> +<p>A number of libraries, including Rogue Wave, GNU, Adobe ASL, and Boost, have +already added these functions, either publicly or for internal use. For example, +Doug Gregor commented: "Boost will also add ... (|, &, ^) in 1.35.0, because we +need those <span id="st" name="st" class="st">function</span> +<span id="st" name="st" class="st">objects</span> to represent various parallel +collective operations (reductions, prefix reductions, etc.) in the new Message +Passing Interface (MPI) library."</p> +<p>Because the bitwise operators have the strongest use cases, the proposed +resolution is limited to them.</p> + + +<p><b>Proposed resolution:</b></p> +<p>To 20.5 [function.objects], Function objects, paragraph 2, add to the header +<functional> synopsis:</p> +<blockquote> + <pre>template <class T> struct bit_and; +template <class T> struct bit_or; +template <class T> struct bit_xor;</pre> +</blockquote> +<p>At a location in clause 20 to be determined by the Project Editor, add:</p> +<blockquote> + <p>The library provides basic function object classes for all of the bitwise + operators in the language ([expr.bit.and], [expr.or], [exp.xor]).</p> + <pre>template <class T> struct bit_and : binary_function<T,T,T> { + T operator()(const T& x , const T& y ) const; +};</pre> + <blockquote> + <p><code>operator()</code> returns<code> x & y</code> .</p> + </blockquote> + <pre>template <class T> struct bit_or : binary_function<T,T,T> { + T operator()(const T& x , const T& y ) const; +};</pre> + <blockquote> + <p><code>operator()</code> returns <code>x | y</code> .</p> + </blockquote> + <pre>template <class T> struct bit_xor : binary_function<T,T,T> { + T operator()(const T& x , const T& y ) const; +};</pre> + <blockquote> + <p><code>operator()</code> returns <code>x ^ y</code> .</p> + </blockquote> +</blockquote> + + + + + +<hr> +<h3><a name="661"></a>661. New 27.6.1.2.2 changes make special extractions useless</h3> +<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-04-01</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +To the more drastic changes of 27.6.1.2.2 [istream.formatted.arithmetic] in the current draft N2134 belong +the explicit description of the extraction of the types short and int in +terms of as-if code fragments. +</p> + +<ol> <li> -decimal32 is a <em>decimal32</em> number, which is encoded in four consecutive <del>bytes</del> <ins>octets</ins> (32 bits) +The corresponding as-if extractions in paragraph 2 and 3 will never +result in a change of the operator>> argument val, because the +contents of the local variable lval is in no case written into val. +Furtheron both fragments need a currently missing parentheses in the +beginning of the if-statement to be valid C++. +</li> +<li>I would like to ask whether the omission of a similar explicit +extraction of unsigned short and unsigned int in terms of long - +compared to their corresponding new insertions, as described in +27.6.2.6.2 [ostream.inserters.arithmetic], is a deliberate decision or +an +oversight. </li> +</ol> + + +<p><b>Proposed resolution:</b></p> +<ol> <li> -decimal64 is a <em>decimal64</em> number, which is encoded in eight consecutive <del>bytes</del> <ins>octets</ins> (64 bits) +<p> +In 27.6.1.2.2 [istream.formatted.arithmetic]/2 change the current as-if code fragment +</p> +<blockquote><pre>typedef num_get<charT,istreambuf_iterator<charT,traits> > numget; +iostate err = 0; +long lval; +use_facet<numget>(loc).get(*this, 0, *this, err, lval ); +if (err == 0) <ins>{</ins> + <del>&&</del> <ins>if</ins> (lval < numeric_limits<short>::min() || numeric_limits<short>::max() < lval)<del>)</del> + err = ios_base::failbit; + <ins>else + val = static_cast<short>(lval); +}</ins> +setstate(err); +</pre></blockquote> +<p> +Similarily in 27.6.1.2.2 [istream.formatted.arithmetic]/3 change the current as-if fragment +</p> + +<blockquote><pre>typedef num_get<charT,istreambuf_iterator<charT,traits> > numget; +iostate err = 0; +long lval; +use_facet<numget>(loc).get(*this, 0, *this, err, lval ); +if (err == 0) <ins>{</ins> + <del>&&</del> <ins>if</ins> (lval < numeric_limits<int>::min() || numeric_limits<int>::max() < lval)<del>)</del> + err = ios_base::failbit; + <ins>else + val = static_cast<int>(lval); +}</ins> +setstate(err); +</pre></blockquote> </li> <li> -decimal128 is a <em>decimal128</em> number, which is encoded in 16 consecutive <del>bytes</del> <ins>octets</ins> (128 bits) +--- </li> +</ol> + + + + + +<hr> +<h3><a name="662"></a>662. Inconsistent handling of incorrectly-placed thousands separators</h3> +<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#New">New</a> + <b>Submitter:</b> Cosmin Truta <b>Date:</b> 2007-04-05</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +From Section 22.2.2.1.2 [facet.num.get.virtuals], paragraphs 11 and 12, it is implied +that the value read from a stream must be stored +even if the placement of thousands separators does not conform to the +<code>grouping()</code> specification from the <code>numpunct</code> facet. +Since incorrectly-placed thousands separators are flagged as an extraction +failure (by the means of <code>failbit</code>), we believe it is better not +to store the value. A consistent strategy, in which any kind of extraction +failure leaves the input item intact, is conceptually cleaner, is able to avoid +corner-case traps, and is also more understandable from the programmer's point +of view. +</p> +<p> +Here is a quote from <i>"The C++ Programming Language (Special Edition)"</i> +by B. Stroustrup (Section D.4.2.3, pg. 897): +</p> +<blockquote><p> +<i>"If a value of the desired type could not be read, failbit is set in r. +[...] An input operator will use r to determine how to set the state of its +stream. If no error was encountered, the value read is assigned through v; +otherwise, v is left unchanged."</i> +</p></blockquote> +<p> +This statement implies that <code>rdstate()</code> alone is sufficient to +determine whether an extracted value is to be assigned to the input item +<i>val</i> passed to <code>do_get</code>. However, this is in disagreement +with the current C++ Standard. The above-mentioned assumption is true in all +cases, except when there are mismatches in digit grouping. In the latter case, +the parsed value is assigned to <i>val</i>, and, at the same time, <i>err</i> +is assigned to <code>ios_base::failbit</code> (essentially "lying" about the +success of the operation). Is this intentional? The current behavior raises +both consistency and usability concerns. +</p> +<p> +Although digit grouping is outside the scope of <code>scanf</code> (on which +the virtual methods of <code>num_get</code> are based), handling of grouping +should be consistent with the overall behavior of scanf. The specification of +<code>scanf</code> makes a distinction between input failures and matching +failures, and yet both kinds of failures have no effect on the input items +passed to <code>scanf</code>. A mismatch in digit grouping logically falls in +the category of matching failures, and it would be more consistent, and less +surprising to the user, to leave the input item intact whenever a failure is +being signaled. +</p> +<p> +The extraction of <code>bool</code> is another example outside the scope of +<code>scanf</code>, and yet consistent, even in the event of a successful +extraction of a <code>long</code> but a failed conversion from +<code>long</code> to <code>bool</code>. +</p> +<p> +Inconsistency is further aggravated by the fact that, when failbit is set, +subsequent extraction operations are no-ops until <code>failbit</code> is +explicitly cleared. Assuming that there is no explicit handling of +<code>rdstate()</code> (as in <code>cin>>i>>j</code>) it is +counter-intuitive to be able to extract an integer with mismatched digit +grouping, but to be unable to extract another, properly-formatted integer +that immediately follows. +</p> +<p> +Moreover, setting <code>failbit</code>, and selectively assigning a value to +the input item, raises usability problems. Either the strategy of +<code>scanf</code> (when there is no extracted value in case of failure), or +the strategy of the <code>strtol</code> family (when there is always an +extracted value, and there are well-defined defaults in case of a failure) are +easy to understand and easy to use. On the other hand, if <code>failbit</code> +alone cannot consistently make a difference between a failed extraction, and a +successful but not-quite-correct extraction whose output happens to be the same +as the previous value, the programmer must resort to implementation tricks. +Consider the following example: +</p> +<pre> int i = old_i; + cin >> i; + if (cin.fail()) + // can the value of i be trusted? + // what does it mean if i == old_i? + // ... +</pre> +<p> +Last but not least, the current behvaior is not only confusing to the casual +reader, but it has also been confusing to some book authors. Besides +Stroustrup's book, other books (e.g. "Standard C++ IOStreams and Locales" by +Langer and Kreft) are describing the same mistaken assumption. Although books +are not to be used instead of the standard reference, the readers of these +books, as well as the people who are generally familiar to <code>scanf</code>, +are even more likely to misinterpret the standard, and expect the input items +to remain intact when a failure occurs. +</p> + + +<p><b>Proposed resolution:</b></p> + +<p> +Change 22.2.2.1.2 [facet.num.get.virtuals]: +</p> + +<blockquote> +<p> +<b>Stage 3:</b> The result of stage 2 processing can be one of +</p> +<ul> +<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> + +<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> </ul> <p> -<del>[<i>Note:</i> this implies that <code>sizeof(std::decimal::decimal32) == 4</code>, <code>sizeof(std::decimal::decimal64) == 8</code>, and <code>sizeof(std::decimal::decimal128) == 16</code>. <i>--end note</i>]</del> +<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<numpunct<charT> >(<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> </p> </blockquote> + + + + + <hr> -<a name="600"><h3>600. Decimal: Wrong parameters for wcstod* functions</h3></a><p><b>Section:</b> <font color="red">Decimal 3.9</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Daniel Krugler <b>Date:</b> 28 May 2006</p> +<h3><a name="663"></a>663. Complexity Requirements</h3> +<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#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#structure.specifications">active issues</a> in [structure.specifications].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> -Daniel writes: +17.3.1.3 [structure.specifications] para 5 says </p> -<blockquote> -- 3.9.1 'Additions to <cwchar>' provides wrong -signatures to the wcstod32, wcstod64, and -wcstod128 functions ([the parameters have type pointer-to-] char instead of wchar_t). -</blockquote> + +<blockquote><p> +-5- Complexity requirements specified in the library +clauses are upper bounds, and implementations that provide better +complexity guarantees satisfy the requirements. +</p></blockquote> + +<p> +The following +objection has been raised: +</p> + +<blockquote><p> +The library clauses suggest general +guidelines regarding complexity, but we have been unable to discover +any absolute hard-and-fast formulae for these requirements. Unless +or until the Library group standardizes specific hard-and-fast +formulae, we regard all the complexity requirements as subject to a +"fudge factor" without any intrinsic upper bound. +</p></blockquote> + +<p> +[Plum ref +_23213Y31 etc] +</p> + + <p><b>Proposed resolution:</b></p> <p> -Change "3.9.1 Additions to <code><cwchar></code> synopsis" to: </p> -<pre> namespace std { - namespace decimal { - // 3.9.2 wcstod functions: - decimal32 wcstod32 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr); - decimal64 wcstod64 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr); - decimal128 wcstod128 (const <del>char</del> <ins>wchar_t</ins> * nptr, <del>char</del> <ins>wchar_t</ins> ** endptr); - } - } -</pre> + + + + + +<hr> +<h3><a name="664"></a>664. <tt>do_unshift</tt> for <tt>codecvt<char, char, mbstate_t></tt></h3> +<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#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.codecvt.virtuals">active issues</a> in [locale.codecvt.virtuals].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.1.4.2 [locale.codecvt.virtuals], para 7 says (regarding <tt>do_unshift</tt>): +</p> + +<blockquote><p> +<i>Effects:</i> Places characters starting at to that should be appended to +terminate a sequence when the current <tt>stateT</tt> is given by +<tt><i>state</i></tt>.<sup>237)</sup> Stores no more than <tt>(<i>to_limit</i> - +<i>to</i>)</tt> destination elements, and leaves the <tt><i>to_next</i></tt> +pointer pointing one beyond the last element successfully stored. +<em><tt>codecvt<char, char, mbstate_t></tt> stores no characters.</em> +</p></blockquote> + +<p> +The following objection has been raised: +</p> + +<blockquote><p> +Since the C++ Standard permits a nontrivial conversion for the required +instantiations of <tt>codecvt</tt>, it is overly restrictive to say that +<tt>do_unshift</tt> must store no characters and return <tt>noconv</tt>. +</p></blockquote> + +<p> +[Plum ref _222152Y50] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="665"></a>665. <tt>do_unshift</tt> return value</h3> +<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#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.codecvt.virtuals">active issues</a> in [locale.codecvt.virtuals].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.1.4.2 [locale.codecvt.virtuals], para 8 says: +</p> + +<blockquote><p> +<tt>codecvt<char,char,mbstate_t></tt>, returns <tt>noconv</tt>. +</p></blockquote> + +<p> +The following objection has been raised: +</p> + +<blockquote><p> +Despite what the C++ Standard +says, <tt>unshift</tt> can't always return <tt>noconv</tt> for the default facets, since +they can be nontrivial. At least one implementation does whatever the +C functions do. +</p></blockquote> + +<p> +[Plum ref _222152Y62] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + <hr> -<a name="601"><h3>601. Decimal: numeric_limits typos</h3></a><p><b>Section:</b> <font color="red">Decimal 3.3</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Daniel Krugler <b>Date:</b> 28 May 2006</p> +<h3><a name="666"></a>666. <tt>moneypunct::do_curr_symbol()</tt></h3> +<p><b>Section:</b> 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#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.moneypunct.virtuals">issues</a> in [locale.moneypunct.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.6.3.2 [locale.moneypunct.virtuals], para 4 footnote 257 says +</p> + +<blockquote><p> +<sup>257)</sup> For international +specializations (second template parameter <tt>true</tt>) this is always four +characters long, usually three letters and a space. +</p></blockquote> + <p> -Daniel writes in a private email: +The following objection has been raised: +</p> + +<blockquote><p> +The international currency +symbol is whatever the underlying locale says it is, not necessarily +four characters long. +</p></blockquote> + +<p> +[Plum ref _222632Y41] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="667"></a>667. <tt>money_get</tt>'s widened minus sign</h3> +<p><b>Section:</b> 22.2.6.1.2 [locale.money.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.money.get.virtuals">active issues</a> in [locale.money.get.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.money.get.virtuals">issues</a> in [locale.money.get.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.6.1.2 [locale.money.get.virtuals], para 1 says: +</p> + +<blockquote><p> +The result is returned as an integral value +stored in <tt>units</tt> or as a sequence of digits possibly preceded by a +minus sign (as produced by <tt>ct.widen(c)</tt> where <tt>c</tt> is '-' or in the range +from '0' through '9', inclusive) stored in <tt>digits</tt>. +</p></blockquote> + +<p> +The following +objection has been raised: +</p> + +<blockquote><p> +Some implementations interpret this to mean that a facet derived from +<tt>ctype<wchar_t></tt> can provide its own member <tt>do_widen(char)</tt> +which produces e.g. <tt>L'@'</tt> for the "widened" minus sign, and that the +<tt>'@'</tt> symbol will appear in the resulting sequence of digits. Other +implementations have assumed that one or more places in the standard permit the +implementation to "hard-wire" <tt>L'-'</tt> as the "widened" minus sign. Are +both interpretations permissible, or only one? +</p></blockquote> + +<p> +[Plum ref _222612Y14] +</p> + +<p> +Furthermore: if <tt>ct.widen('9')</tt> produces <tt>L'X'</tt> (a non-digit), does a +parse fail if a <tt>'9'</tt> appears in the subject string? [Plum ref _22263Y33] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="668"></a>668. <tt>money_get</tt>'s empty minus sign</h3> +<p><b>Section:</b> 22.2.6.1.2 [locale.money.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.money.get.virtuals">active issues</a> in [locale.money.get.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.money.get.virtuals">issues</a> in [locale.money.get.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.6.1.2 [locale.money.get.virtuals], para 3 says: +</p> + +<blockquote><p> +If <tt>pos</tt> or <tt>neg</tt> is empty, the sign component is +optional, and if no sign is detected, the result is given the sign +that corresponds to the source of the empty string. +</p></blockquote> + +<p> +The following +objection has been raised: +</p> + +<blockquote><p> +A <tt>negative_sign</tt> of "" means "there is no +way to write a negative sign" not "any null sequence is a negative +sign, so it's always there when you look for it". +</p></blockquote> + +<p> +[Plum ref _222612Y32] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="669"></a>669. Equivalent postive and negative signs in <tt>money_get</tt></h3> +<p><b>Section:</b> 22.2.6.1.2 [locale.money.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#locale.money.get.virtuals">active issues</a> in [locale.money.get.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.money.get.virtuals">issues</a> in [locale.money.get.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.6.1.2 [locale.money.get.virtuals], para 3 sentence 4 says: +</p> + +<blockquote><p> +If the first character of <tt>pos</tt> is equal to the first character of <tt>neg</tt>, +or if both strings are empty, the result is given a positive sign. +</p></blockquote> + +<p> +One interpretation is that an input sequence must match either the +positive pattern or the negative pattern, and then in either event it +is interpreted as positive. The following objections has been raised: +</p> + +<blockquote><p> +The input can successfully match only a positive sign, so the negative +pattern is an unsuccessful match. +</p></blockquote> + +<p> +[Plum ref _222612Y34, 222612Y51b] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="670"></a>670. <tt>money_base::pattern</tt> and <tt>space</tt></h3> +<p><b>Section:</b> 22.2.6.3 [locale.moneypunct] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Thomas Plum <b>Date:</b> 2007-04-16</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +22.2.6.3 [locale.moneypunct], para 2 says: +</p> + +<blockquote><p> +The value <tt>space</tt> indicates that at least one space is required at +that position. +</p></blockquote> + +<p> +The following objection has been raised: +</p> + +<blockquote><p> +Whitespace is optional when matching space. (See 22.2.6.1.2 [locale.money.get.virtuals], para 2.) +</p></blockquote> + +<p> +[Plum ref _22263Y22] +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="671"></a>671. precision of hexfloat</h3> +<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#New">New</a> + <b>Submitter:</b> John Salmon <b>Date:</b> 2007-04-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +I am trying to understand how TR1 supports hex float (%a) output. +</p> +<p> +As far as I can tell, it does so via the following: +</p> +<p> +8.15 Additions to header <locale> [tr.c99.locale] +</p> +<p> +In subclause 22.2.2.2.2 [facet.num.put.virtuals], Table 58 Floating-point conversions, after +the line: +floatfield == ios_base::scientific %E +</p> +<p> +add the two lines: +</p> +<blockquote><pre>floatfield == ios_base::fixed | ios_base::scientific && !uppercase %a +floatfield == ios_base::fixed | ios_base::scientific %A 2 +</pre></blockquote> +<p> +[Note: The additional requirements on print and scan functions, later +in this clause, ensure that the print functions generate hexadecimal +floating-point fields with a %a or %A conversion specifier, and that +the scan functions match hexadecimal floating-point fields with a %g +conversion specifier. end note] +</p> +<p> +Following the thread, in 22.2.2.2.2 [facet.num.put.virtuals], we find: +</p> +<p> +For conversion from a floating-point type, if (flags & fixed) != 0 or +if str.precision() > 0, then str.precision() is specified in the +conversion specification. +</p> +<p> +This would seem to imply that when floatfield == fixed|scientific, the +precision of the conversion specifier is to be taken from +str.precision(). Is this really what's intended? I sincerely hope +that I'm either missing something or this is an oversight. Please +tell me that the committee did not intend to mandate that hex floats +(and doubles) should by default be printed as if by %.6a. +</p> + +<p><i>[ +Howard: I think the fundamental issue we overlooked was that with %f, +%e, %g, the default precision was always 6. With %a the default +precision is not 6, it is infinity. So for the first time, we need to +distinguish between the default value of precision, and the precision +value 6. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="672"></a>672. Swappable requirements need updating</h3> +<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#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-04</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The current <tt>Swappable</tt> is: </p> <blockquote> +<table border="1"> +<caption>Table 37: <tt>Swappable</tt> requirements <b>[swappable]</b></caption> +<tbody><tr><th>expression</th><th>return type</th><th>post-condition</th></tr> +<tr><td><tt>swap(s,t)</tt></td><td><tt>void</tt></td><td><tt>t</tt> has the value originally held by <tt>u</tt>, and <tt>u</tt> has the value originally +held by <tt>t</tt></td></tr> +<tr><td colspan="3"> <p> -- 3.3 'Additions to header <limits>' contains two -errors in the specialisation of numeric_limits<decimal::decimal128>: +The Swappable requirement is met by satisfying one or more of the following conditions: </p> -<ol> -<li>The static member max() returns DEC128_MIN, this should be DEC128_MAX.</li> -<li>The static member digits is assigned to 384, -this should be 34 (Probably mixed up with the -max. exponent for decimal::decimal64).</li> -</ol> +<ul> +<li> +<tt>T</tt> is Swappable if <tt>T</tt> satisfies the <tt>CopyConstructible</tt> requirements (Table 34) +and the <tt>CopyAssignable</tt> requirements (Table 36); +</li> +<li> +<tt>T</tt> is Swappable if a namespace scope function named <tt>swap</tt> exists in the same +namespace as the definition of <tt>T</tt>, such that the expression <tt>swap(t,u)</tt> is valid +and has the semantics described in this table. +</li> +</ul> +</td></tr> +</tbody></table> </blockquote> + +<p> +With the passage of rvalue reference into the language, <tt>Swappable</tt> needs to be updated to +require only <tt>MoveConstructible</tt> and <tt>MoveAssignable</tt>. This is a minimum. +</p> + +<p> +Additionally we may want to support proxy references such that the following code is acceptable: +</p> + +<blockquote><pre>namespace Mine { + +template <class T> +struct proxy {...}; + +template <class T> +struct proxied_iterator +{ + typedef T value_type; + typedef proxy<T> reference; + reference operator*() const; + ... +}; + +struct A +{ + // heavy type, has an optimized swap, maybe isn't even copyable or movable, just swappable + void swap(A&); + ... +}; + +void swap(A&, A&); +void swap(proxy<A>, A&); +void swap(A&, proxy<A>); +void swap(proxy<A>, proxy<A>); + +} // Mine + +... + +Mine::proxied_iterator<Mine::A> i(...) +Mine::A a; +swap(*i1, a); +</pre></blockquote> + +<p> +I.e. here is a call to <tt>swap</tt> which the user enables swapping between a proxy to a class and the class +itself. We do not need to anything in terms of implementation except not block their way with overly +constrained concepts. That is, the <tt>Swappable</tt> concept should be expanded to allow swapping +between two different types for the case that one is binding to a user-defined <tt>swap</tt>. +</p> + + + <p><b>Proposed resolution:</b></p> + <p> -In "3.3 Additions to header <code><limits></code>" change numeric_limits<decimal::decimal128> as follows: +Change 20.1.1 [utility.arg.requirements]: </p> -<pre> template<> class numeric_limits<decimal::decimal128> { - public: - static const bool is_specialized = true; - static decimal::decimal128 min() throw() { return DEC128_MIN; } - static decimal::decimal128 max() throw() { return <del>DEC128_MIN;</del> <ins>DEC128_MAX;</ins> } +<blockquote> + +<p> +-1- The template definitions in the C++ Standard Library refer to various +named requirements whose details are set out in tables 31-38. In these +tables, <tt>T</tt> <ins>and <tt>V</tt> are</ins> <del>is a</del> type<ins>s</ins> to be supplied by a C++ program +instantiating a template; <tt>a</tt>, <tt>b</tt>, and <tt>c</tt> are +values of type <tt>const T</tt>; <tt>s</tt> and <tt>t</tt> are modifiable +lvalues of type <tt>T</tt>; <tt>u</tt> is a value of type (possibly +<tt>const</tt>) <tt>T</tt>; <del>and</del> <tt>rv</tt> is a non-<tt>const</tt> +rvalue of type <tt>T</tt><ins>; and <tt>v</tt> is a value of type <tt>V</tt></ins>. +</p> + +<table border="1"> +<caption>Table 37: <tt>Swappable</tt> requirements <b>[swappable]</b></caption> +<tbody><tr><th>expression</th><th>return type</th><th>post-condition</th></tr> +<tr><td><tt>swap(s,<del>t</del><ins>v</ins>)</tt></td><td><tt>void</tt></td> +<td><del><tt>t</tt></del><ins><tt>s</tt></ins> has the value originally +held by <del><tt>u</tt></del><ins><tt>v</tt></ins>, and +<del><tt>u</tt></del><ins><tt>v</tt></ins> has the value originally held +by <del><tt>t</tt></del><ins><tt>s</tt></ins></td></tr> +<tr><td colspan="3"> +<p> +The <tt>Swappable</tt> requirement is met by satisfying one or more of the following conditions: +</p> +<ul> +<li> +<tt>T</tt> is <tt>Swappable</tt> if <ins><tt>T</tt> and <tt>V</tt> are +the same type and </ins> <tt>T</tt> satisfies the +<del><tt>CopyConstructible</tt></del> +<ins><tt>MoveConstructible</tt></ins> requirements (Table <del>34</del> +<ins>33</ins>) and the <del><tt>CopyAssignable</tt></del> +<ins><tt>MoveAssignable</tt></ins> requirements (Table <del>36</del> +<ins>35</ins>); +</li> +<li> +<tt>T</tt> is <tt>Swappable</tt> <ins>with <tt>V</tt></ins> if a namespace scope function named +<tt>swap</tt> exists in the same namespace as the definition of +<tt>T</tt> <ins>or <tt>V</tt></ins>, such that the expression +<tt>swap(<del>t</del><ins>s</ins>,<del>u</del> <ins>v</ins>)</tt> is valid and has the +semantics described in this table. +</li> +</ul> +</td></tr> +</tbody></table> +</blockquote> + +<p><i>[Some editorial issues are also cleaned up by this resolution.]</i></p> + + +<p> + +</p> + + + + + - static const int digits = <del>384</del> <ins>34</ins>; - /* ... */ -</pre> <hr> -<a name="602"><h3>602. Decimal: "generic floating type" not defined.</h3></a><p><b>Section:</b> <font color="red">Decimal 3</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Daniel Krugler <b>Date:</b> 28 May 2006</p> +<h3><a name="673"></a>673. <tt>unique_ptr</tt> update</h3> +<p><b>Section:</b> 20.6.5 [unique.ptr] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-04</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Since the publication of +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a> +there have been a few small but significant advances which should be included into +<tt>unique_ptr</tt>. There exists a +<a href="http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr.html">reference implmenation</a> +for all of these changes. +</p> + +<ul> + +<li> +<p> +Even though <tt>unique_ptr<void></tt> is not a valid use case (unlike for <tt>shared_ptr<void></tt>), +unexpected cases to crop up which require the instantiation of the interface of <tt>unique_ptr<void></tt> +even if it is never used. For example see +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#541">LWG 541</a> for how this accidently +happened to <tt>auto_ptr</tt>. I believe the most robust way to protect <tt>unique_ptr</tt> against this +type of failure is to augment the return type of <tt>unique_ptr<T>:operator*()</tt> with +<tt>add_lvalue_reference<T>::type</tt>. This means that given an instantiated <tt>unique_ptr<void></tt> +the act of dereferencing it will simply return <tt>void</tt> instead of causing a compile time failure. +This is simpler than creating a <tt>unique_ptr<void></tt> specialization which isn't robust in the +face of <tt><i>cv-</i></tt>qualified <tt>void</tt> types. +</p> + +<p> +This resolution also supports instantiations such as <tt>unique_ptr<void, free_deleter></tt> +which could be very useful to the client. +</p> + +</li> + +<li> +<p> +Efforts have been made to better support containers and smart pointers in shared +memory contexts. One of the key hurdles in such support is not assuming that a +pointer type is actually a <tt>T*</tt>. This can easily be accomplished +for <tt>unique_ptr</tt> by having the deleter define the pointer type: +<tt>D::pointer</tt>. Furthermore this type can easily be defaulted to +<tt>T*</tt> should the deleter <tt>D</tt> choose not to define a pointer +type (reference implementation +<a href="http://home.twcny.rr.com/hinnant/cpp_extensions/unique_ptr.html">here</a>). +This change has no run time overhead. It has no interface overhead on +authors of custom delter types. It simply allows (but not requires) +authors of custom deleter types to define a smart pointer for the +storage type of <tt>unique_ptr</tt> if they find such functionality +useful. <tt>std::default_delete</tt> is an example of a deleter which +defaults <tt>pointer</tt> to <tt>T*</tt> by simply ignoring this issue +and not including a <tt>pointer typedef</tt>. +</p> +</li> + +<li> <p> -The document uses the term "generic floating types," but defines it nowhere. +When the deleter type is a function pointer then it is unsafe to construct +a <tt>unique_ptr</tt> without specifying the function pointer in the constructor. +This case is easy to check for with a <tt>static_assert</tt> assuring that the +deleter is not a pointer type in those constructors which do not accept deleters. </p> + +<blockquote><pre>unique_ptr<A, void(*)(void*)> p(new A); // error, no function given to delete the pointer! +</pre></blockquote> + +</li> + +</ul> + + + <p><b>Proposed resolution:</b></p> + +<p><i>[ +I am grateful for the generous aid of Peter Dimov and Ion Gaztañaga in helping formulate and review +the proposed resolutions below. +]</i></p> + + +<ul> +<li> + +<p> +Change 20.6.5.2 [unique.ptr.single]: +</p> + +<blockquote><pre>template <class T, class D = default_delete<T>> class unique_ptr { + ... + <del>T&</del> <ins>typename add_lvalue_reference<T>::type</ins> operator*() const; + ... +}; +</pre></blockquote> + +<p> +Change 20.6.5.2.4 [unique.ptr.single.observers]: +</p> + +<blockquote><pre><del>T&</del> <ins>typename add_lvalue_reference<T>::type</ins> operator*() const; +</pre></blockquote> + +</li> + +<li> +<p> +Change 20.6.5.2 [unique.ptr.single]: +</p> + +<blockquote><pre>template <class T, class D = default_delete<T>> class unique_ptr { +public: + <ins>typedef <i>implementation (see description below)</i> pointer;</ins> + ... + explicit unique_ptr(<del>T*</del> <ins>pointer</ins> p); + ... + unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined (see description below)</i> d); + unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined (see description below)</i> d); + ... + <del>T*</del> <ins>pointer</ins> operator->() const; + <del>T*</del> <ins>pointer</ins> get() const; + ... + <del>T*</del> <ins>pointer</ins> release(); + void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>); +}; +</pre></blockquote> + +<p> +<ins> +-3- If the type <tt>remove_reference<D>::type::pointer</tt> +exists, then <tt>unique_ptr<T, D>::pointer</tt> is a typedef to +<tt>remove_reference<D>::type::pointer</tt>. Otherwise +<tt>unique_ptr<T, D>::pointer</tt> is a typedef to <tt>T*</tt>. +The type <tt>unique_ptr<T, D>::pointer</tt> must be <tt>CopyConstructible</tt> +and <tt>CopyAssignable</tt>. +</ins> +</p> + +<p> +Change 20.6.5.2.1 [unique.ptr.single.ctor]: +</p> + +<blockquote><pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p); +... +unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); +unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); +... +unique_ptr(<del>T*</del> <ins>pointer</ins> p, const A& d); +unique_ptr(<del>T*</del> <ins>pointer</ins> p, A&& d); +... +unique_ptr(<del>T*</del> <ins>pointer</ins> p, A& d); +unique_ptr(<del>T*</del> <ins>pointer</ins> p, A&& d); +... +unique_ptr(<del>T*</del> <ins>pointer</ins> p, const A& d); +unique_ptr(<del>T*</del> <ins>pointer</ins> p, const A&& d); +... +</pre></blockquote> + <p> -Change the first paragraph of "3 Decimal floating-point types" as follows: +-23- <i>Requires:</i> If <tt>D</tt> is not a reference type, +construction of the deleter <tt>D</tt> from an rvalue of type <tt>E</tt> +must be well formed and not throw an exception. If <tt>D</tt> is a +reference type, then <tt>E</tt> must be the same type as <tt>D</tt> +(diagnostic required). <del><tt>U*</tt></del> <ins><tt>unique_ptr<U,E>::pointer</tt></ins> +must be implicitly convertible to <del><tt>T*</tt></del> +<ins>pointer</ins>. </p> + +<p> +-25- <i>Postconditions:</i> <tt>get() == value u.get()</tt> had before +the construction, modulo any required offset adjustments resulting from +the cast from <del><tt>U*</tt></del> +<ins><tt>unique_ptr<U,E>::pointer</tt></ins> to <del><tt>T*</tt></del> +<ins>pointer</ins>. <tt>get_deleter()</tt> returns a reference to the +internally stored deleter which was constructed from +<tt>u.get_deleter()</tt>. +</p> + +<p> +Change 20.6.5.2.3 [unique.ptr.single.asgn]: +</p> + <blockquote> -This Technical Report introduces three decimal floating-point types, named -decimal32, decimal64, and decimal128. The set of values of type decimal32 is a -subset of the set of values of type decimal64; the set of values of the type -decimal64 is a subset of the set of values of the type decimal128. Support for -decimal128 is optional. <ins>These types supplement the Standard C++ types -<code>float</code>, <code>double</code>, and <code>long double</code>, which are -collectively described as the <i>basic floating types</i></ins>. +<p> +-8- <i>Requires:</i> Assignment of the deleter <tt>D</tt> from an rvalue +<tt>D</tt> must not throw an exception. <del><tt>U*</tt></del> +<ins><tt>unique_ptr<U,E>::pointer</tt></ins> must be implicitly +convertible to <del><tt>T*</tt></del> <ins>pointer</ins>. +</p> </blockquote> -<hr> -<a name="603"><h3>603. Decimal: Trivially simplifying decimal classes.</h3></a><p><b>Section:</b> <font color="red">Decimal 3</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 May 2006</p> -<p>In c++std-lib-17198, Martin writes:</p> + +<p> +Change 20.6.5.2.4 [unique.ptr.single.observers]: +</p> <blockquote> -Each of the three classes proposed in the paper (decimal32, decimal64, -and decimal128) explicitly declares and specifies the semantics of its -copy constructor, copy assignment operator, and destructor. Since the -semantics of all three functions are identical to the trivial versions -implicitly generated by the compiler in the absence of any declarations -it is safe to drop them from the spec. This change would make the -proposed classes consistent with other similar classes already in the -standard (e.g., std::complex). +<pre><del>T*</del> <ins>pointer</ins> operator->() const;</pre> +... +<pre><del>T*</del> <ins>pointer</ins> get() const;</pre> </blockquote> -<p><b>Proposed resolution:</b></p> + <p> -Change "3.2.2 Class <code>decimal32</code>" as follows: +Change 20.6.5.2.5 [unique.ptr.single.modifiers]: </p> -<pre> namespace std { - namespace decimal { - class decimal32 { - public: - // 3.2.2.1 construct/copy/destroy: - decimal32(); - <del>decimal32(const decimal32 & d32);</del> - <del>decimal32 & operator=(const decimal32 & d32);</del> - <del>~decimal32();</del> - /* ... */ -</pre> + +<blockquote> +<pre><del>T*</del> <ins>pointer</ins> release();</pre> +... +<pre>void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>);</pre> +</blockquote> + <p> -Change "3.2.2.1 construct/copy/destroy" as follows: +Change 20.6.5.3 [unique.ptr.runtime]: </p> -<pre> decimal32(); - Effects: Constructs an object of type decimal32 with the value 0; +<blockquote><pre>template <class T, class D> class unique_ptr<T[], D> { +public: + <ins>typedef <i>implementation</i> pointer;</ins> + ... + explicit unique_ptr(<del>T*</del> <ins>pointer</ins> p); + ... + unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); + unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); + ... + <del>T*</del> <ins>pointer</ins> get() const; + ... + <del>T*</del> <ins>pointer</ins> release(); + void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>); +}; +</pre></blockquote> - <del>decimal32(const decimal32 & d32);</del> - <del>decimal32 & operator=(const decimal32 & d32);</del> +<p> +Change 20.6.5.3.1 [unique.ptr.runtime.ctor]: +</p> - <del>Effects: Copies an object of type decimal32.</del> +<blockquote> +<pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p); +unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); +unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); +</pre> - <del>~decimal32();</del> +<p> +These constructors behave the same as in the primary template except +that they do not accept pointer types which are convertible to +<del><tt>T*</tt></del> <ins><tt>pointer</tt></ins>. [<i>Note:</i> One +implementation technique is to create private templated overloads of +these members. <i>-- end note</i>] +</p> +</blockquote> - <del>Effects: Destroys an object of type decimal32.</del> +<p> +Change 20.6.5.3.3 [unique.ptr.runtime.modifiers]: +</p> +<blockquote> +<pre>void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>); </pre> + <p> -Change "3.2.3 Class <code>decimal64</code>" as follows: -</p> -<pre> namespace std { - namespace decimal { - class decimal64 { - public: - // 3.2.3.1 construct/copy/destroy: - decimal64(); - <del>decimal64(const decimal64 & d64);</del> - <del>decimal64 & operator=(const decimal64 & d64);</del> - <del>~decimal64();</del> - /* ... */ +-1- <i>Requires:</i> Does not accept pointer types which are convertible +to <del><tt>T*</tt></del> <ins><tt>pointer</tt></ins> (diagnostic +required). [<i>Note:</i> One implementation technique is to create a private +templated overload. <i>-- end note</i>] +</p> +</blockquote> + +<p> +Change 20.6.5.4 [unique.ptr.compiletime]: +</p> + +<blockquote><pre>template <class T, class D, size_t N> class unique_ptr<T[N], D> { +public: + <ins>typedef <i>implementation</i> pointer;</ins> + ... + explicit unique_ptr(<del>T*</del> <ins>pointer</ins> p); + ... + unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); + unique_ptr(<del>T*</del> <ins>pointer</ins> p, <i>implementation defined</i> d); + ... + <del>T*</del> <ins>pointer</ins> get() const; + ... + <del>T*</del> <ins>pointer</ins> release(); + void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>); +}; +</pre></blockquote> + +<p> +Change 20.6.5.4.3 [unique.ptr.compiletime.modifiers]: +</p> + +<blockquote> +<pre>void reset(<del>T*</del> <ins>pointer</ins> p = <del>0</del> <ins>pointer()</ins>); </pre> + <p> -Change "3.2.3.1 construct/copy/destroy" as follows: +-1- <i>Requires:</i> Does not accept pointer types which are convertible +to <del><tt>T*</tt></del> <ins><tt>pointer</tt></ins> (dignostic required). [<i>Note:</i> One implementation +technique is to create a private templated overload. <i>--end note</i>] </p> -<pre> decimal64(); - Effects: Constructs an object of type decimal64 with the value 0; +</blockquote> - <del>decimal64(const decimal64 & d64);</del> - <del>decimal64 & operator=(const decimal64 & d64);</del> +</li> - <del>Effects: Copies an object of type decimal64.</del> +<li> - <del>~decimal64();</del> +<p> +Change 20.6.5.2.1 [unique.ptr.single.ctor]: +</p> - <del>Effects: Destroys an object of type decimal64.</del> +<blockquote> +<pre>unique_ptr();</pre> +<blockquote> +<p> +<i>Requires:</i> <tt>D</tt> must be default constructible, and that +construction must not throw an exception. <tt>D</tt> must not be a +reference type <ins>or pointer type (diagnostic required)</ins>. +</p> +</blockquote> +<pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p);</pre> +<blockquote> +<p> +<i>Requires:</i> The expression <tt>D()(p)</tt> must be well formed. +The default constructor of <tt>D</tt> must not throw an exception. +<tt>D</tt> must not be a reference type <ins>or pointer type (diagnostic +required)</ins>. +</p> +</blockquote> +</blockquote> -</pre> <p> -Change "3.2.4 Class <code>decimal128</code>" as follows: -</p> -<pre> namespace std { - namespace decimal { - class decimal128 { - public: - // 3.2.4.1 construct/copy/destroy: - decimal128(); - <del>decimal128(const decimal128 & d128);</del> - <del>decimal128 & operator=(const decimal128 & d128);</del> - <del>~decimal128();</del> - /* ... */ -</pre> +Change 20.6.5.2.1 [unique.ptr.single.ctor]: +</p> + +<blockquote> +<pre>unique_ptr();</pre> +<blockquote> <p> -Change "3.2.4.1 construct/copy/destroy" as follows: +<i>Requires:</i> <tt>D</tt> must be default constructible, and that +construction must not throw an exception. <tt>D</tt> must not be a +reference type <ins>or pointer type (diagnostic required)</ins>. </p> -<pre> decimal128(); +</blockquote> +<pre>unique_ptr(<del>T*</del> <ins>pointer</ins> p);</pre> +<blockquote> +<p> +<i>Requires:</i> The expression <tt>D()(p)</tt> must be well formed. +The default constructor of <tt>D</tt> must not throw an exception. +<tt>D</tt> must not be a reference type <ins>or pointer type (diagnostic +required)</ins>. +</p> +</blockquote> +</blockquote> + +</li> + +</ul> - Effects: Constructs an object of type decimal128 with the value 0; - <del>decimal128(const decimal128 & d128);</del> - <del>decimal128 & operator=(const decimal128 & d128);</del> - <del>Effects: Copies an object of type decimal128.</del> - <del>~decimal128();</del> - <del>Effects: Destroys an object of type decimal128.</del> -</pre> <hr> -<a name="604"><h3>604. Decimal: Storing a reference to a facet unsafe.</h3></a><p><b>Section:</b> <font color="red">Decimal 3</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Review">Review</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 May 2006</p> +<h3><a name="674"></a>674. <tt>shared_ptr</tt> interface changes for consistency with N1856</h3> +<p><b>Section:</b> 20.6.6.2 [util.smartptr.shared] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-05</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared">issues</a> in [util.smartptr.shared].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> -In c++std-lib-17197, Martin writes: +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html">N1856</a> does not propose +any changes to <tt>shared_ptr</tt>. It needs to be updated to use a rvalue reference where appropriate +and to interoperate with <tt>unique_ptr</tt> as it does with <tt>auto_ptr</tt>. +</p> + + +<p><b>Proposed resolution:</b></p> + +<p> +Change 20.6.6.2 [util.smartptr.shared] as follows: </p> + <blockquote> -The extended_num_get and extended_num_put facets are designed -to store a reference to a num_get or num_put facet which the -extended facets delegate the parsing and formatting of types -other than decimal. One form of the extended facet's ctor (the -default ctor and the size_t overload) obtains the reference -from the global C++ locale while the other form takes this -reference as an argument. +<pre>template<class Y> explicit shared_ptr(auto_ptr<Y><del>&</del><ins>&&</ins> r); +<ins>private: +template<class Y, class D> explicit shared_ptr(const unique_ptr<Y,D>& r); +public: +template<class Y, class D> explicit shared_ptr(unique_ptr<Y,D>&& r);</ins> +... +template<class Y> shared_ptr& operator=(auto_ptr<Y><del>&</del><ins>&&</ins> r); +<ins> +private: +template<class Y, class D> shared_ptr& operator=(const unique_ptr<Y,D>& r); +public: +template<class Y, class D> shared_ptr& operator=(unique_ptr<Y,D>&& r);</ins></pre> </blockquote> + +<p> +Change 20.6.6.2.1 [util.smartptr.shared.const] as follows: +</p> + <blockquote> -The problem with storing a reference to a facet in another -object (as opposed to storing the locale object in which the -facet is installed) is that doing so bypasses the reference -counting mechanism designed to prevent a facet that is still -being referenced (i.e., one that is still installed in some -locale) from being destroyed when another locale that contains -it is destroyed. Separating a facet reference from the locale -it comes from van make it cumbersome (and in some cases might -even make it impossible) for programs to prevent invalidating -the reference. (The danger of this design is highlighted in -the paper.) +<pre><ins>template<class Y> shared_ptr(auto_ptr<Y><del>&</del><ins>&&</ins> r);</ins></pre> </blockquote> + +<p> +Add to 20.6.6.2.1 [util.smartptr.shared.const]: +</p> + <blockquote> -This problem could be easily avoided by having the extended -facets store a copy of the locale from which they would extract -the base facet either at construction time or when needed. To -make it possible, the forms of ctors of the extended facets that -take a reference to the base facet would need to be changed to -take a locale argument instead. +<pre><ins>template<class Y, class D> shared_ptr(unique_ptr<Y, D>&& r);</ins></pre> +<blockquote> + +<p><ins> +<i>Effects:</i> Equivalent to <tt>shared_ptr( r.release(), r.get_deleter() )</tt> when <tt>D</tt> is + not a reference type, <tt>shared_ptr( r.release(), ref( r.get_deleter() ) )</tt> + otherwise. +</ins></p> + +<p><ins> +<i>Exception safety:</i> If an exception is thrown, the constructor has no effect. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 20.6.6.2.3 [util.smartptr.shared.assign] as follows: +</p> + +<blockquote> +<pre>template<class Y> shared_ptr& operator=(auto_ptr<Y><del>&</del><ins>&&</ins> r);</pre> +</blockquote> + +<p> +Add to 20.6.6.2.3 [util.smartptr.shared.assign]: +</p> + +<blockquote> +<pre><ins>template<class Y, class D> shared_ptr& operator=(unique_ptr<Y,D>&& r);</ins></pre> + +<blockquote> +<p><ins> +-4- <i>Effects:</i> Equivalent to <tt>shared_ptr(std::move(r)).swap(*this)</tt>. +</ins></p> +<p><ins> +-5- <i>Returns:</i> <tt>*this</tt>. +</ins></p> +</blockquote> + </blockquote> + + + + + + +<hr> +<h3><a name="675"></a>675. Move assignment of containers</h3> +<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#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-05</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +James Hopkin pointed out to me that if <tt>vector<T></tt> move assignment is O(1) +(just a <tt>swap</tt>) then containers such as <tt>vector<shared_ptr<ostream>></tt> might have +the wrong semantics under move assignment when the source is not truly an rvalue, but a +moved-from lvalue (destructors could run late). +</p> + +<blockquote><pre><tt>vector<shared_ptr<ostream>></tt> v1; +<tt>vector<shared_ptr<ostream>></tt> v2; +... +v1 = v2; // #1 +v1 = std::move(v2); // #2 +</pre></blockquote> + +<p> +Move semantics means not caring what happens to the source (<tt>v2</tt> in this example). +It doesn't mean not caring what happens to the target (<tt>v1</tt>). In the above example +both assignments should have the same effect on <tt>v1</tt>. Any non-shared <tt>ostream</tt>'s +<tt>v1</tt> owns before the assignment should be closed, whether <tt>v1</tt> is undergoing +copy assignment or move assignment. +</p> + +<p> +This implies that the semantics of move assignment of a generic container should be +<tt>clear, swap</tt> instead of just swap. An alternative which could achieve the same +effect would be to move assign each element. In either case, the complexity of move +assignment needs to be relaxed to <tt>O(v1.size())</tt>. +</p> + +<p> +The performance hit of this change is not nearly as drastic as it sounds. +In practice, the target of a move assignment has always just been move constructed +or move assigned <i>from</i>. Therefore under <tt>clear, swap</tt> semantics (in +this common use case) we are still achieving O(1) complexity. +</p> + + + <p><b>Proposed resolution:</b></p> <p> -1. Change the <code>extended_num_get</code> synopsis in 3.10.2 as follows: +Change 23.1 [container.requirements]: </p> -<pre> extended_num_get(const <del>std::num_get<charT, InputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); - /* ... */ +<blockquote> +<table border="1"> +<caption>Table 86: Container requirements</caption> +<tbody><tr> +<th>expression</th><th>return type</th><th>operational semantics</th> +<th>assertion/note pre/post-condition</th><th>complexity</th> +</tr> +<tr> +<td><tt>a = rv;</tt></td><td><tt>X&</tt></td> +<td><ins>All existing elements of <tt>a</tt> are either move assigned or destructed</ins></td> +<td><tt>a</tt> shall be equal to the +value that <tt>rv</tt> had +before this construction +</td> +<td><del>constant</del> <ins>linear</ins></td> +</tr> +</tbody></table> +</blockquote> - <del>// <i>const std::num_get<charT, InputIterator> & <b>base</b></i>; <i><b>exposition only</b></i></del> - <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins> + + + + + +<hr> +<h3><a name="676"></a>676. Moving the unordered containers</h3> +<p><b>Section:</b> 23.4 [unord] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-05-05</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Move semantics are missing from the <tt>unordered</tt> containers. The proposed +resolution below adds move-support consistent with +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1858.html">N1858</a> +and the current working draft. +</p> + +<p> +The current proposed resolution simply lists the requirements for each function. +These might better be hoisted into the requirements table for unordered associative containers. +Futhermore a mild reorganization of the container requirements could well be in order. +This defect report is purposefully ignoring these larger issues and just focusing +on getting the unordered containers "moved". +</p> + + + +<p><b>Proposed resolution:</b></p> + +<p> +Add to 23.4 [unord]: +</p> + +<blockquote><pre>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x, + unordered_map<Key, T, Hash, Pred, Alloc>& y); + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x, + unordered_map<Key, T, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>&& x, + unordered_map<Key, T, Hash, Pred, Alloc>& y);</ins> + +template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>& y); + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>&& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>& y);</ins> + +... + +template <class Value, class Hash, class Pred, class Alloc> + void swap(unordered_set<Value, Hash, Pred, Alloc>& x, + unordered_set<Value, Hash, Pred, Alloc>& y); + +<ins>template <class Value, class Hash, class Pred, class Alloc> + void swap(unordered_set<Value, Hash, Pred, Alloc>& x, + unordered_set<Value, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Value, class Hash, class Pred, class Alloc> + void swap(unordered_set<Value, Hash, Pred, Alloc>&& x, + unordered_set<Value, Hash, Pred, Alloc>& y);</ins> + +template <class Value, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Value, Hash, Pred, Alloc>& x, + unordered_multiset<Value, Hash, Pred, Alloc>& y); + +<ins>template <class Value, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Value, Hash, Pred, Alloc>& x, + unordered_multiset<Value, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Value, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Value, Hash, Pred, Alloc>&& x, + unordered_multiset<Value, Hash, Pred, Alloc>& y);</ins> +</pre></blockquote> + +<p><b><tt>unordered_map</tt></b></p> + +<p> +Change 23.4.1 [unord.map]: +</p> + +<blockquote><pre>class unordered_map +{ + ... + unordered_map(const unordered_map&); + <ins>unordered_map(unordered_map&&);</ins> + ~unordered_map(); + unordered_map& operator=(const unordered_map&); + <ins>unordered_map& operator=(unordered_map&&);</ins> + ... + // modifiers + <del>std::</del>pair<iterator, bool> insert(const value_type& obj); + <ins>template <class P> pair<iterator, bool> insert(P&& obj);</ins> + iterator insert(iterator hint, const value_type& obj); + <ins>template <class P> iterator insert(iterator hint, P&& obj);</ins> + const_iterator insert(const_iterator hint, const value_type& obj); + <ins>template <class P> const_iterator insert(const_iterator hint, P&& obj);</ins> + ... + void swap(unordered_map&<ins>&</ins>); + ... + mapped_type& operator[](const key_type& k); + <ins>mapped_type& operator[](key_type&& k);</ins> + ... +}; + +template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x, + unordered_map<Key, T, Hash, Pred, Alloc>& y); + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x, + unordered_map<Key, T, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>&& x, + unordered_map<Key, T, Hash, Pred, Alloc>& y);</ins> +</pre></blockquote> + +<p> +Add to 23.4.1.1 [unord.map.cnstr]: +</p> + +<blockquote> +<pre>template <class InputIterator> + unordered_map(InputIterator f, InputIterator l, + size_type n = <i>implementation-defined</i>, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& a = allocator_type()); </pre> + +<blockquote><p> +<ins> +<i>Requires:</i> If the iterator's dereference operator returns an +lvalue or a const rvalue <tt>pair<key_type, mapped_type></tt>, +then both <tt>key_type</tt> and <tt>mapped_type</tt> shall be +<tt>CopyConstructible</tt>. +</ins> +</p></blockquote> +</blockquote> + <p> -2. Change the description of the above constructor in 3.10.2.1: +Add to 23.4.1.2 [unord.map.elem]: +</p> + +<blockquote> + +<pre>mapped_type& operator[](const key_type& k);</pre> + +<blockquote> +<p>...</p> +<p><ins> +<i>Requires:</i> <tt>key_type</tt> shall be <tt>CopyConstructible</tt> +and <tt>mapped_type</tt> shall be <tt>DefaultConstructible</tt>. +</ins></p> +</blockquote> + +<pre><ins>mapped_type& operator[](key_type&& k);</ins></pre> + +<blockquote> +<p><ins> +<i>Effects:</i> If the <tt>unordered_map</tt> does not already contain an +element whose key is equivalent to <tt>k</tt> , inserts the value +<tt>std::pair<const key_type, mapped_type>(std::move(k), mapped_type())</tt>. +</ins></p> + +<p><ins> +<i>Requires:</i> <tt>mapped_type</tt> shall be <tt>DefaultConstructible</tt>. +</ins></p> + +<p><ins> +<i>Returns:</i> A reference to <tt>x.second</tt>, where <tt>x</tt> is the +(unique) element whose key is equivalent to <tt>k</tt>. +</ins></p> + +</blockquote> + +</blockquote> + +<p> +Add new section [unord.map.modifiers]: </p> -<pre> extended_num_get(const <del>std::num_get<charT, InputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); +<blockquote> +<pre><ins>pair<iterator, bool> insert(const value_type& x);</ins> +<ins>template <class P> pair<iterator, bool> insert(P&& x);</ins> +<ins>iterator insert(iterator hint, const value_type& x);</ins> +<ins>template <class P> iterator insert(iterator hint, P&& x);</ins> +<ins>const_iterator insert(const_iterator hint, const value_type& x);</ins> +<ins>template <class P> const_iterator insert(const_iterator hint, P&& x);</ins> +<ins>template <class InputIterator> + void insert(InputIterator first, InputIterator last);</ins> </pre> + <blockquote> +<p><ins> +<i>Requires:</i> Those signatures taking a <tt>const value_type&</tt> parameter +requires both the <tt>key_type</tt> and the <tt>mapped_type</tt> to be +<tt>CopyConstructible</tt>. +</ins></p> + +<p><ins> +<tt>P</tt> shall be convertible to <tt>value_type</tt>. + If <tt>P</tt> is instantiated as a reference +type, then the argument <tt>x</tt> is copied from. Otherwise <tt>x</tt> +is considered to be an rvalue as it is converted to <tt>value_type</tt> +and inserted into the <tt>unordered_map</tt>. Specifically, in such +cases <tt>CopyConstructible</tt> is not required of <tt>key_type</tt> or +<tt>mapped_type</tt> unless the conversion from <tt>P</tt> specifically +requires it (e.g. if <tt>P</tt> is a <tt>tuple<const key_type, +mapped_type></tt>, then <tt>key_type</tt> must be +<tt>CopyConstructible</tt>). +</ins></p> + +<p><ins> +The signature taking <tt>InputIterator</tt> +parameters requires <tt>CopyConstructible</tt> of both +<tt>key_type</tt> and <tt>mapped_type</tt> if the dereferenced +<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue +<tt>value_type</tt>. +</ins></p> + +</blockquote> + +</blockquote> + <p> -<b>Effects:</b> Constructs an <code>extended_num_get</code> facet as if by: +Add to 23.4.1.3 [unord.map.swap]: </p> -<pre> extended_num_get(const <del>std::num_get<charT, InputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0) - : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>) - { /* ... */ } +<blockquote> +<pre>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x, + unordered_map<Key, T, Hash, Pred, Alloc>& y); +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x, + unordered_map<Key, T, Hash, Pred, Alloc>&& y);</ins> +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_map<Key, T, Hash, Pred, Alloc>&& x, + unordered_map<Key, T, Hash, Pred, Alloc>& y);</ins> </pre> +</blockquote> + +<p><b><tt>unordered_multimap</tt></b></p> + <p> -<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_get</code> facet.</del> +Change 23.4.2 [unord.multimap]: +</p> + +<blockquote><pre>class unordered_multimap +{ + ... + unordered_multimap(const unordered_multimap&); + <ins>unordered_multimap(unordered_multimap&&);</ins> + ~unordered_multimap(); + unordered_multimap& operator=(const unordered_multimap&); + <ins>unordered_multimap& operator=(unordered_multimap&&);</ins> + ... + // modifiers + iterator insert(const value_type& obj); + <ins>template <class P> iterator insert(P&& obj);</ins> + iterator insert(iterator hint, const value_type& obj); + <ins>template <class P> iterator insert(iterator hint, P&& obj);</ins> + const_iterator insert(const_iterator hint, const value_type& obj); + <ins>template <class P> const_iterator insert(const_iterator hint, P&& obj);</ins> + ... + void swap(unordered_multimap&<ins>&</ins>); + ... +}; + +template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>& y); + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>&& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>& y);</ins> +</pre></blockquote> + +<p> +Add to 23.4.2.1 [unord.multimap.cnstr]: </p> + +<blockquote> +<pre>template <class InputIterator> + unordered_multimap(InputIterator f, InputIterator l, + size_type n = <i>implementation-defined</i>, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& a = allocator_type()); +</pre> + +<blockquote><p> +<ins> +<i>Requires:</i> If the iterator's dereference operator returns an +lvalue or a const rvalue <tt>pair<key_type, mapped_type></tt>, +then both <tt>key_type</tt> and <tt>mapped_type</tt> shall be +<tt>CopyConstructible</tt>. +</ins> +</p></blockquote> </blockquote> + <p> -3. Change the <b>Returns:</b> clause for <code>do_get(iter_type, iter_type, ios_base &, ios_base::iostate &, bool &) const</code>, <i>et al</i> to +Add new section [unord.multimap.modifiers]: </p> + <blockquote> -<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet<std::num_get<charT, InputIterator> >(<i>baseloc</i>)</ins>.get(<i>in</i>, <i>end</i>, <i>str</i>, <i>err</i>, <i>val</i>)</code>. +<pre><ins>iterator insert(const value_type& x);</ins> +<ins>template <class P> iterator insert(P&& x);</ins> +<ins>iterator insert(iterator hint, const value_type& x);</ins> +<ins>template <class P> iterator insert(iterator hint, P&& x);</ins> +<ins>const_iterator insert(const_iterator hint, const value_type& x);</ins> +<ins>template <class P> const_iterator insert(const_iterator hint, P&& x);</ins> +<ins>template <class InputIterator> + void insert(InputIterator first, InputIterator last);</ins> +</pre> + +<blockquote> +<p><ins> +<i>Requires:</i> Those signatures taking a <tt>const value_type&</tt> parameter +requires both the <tt>key_type</tt> and the <tt>mapped_type</tt> to be +<tt>CopyConstructible</tt>. +</ins></p> + +<p><ins> +<tt>P</tt> shall be convertible to <tt>value_type</tt>. + If <tt>P</tt> is instantiated as a reference +type, then the argument <tt>x</tt> is copied from. Otherwise <tt>x</tt> +is considered to be an rvalue as it is converted to <tt>value_type</tt> +and inserted into the <tt>unordered_multimap</tt>. Specifically, in such +cases <tt>CopyConstructible</tt> is not required of <tt>key_type</tt> or +<tt>mapped_type</tt> unless the conversion from <tt>P</tt> specifically +requires it (e.g. if <tt>P</tt> is a <tt>tuple<const key_type, +mapped_type></tt>, then <tt>key_type</tt> must be +<tt>CopyConstructible</tt>). +</ins></p> + +<p><ins> +The signature taking <tt>InputIterator</tt> +parameters requires <tt>CopyConstructible</tt> of both +<tt>key_type</tt> and <tt>mapped_type</tt> if the dereferenced +<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue +<tt>value_type</tt>. +</ins></p> +</blockquote> + </blockquote> + <p> -4. Change the <code>extended_num_put</code> synopsis in 3.10.3 as follows: +Add to 23.4.2.2 [unord.multimap.swap]: </p> -<pre> extended_num_put(const <del>std::num_put<charT, OutputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); - /* ... */ +<blockquote> +<pre>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>& y); +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>&& y);</ins> +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>&& x, + unordered_multimap<Key, T, Hash, Pred, Alloc>& y);</ins> +</pre> +</blockquote> - <del>// <i>const std::num_put<charT, OutputIterator> & <b>base</b></i>; <i><b>exposition only</b></i></del> - <ins>// <i>std::locale <b>baseloc</b></i>; <i><b>exposition only</b></i></ins> +<p><b><tt>unordered_set</tt></b></p> + +<p> +Change 23.4.3 [unord.set]: +</p> + +<blockquote><pre>class unordered_set +{ + ... + unordered_set(const unordered_set&); + <ins>unordered_set(unordered_set&&);</ins> + ~unordered_set(); + unordered_set& operator=(const unordered_set&); + <ins>unordered_set& operator=(unordered_set&&);</ins> + ... + // modifiers + <del>std::</del>pair<iterator, bool> insert(const value_type& obj); + <ins>pair<iterator, bool> insert(value_type&& obj);</ins> + iterator insert(iterator hint, const value_type& obj); + <ins>iterator insert(iterator hint, value_type&& obj);</ins> + const_iterator insert(const_iterator hint, const value_type& obj); + <ins>const_iterator insert(const_iterator hint, value_type&& obj);</ins> + ... + void swap(unordered_set&<ins>&</ins>); + ... +}; + +template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_set<Key, T, Hash, Pred, Alloc>& x, + unordered_set<Key, T, Hash, Pred, Alloc>& y); + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_set<Key, T, Hash, Pred, Alloc>& x, + unordered_set<Key, T, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_set<Key, T, Hash, Pred, Alloc>&& x, + unordered_set<Key, T, Hash, Pred, Alloc>& y);</ins> +</pre></blockquote> + +<p> +Add to 23.4.3.1 [unord.set.cnstr]: +</p> + +<blockquote> +<pre>template <class InputIterator> + unordered_set(InputIterator f, InputIterator l, + size_type n = <i>implementation-defined</i>, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& a = allocator_type()); </pre> + +<blockquote><p> +<ins> +<i>Requires:</i> If the iterator's dereference operator returns an +lvalue or a const rvalue <tt>value_type</tt>, then the +<tt>value_type</tt> shall be <tt>CopyConstructible</tt>. +</ins> +</p></blockquote> +</blockquote> + <p> -5. Change the description of the above constructor in 3.10.3.1: +Add new section [unord.set.modifiers]: </p> -<pre> extended_num_put(const <del>std::num_put<charT, OutputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0); + +<blockquote> +<pre><ins>pair<iterator, bool> insert(const value_type& x);</ins> +<ins>pair<iterator, bool> insert(value_type&& x);</ins> +<ins>iterator insert(iterator hint, const value_type& x);</ins> +<ins>iterator insert(iterator hint, value_type&& x);</ins> +<ins>const_iterator insert(const_iterator hint, const value_type& x);</ins> +<ins>const_iterator insert(const_iterator hint, value_type&& x);</ins> +<ins>template <class InputIterator> + void insert(InputIterator first, InputIterator last);</ins> </pre> + <blockquote> + +<p><ins> +<i>Requires:</i> Those signatures taking a <tt>const +value_type&</tt> parameter requires the <tt>value_type</tt> to +be <tt>CopyConstructible</tt>. +</ins></p> + +<p><ins> +The signature taking <tt>InputIterator</tt> parameters requires +<tt>CopyConstructible</tt> of <tt>value_type</tt> if the dereferenced +<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue +<tt>value_type</tt>. +</ins></p> + +</blockquote> + +</blockquote> + <p> -<b>Effects:</b> Constructs an <code>extended_num_put</code> facet as if by: +Add to 23.4.3.2 [unord.set.swap]: </p> -<pre> extended_num_put(const <del>std::num_put<charT, OutputIterator></del> <ins>std::locale</ins> & <i>b</i>, size_t <i>refs</i> = 0) - : facet(<i>refs</i>), <i>base<ins>loc</ins></i>(<i>b</i>) - { /* ... */ } +<blockquote> +<pre>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_set<Key, T, Hash, Pred, Alloc>& x, + unordered_set<Key, T, Hash, Pred, Alloc>& y); +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_set<Key, T, Hash, Pred, Alloc>& x, + unordered_set<Key, T, Hash, Pred, Alloc>&& y);</ins> +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_set<Key, T, Hash, Pred, Alloc>&& x, + unordered_set<Key, T, Hash, Pred, Alloc>& y);</ins> </pre> +</blockquote> + +<p><b><tt>unordered_multiset</tt></b></p> + <p> -<del><b>Notes:</b> Care must be taken by the implementation to ensure that the lifetime of the facet referenced by <i>base</i> exceeds that of the resulting <code>extended_num_put</code> facet.</del> +Change 23.4.4 [unord.multiset]: +</p> + +<blockquote><pre>class unordered_multiset +{ + ... + unordered_multiset(const unordered_multiset&); + <ins>unordered_multiset(unordered_multiset&&);</ins> + ~unordered_multiset(); + unordered_multiset& operator=(const unordered_multiset&); + <ins>unordered_multiset& operator=(unordered_multiset&&);</ins> + ... + // modifiers + iterator insert(const value_type& obj); + <ins>iterator insert(value_type&& obj);</ins> + iterator insert(iterator hint, const value_type& obj); + <ins>iterator insert(iterator hint, value_type&& obj);</ins> + const_iterator insert(const_iterator hint, const value_type& obj); + <ins>const_iterator insert(const_iterator hint, value_type&& obj);</ins> + ... + void swap(unordered_multiset&<ins>&</ins>); + ... +}; + +template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>& x, + unordered_multiset<Key, T, Hash, Pred, Alloc>& y); + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>& x, + unordered_multiset<Key, T, Hash, Pred, Alloc>&& y);</ins> + +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>&& x, + unordered_multiset<Key, T, Hash, Pred, Alloc>& y);</ins> +</pre></blockquote> + +<p> +Add to 23.4.4.1 [unord.multiset.cnstr]: +</p> + +<blockquote> +<pre>template <class InputIterator> + unordered_multiset(InputIterator f, InputIterator l, + size_type n = <i>implementation-defined</i>, + const hasher& hf = hasher(), + const key_equal& eql = key_equal(), + const allocator_type& a = allocator_type()); +</pre> + +<blockquote><p> +<ins> +<i>Requires:</i> If the iterator's dereference operator returns an +lvalue or a const rvalue <tt>value_type</tt>, then the +<tt>value_type</tt> shall be <tt>CopyConstructible</tt>. +</ins> +</p></blockquote> +</blockquote> + +<p> +Add new section [unord.multiset.modifiers]: </p> + +<blockquote> +<pre><ins>iterator insert(const value_type& x);</ins> +<ins>iterator insert(value_type&& x);</ins> +<ins>iterator insert(iterator hint, const value_type& x);</ins> +<ins>iterator insert(iterator hint, value_type&& x);</ins> +<ins>const_iterator insert(const_iterator hint, const value_type& x);</ins> +<ins>const_iterator insert(const_iterator hint, value_type&& x);</ins> +<ins>template <class InputIterator> + void insert(InputIterator first, InputIterator last);</ins> +</pre> + +<blockquote> + +<p><ins> +<i>Requires:</i> Those signatures taking a <tt>const +value_type&</tt> parameter requires the <tt>value_type</tt> to +be <tt>CopyConstructible</tt>. +</ins></p> + +<p><ins> +The signature taking <tt>InputIterator</tt> parameters requires +<tt>CopyConstructible</tt> of <tt>value_type</tt> if the dereferenced +<tt>InputIterator</tt> returns an lvalue or <tt>const</tt> rvalue +<tt>value_type</tt>. +</ins></p> + +</blockquote> + </blockquote> + <p> -6. Change the <b>Returns:</b> clause for <code>do_put(iter_type, ios_base &, char_type, bool &) const</code>, <i>et al</i> to +Add to 23.4.4.2 [unord.multiset.swap]: </p> + <blockquote> -<b>Returns:</b> <code><del><i>base</i></del> <ins>std::use_facet<std::num_put<charT, OutputIterator> >(<i>baseloc</i>)</ins>.put(<i>s</i>, <i>f</i>, <i>fill</i>, <i>val</i>)</code>. +<pre>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>& x, + unordered_multiset<Key, T, Hash, Pred, Alloc>& y); +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>& x, + unordered_multiset<Key, T, Hash, Pred, Alloc>&& y);</ins> +<ins>template <class Key, class T, class Hash, class Pred, class Alloc> + void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>&& x, + unordered_multiset<Key, T, Hash, Pred, Alloc>& y);</ins> +</pre> </blockquote> -<p><i>[ -Redmond: We would prefer to rename "extended" to "decimal". -]</i></p> + + + + <hr> -<a name="605"><h3>605. Decimal: <decfloat.h> doesn't live here anymore.</h3></a><p><b>Section:</b> <font color="red">Decimal 3.4</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Ready">Ready</a> <b>Submitter:</b> Robert Klarer <b>Date:</b> 17 October 2006</p> -<p>In Berlin, WG14 decided to drop the <decfloat.h> header. The -contents of that header have been moved into <float.h>. For the -sake of C compatibility, we should make corresponding changes. +<h3><a name="677"></a>677. Weaknesses in seed_seq::randomize [rand.util.seedseq]</h3> +<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#New">New</a> + <b>Submitter:</b> Charles Karney <b>Date:</b> 2007-05-15</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +<tt>seed_seq::randomize</tt> provides a mechanism for initializing random number +engines which ideally would yield "distant" states when given "close" +seeds. The algorithm for <tt>seed_seq::randomize</tt> given in the current +Working Draft for C++, +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a> +(2007-05-08), has 3 weaknesses </p> -<p><b>Proposed resolution:</b></p> + +<ol> +<li> +<p> Collisions in state. Because of the way the state is initialized, + seeds of different lengths may result in the same state. The + current version of seed_seq has the following properties:</p> +<ul> +<li> For a given <tt>s <= n</tt>, each of the 2^(32s) seed vectors results in a + distinct state.</li> +</ul> +<p> + The proposed algorithm (below) has the considerably stronger + properties:</p> +<ul> +<li> All of the <tt>(2^(32n)-1)/(2^32-1)</tt> seed vectors of lengths <tt>s < n</tt> + result in distinct states. +</li> +<li> All of the <tt>2^(32n)</tt> seed vectors of length <tt>s == n</tt> result in + distinct states. +</li> +</ul> +</li> +<li> +<p> Poor mixing of <tt>v'</tt>s entropy into the state. Consider <tt>v.size() == n</tt> + and hold <tt>v[n/2]</tt> thru <tt>v[n-1]</tt> fixed while varying <tt>v[0]</tt> thru <tt>v[n/2-1]</tt>, + a total of <tt>2^(16n)</tt> possibilities. Because of the simple recursion + used in <tt>seed_seq</tt>, <tt>begin[n/2]</tt> thru <tt>begin[n-1]</tt> can take on only 2^64 + possible states.</p> + +<p> The proposed algorithm uses a more complex recursion which results + in much better mixing.</p> +</li> +<li> <tt>seed_seq::randomize</tt> is undefined for <tt>v.size() == 0</tt>. The proposed + algorithm remedies this. +</li> +</ol> <p> -1. Change the heading of subclause 3.4, "Headers <code><cdecfloat></code> and <code><decfloat.h></code>" to "Additions to headers <code><cfloat></code> and <code><float.h></code>." +The current algorithm for <tt>seed_seq::randomize</tt> is adapted by me from the +initialization procedure for the Mersenne Twister by Makoto Matsumoto +and Takuji Nishimura. The weakness (2) given above was communicated to +me by Matsumoto last year. </p> <p> -2. Change the text of subclause 3.4 as follows: +The proposed replacement for <tt>seed_seq::randomize</tt> is due to Mutsuo Saito, +a student of Matsumoto, and is given in the implementation of the +SIMD-oriented Fast Mersenne Twister random number generator SFMT. +<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/SFMT/index.html">http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html</a> +<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/SFMT/SFMT-src-1.2.tar.gz">http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/SFMT-src-1.2.tar.gz</a> +</p> +<p> +See +Mutsuo Saito, +An Application of Finite Field: Design and Implementation of 128-bit +Instruction-Based Fast Pseudorandom Number Generator, +Master's Thesis, Dept. of Math., Hiroshima University (Feb. 2007) +<a href="http://www.math.sci.hiroshima-u.ac.jp/%7Em-mat/MT/SFMT/M062821.pdf">http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/M062821.pdf</a> </p> -<blockquote> <p> -<del>The standard C++ headers <code><cfloat></code> and <code><float.h></code> define characteristics of the floating-point types <code>float</code>, <code>double</code>, and <code>long double</code>. Their contents remain unchanged by this Technical Report.</del> +One change has been made here, namely to treat the case of small <tt>n</tt> +(setting <tt>t = (n-1)/2</tt> for <tt>n < 7</tt>). </p> <p> -<del>Headers <code><cdecfloat></code> and <code><decfloat.h></code> define characteristics of the decimal floating-point types <code>decimal32</code>, <code>decimal64</code>, and <code>decimal128</code>. As well, <code><decfloat.h></code> defines the convenience typedefs <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code>, for compatibilty with the C programming language.</del> +Since <tt>seed_seq</tt> was introduced relatively recently there is little cost +in making this incompatible improvement to it. </p> + + +<p><b>Proposed resolution:</b></p> <p> -<ins>The header <code><cfloat></code> is described in [tr.c99.cfloat]. The header <code><float.h></code> -is described in [tr.c99.floath]. These headers are extended by this -Technical Report to define characteristics of the decimal -floating-point types <code>decimal32</code>, <code>decimal64</code>, and <code>decimal128</code>. As well, <code><float.h></code> is extended to define the convenience typedefs <code>_Decimal32</code>, <code>_Decimal64</code>, and <code>_Decimal128</code> for compatibility with the C programming language.</ins> +The following is the proposed replacement of paragraph 8 of section +26.4.7.1 [rand.util.seedseq]: </p> + +<blockquote> +<p> +-8- <i>Effects:</i> With <tt><i>s</i> = v.size()</tt> and <tt><i>n</i> = +end - begin</tt>, fills the supplied range <tt>[begin, end)</tt> +according to the following algorithm in which each operation is to be +carried out modulo 2<sup>32</sup>, each indexing operator applied to +<tt>begin</tt> is to be taken modulo <tt><i>n</i></tt>, <del>each indexing +operator applied to <tt>v</tt> is to be taken modulo <tt><i>s</i></tt>,</del> +and <tt><i>T</i>(<i>x</i>)</tt> is defined as <tt><i>x</i> xor (<i>x</i> +rshift <del>30</del> <ins>27</ins>)</tt>: +</p> + +<ol type="a"> +<li><p><del>Set <tt>begin[0]</tt> to <tt>5489 + <i>s</i></tt>. Then, +iteratively for <tt><i>k</i> = 1, ... , <i>n</i> - 1</tt>, set +<tt>begin[<i>k</i>]</tt> to</del></p> +<blockquote><pre><del>1812433253 * <i>T</i>(begin[<i>k</i>-1]) + <i>k</i>.</del> +</pre></blockquote> +</li> +<li><p><del>With <tt><i>m</i></tt> as the larger of <tt><i>s</i></tt> and +<tt><i>n</i></tt>, transform each element of the range (possibly more +than once): iteratively for <tt><i>k</i> = 0, ..., <i>m</i> - 1</tt>, +set <tt>begin[<i>k</i>]</tt> to</del></p> +<blockquote><pre><del>(begin[<i>k</i>] xor (1664525 * <i>T</i>(begin[<i>k</i>-1]))) + v[<i>k</i>] + (<i>k</i> mod <i>s</i>).</del> +</pre></blockquote> +</li> +<li><p><del>Transform each element of the range one last time, beginning +where the previous step ended: iteratively for <tt><i>k</i> = <i>m</i> +mod <i>n</i>, ..., <i>n</i> - 1, 0, ..., (<i>m</i> - 1) mod +<i>n</i></tt>, set <tt>begin[<i>k</i>]</tt> to</del></p> +<blockquote><pre><del>(begin[<i>k</i>] xor (1566083941 * <i>T</i>(begin[<i>k</i>-1]))) - <i>k</i>.</del> +</pre></blockquote> +</li> +</ol> + +<blockquote><pre><ins> +fill(begin, end, 0x8b8b8b8b); + +if (n >= 623) + t = 11; +else if (n >= 68) + t = 7; +else if (n >= 39) + t = 5; +else if (n >= 7) + t = 3; +else + t = (n-1)/2; + +p = (n-t)/2; +q = p+t; + +m = max(s+1, n); +for (k = 0; k < m; k += 1) { + r = 1664525 * T(begin[k] ^ begin[k+p] ^ begin[k-1]); + begin[k+p] += r; + r += k % n; + if (k == 0) + r += s; + else if (k <= s) + r += v[k-1]; + begin[k+q] += r; + begin[k] = r; +} + +for (k = m; k < m + n; k += 1) { + r = 1566083941 * T(begin[k] + begin[k+p] + begin[k-1]); + begin[k+p] ^= r; + r -= k % n; + begin[k+q] ^= r; + begin[k] = r; +} +</ins></pre></blockquote> + </blockquote> + + + + + + +<hr> +<h3><a name="678"></a>678. Changes for [rand.req.eng]</h3> +<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#New">New</a> + <b>Submitter:</b> Charles Karney <b>Date:</b> 2007-05-15</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#rand.req.eng">active issues</a> in [rand.req.eng].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Section 26.4.1.3 [rand.req.eng] Random number engine requirements: +</p> + <p> -3. Change the heading of subclause 3.4.1, "Header <code><cdecfloat></code> synopsis" to "Additions to header <code><cfloat></code> synopsis." +This change follows naturally from the proposed change to +<tt>seed_seq::randomize</tt> in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#677">677</a>. </p> + <p> -4. Change the heading of subclause 3.4.2, "Header <code><decfloat.h></code> synopsis" to "Additions to header <code><float.h></code> synopsis." +In table 104 the description of <tt>X(q)</tt> contains a special treatment of +the case <tt>q.size() == 0</tt>. This is undesirable for 4 reasons: </p> + +<ol> +<li>It replicates the functionality provided by <tt>X()</tt>.</li> +<li>It leads to the possibility of a collision in the state provided + by some other <tt>X(q)</tt> with <tt>q.size() > 0</tt>.</li> +<li>It is inconsistent with the description of the <tt>X(q)</tt> in +paragraphs 26.4.3.1 [rand.eng.lcong] p5, 26.4.3.2 [rand.eng.mers] p8, and 26.4.3.3 [rand.eng.sub] p10 where +there is no special treatment of <tt>q.size() == 0</tt>.</li> +<li>The proposed replacement for <tt>seed_seq::randomize</tt> given above + allows for the case <tt>q.size() == 0</tt>.</li> +</ol> + + + +<p><b>Proposed resolution:</b></p> + <p> -5. Change the contents of 3.4.2 as follows: +I recommend removing the special-case treatment of <tt>q.size() == 0</tt>. Here +is the replacement line for table 104 of section 26.4.1.3 [rand.req.eng]: </p> -<pre> <del>#include <cdecfloat></del> - // <i>C-compatibility convenience typedefs:</i> +<blockquote> +<table border="1"> +<tbody><tr> +<td><tt>X(q)</tt><sup>272</sup></td> +<td>-</td> +<td> +<del>With <tt>n = q.size()</tt>, creates an +engine <tt>u</tt> with initial state +determined as follows: If <tt>n</tt> is <tt>0</tt>, <tt>u +== X();</tt> otherwise, the</del> <ins>Create an engine <tt>u</tt> with an</ins> initial state <ins>which</ins> +depends on a sequence produced by +one call to <tt>q.randomize</tt>. +</td> +<td> +O(max(<del>n</del> <ins><tt>q.size()</tt></ins>, size of state)) +</td> +</tr> +</tbody></table> +</blockquote> + + + + - typedef std::decimal::decimal32 _Decimal32; - typedef std::decimal::decimal64 _Decimal64; - typedef std::decimal::decimal128 _Decimal128; -</pre> <hr> -<a name="606"><h3>606. Decimal: allow narrowing conversions</h3></a><p><b>Section:</b> <font color="red">Decimal 3.2</font> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Open">Open</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 June 2006</p> +<h3><a name="679"></a>679. resize parameter by value</h3> +<p><b>Section:</b> 23.2 [sequences] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-06-11</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> -In c++std-lib-17205, Martin writes: +The C++98 standard specifies that one member function alone of the containers +passes its parameter (<tt>T</tt>) by value instead of by const reference: +</p> + +<blockquote><pre>void resize(size_type sz, T c = T()); +</pre></blockquote> + +<p> +This fact has been discussed / debated repeatedly over the years, the first time +being even before C++98 was ratified. The rationale for passing this parameter by +value has been: </p> + <blockquote> -...was it a deliberate design choice to make narrowing assignments -ill-formed while permitting narrowing compound assignments? For -instance: +<p> +So that self referencing statements are guaranteed to work, for example: +</p> +<blockquote><pre>v.resize(v.size() + 1, v[0]); +</pre></blockquote> </blockquote> -<pre> decimal32 d32; - decimal64 d64; - d32 = 64; // error - d32 += 64; // okay -</pre> <p> -In c++std-lib-17229, Robert responds: +However this rationale is not convincing as the signature for <tt>push_back</tt> is: </p> -<blockquote>It is a vestige of an old idea that I forgot to remove from -the paper. Narrowing assignments should be permitted. The bug is that -the converting constructors that cause narrowing should not be -explicit. Thanks for pointing this out. -</blockquote> + +<blockquote><pre>void push_back(const T& x); +</pre></blockquote> + +<p> +And <tt>push_back</tt> has similar semantics to <tt>resize</tt> (append). +And <tt>push_back</tt> must also work in the self referencing case: +</p> + +<blockquote><pre>v.push_back(v[0]); // must work +</pre></blockquote> + +<p> +The problem with passing <tt>T</tt> by value is that it can be significantly more +expensive than passing by reference. The converse is also true, however when it is +true it is usually far less dramatic (e.g. for scalar types). +</p> + +<p> +Even with move semantics available, passing this parameter by value can be expensive. +Consider for example <tt>vector<vector<int>></tt>: +</p> + +<blockquote><pre>std::vector<int> x(1000); +std::vector<std::vector<int>> v; +... +v.resize(v.size()+1, x); +</pre></blockquote> + +<p> +In the pass-by-value case, <tt>x</tt> is copied once to the parameter of +<tt>resize</tt>. And then internally, since the code can not know at compile +time by how much <tt>resize</tt> is growing the <tt>vector</tt>, <tt>x</tt> is +usually copied (not moved) a second time from <tt>resize</tt>'s parameter into its proper place +within the <tt>vector</tt>. +</p> + +<p> +With pass-by-const-reference, the <tt>x</tt> in the above example need be copied +only once. In this case, <tt>x</tt> has an expensive copy constructor and so any +copies that can be saved represents a significant savings. +</p> + +<p> +If we can be efficient for <tt>push_back</tt>, we should be efficient for <tt>resize</tt> +as well. The resize taking a reference parameter has been coded and shipped in the +CodeWarrior library with no reports of problems which I am aware of. +</p> + + + <p><b>Proposed resolution:</b></p> <p> -1. In "3.2.2 Class <code>decimal32</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversions: +Change 23.2.2 [deque], p2: </p> -<pre> // <i>3.2.2.2 conversion from floating-point type:</i> - <del>explicit</del> decimal32(decimal64 <i>d64</i>); - <del>explicit</del> decimal32(decimal128 <i>d128</i>); -</pre> + +<blockquote><pre>class deque { + ... + void resize(size_type sz, <ins>const </ins>T<ins>&</ins> c); +</pre></blockquote> + <p> -2. Do the same thing in "3.2.2.2. Conversion from floating-point type." +Change 23.2.2.2 [deque.capacity], p3: </p> + +<blockquote><pre>void resize(size_type sz, <ins>const </ins>T<ins>&</ins> c); +</pre></blockquote> + +<p><b>Proposed resolution:</b></p> <p> -3. In "3.2.3 Class <code>decimal64</code>" synopsis, remove the <code>explicit</code> specifier from the narrowing conversion: +Change 23.2.3 [list], p2: </p> -<pre> // <i>3.2.3.2 conversion from floating-point type:</i> - <del>explicit</del> decimal64(decimal128 <i>d128</i>); + +<blockquote><pre>class list { + ... + void resize(size_type sz, <ins>const </ins>T<ins>&</ins> c); +</pre></blockquote> + +<p> +Change 23.2.3.2 [list.capacity], p3: +</p> + +<blockquote><pre>void resize(size_type sz, <ins>const </ins>T<ins>&</ins> c); +</pre></blockquote> + +<p><b>Proposed resolution:</b></p> +<p> +Change 23.2.5 [vector], p2: +</p> + +<blockquote><pre>class vector { + ... + void resize(size_type sz, <ins>const </ins>T<ins>&</ins> c); +</pre></blockquote> + +<p> +Change 23.2.5.2 [vector.capacity], p11: +</p> + +<blockquote><pre>void resize(size_type sz, <ins>const </ins>T<ins>&</ins> c); +</pre></blockquote> + + + + + + +<hr> +<h3><a name="680"></a>680. move_iterator operator-> return</h3> +<p><b>Section:</b> 24.4.3.1 [move.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2007-06-11</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +<tt>move_iterator</tt>'s <tt>operator-></tt> return type <tt>pointer</tt> +does not consistently match the type which is returned in the description +in 24.4.3.3.5 [move.iter.op.ref]. +</p> + +<blockquote><pre>template <class Iterator> +class move_iterator { +public: + ... + typedef typename iterator_traits<Iterator>::pointer pointer; + ... + pointer operator->() const {return current;} + ... +private: + Iterator current; // exposition only +}; +</pre></blockquote> + + +<p> +There are two possible fixes. +</p> + +<ol> +<li><tt>pointer operator->() const {return &*current;}</tt></li> +<li><tt>typedef Iterator pointer;</tt></li> +</ol> + +<p> +The first solution is the one chosen by <tt>reverse_iterator</tt>. A potential +disadvantage of this is it may not work well with iterators which return a +proxy on dereference and that proxy has overloaded <tt>operator&()</tt>. Proxy +references often need to overloaad <tt>operator&()</tt> to return a proxy +pointer. That proxy pointer may or may not be the same type as the iterator's +<tt>pointer</tt> type. +</p> + +<p> +By simply returning the <tt>Iterator</tt> and taking advantage of the fact that +the language forwards calls to <tt>operator-></tt> automatically until it +finds a non-class type, the second solution avoids the issue of an overloaded +<tt>operator&()</tt> entirely. +</p> + +<p><b>Proposed resolution:</b></p> +<p> +Change the synopsis in 24.4.3.1 [move.iterator]: +</p> + +<blockquote><pre>typedef <del>typename iterator_traits<</del>Iterator<del>>::pointer</del> pointer; +</pre></blockquote> + + + + + + +<hr> +<h3><a name="681"></a>681. Operator functions impossible to compare are defined in [re.submatch.op]</h3> +<p><b>Section:</b> 28.9.2 [re.submatch.op] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Nozomu Katoo <b>Date:</b> 2007-05-27</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In 28.9.2 [re.submatch.op] of N2284, +operator functions numbered 31-42 seem impossible to compare. E.g.: +</p> + +<blockquote> +<pre>template <class BiIter> + bool operator==(typename iterator_traits<BiIter>::value_type const& lhs, + const sub_match<BiIter>& rhs); </pre> +<blockquote> <p> -4. Do the same thing in "3.2.3.2. Conversion from floating-point type." +-31- <i>Returns:</i> <tt>lhs == rhs.str()</tt>. +</p> +</blockquote> +</blockquote> + +<p> +When <tt>char*</tt> is used as <tt>BiIter</tt>, <tt>iterator_traits<BiIter>::value_type</tt> would be +<tt>char</tt>, so that <tt>lhs == rhs.str()</tt> ends up comparing a <tt>char</tt> value and an object +of <tt>std::basic_string<char></tt>. However, the behaviour of comparison between +these two types is not defined in 21.3.8 [string.nonmembers] of N2284. + This applies when <tt>wchar_t*</tt> is used as <tt>BiIter</tt>. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="682"></a>682. basic_regex ctor takes InputIterator or ForwardIterator?</h3> +<p><b>Section:</b> 28.8.2 [re.regex.construct] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Eric Niebler <b>Date:</b> 2007-06-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Looking at N2284, 28.8 [re.regex], p3 <tt>basic_regex</tt> class template synopsis shows this +constructor: +</p> +<blockquote><pre>template <class InputIterator> + basic_regex(InputIterator first, InputIterator last, + flag_type f = regex_constants::ECMAScript); +</pre></blockquote> + +<p> +In 28.8.2 [re.regex.construct], p15, the constructor appears with this signature: +</p> + +<blockquote><pre>template <class ForwardIterator> + basic_regex(ForwardIterator first, ForwardIterator last, + flag_type f = regex_constants::ECMAScript); +</pre></blockquote> + +<p> +<tt>ForwardIterator</tt> is probably correct, so the synopsis is wrong. </p> <p><i>[ -Redmond: We prefer explicit conversions for narrowing and implicit for widening. +John adds: ]</i></p> + +<blockquote> +<p> +I think either could be implemented? Although an input iterator would +probably require an internal copy of the string being made. +</p> +<p> +I have no strong feelings either way, although I think my original intent +was <tt>InputIterator</tt>. +</p> +</blockquote> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + <hr> -<a name="607"><h3>607. Concern about short seed vectors</h3></a><p><b>Section:</b> 26.4.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.dist.iunif"> [lib.rand.dist.iunif]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Charles Karney <b>Date:</b> 26 Oct 2006</p> +<h3><a name="684"></a>684. Unclear which members of match_results should be used in comparison</h3> +<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#New">New</a> + <b>Submitter:</b> Nozomu Katoo <b>Date:</b> 2007-05-27</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#re.results">active issues</a> in [re.results].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In 28.4 [re.syn] of N2284, two template functions +are declared here: +</p> +<blockquote><pre>// 28.10, class template match_results: + <<i>snip</i>> +// match_results comparisons + template <class BidirectionalIterator, class Allocator> + bool operator== (const match_results<BidirectionalIterator, Allocator>& m1, + const match_results<BidirectionalIterator, Allocator>& m2); + template <class BidirectionalIterator, class Allocator> + bool operator!= (const match_results<BidirectionalIterator, Allocator>& m1, + const match_results<BidirectionalIterator, Allocator>& m2); + +// 28.10.6, match_results swap: +</pre></blockquote> + <p> -Short seed vectors of 32-bit quantities all result in different states. However -this is not true of seed vectors of 16-bit (or smaller) quantities. For example -these two seeds +But the details of these two bool operator functions (i.e., which members of +<tt>match_results</tt> should be used in comparison) are not described in any +following sections. </p> -<blockquote><pre>unsigned short seed = {1, 2, 3}; -unsigned short seed = {1, 2, 3, 0}; +<p><i>[ +John adds: +]</i></p> + + +<blockquote><p> +That looks like a bug: <tt>operator==</tt> should return <tt>true</tt> only if +the two objects refer to the same match - ie if one object was constructed as a +copy of the other. +</p></blockquote> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="685"></a>685. reverse_iterator/move_iterator difference has invalid signatures</h3> +<p><b>Section:</b> 24.4.1.3.19 [reverse.iter.opdiff], 24.4.3.3.14 [move.iter.nonmember] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-06-10</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In C++03 the difference between two <tt>reverse_iterators</tt> +</p> +<blockquote><pre>ri1 - ri2 +</pre></blockquote> +<p> +is possible to compute only if both iterators have the same base +iterator. The result type is the <tt>difference_type</tt> of the base iterator. +</p> +<p> +In the current draft, the operator is defined as 24.4.1.3.19 [reverse.iter.opdiff] +</p> +<blockquote><pre>template<class Iterator1, class Iterator2> +typename reverse_iterator<Iterator>::difference_type + operator-(const reverse_iterator<Iterator1>& x, + const reverse_iterator<Iterator2>& y); </pre></blockquote> +<p> +The return type is the same as the C++03 one, based on the no longer +present <tt>Iterator</tt> template parameter. +</p> +<p> +Besides being slightly invalid, should this operator work only when +<tt>Iterator1</tt> and <tt>Iterator2</tt> has the same <tt>difference_type</tt>? Or should the +implementation choose one of them? Which one? +</p> +<p> +The same problem now also appears in <tt>operator-()</tt> for <tt>move_iterator</tt> +24.4.3.3.14 [move.iter.nonmember]. +</p> + +<p><b>Proposed resolution:</b></p> <p> -both pack to </p> -<blockquote><pre>unsigned seed = {0x20001, 0x3}; + + + + +<hr> +<h3><a name="686"></a>686. Unique_ptr and shared_ptr fail to specify non-convertibility to int for unspecified-bool-type</h3> +<p><b>Section:</b> 20.6.5.2.4 [unique.ptr.single.observers], 20.6.6.2.5 [util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2007-06-14</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The standard library uses the <tt>operator <i>unspecified-bool-type</i>() const</tt> idiom in +five places. In three of those places (20.5.14.2.3 [func.wrap.func.cap], function capacity +for example) the returned value is constrained to disallow +unintended conversions to int. The standardese is +</p> +<blockquote><p> +The return type shall not be convertible to <tt>int</tt>. +</p></blockquote> +<p> +This constraint is omitted for <tt>unique_ptr</tt> and <tt>shared_ptr</tt>. It should be added for those. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +To the <i>Returns</i> paragraph for <tt>operator <i>unspecified-bool-type</i>() +const</tt> +of 20.6.5.2.4 [unique.ptr.single.observers] paragraph 11 and 20.6.6.2.5 +[util.smartptr.shared.obs] paragraph 16, add the sentence: +</p> +<blockquote><p> +The return type shall not be convertible to <tt>int</tt>. +</p></blockquote> + + + + + +<hr> +<h3><a name="687"></a>687. shared_ptr conversion constructor not constrained</h3> +<p><b>Section:</b> 20.6.6.2.1 [util.smartptr.shared.const], 20.6.6.3.1 [util.smartptr.weak.const] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-10</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Since all conversions from <tt>shared_ptr<T></tt> to <tt>shared_ptr<U></tt> have the same +rank regardless of the relationship between <tt>T</tt> and <tt>U</tt>, reasonable user +code that works with raw pointers fails with <tt>shared_ptr</tt>: +</p> + +<blockquote><pre>void f( shared_ptr<void> ); +void f( shared_ptr<int> ); + +int main() +{ + f( shared_ptr<double>() ); // ambiguous +} </pre></blockquote> <p> -yielding the same state. +Now that we officially have <tt>enable_if</tt>, we can constrain the constructor +and the corresponding assignment operator to only participate in the +overload resolution when the pointer types are compatible. </p> + + <p><b>Proposed resolution:</b></p> <p> -In 26.4.7.1[rand.util.seedseq]/8a, replace +In 20.6.6.2.1 [util.smartptr.shared.const], change: +</p> + +<blockquote><p> +-14- <i>Requires:</i> <del>For the second constructor</del> <ins>The +second constructor shall not participate in the overload resolution +unless</ins> <tt>Y*</tt> <del>shall be</del> <ins>is</ins> convertible +to <tt>T*</tt>. +</p></blockquote> + +<p> +In 20.6.6.3.1 [util.smartptr.weak.const], change: </p> <blockquote> +<pre><del>template<class Y> weak_ptr(shared_ptr<Y> const& r);</del> +<del>weak_ptr(weak_ptr const& r);</del> +<del>template<class Y> weak_ptr(weak_ptr<Y> const& r);</del> +<ins>weak_ptr(weak_ptr const& r);</ins> +<ins>template<class Y> weak_ptr(weak_ptr<Y> const& r);</ins> +<ins>template<class Y> weak_ptr(shared_ptr<Y> const& r);</ins> +</pre> +<blockquote><p> +-4- <i>Requires:</i> <del>For</del> <del>t</del><ins>T</ins>he second and +third constructors<del>,</del> <ins>shall not participate in the +overload resolution unless</ins> <tt>Y*</tt> <del>shall be</del> +<ins>is</ins> convertible to <tt>T*</tt>. +</p></blockquote> +</blockquote> + + + + + + +<hr> +<h3><a name="688"></a>688. reference_wrapper, cref unsafe, allow binding to rvalues</h3> +<p><b>Section:</b> 20.5.5.1 [refwrap.const] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-10</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#refwrap.const">active issues</a> in [refwrap.const].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#refwrap.const">issues</a> in [refwrap.const].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> -Set <tt>begin[0]</tt> to <tt>5489 + <del>s</del><ins>N</ins></tt>. +A <tt>reference_wrapper</tt> can be constructed from an rvalue, either by using +the constructor, or via <tt>cref</tt> (and <tt>ref</tt> in some corner cases). This leads +to a dangling reference being stored into the <tt>reference_wrapper</tt> object. +Now that we have a mechanism to detect an rvalue, we can fix them to +disallow this source of undefined behavior. </p> + + +<p><b>Proposed resolution:</b></p> <p> -where <tt>N</tt> is the bit length of the sequence used to construct the -seed_seq in 26.4.7.1/6 [rand.util.seedseq]. (This quantity is called <tt>n</tt> -in 26.4.7.1/6 [rand.util.seedseq], but <tt>n</tt> has a different meaning in -26.4.7.1/8 [rand.util.seedseq]. We have <tt>32^(s-1) < N <= 32^s</tt>.) Now +In 20.5.5 [refwrap], add: </p> -<blockquote><pre>unsigned short seed = {1, 2, 3, 0}; -unsigned seed = {0x20001, 0x3}; +<blockquote><pre><ins>private:</ins> +<ins> explicit reference_wrapper(T&&);</ins> </pre></blockquote> <p> -are equivalent (<tt>N = 64</tt>), but +In 20.5.5.1 [refwrap.const], add: </p> -<blockquote><pre>unsigned short seed = {1, 2, 3}; +<blockquote> +<pre><ins>explicit reference_wrapper(T&&);</ins> +</pre> +<blockquote><p> +<ins>-?- Not defined to disallow creating a <tt>reference_wrapper</tt> from an rvalue.</ins> +</p></blockquote> +</blockquote> + +<p> +In the synopsis of <tt><functional></tt> (20.5.5 [refwrap]), change the declarations +of <tt>ref</tt> and <tt>cref</tt> to: +</p> + +<blockquote><pre>template<class T> reference_wrapper<T> ref(T&<ins>&</ins>); +template<class T> reference_wrapper<const T> cref(<del>const</del> T&<ins>&</ins>); </pre></blockquote> <p> -gives a distinct state (<tt>N = 48</tt>). +In 20.5.5.5 [refwrap.helpers], change: +</p> + +<blockquote> +<pre>template<class T> reference_wrapper<T> ref(T&<ins>&</ins> t); +</pre> +<blockquote> +<p> +<ins>-1- <i>Requires:</i> <tt>t</tt> shall be an lvalue.</ins> +</p> +</blockquote> +</blockquote> + +<p>and change:</p> + +<blockquote> +<pre>template<class T> reference_wrapper<const T> cref(<del>const</del> T&<ins>&</ins> t); +</pre> +<blockquote> +<p> +<ins>-6- <i>Requires:</i> <tt>t</tt> shall be an lvalue.</ins> </p> </blockquote> +</blockquote> + + + + + <hr> -<a name="608"><h3>608. Unclear seed_seq construction details</h3></a><p><b>Section:</b> 26.4.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.dist.iunif"> [lib.rand.dist.iunif]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Charles Karney <b>Date:</b> 26 Oct 2006</p> +<h3><a name="689"></a>689. reference_wrapper constructor overly constrained</h3> +<p><b>Section:</b> 20.5.5.1 [refwrap.const] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2007-05-10</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#refwrap.const">active issues</a> in [refwrap.const].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#refwrap.const">issues</a> in [refwrap.const].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> -In 26.4.7.1 [rand.util.seedseq] /6, the order of packing the inputs into b and the -treatment of signed quantities is unclear. Better to spell it out. +The constructor of <tt>reference_wrapper</tt> is currently <tt>explicit</tt>. The primary +motivation behind this is the safety problem with respect to rvalues, +which is addressed by the proposed resolution of the previous issue. +Therefore we should consider relaxing the requirements on the +constructor since requests for the implicit conversion keep resurfacing. </p> + + <p><b>Proposed resolution:</b></p> -<blockquote><pre>b = sum( unsigned(begin[i]) 2^(w i), 0 <= i < end-begin ) +<p> +Remove the <tt>explicit</tt> from the constructor of <tt>reference_wrapper</tt>. If the +proposed resolution of the previous issue is accepted, remove the +<tt>explicit</tt> from the <tt>T&&</tt> constructor as well to keep them in sync. +</p> + + + + + +<hr> +<h3><a name="690"></a>690. abs(long long) should return long long</h3> +<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#New">New</a> + <b>Submitter:</b> Niels Dekker <b>Date:</b> 2007-06-10</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Quoting the latest draft (n2135), 26.7 [c.math]: +</p> + +<blockquote> +<p> +The added signatures are: +</p> +<blockquote><pre>long abs(long); // labs() +long abs(long long); // llabs() </pre></blockquote> +</blockquote> +<p> +Shouldn't <tt>abs(long long)</tt> have <tt>long long</tt> as return type? +</p> + +<p><b>Proposed resolution:</b></p> <p> -where <tt>w</tt> is the bit-width of the InputIterator. +Change 26.7 [c.math]: </p> +<blockquote><pre><ins>long </ins>long abs(long long); // llabs() +</pre></blockquote> + + + + + <hr> -<a name="609"><h3>609. missing static const</h3></a><p><b>Section:</b> 26.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.eng.mers"> [lib.rand.eng.mers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> <b>Submitter:</b> Walter E. Brown <b>Date:</b> 2 Nov 2006</p> +<h3><a name="691"></a>691. const_local_iterator cbegin, cend missing from TR1</h3> +<p><b>Section:</b> 23.4 [unord] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2007-06-14</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> <p> -In preparing N2111, an error on my part resulted in the omission of the -following line from the template synopsis in the cited section: +The last version of TR1 does not include the following member +functions +for unordered containers: </p> -<blockquote><pre>static const size_t word_size = w; +<blockquote><pre>const_local_iterator cbegin(size_type n) const; +const_local_iterator cend(size_type n) const; </pre></blockquote> <p> -(This same constant is found, for example, in 26.4.3.3 [rand.eng.sub].) +which looks like an oversight to me. I've checked th TR1 issues lists +and the latest working draft of the C++0x std (N2284) and haven't +found any mention to these menfuns or to their absence. </p> +<p> +Is this really an oversight, or am I missing something? +</p> + + <p><b>Proposed resolution:</b></p> <p> -Add the above declaration as the first line after the comment in [rand.adapt.ibits] p4: </p> -<blockquote><pre>// engine characteristics -<ins>static const size_t word_size = w;</ins> + + + + +<hr> +<h3><a name="692"></a>692. <code>get_money</code> and <code>put_money</code> should be formatted I/O functions</h3> +<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#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In a private email Bill Plauger notes: +</p> +<blockquote><p> +I believe that the function that implements <code>get_money</code> +[from <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2072.html">N2072</a>] +should behave as a formatted input function, and the function that +implements <code>put_money</code> should behave as a formatted output +function. This has implications regarding the skipping of whitespace +and the handling of errors, among other things. +</p> +<p> +The words don't say that right now and I'm far from convinced that +such a change is editorial. +</p></blockquote> +<p> +Martin's response: +</p> +<blockquote><p> +I agree that the manipulators should handle exceptions the same way as +formatted I/O functions do. The text in N2072 assumes so but the +<i>Returns</i> clause explicitly omits exception handling for the sake +of brevity. The spec should be clarified to that effect. +</p> +<p> +As for dealing with whitespace, I also agree it would make sense for +the extractors and inserters involving the new manipulators to treat +it the same way as formatted I/O. +</p></blockquote> + + +<p><b>Proposed resolution:</b></p> +<p> +Add a new paragraph immediately above p4 of 27.6.4 [ext.manip] with the +following text: +</p> +<blockquote><p> +<i>Effects</i>: The expression <code><i>in</i> >> get_money(mon, intl)</code> +described below behaves as a formatted input function (as +described in 27.6.1.2.1 [istream.formatted.reqmts]). +</p></blockquote> +<p> +Also change p4 of 27.6.4 [ext.manip] as follows: +</p> +<blockquote><p> +<i>Returns</i>: An object <code>s</code> of unspecified type such that +if <code>in</code> is an object of type <code>basic_istream<charT, +traits></code> then the expression <code><i>in</i> >> get_money(mon, intl)</code> behaves as <ins>a formatted input function +that calls </ins><code>f(in, mon, intl)</code><del> were +called</del>. The function <code>f</code> can be defined as... +</p></blockquote> + + + + + +<hr> +<h3><a name="693"></a>693. <code>std::bitset::all()</code> missing</h3> +<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#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The <code>bitset</code> class template provides the member function +<code>any()</code> to determine whether an object of the type has any +bits set, and the member function <code>none()</code> to determine +whether all of an object's bits are clear. However, the template does +not provide a corresponding function to discover whether a +<code>bitset</code> object has all its bits set. While it is +possible, even easy, to obtain this information by comparing the +result of <code>count()</code> with the result of <code>size()</code> +for equality (i.e., via <code>b.count() == b.size()</code>) the +operation is less efficient than a member function designed +specifically for that purpose could be. (<code>count()</code> must +count all non-zero bits in a <code>bitset</code> a word at a time +while <code>all()</code> could stop counting as soon as it encountered +the first word with a zero bit). +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add a declaration of the new member function <code>all()</code> to the +defintion of the <code>bitset</code> template in 23.3.5 [template.bitset], p1, +right above the declaration of <code>any()</code> as shown below: +</p> + +<blockquote><pre>bool operator!=(const bitset<N>& rhs) const; +bool test(size_t pos) const; +<ins>bool all() const;</ins> +bool any() const; +bool none() const; </pre></blockquote> <p> -and accept my apologies for the oversight. +Add a description of the new member function to the end of 23.3.5.2 [bitset.members] with the following text: +</p> +<blockquote><p> +<code>bool all() const;</code> +</p> +<blockquote> +<i>Returns</i>: <code>count() == b.size()</code>. +</blockquote> +</blockquote> + +<p> +In addition, change the description of <code>any()</code> and +<code>none()</code> for consistency with <code>all()</code> as +follows: +</p> +<blockquote><p> +<code>bool any() const;</code> +</p> +<blockquote> +<p> +<i>Returns</i>: <del><code>true</code> if any bit in <code>*this</code> +is one</del><ins><code>count() != 0</code></ins>. +</p> +</blockquote> +<p> +<code>bool none() const;</code> +</p> +<blockquote> +<p> +<i>Returns</i>: <del><code>true</code> if no bit in <code>*this</code> +is one</del><ins><code>count() == 0</code></ins>. +</p> +</blockquote> +</blockquote> + + + + + +<hr> +<h3><a name="694"></a>694. <code>std::bitset</code> and <code>long long</code></h3> +<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#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Objects of the <code>bitset</code> class template specializations can +be constructed from and explicitly converted to values of the widest +C++ integer type, <code>unsigned long</code>. With the introduction +of <code>long long</code> into the language the template should be +enhanced to make it possible to interoperate with values of this type +as well, or perhaps <code>uintmax_t</code>. See c++std-lib-18274 for +a brief discussion in support of this change. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +For simplicity, instead of adding overloads for <code>unsigned long +long</code> and dealing with possible ambiguities in the spec, replace +the <code>bitset</code> ctor that takes an <code>unsigned long</code> +argument with one taking <code>unsigned long long</code> in the +definition of the template as shown below. (The standard permits +implementations to add overloads on other integer types or employ +template tricks to achieve the same effect provided they don't cause +ambiguities or changes in behavior.) </p> -<p>----- End of document -----</p> +<blockquote> +<pre>// [bitset.cons] constructors: +bitset(); +bitset(unsigned <ins>long</ins> long val); +template<class charT, class traits, class Allocator> +explicit bitset( + const basic_string<charT,traits,Allocator>& str, + typename basic_string<charT,traits,Allocator>::size_type pos = 0, + typename basic_string<charT,traits,Allocator>::size_type n = + basic_string<charT,traits,Allocator>::npos); +</pre> +</blockquote> +<p> +Make a corresponding change in 23.3.5.1 [bitset.cons], p2: +</p> +<blockquote> +<p> +<code>bitset(unsigned <ins>long</ins> long val);</code> +</p> +<blockquote> +<i>Effects</i>: Constructs an object of class bitset<N>, +initializing the first <code><i>M</i></code> bit positions to the +corresponding bit values in <code><i>val</i></code>. +<code><i>M</i></code> is the smaller of <code><i>N</i></code> and the +number of bits in the value representation (section [basic.types]) of +<code>unsigned <ins> long</ins> long</code>. If <code><i>M</i> < +<i>N</i></code> <ins>is <code>true</code></ins>, the remaining bit +positions are initialized to zero. +</blockquote> +</blockquote> + +<p> +Additionally, introduce a new member function <code>to_ullong()</code> +to make it possible to convert <code>bitset</code> to values of the +new type. Add the following declaration to the definition of the +template, immediate after the declaration of <code>to_ulong()</code> +in 23.3.5 [template.bitset], p1, as shown below: +</p> +<blockquote> +<pre>// element access: +bool operator[](size_t pos) const; // for b[i]; +reference operator[](size_t pos); // for b[i]; +unsigned long to_ulong() const; +<ins>unsigned long long to_ullong() const;</ins> +template <class charT, class traits, class Allocator> +basic_string<charT, traits, Allocator> to_string() const; +</pre> +</blockquote> +<p> +And add a description of the new member function to 23.3.5.2 [bitset.members], +below the description of the existing <code>to_ulong()</code> (if +possible), with the following text: +</p> +<blockquote> +<p> +<code>unsigned long long to_ullong() const;</code> +</p> +<blockquote> +<i>Throws</i>: <code>overflow_error</code> if the integral value +<code><i>x</i></code> corresponding to the bits in <code>*this</code> +cannot be represented as type <code>unsigned long long</code>. +</blockquote> +<blockquote> +<i>Returns:</i> <code><i>x</i></code>. +</blockquote> +</blockquote> + + + + + +<hr> +<h3><a name="695"></a>695. ctype<char>::classic_table() not accessible</h3> +<p><b>Section:</b> 22.2.1.3 [facet.ctype.special] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-22</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The <code>ctype<char>::classic_table()</code> static member +function returns a pointer to an array of const +<code>ctype_base::mask</code> objects (enums) that contains +<code>ctype<char>::table_size</code> elements. The table +describes the properties of the character set in the "C" locale (i.e., +whether a character at an index given by its value is alpha, digit, +punct, etc.), and is typically used to initialize the +<code>ctype<char></code> facet in the classic "C" locale (the +protected <code>ctype<char></code> member function +<code>table()</code> then returns the same value as +<code>classic_table()</code>). +</p> +<p> +However, while <code>ctype<char>::table_size</code> (the size of +the table) is a public static const member of the +<code>ctype<char></code> specialization, the +<code>classic_table()</code> static member function is protected. That +makes getting at the classic data less than convenient (i.e., one has +to create a whole derived class just to get at the masks array). It +makes little sense to expose the size of the table in the public +interface while making the table itself protected, especially when the +table is a constant object. +</p> +<p> +The same argument can be made for the non-static protected member +function <code>table()</code>. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Make the <code>ctype<char>::classic_table()</code> and +<code>ctype<char>::table()</code> member functions public by +moving their declarations into the public section of the definition of +specialization in 22.2.1.3 [facet.ctype.special] as shown below: +</p> +<blockquote> +<pre> static locale::id id; + static const size_t table_size = IMPLEMENTATION_DEFINED; +<del>protected:</del> + const mask* table() const throw(); + static const mask* classic_table() throw(); +<ins>protected:</ins> + +~ctype(); // virtual +virtual char do_toupper(char c) const; +</pre> +</blockquote> + + + + + +<hr> +<h3><a name="696"></a>696. <code>istream::operator>>(int&)</code> broken</h3> +<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#New">New</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2007-06-23</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#New">New</a> status.</p> +<p><b>Discussion:</b></p> +<p> +From message c++std-lib-17897: +</p> +<p> +The code shown in 27.6.1.2.2 [istream.formatted.arithmetic] as the "as if" +implementation of the two arithmetic extractors that don't have a +corresponding <code>num_get</code> interface (i.e., the +<code>short</code> and <code>int</code> overloads) is subtly buggy in +how it deals with <code>EOF</code>, overflow, and other similar +conditions (in addition to containing a few typos). +</p> +<p> +One problem is that if <code>num_get::get()</code> reaches the EOF +after reading in an otherwise valid value that exceeds the limits of +the narrower type (but not <code>LONG_MIN</code> or +<code>LONG_MAX</code>), it will set <code><i>err</i></code> to +<code>eofbit</code>. Because of the if condition testing for +<code>(<i>err</i> == 0)</code>, the extractor won't set +<code>failbit</code> (and presumably, return a bogus value to the +caller). +</p> +<p> +Another problem with the code is that it never actually sets the +argument to the extracted value. It can't happen after the call to +<code>setstate()</code> since the function may throw, so we need to +show when and how it's done (we can't just punt as say: "it happens +afterwards"). However, it turns out that showing how it's done isn't +quite so easy since the argument is normally left unchanged by the +facet on error except when the error is due to a misplaced thousands +separator, which causes <code>failbit</code> to be set but doesn't +prevent the facet from storing the value. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + </body></html>
\ No newline at end of file diff --git a/libstdc++-v3/docs/html/ext/lwg-closed.html b/libstdc++-v3/docs/html/ext/lwg-closed.html index 19de851..4d0c76d 100644 --- a/libstdc++-v3/docs/html/ext/lwg-closed.html +++ b/libstdc++-v3/docs/html/ext/lwg-closed.html @@ -1,18 +1,22 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><title>C++ Standard Library Closed Issues List</title> -<style>ins {background-color:#FFFFA0} -del {background-color:#FFFFA0}</style></head> +<style type="text/css"> +p {text-align:justify} +li {text-align:justify} +ins {background-color:#FFFFA0} +del {background-color:#FFFFA0} +</style></head> -<body bgcolor="#ffffff" text="#000000"> +<body> <table> <tbody><tr> <td align="left">Doc. no.</td> -<td align="left">N2132=06-0202</td> +<td align="left">N2319=07-0179</td> </tr> <tr> <td align="left">Date:</td> -<td align="left">2006-11-03</td> +<td align="left">2007-06-24</td> </tr> <tr> <td align="left">Project:</td> @@ -20,73 +24,202 @@ del {background-color:#FFFFA0}</style></head> </tr> <tr> <td align="left">Reply to:</td> -<td align="left">Howard Hinnant <howard.hinnant@gmail.com></td> +<td align="left">Howard Hinnant <<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>></td> </tr> </tbody></table> -<h1>C++ Standard Library Closed Issues List (Revision R45)</h1> +<h1>C++ Standard Library Closed Issues List (Revision R49)</h1> + <p>Reference ISO/IEC IS 14882:1998(E)</p> <p>Also see:</p> <ul> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li> <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li> <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html">Library Defect Reports List</a></li> </ul> <p>This document contains only library issues which have been closed by the Library Working Group as duplicates or not defects. That is, - issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> or <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 + issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> or + <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 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 defects. The introductory material in that document also applies to this document.</p> + <h2>Revision History</h2> <ul> +<li>R49: +2007-06-23 pre-Toronto mailing. +<ul> +<li><b>Summary:</b><ul> +<li>158 open issues, up by 13.</li> +<li>538 closed issues, up by 7.</li> +<li>696 issues total, up by 20.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li> +<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> +<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> +<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> +<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> +</ul></li> +</ul> +</li> +<li>R48: +2007-05-06 post-Oxford mailing. +<ul> +<li><b>Summary:</b><ul> +<li>145 open issues, down by 33.</li> +<li>531 closed issues, up by 53.</li> +<li>676 issues total, up by 20.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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> +<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> +<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-closed.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> +<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> +<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> +<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-closed.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-closed.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-closed.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> +<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> +<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> +<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> +<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> +<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#646">646</a>.</li> +<li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a>.</li> +<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> +<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> +<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> +</ul></li> +</ul> +</li> +<li>R47: +2007-03-09 pre-Oxford mailing. +<ul> +<li><b>Summary:</b><ul> +<li>178 open issues, up by 37.</li> +<li>478 closed issues, up by 0.</li> +<li>656 issues total, up by 37.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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-active.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li> +<li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#626">626</a>.</li> +<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li> +<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> +<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-closed.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> +<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> +</ul></li> +</ul> +</li> +<li>R46: +2007-01-12 mid-term mailing. +<ul> +<li><b>Summary:</b><ul> +<li>141 open issues, up by 11.</li> +<li>478 closed issues, down by 1.</li> +<li>619 issues total, up by 10.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +</ul></li> +</ul> +</li> <li>R45: 2006-11-03 post-Portland mailing. -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. -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. -Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#605">605</a> to Ready. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#609">609</a>. +<ul> +<li><b>Summary:</b><ul> +<li>130 open issues, up by 0.</li> +<li>479 closed issues, up by 17.</li> +<li>609 issues total, up by 17.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +<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> +<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li> +<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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> +<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> +<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review.</li> +<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> +</ul></li> +</ul> </li> <li>R44: 2006-09-08 pre-Portland mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>. +<ul> +<li><b>Summary:</b><ul> +<li>130 open issues, up by 6.</li> +<li>462 closed issues, down by 1.</li> +<li>592 issues total, up by 5.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>.</li> +</ul></li> +</ul> </li> <li>R43: 2006-06-23 mid-term mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>. -Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>. -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. +<ul> +<li><b>Summary:</b><ul> +<li>124 open issues, up by 14.</li> +<li>463 closed issues, down by 1.</li> +<li>587 issues total, up by 13.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li> +<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> +</ul></li> +</ul> </li> <li>R42: 2006-04-21 post-Berlin mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#572">572</a>. -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. -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-active.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-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#548">548</a> to Open. -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-active.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. -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. -Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#534">534</a> to Review. +<ul> +<li><b>Summary:</b><ul> +<li>110 open issues, down by 16.</li> +<li>464 closed issues, up by 24.</li> +<li>574 issues total, up by 8.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li> +<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> +<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-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#548">548</a> to Open.</li> +<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-active.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> +<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> +<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li> +</ul></li> +</ul> </li> <li>R41: 2006-02-24 pre-Berlin mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>. -Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open. -Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>. +<ul> +<li><b>Summary:</b><ul> +<li>126 open issues, up by 31.</li> +<li>440 closed issues, up by 0.</li> +<li>566 issues total, up by 31.</li> +</ul></li> +<li><b>Details:</b><ul> +<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-active.html#566">566</a>.</li> +<li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li> +<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li> +</ul></li> +</ul> </li> <li>R40: 2005-12-16 mid-term mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>. +<ul> +<li><b>Summary:</b><ul> +<li>95 open issues.</li> +<li>440 closed issues.</li> +<li>535 issues total.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li> +</ul></li> +</ul> </li> <li>R39: 2005-10-14 post-Mont Tremblant mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#528">528</a>. +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-active.html#528">528</a>. 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. 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. 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. @@ -120,12 +253,12 @@ previously in "DR" status were moved to "WP". <li>R32: 2004-09 pre-Redmond mailing: reflects new proposed resolutions and new issues received after the 2004-07 mailing. Added -new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>. +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>. </li> <li>R31: 2004-07 mid-term mailing: reflects new proposed resolutions and new issues received after the post-Sydney mailing. Added -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>. +new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>. </li> <li>R30: Post-Sydney mailing: reflects decisions made at the Sydney meeting. @@ -177,8 +310,8 @@ All Ready issues were moved to DR status, with the exception of issues <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>. Noteworthy issues discussed at Redmond include -<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-active.html#233">233</a>, -<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-active.html#254">254</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-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>, +<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>. </li> <li>R19: Pre-Redmond mailing. Added new issues @@ -247,7 +380,7 @@ the bug in enough places. </li> <li>R15: pre-Toronto mailing. Added issues -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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 +<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 changes so that we pass Weblint tests. </li> <li>R14: @@ -320,35 +453,65 @@ Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-def format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98) </li> </ul> + <h2>Closed Issues</h2> <hr> -<a name="2"><h3>2. Auto_ptr conversions effects incorrect</h3></a><p><b>Section:</b> 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 4 Dec 1997</p> +<h3><a name="2"></a>2. Auto_ptr conversions effects incorrect</h3> +<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> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1997-12-04</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 1 in "Effects", says "Calls p->release()" where it clearly must be "Calls p.release()". (As it is, it seems to require using auto_ptr<>::operator-> to refer to X::release, assuming that exists.)</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a> paragraph 1 Effects from +<p>Change 20.4.4.3 [meta.unary.prop] paragraph 1 Effects from "Calls p->release()" to "Calls p.release()".</p> + + <p><b>Rationale:</b></p> <p>Not a defect: the proposed change is already found in the standard. [Originally classified as a defect, later reclassified.]</p> + + + + + <hr> -<a name="4"><h3>4. Basic_string size_type and difference_type should be implementation defined</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 16 Nov 1997</p> +<h3><a name="4"></a>4. Basic_string size_type and difference_type should be implementation defined</h3> +<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> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 1997-11-16</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In Morristown we changed the size_type and difference_type typedefs for all the other containers to implementation defined with a -reference to 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>. This should probably also have been +reference to 23.1 [container.requirements]. This should probably also have been done for strings. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. [Originally classified as a defect, later reclassified.] basic_string, unlike the other standard library template containers, is severely constrained by its use of char_traits. Those types are dictated by the traits class, and are far from implementation defined.</p> + + + + + <hr> -<a name="6"><h3>6. File position not an offset unimplementable</h3></a><p><b>Section:</b> 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 15 Dec 1997</p> +<h3><a name="6"></a>6. File position not an offset unimplementable</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Table 88, in I/O, is too strict; it's unimplementable on systems where a file position isn't just an offset. It also never says just what fpos<> is really supposed to be. [Here's my summary, which @@ -358,12 +521,24 @@ encapsulates an mbstate_t and a file position (possibly represented as an fpos_t), it has syntactic support for pointer-like arithmetic, and implementors are required to have real, not just syntactic, support for arithmetic." This isn't standardese, of course.] </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. The LWG believes that the Standard is already clear, and that the above summary is what the Standard in effect says.</p> + + + + + <hr> -<a name="10"><h3>10. Codecvt<>::do unclear</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 14 Jan 1998</p> +<h3><a name="10"></a>10. Codecvt<>::do unclear</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-14</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a></p> +<p><b>Discussion:</b></p> <p>Section 22.2.1.5.2 says that codecvt<>::do_in and do_out should return the value noconv if "no conversion was needed". However, I don't see anything anywhere that defines what @@ -371,11 +546,23 @@ it means for a conversion to be needed or not needed. I can think of several circumstances where one might plausibly think that a conversion is not "needed", but I don't know which one is intended here. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#19">19</a>.</p> + + + + + + <hr> -<a name="12"><h3>12. Way objects hold allocators unclear</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 23 Feb 1998</p> +<h3><a name="12"></a>12. Way objects hold allocators unclear</h3> +<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> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1998-02-23</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>I couldn't find a statement in the standard saying whether the allocator object held by a container is held as a copy of the constructor argument or whether a pointer of reference is maintained internal. There is an according statement for compare objects and @@ -384,20 +571,44 @@ regarding allocators. </p> <p>Did I overlook it? Is it an open issue or known defect? Or is it deliberately left unspecified? </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. The LWG believes that the Standard is already -clear. See 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>, paragraph 8.</p> +clear. See 23.1 [container.requirements], paragraph 8.</p> + + + + + <hr> -<a name="43"><h3>43. Locale table correction</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1 Jun 1998</p> -<p><b>Proposed resolution:</b></p> +<h3><a name="43"></a>43. Locale table correction</h3> +<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> + <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1998-06-01</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#33">33</a></p> +<p><b>Discussion:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#33">33</a>.</p> + + + + + + <hr> -<a name="45"><h3>45. Stringstreams read/write pointers initial position unclear</h3></a><p><b>Section:</b> 27.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream"> [lib.ostringstream]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matthias Mueller <b>Date:</b> 27 May 1998</p> +<h3><a name="45"></a>45. Stringstreams read/write pointers initial position unclear</h3> +<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> + <b>Submitter:</b> Matthias Mueller <b>Date:</b> 1998-05-27</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In a comp.lang.c++.moderated Matthias Mueller wrote:</p> -<p>"We are not sure how to interpret the CD2 (see 27.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.forward"> [lib.iostream.forward]</a>, 27.7.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream.cons"> [lib.ostringstream.cons]</a>, 27.7.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.cons"> [lib.stringbuf.cons]</a>) +<p>"We are not sure how to interpret the CD2 (see 27.2 +[iostream.forward], 27.7.3.1 [ostringstream.cons], 27.7.1.1 +[stringbuf.cons]) with respect to the question as to what the correct initial positions of the write and read pointers of a stringstream should be."</p> @@ -409,14 +620,26 @@ first and to output the second?"</p> Jerry Schwarz have all offered opinions; see reflector messages lib-6518, 6519, 6520, 6521, 6523, 6524.]</i></p> -<p><b>Proposed resolution:</b></p> + + + <p><b>Rationale:</b></p> <p>The LWG believes the Standard is correct as written. The behavior of stringstreams is consistent with fstreams, and there is a constructor which can be used to obtain the desired effect. This behavior is known to be different from strstreams.</p> + + + + + <hr> -<a name="58"><h3>58. Extracting a char from a wide-oriented stream</h3></a><p><b>Section:</b> 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 1 Jul 1998</p> +<h3><a name="58"></a>58. Extracting a char from a wide-oriented stream</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-01</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>27.6.1.2.3 has member functions for extraction of signed char and unsigned char, both singly and as strings. However, it doesn't say what it means to extract a <tt>char</tt> from a @@ -426,12 +649,22 @@ what it means to extract a <tt>char</tt> from a basic_istream must somehow convert from charT to signed char or unsigned char. The standard doesn't say how it is to perform that conversion. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The Standard is correct as written. There is no such extractor and this is the intent of the LWG.</p> + + + + <hr> -<a name="65"><h3>65. Underspecification of strstreambuf::seekoff</h3></a><p><b>Section:</b> D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 18 Aug 1998</p> +<h3><a name="65"></a>65. Underspecification of strstreambuf::seekoff</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The standard says how this member function affects the current stream position. (<tt>gptr</tt> or <tt>pptr</tt>) However, it does not say how this member function affects the beginning and end of the @@ -441,12 +674,24 @@ get/put area. </p> beyond the end of the current read area. (Which is legal. This is implicit in the definition of <i>seekhigh</i> in D.7.1, paragraph 4.) </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG agrees that seekoff() is underspecified, but does not wish to invest effort in this deprecated feature.</p> + + + + + <hr> -<a name="67"><h3>67. Setw useless for strings</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 9 Jul 1998</p> +<h3><a name="67"></a>67. Setw useless for strings</h3> +<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> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-07-09</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#25">25</a></p> +<p><b>Discussion:</b></p> <p>In a comp.std.c++ posting Michel Michaud wrote: What should be output by: </p> @@ -469,30 +714,63 @@ intent, one wouldn't expect them to have mentioned using its value.) <p>It's worth pointing out that this is a recent correction anyway; IIRC, earlier versions of the draft forgot to mention formatting parameters whatsoever.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#25">25</a>.</p> + + + + + + <hr> -<a name="72"><h3>72. Do_convert phantom member function</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 24 Aug 1998</p> -<p>In 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> par 3, and in <font color="red">22.2.1.5.2</font> par 8, a nonexistent member function +<h3><a name="72"></a>72. Do_convert phantom member function</h3> +<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> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-24</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#24">24</a></p> +<p><b>Discussion:</b></p> +<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 "do_convert" is mentioned. This member was replaced with "do_in" and "do_out", the proper referents in the contexts above.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate: see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#24">24</a>.</p> + + + + + <hr> -<a name="73"><h3>73. <tt>is_open</tt> should be const</h3></a><p><b>Section:</b> 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 27 Aug 1998</p> +<h3><a name="73"></a>73. <tt>is_open</tt> should be const</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-27</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Classes <tt>basic_ifstream</tt>, <tt>basic_ofstream</tt>, and <tt>basic_fstream</tt> all have a member function <tt>is_open</tt>. It should be a <tt>const</tt> member function, since it does nothing but call one of <tt>basic_filebuf</tt>'s const member functions. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. This is a deliberate feature; const streams would be meaningless.</p> + + + + <hr> -<a name="77"></a><h3><a name="77">77. Valarray operator[] const returning value</a></h3><p><b>Section:</b> 26.5.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.access"> [lib.valarray.access]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Levente Farkas <b>Date:</b> 9 Sep 1998</p> +<h3><a name="77"></a>77. Valarray operator[] const returning value</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Levente Farkas <b>Date:</b> 1998-09-09</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#389">389</a></p> +<p><b>Discussion:</b></p> <p>valarray:<br> <br> <tt>T operator[] (size_t) const;</tt><br> @@ -508,18 +786,29 @@ One can't copy even from a const valarray eg:<br> <tt>memcpy(ptr, &v[0], v.size() * sizeof(double));<br> </tt><br> [I] find this bug in valarray is very difficult.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG believes that the interface was deliberately designed that way. That is what valarray was designed to do; that's where the "value array" name comes from. LWG members further comment that "we don't want valarray to be a full STL container." -26.5.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.access"> [lib.valarray.access]</a> specifies properties that indicate "an +26.5.2.3 [valarray.access] specifies properties that indicate "an absence of aliasing" for non-constant arrays; this allows optimizations, including special hardware optimizations, that are not otherwise possible. </p> + + + + + <hr> -<a name="81"><h3>81. Wrong declaration of slice operations</h3></a><p><b>Section:</b> 26.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.member.ops"> [lib.complex.member.ops]</a>, 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a>, 26.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.transcendentals"> [lib.complex.transcendentals]</a>, 26.3.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cmplx.over"> [lib.cmplx.over]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="81"></a>81. Wrong declaration of slice operations</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Isn't the definition of copy constructor and assignment operators wrong? Instead of</p> @@ -532,28 +821,47 @@ otherwise possible. </p> slice_array& operator=(const slice_array<T>&);</pre> <p>Same for gslice_array. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. The Standard is correct as written. </p> + + + + <hr> -<a name="82"><h3>82. Missing constant for set elements</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="82"></a>82. Missing constant for set elements</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 5 specifies:</p> -<blockquote> +<blockquote><p> For set and multiset the value type is the same as the key type. For map and multimap it is equal to pair<const Key, T>. -</blockquote> +</p></blockquote> <p>Strictly speaking, this is not correct because for set and multiset the value type is the same as the <b>constant</b> key type.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. The Standard is correct as written; it uses a different mechanism (const &) for <tt>set</tt> and <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 issue.</p> + + + + <hr> -<a name="84"><h3>84. Ambiguity with string::insert()</h3></a><p><b>Section:</b> 21.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.modifiers"> [lib.string.modifiers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="84"></a>84. Ambiguity with string::insert()</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>If I try</p> <pre> s.insert(0,1,' ');</pre> @@ -570,22 +878,43 @@ issue.</p> '. But according to 23.1.1.9 (the "do the right thing" fix) it is equivalent to the second. However, it is still ambiguous, because of course I mean the first!</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Not a defect. The LWG believes this is a "genetic misfortune" inherent in the design of string and thus not a defect in the Standard as such .</p> + + + + <hr> -<a name="85"><h3>85. String char types</h3></a><p><b>Section:</b> 21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.strings"> [lib.strings]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="85"></a>85. String char types</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The standard seems not to require that charT is equivalent to traits::char_type. So, what happens if charT is not equivalent to traits::char_type?</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>There is already wording in 21.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits"> [lib.char.traits]</a> paragraph 3 that +<p>There is already wording in 21.1 [char.traits] paragraph 3 that requires them to be the same.</p> + + + + <hr> -<a name="87"><h3>87. Error in description of string::compare()</h3></a><p><b>Section:</b> 21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="87"></a>87. Error in description of string::compare()</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#5">5</a></p> +<p><b>Discussion:</b></p> <p>The following compare() description is obviously a bug:</p> <pre>int compare(size_type pos, size_type n1, @@ -595,11 +924,21 @@ requires them to be the same.</p> <p>because without passing n2 it should compare up to the end of the string instead of comparing npos characters (which throws an exception) </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#5">5</a>.</p> + + + + + <hr> -<a name="88"><h3>88. Inconsistency between string::insert() and string::append()</h3></a><p><b>Section:</b> 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, 21.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::append"> [lib.string::append]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="88"></a>88. Inconsistency between string::insert() and string::append()</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Why does </p> <pre> template<class InputIterator> basic_string& append(InputIterator first, InputIterator last);</pre> @@ -609,22 +948,44 @@ exception) </p> void insert(iterator p, InputIterator first, InputIterator last);</pre> <p>returns nothing ?</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG believes this stylistic inconsistency is not sufficiently serious to constitute a defect.</p> + + + + <hr> -<a name="89"><h3>89. Missing throw specification for string::insert() and string::replace()</h3></a><p><b>Section:</b> 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, 21.3.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::replace"> [lib.string::replace]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="89"></a>89. Missing throw specification for string::insert() and string::replace()</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a></p> +<p><b>Discussion:</b></p> <p>All insert() and replace() members for strings with an iterator as first argument lack a throw specification. The throw specification should probably be: length_error if size exceeds maximum. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Considered a duplicate because it will be solved by the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p> + + + + + <hr> -<a name="93"><h3>93. Incomplete Valarray Subset Definitions</h3></a><p><b>Section:</b> 26.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.numbers"> [lib.complex.numbers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="93"></a>93. Incomplete Valarray Subset Definitions</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>You can easily create subsets, but you can't easily combine them with other subsets. Unfortunately, you almost always needs an explicit type conversion to valarray. This is because the standard @@ -643,12 +1004,24 @@ write the following:</p> <p>This is tedious and error-prone. Even worse, it costs performance because each cast creates a temporary objects, which could be avoided without the cast. </p> + + <p><b>Proposed resolution:</b></p> <p>Extend all valarray subset types so that they offer all valarray operations.</p> + + <p><b>Rationale:</b></p> <p>This is not a defect in the Standard; it is a request for an extension.</p> + + + + <hr> -<a name="94"><h3>94. May library implementors add template parameters to Standard Library classes?</h3></a><p><b>Section:</b> 17.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.conforming"> [lib.conforming]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 22 Jan 1998</p> +<h3><a name="94"></a>94. May library implementors add template parameters to Standard Library classes?</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-22</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Is it a permitted extension for library implementors to add template parameters to standard library classes, provided that those extra parameters have defaults? For example, instead of defining <tt>template <class T, class Alloc = allocator<T> > class @@ -687,8 +1060,10 @@ may be provided by a non-Standard implementation class:</p> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>Add a new subclause [presumably 17.4.4.9] following 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>:</p> +<p>Add a new subclause [presumably 17.4.4.9] following 17.4.4.8 [res.on.exception.handling]:</p> <blockquote> <p>17.4.4.9 Template Parameters</p> <p>A specialization of a @@ -699,7 +1074,7 @@ may be provided by a non-Standard implementation class:</p> </blockquote> <p>Add "template parameters" to the list of subclauses at -the end of 17.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.conforming"> [lib.conforming]</a> paragraph 1.</p> +the end of 17.4.4 [conforming] paragraph 1.</p> <p><i>[Kona: The LWG agreed the standard needs clarification. After discussion with John Spicer, it seems added template parameters can be @@ -707,6 +1082,9 @@ detected by a program using template-template parameters. A straw vote - "should implementors be allowed to add template parameters?" found no consensus ; 5 - yes, 7 - no.]</i></p> + + + <p><b>Rationale:</b></p> <p> There is no ambiguity; the standard is clear as written. Library @@ -722,8 +1100,17 @@ The LWG decided against making this change, because it would break user code involving template template parameters or specializations of standard library class templates. </p> + + + + + <hr> -<a name="95"><h3>95. Members added by the implementation</h3></a><p><b>Section:</b> 17.4.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.member.functions"> [lib.member.functions]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="95"></a>95. Members added by the implementation</h3> +<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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In 17.3.4.4/2 vs 17.3.4.7/0 there is a hole; an implementation could add virtual members a base class and break user derived classes.</p> @@ -744,49 +1131,92 @@ class vector_checking : public vector // user doesn't know about _Base::foo () };</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> <p>Clarify the wording to make the example illegal.</p> + + <p><b>Rationale:</b></p> <p>This is not a defect in the Standard. The example is already -illegal. See 17.4.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.member.functions"> [lib.member.functions]</a> paragraph 2.</p> +illegal. See 17.4.4.4 [member.functions] paragraph 2.</p> + + + + <hr> -<a name="97"><h3>97. Insert inconsistent definition</h3></a><p><b>Section:</b> 23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="97"></a>97. Insert inconsistent definition</h3> +<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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p><tt>insert(iterator, const value_type&)</tt> is defined both on sequences and on set, with unrelated semantics: insert here (in sequences), and insert with hint (in associative containers). They should have different names (B.S. says: do not abuse overloading).</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is not a defect in the Standard. It is a genetic misfortune of the design, for better or for worse.</p> + + + + <hr> -<a name="99"><h3>99. Reverse_iterator comparisons completely wrong</h3></a><p><b>Section:</b> 24.4.1.3.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op=="> [lib.reverse.iter.op==]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="99"></a>99. Reverse_iterator comparisons completely wrong</h3> +<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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The <, >, <=, >= comparison operator are wrong: they return the opposite of what they should.</p> <p>Note: same problem in CD2, these were not even defined in CD1. SGI STL code is correct; this problem is known since the Morristown meeting but there it was too late</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is not a defect in the Standard. A careful reading shows the Standard is correct as written. A review of several implementations show that they implement exactly what the Standard says.</p> + + + + <hr> -<a name="100"><h3>100. Insert iterators/ostream_iterators overconstrained</h3></a><p><b>Section:</b> 24.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.insert.iterators"> [lib.insert.iterators]</a>, 24.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostreambuf.iterator"> [lib.ostreambuf.iterator]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="100"></a>100. Insert iterators/ostream_iterators overconstrained</h3> +<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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Overspecified For an insert iterator it, the expression *it is required to return a reference to it. This is a simple possible implementation, but as the SGI STL documentation says, not the only one, and the user should not assume that this is the case.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG believes this causes no harm and is not a defect in the standard. The only example anyone could come up with caused some incorrect code to work, rather than the other way around.</p> + + + + + <hr> -<a name="101"><h3>101. No way to free storage for vector and deque</h3></a><p><b>Section:</b> 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, 23.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array"> [lib.array]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="101"></a>101. No way to free storage for vector and deque</h3> +<p><b>Section:</b> 23.2.5 [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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Reserve can not free storage, unlike string::reserve</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is not a defect in the Standard. The LWG has considered this issue in the past and sees no need to change the Standard. Deque has @@ -798,55 +1228,114 @@ expressed in a single line of code (where <tt>v</tt> is <blockquote> <p><tt>vector<T>(v).swap(v); // shrink-to-fit v</tt></p> </blockquote> + + + + + <hr> -<a name="102"><h3>102. Bug in insert range in associative containers</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="102"></a>102. Bug in insert range in associative containers</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a></p> +<p><b>Discussion:</b></p> <p>Table 69 of Containers say that a.insert(i,j) is linear if [i, j) is ordered. It seems impossible to implement, as it means that if [i, j) = [x], insert in an associative container is O(1)!</p> + + <p><b>Proposed resolution:</b></p> <p>N+log (size()) if [i,j) is sorted according to value_comp()</p> + + <p><b>Rationale:</b></p> <p>Subsumed by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#264">264</a>.</p> + + + + + <hr> -<a name="104"><h3>104. Description of basic_string::operator[] is unclear</h3></a><p><b>Section:</b> 21.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.access"> [lib.string.access]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="104"></a>104. Description of basic_string::operator[] is unclear</h3> +<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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>It is not clear that undefined behavior applies when pos == size () for the non const version.</p> + + <p><b>Proposed resolution:</b></p> <p>Rewrite as: Otherwise, if pos > size () or pos == size () and the non-const version is used, then the behavior is undefined.</p> + + <p><b>Rationale:</b></p> <p>The Standard is correct. The proposed resolution already appears in the Standard.</p> + + + + <hr> -<a name="105"><h3>105. fstream ctors argument types desired</h3></a><p><b>Section:</b> 27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="105"></a>105. fstream ctors argument types desired</h3> +<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#NAD%20Future">NAD Future</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>Discussion:</b></p> <p>fstream ctors take a const char* instead of string.<br> fstream ctors can't take wchar_t</p> <p>An extension to add a const wchar_t* to fstream would make the implementation non conforming.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is not a defect in the Standard. It might be an interesting extension for the next Standard. </p> + + + + <hr> -<a name="107"><h3>107. Valarray constructor is strange</h3></a><p><b>Section:</b> 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="107"></a>107. Valarray constructor is strange</h3> +<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> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The order of the arguments is (elem, size) instead of the normal (size, elem) in the rest of the library. Since elem often has an integral or floating point type, both types are convertible to each other and reversing them leads to a well formed program.</p> + + <p><b>Proposed resolution:</b></p> <p>Inverting the arguments could silently break programs. Introduce the two signatures (const T&, size_t) and (size_t, const T&), but make the one we do not want private so errors result in a diagnosed access violation. This technique can also be applied to STL containers.</p> + + <p><b>Rationale:</b></p> <p>The LWG believes that while the order of arguments is unfortunate, it does not constitute a defect in the standard. The LWG believes that the proposed solution will not work for valarray<size_t> and perhaps other cases.</p> + + + + <hr> -<a name="111"><h3>111. istreambuf_iterator::equal overspecified, inefficient</h3></a><p><b>Section:</b> 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 15 Oct 1998</p> +<h3><a name="111"></a>111. istreambuf_iterator::equal overspecified, inefficient</h3> +<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> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-10-15</p> +<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> +<p><b>Discussion:</b></p> <p>The member istreambuf_iterator<>::equal is specified to be unnecessarily inefficient. While this does not affect the efficiency of conforming implementations of iostreams, because they can @@ -861,8 +1350,10 @@ but slows down users' code. </p> <p>The solution is to weaken the requirement on the function to return true only if both iterators are at eof. </p> + + <p><b>Proposed resolution:</b></p> -<p>Replace 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>, +<p>Replace 24.5.3.5 [istreambuf.iterator::equal], paragraph 1, </p> <blockquote> @@ -877,14 +1368,26 @@ paragraph 1, </p> end-of-stream, regardless of what streambuf object they use. </p> </blockquote> + + <p><b>Rationale:</b></p> <p>It is not clear that this is a genuine defect. Additionally, the LWG was reluctant to make a change that would result in operator== not being a equivalence relation. One consequence of this change is that an algorithm that's passed the range [i, i) would no longer treat it as an empty range.</p> + + + + + <hr> -<a name="113"><h3>113. Missing/extra iostream sync semantics</h3></a><p><b>Section:</b> 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a>, 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 13 Oct 1998</p> +<h3><a name="113"></a>113. Missing/extra iostream sync semantics</h3> +<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> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-10-13</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In 27.6.1.1, class basic_istream has a member function sync, described in 27.6.1.3, paragraph 36. </p> @@ -905,14 +1408,26 @@ strstream. </p> <p>If we can add corresponding semantics to the various sync functions, we should. If not, we should remove sync from basic_istream.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>A sync function is not needed in basic_ostream because the flush function provides the desired functionality.</p> <p>As for the other points, the LWG finds the standard correct as written.</p> + + + + + <hr> -<a name="116"><h3>116. bitset cannot be constructed with a const char*</h3></a><p><b>Section:</b> 23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 6 Nov 1998</p> +<h3><a name="116"></a>116. bitset cannot be constructed with a const char*</h3> +<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#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-11-06</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p> +<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> +<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> +<p><b>Discussion:</b></p> <p>The following code does not compile with the EDG compiler:</p> <blockquote> @@ -946,31 +1461,45 @@ comes up with exact matches, not ones involving conversions." <p>I don't think the intention when this constructor became templatized was for construction from a <tt>const char*</tt> to no longer work.</p> + + <p><b>Proposed resolution:</b></p> -<p>Add to 23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a> a bitset constructor declaration</p> +<p>Add to 23.3.5 [template.bitset] a bitset constructor declaration</p> <blockquote> <pre>explicit bitset(const char*);</pre> </blockquote> -<p>and in Section 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> add:</p> +<p>and in Section 23.3.5.1 [bitset.cons] add:</p> <blockquote> <pre>explicit bitset(const char* str);</pre> <p>Effects: <br> Calls <tt>bitset((string) str, 0, string::npos);</tt></p> </blockquote> + + <p><b>Rationale:</b></p> <p>Although the problem is real, the standard is designed that way so it is not a defect. Education is the immediate workaround. A future standard may wish to consider the Proposed Resolution as an extension.</p> + + + + + <hr> -<a name="121"><h3>121. Detailed definition for ctype<wchar_t> specialization</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> +<h3><a name="121"></a>121. Detailed definition for ctype<wchar_t> specialization</h3> +<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> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Section 22.1.1.1.1 has the following listed in Table 51: ctype<char> , ctype<wchar_t>. </p> -<p>Also Section 22.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype"> [lib.locale.ctype]</a> says: </p> +<p>Also Section 22.2.1.1 [locale.ctype] says: </p> <blockquote> <p>The instantiations required in Table 51 (22.1.1.1.1) namely ctype<char> and @@ -978,16 +1507,30 @@ ctype<wchar_t>. </p> native character set. </p> </blockquote> -<p>However, Section 22.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.special"> [lib.facet.ctype.special]</a> +<p>However, Section 22.2.1.3 [facet.ctype.special] only has a detailed description of the ctype<char> specialization, not the ctype<wchar_t> specialization. </p> + + <p><b>Proposed resolution:</b></p> <p>Add the ctype<wchar_t> detailed class description to Section -22.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.special"> [lib.facet.ctype.special]</a>. </p> +22.2.1.3 [facet.ctype.special]. </p> + + <p><b>Rationale:</b></p> <p>Specialization for wchar_t is not needed since the default is acceptable.</p> + + + + + <hr> -<a name="128"><h3>128. Need open_mode() function for file stream, string streams, file buffers, and string buffers</h3></a><p><b>Section:</b> 27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a>, 27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 22 Feb 1999</p> +<h3><a name="128"></a>128. Need open_mode() function for file stream, string streams, file buffers, and string buffers</h3> +<p><b>Section:</b> 27.7 [string.streams], 27.8 [file.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-02-22</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.streams">issues</a> in [string.streams].</p> +<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> +<p><b>Discussion:</b></p> <p>The following question came from Thorsten Herlemann:</p> <blockquote> @@ -1006,9 +1549,11 @@ how certain operations behave. Just think of the append mode. </p> <p>Both streams and stream buffers should have a <tt>mode()</tt> function that returns the current open mode setting. </p> + + <p><b>Proposed resolution:</b></p> <p>For stream buffers, add a function to the base class as a non-virtual function -qualified as const to 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a>:</p> +qualified as const to 27.5.2 [streambuf]:</p> <p> <tt>openmode mode() const</tt>;</p> @@ -1020,19 +1565,41 @@ initialized for file and string stream objects, unless I'm overlooking anything. For this reason it should be added to the most derived stream classes. Alternatively, it could be added to <tt>basic_ios</tt> and would be default initialized in <tt>basic_ios<>::init()</tt>.</p> + + <p><b>Rationale:</b></p> <p>This might be an interesting extension for some future, but it is not a defect in the current standard. The Proposed Resolution is retained for future reference.</p> + + + + + <hr> -<a name="131"><h3>131. list::splice throws nothing</h3></a><p><b>Section:</b> 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 6 Mar 1999</p> +<h3><a name="131"></a>131. list::splice throws nothing</h3> +<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>What happens if a splice operation causes the size() of a list to grow beyond max_size()?</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Size() cannot grow beyond max_size(). </p> + + + + + <hr> -<a name="135"><h3>135. basic_iostream doubly initialized</h3></a><p><b>Section:</b> 27.6.1.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.cons"> [lib.iostream.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 6 Mar 1999</p> +<h3><a name="135"></a>135. basic_iostream doubly initialized</h3> +<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> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>-1- Effects Constructs an object of class basic_iostream, assigning initial values to the base classes by calling basic_istream<charT,traits>(sb) (lib.istream) and @@ -1041,19 +1608,32 @@ basic_ostream<charT,traits>(sb) (lib.ostream)</p> <p>The called for basic_istream and basic_ostream constructors call init(sb). This means that the basic_iostream's virtual base class is initialized twice.</p> + + <p><b>Proposed resolution:</b></p> <p>Change 27.6.1.5.1, paragraph 1 to:</p> <p>-1- Effects Constructs an object of class basic_iostream, assigning initial values to the base classes by calling basic_istream<charT,traits>(sb) (lib.istream).</p> + + <p><b>Rationale:</b></p> <p>The LWG agreed that the <tt> init()</tt> function is called twice, but said that this is harmless and so not a defect in the standard.</p> + + + + <hr> -<a name="138"><h3>138. Class ctype_byname<char> redundant and misleading</h3></a><p><b>Section:</b> 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> March 18, 1999</p> -<p>Section 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a> specifies that +<h3><a name="138"></a>138. Class ctype_byname<char> redundant and misleading</h3> +<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> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-03-18</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p>Section 22.2.1.4 [locale.codecvt] specifies that ctype_byname<char> must be a specialization of the ctype_byname template.</p> @@ -1073,15 +1653,25 @@ redundant, at worst misleading - unless I am missing anything. </p> specialization, because the base class ctype<char> is a specialization with an interface different from the ctype template, but that's an implementation detail and need not be mentioned in the standard. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p> The standard as written is mildly misleading, but the correct fix is to deal with the underlying problem in the ctype_byname base class, not in the specialization. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p> + + + + <hr> -<a name="140"><h3>140. map<Key, T>::value_type does not satisfy the assignable requirement</h3></a><p><b>Section:</b> 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Mark Mitchell <b>Date:</b> 14 Apr 1999</p> +<h3><a name="140"></a>140. map<Key, T>::value_type does not satisfy the assignable requirement</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Mark Mitchell <b>Date:</b> 1999-04-14</p> +<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> +<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> +<p><b>Discussion:</b></p> <blockquote> - <p>23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a><br> + <p>23.1 [container.requirements]<br> <br> expression return type pre/post-condition<br> @@ -1091,7 +1681,7 @@ not in the specialization. See issue <a href="http://www.open-std.org/jtc1/sc22/ T is assignable<br> <br> - 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a><br> + 23.3.1 [map]<br> <br> A map satisfies all the requirements of a container.<br> <br> @@ -1105,13 +1695,23 @@ assignable requirement imposed by a container.</p> <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 modification of set keys.]</i></p> -<p><b>Proposed resolution:</b></p> + + + <p><b>Rationale:</b></p> <p>The LWG believes that the standard is inconsistent, but that this is a design problem rather than a strict defect. May wish to reconsider for the next standard.</p> + + + + <hr> -<a name="143"><h3>143. C .h header wording unclear</h3></a><p><b>Section:</b> D.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.c.headers"> [depr.c.headers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Christophe de Dinechin <b>Date:</b> 4 May 1999</p> +<h3><a name="143"></a>143. C .h header wording unclear</h3> +<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> + <b>Submitter:</b> Christophe de Dinechin <b>Date:</b> 1999-05-04</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>[depr.c.headers] paragraph 2 reads:</p> <blockquote> @@ -1190,9 +1790,11 @@ int main() { }</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>Replace D.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.c.headers"> [depr.c.headers]</a> paragraph 2 with:</p> +<p>Replace D.5 [depr.c.headers] paragraph 2 with:</p> <blockquote> @@ -1204,14 +1806,25 @@ using-declaration (_namespace.udecl_) in global scope.</p> </blockquote> + + <p><b>Rationale:</b></p> <p> The current wording in the standard is the result of a difficult compromise that averted delay of the standard. Based on discussions in Tokyo it is clear that there is no still no consensus on stricter wording, so the issue has been closed. It is suggested that users not write code that depends on Koenig lookup of C library functions.</p> + + + + <hr> -<a name="145"><h3>145. adjustfield lacks default value</h3></a><p><b>Section:</b> 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 12 May 1999</p> +<h3><a name="145"></a>145. adjustfield lacks default value</h3> +<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> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-05-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>There is no initial value for the adjustfield defined, although many people believe that the default adjustment were right. This is a common misunderstanding. The standard only defines that, if no @@ -1230,12 +1843,22 @@ matters more than necessary.</p> initialized I would suggest to give it the default value that everybody expects anyway.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is not a defect. It is deliberate that the default is no bits -set. Consider Arabic or Hebrew, for example. See 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a> paragraph 19, Table 61 - Fill padding.</p> +set. Consider Arabic or Hebrew, for example. See 22.2.2.2.2 [facet.num.put.virtuals] paragraph 19, Table 61 - Fill padding.</p> + + + + <hr> -<a name="149"><h3>149. Insert should return iterator to first element inserted</h3></a><p><b>Section:</b> 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 28 Jun 1999</p> +<h3><a name="149"></a>149. Insert should return iterator to first element inserted</h3> +<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-06-28</p> +<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> +<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> +<p><b>Discussion:</b></p> <p>Suppose that c and c1 are sequential containers and i is an iterator that refers to an element of c. Then I can insert a copy of c1's elements into c ahead of element i by executing </p> @@ -1293,14 +1916,24 @@ But I think the right solution is to change the definition of insert so that instead of returning void, it returns an iterator that refers to the first element inserted, if any, and otherwise is a copy of its first argument. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG believes this was an intentional design decision and so is not a defect. It may be worth revisiting for the next standard.</p> + + + + <hr> -<a name="157"><h3>157. Meaningless error handling for <tt>pword()</tt> and <tt>iword()</tt> -</h3></a><p><b>Section:</b> 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> -<p>According to paragraphs 2 and 4 of 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a>, the +<h3><a name="157"></a>157. Meaningless error handling for <tt>pword()</tt> and <tt>iword()</tt></h3> +<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> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#41">41</a></p> +<p><b>Discussion:</b></p> +<p>According to paragraphs 2 and 4 of 27.4.2.5 [ios.base.storage], the functions <tt>iword()</tt> and <tt>pword()</tt> "set the <tt>badbit</tt> (which might throw an exception)" on failure. ... but what does it mean for <tt>ios_base</tt> to set the @@ -1308,31 +1941,57 @@ failure. ... but what does it mean for <tt>ios_base</tt> to set the defined in <tt>basic_ios</tt>, a derived class! It would be possible to attempt a down cast but then it would be necessary to know the character type used...</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#41">41</a>.</p> + + + + + <hr> -<a name="162"><h3>162. Really "formatted input functions"?</h3></a><p><b>Section:</b> 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="162"></a>162. Really "formatted input functions"?</h3> +<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> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p> +<p><b>Discussion:</b></p> <p>It appears to be somewhat nonsensical to consider the functions defined in the paragraphs 1 to 5 to be "Formatted input function" but since these functions are defined in a section labeled "Formatted input functions" it is unclear to me whether these operators are considered formatted input functions which -have to conform to the "common requirements" from 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>: If this is the case, all manipulators, not just +have to conform to the "common requirements" from 27.6.1.2.1 +[istream.formatted.reqmts]: If this is the case, all manipulators, not +just <tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is set (... but setting <tt>noskipws</tt> using the manipulator syntax would also skip whitespace :-)</p> <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 output</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a>.</p> + + + + + <hr> -<a name="163"><h3>163. Return of <tt>gcount()</tt> after a call to <tt>gcount</tt> -</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="163"></a>163. Return of <tt>gcount()</tt> after a call to <tt>gcount</tt></h3> +<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> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p> +<p><b>Discussion:</b></p> <p>It is not clear which functions are to be considered unformatted -input functions. As written, it seems that all functions in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> are unformatted input functions. However, it does not +input functions. As written, it seems that all functions in 27.6.1.3 +[istream.unformatted] are unformatted input functions. However, it does +not really make much sense to construct a sentry object for <tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is unclear what happens to the <tt>gcount()</tt> if eg. <tt>gcount()</tt>, @@ -1348,22 +2007,42 @@ returns <tt>-1</tt> (the last unformatted input function stream). Correspondingly for <tt>unget()</tt>. Is this what is intended? If so, this should be clarified. Otherwise, a corresponding clarification should be used.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a>.</p> + + + + + <hr> -<a name="166"><h3>166. Really "formatted output functions"?</h3></a><p><b>Section:</b> 27.6.2.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters"> [lib.ostream.inserters]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> -<p>From 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a> it appears that all the functions -defined in 27.6.2.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters"> [lib.ostream.inserters]</a> have to construct a +<h3><a name="166"></a>166. Really "formatted output functions"?</h3> +<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> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a></p> +<p><b>Discussion:</b></p> +<p>From 27.6.2.6.1 [ostream.formatted.reqmts] it appears that all the functions +defined in 27.6.2.6.3 [ostream.inserters] have to construct a <tt>sentry</tt> object. Is this really intended?</p> <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 for output instead of input.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#60">60</a>.</p> + + + + + <hr> -<a name="177"><h3>177. Complex operators cannot be explicitly instantiated</h3></a><p><b>Section:</b> 26.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.ops"> [lib.complex.ops]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 2 Jul 1999</p> +<h3><a name="177"></a>177. Complex operators cannot be explicitly instantiated</h3> +<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> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>A user who tries to explicitly instantiate a complex non-member operator will get compilation errors. Below is a simplified example of the reason why. The problem is that iterator_traits cannot be instantiated on a non-pointer type @@ -1396,7 +2075,8 @@ complex<T> operator+ (const T& lhs, const complex<T>& rhs) template std::complex<float> std::operator+<float>(const float&, const std::complex<float>&);</pre> <p>See also c++-stdlib reflector messages: lib-6814, 6815, 6816.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Implementors can make minor changes and the example will work. Users are not affected in any case.</p> <p>According to John @@ -1409,8 +2089,17 @@ to explicitly instantiate standard library templates. If that resolution is accepted then library implementors will be the only ones that will be affected by this problem, and they must use the indicated syntax.</p> + + + + <hr> -<a name="178"><h3>178. Should clog and cerr initially be tied to cout?</h3></a><p><b>Section:</b> 27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 2 Jul 1999</p> +<h3><a name="178"></a>178. Should clog and cerr initially be tied to cout?</h3> +<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> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1999-07-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> Section 27.3.1 says "After the object cerr is initialized, cerr.flags() & unitbuf is nonzero. Its state is otherwise the same as @@ -1424,7 +2113,8 @@ Neither of the popular standard library implementations that I tried does this, they both tie cerr and clog to &cout. I would think that would be what users expect. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The standard is clear as written.</p> <p>27.3.1/5 says that "After the object cerr is initialized, cerr.flags() @@ -1432,8 +2122,17 @@ to &cout. I would think that would be what users expect. ios_base::init (27.4.4.1)." Table 89 in 27.4.4.1, which gives the postconditions of basic_ios::init(), says that tie() is 0. (Other issues correct ios_base::init to basic_ios::init().)</p> + + + + <hr> -<a name="180"><h3>180. Container member iterator arguments constness has unintended consequences</h3></a><p><b>Section:</b> 23 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.containers"> [lib.containers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 1 Jul 1999</p> +<h3><a name="180"></a>180. Container member iterator arguments constness has unintended consequences</h3> +<p><b>Section:</b> 23 [containers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 1999-07-01</p> +<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> +<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> +<p><b>Discussion:</b></p> <p>It is the constness of the container which should control whether it can be modified through a member function such as erase(), not the constness of the iterators. The iterators only serve to give @@ -1448,6 +2147,8 @@ find and read (but not modify) a subrange of (C.begin(), C.end()]. The only modification clients are allowed to make to elements in this subrange is to erase them from C through the use of a member function of W.</p> + + <p><b>Proposed resolution:</b></p> <p>Change all non-const iterator parameters of standard library container member functions to accept const_iterator parameters. @@ -1461,6 +2162,8 @@ strings.</p> to:<br> <tt>iterator erase(const_iterator p);</tt> </p> + + <p><b>Rationale:</b></p> <p>The issue was discussed at length. It was generally agreed that 1) There is no major technical argument against the change (although @@ -1473,8 +2176,16 @@ seems more of a design issue that an out-and-out defect.</p> <p>The LWG believes that this issue should be considered as part of a general review of const issues for the next revision of the standard. Also see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#200">200</a>.</p> + + + + <hr> -<a name="188"><h3>188. valarray helpers missing augmented assignment operators</h3></a><p><b>Section:</b> 26.5.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.cassign"> [lib.valarray.cassign]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 15 Aug 1999</p> +<h3><a name="188"></a>188. valarray helpers missing augmented assignment operators</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 1999-08-15</p> +<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> +<p><b>Discussion:</b></p> <p>26.5.2.6 defines augmented assignment operators valarray<T>::op=(const T&), but fails to provide corresponding versions for the helper classes. Thus making the @@ -1495,14 +2206,24 @@ v[s] *= 2.0; // ERROR </blockquote> <p>I can't understand the intent of that omission. It makes the valarray library less intuitive and less useful.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Although perhaps an unfortunate design decision, the omission is not a defect in the current standard. A future standard may wish to add the missing operators.</p> + + + + <hr> -<a name="190"><h3>190. min() and max() functions should be std::binary_functions</h3></a><p><b>Section:</b> 25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Mark Rintoul <b>Date:</b> 26 Aug 1999</p> +<h3><a name="190"></a>190. min() and max() functions should be std::binary_functions</h3> +<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#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Mark Rintoul <b>Date:</b> 1999-08-26</p> +<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> +<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> +<p><b>Discussion:</b></p> <p>Both std::min and std::max are defined as template functions. This is very different than the definition of std::plus (and similar structs) which are defined as function objects which inherit @@ -1510,13 +2231,23 @@ std::binary_function.<br> <br> This lack of inheritance leaves std::min and std::max somewhat useless in standard library algorithms which require a function object that inherits std::binary_function.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Although perhaps an unfortunate design decision, the omission is not a defect in the current standard. A future standard may wish to consider additional function objects.</p> + + + + <hr> -<a name="191"><h3>191. Unclear complexity for algorithms such as binary search</h3></a><p><b>Section:</b> 25.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.binary.search"> [lib.alg.binary.search]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 10 Oct 1999</p> +<h3><a name="191"></a>191. Unclear complexity for algorithms such as binary search</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1999-10-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The complexity of binary_search() is stated as "At most log(last-first) + 2 comparisons", which seems to say that the algorithm has logarithmic complexity. However, this algorithms is @@ -1528,14 +2259,25 @@ lower_bound(), upper_bound(), and equal_range(). <br> However, strictly speaking the standard contains no bug here. So this might considered to be a clarification or improvement. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The complexity is expressed in terms of comparisons, and that complexity can be met even if the number of iterators accessed is linear. Paragraph 1 already says exactly what happens to iterators.</p> + + + + <hr> -<a name="192"><h3>192. a.insert(p,t) is inefficient and overconstrained</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Ed Brey <b>Date:</b> 6 Jun 1999</p> +<h3><a name="192"></a>192. a.insert(p,t) is inefficient and overconstrained</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Ed Brey <b>Date:</b> 1999-06-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p> +<p><b>Discussion:</b></p> <p>As defined in 23.1.2, paragraph 7 (table 69), a.insert(p,t) suffers from several problems:</p> <table border="1" cellpadding="5"> @@ -1573,8 +2315,10 @@ performance. This negates the added functionality that p would provide if it specified where within a sequence of equivalent keys the insertion should occur. Specifying the insert location provides more control to the user, while providing no disadvantage to the container implementation.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> paragraph 7, replace the row in table 69 +<p>In 23.1.2 [associative.reqmts] paragraph 7, replace the row in table 69 for a.insert(p,t) with the following two rows:</p> <table border="1" cellpadding="5"> <tbody><tr> @@ -1603,11 +2347,22 @@ for a.insert(p,t) with the following two rows:</p> </tr> </tbody></table> + + <p><b>Rationale:</b></p> <p>Too big a change. Furthermore, implementors report checking both before p and after p, and don't want to change this behavior.</p> + + + + + <hr> -<a name="194"><h3>194. rdbuf() functions poorly specified</h3></a><p><b>Section:</b> 27.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios"> [lib.ios]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 7 Sep 1999</p> +<h3><a name="194"></a>194. rdbuf() functions poorly specified</h3> +<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> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1999-09-07</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In classic iostreams, base class ios had an rdbuf function that returned a pointer to the associated streambuf. Each derived class had its own rdbuf function that returned a pointer of a type reflecting the actual type derived @@ -1641,7 +2396,8 @@ would allow invalid programs to compile:</p> require the equivalent of a using-declaration for the rdbuf function that is not replaced in a later derived class. We could discuss whether replacing the function should be allowed.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>For historical reasons, the standard is correct as written. There is a subtle difference between the base class <tt> rdbuf()</tt> and derived class <tt>rdbuf()</tt>. The derived @@ -1649,10 +2405,20 @@ class <tt> rdbuf()</tt> always returns the original streambuf, whereas the base <tt> rdbuf()</tt> will return the "current streambuf" if that has been changed by the variant you mention.</p> <p>Permission is not required to add such an extension. See -17.4.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.member.functions"> [lib.member.functions]</a>.</p> +17.4.4.4 [member.functions].</p> + + + + <hr> -<a name="196"><h3>196. Placement new example has alignment problems</h3></a><p><b>Section:</b> 18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Herb Sutter <b>Date:</b> 15 Dec 1998</p> -<p>The example in 18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a> paragraph 4 reads: </p> +<h3><a name="196"></a>196. Placement new example has alignment problems</h3> +<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> + <b>Submitter:</b> Herb Sutter <b>Date:</b> 1998-12-15</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a></p> +<p><b>Discussion:</b></p> +<p>The example in 18.5.1.3 [new.delete.placement] paragraph 4 reads: </p> <blockquote> @@ -1666,11 +2432,22 @@ class <tt> rdbuf()</tt> always returns the original streambuf, whereas the base </blockquote> <p>This example has potential alignment problems. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate: see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#114">114</a>.</p> + + + + + <hr> -<a name="197"><h3>197. max_size() underspecified</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 21 Oct 1999</p> +<h3><a name="197"></a>197. max_size() underspecified</h3> +<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> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1999-10-21</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Must the value returned by max_size() be unchanged from call to call? </p> <p>Must the value returned from max_size() be meaningful? </p> @@ -1701,7 +2478,11 @@ max_size() returns :-), given it's current environment (i.e. taking into account the actual currently available resources). This, obviously, has to be determined dynamically each time max_size() is called. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>max_size() isn't useful for very many things, and the existing wording is sufficiently clear for the few cases that max_size() can @@ -1711,8 +2492,18 @@ called. </p> <p>It is clear to the LWG that the value returned by max_size() can't change from call to call.</p> + + + + + <hr> -<a name="203"><h3>203. basic_istream::sentry::sentry() is uninstantiable with ctype<user-defined type></h3></a><p><b>Section:</b> 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt McClure and Dietmar Kühl <b>Date:</b> 1 Jan 2000</p> +<h3><a name="203"></a>203. basic_istream::sentry::sentry() is uninstantiable with ctype<user-defined type></h3> +<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> + <b>Submitter:</b> Matt McClure and Dietmar Kühl <b>Date:</b> 2000-01-01</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>27.6.1.1.2 Paragraph 4 states:</p> <blockquote> <p>To decide if the character c is a whitespace character, the constructor @@ -1747,21 +2538,30 @@ respect to sentry's constructor's instantiability, then a note should be added to the following effect: </p> -<blockquote> +<blockquote><p> An implementation is forbidden from using the above code if it renders the constructor uninstantiable for an otherwise valid character type. -</blockquote> +</p></blockquote> <p>In any event, some clarification is needed.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>It is possible but not easy to instantiate on types other than char or wchar_t; many things have to be done first. That is by intention and is not a defect.</p> + + + + <hr> -<a name="204"><h3>204. distance(first, last) when "last" is before "first"</h3></a><p><b>Section:</b> 24.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.operations"> [lib.iterator.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Rintala Matti <b>Date:</b> 28 Jan 2000</p> +<h3><a name="204"></a>204. distance(first, last) when "last" is before "first"</h3> +<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> + <b>Submitter:</b> Rintala Matti <b>Date:</b> 2000-01-28</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Section 24.3.4 describes the function distance(first, last) (where first and last are iterators) which calculates "the number of increments or decrements needed to get from 'first' to 'last'".</p> @@ -1789,19 +2589,29 @@ bidirectional iterators "'last' must be reachable from 'first' using the ++ operator". Maybe this requirement might also apply to random access iterators so that distance() would work the same way for every iterator category?</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>"Reachable" is defined in the standard in 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> paragraph 6. +<p>"Reachable" is defined in the standard in 24.1 [iterator.requirements] paragraph 6. The definition is only in terms of operator++(). The LWG sees no defect in the standard.</p> + + + + <hr> -<a name="205"><h3>205. numeric_limits unclear on how to determine floating point types</h3></a><p><b>Section:</b> 18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Steve Cleary <b>Date:</b> 28 Jan 2000</p> -<p>In several places in 18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a>, a member is +<h3><a name="205"></a>205. numeric_limits unclear on how to determine floating point types</h3> +<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> + <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-01-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p>In several places in 18.2.1.2 [numeric.limits.members], a member is described as "Meaningful for all floating point types." However, no clear method of determining a floating point type is provided.</p> -<p>In 18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a>, paragraph 1 states ". . . (for +<p>In 18.2.1.5 [numeric.special], paragraph 1 states ". . . (for example, epsilon() is only meaningful if is_integer is false). . ." which suggests that a type is a floating point type if is_specialized is true and is_integer is false; however, this is @@ -1812,20 +2622,33 @@ exactly is the definition of floating point? Would a fixed point or rational representation be considered one? I guess my statement here is that there could also be types that are neither integer or (strictly) floating point.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>It is up to the implementor of a user define type to decide if it is a floating point type.</p> + + + + <hr> -<a name="207"><h3>207. ctype<char> members return clause incomplete</h3></a><p><b>Section:</b> 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Robert Klarer <b>Date:</b> 2 Nov 1999</p> +<h3><a name="207"></a>207. ctype<char> members return clause incomplete</h3> +<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> + <b>Submitter:</b> Robert Klarer <b>Date:</b> 1999-11-02</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#153">153</a></p> +<p><b>Discussion:</b></p> <p> The <tt>widen</tt> and <tt>narrow</tt> member functions are described in 22.2.1.3.2, paragraphs 9-11. In each case we have two overloaded signatures followed by a <b>Returns</b> clause. The <b>Returns</b> clause only describes one of the overloads. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change the returns clause in 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> +<p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members] paragraph 10 from:</p> <p> Returns: do_widen(low, high, to).</p> @@ -1833,18 +2656,32 @@ paragraph 10 from:</p> <p> Returns: do_widen(c) or do_widen(low, high, to), respectively.</p> -<p>Change the returns clause in 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> paragraph 11 +<p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members] paragraph 11 from:</p> <p> Returns: do_narrow(low, high, to).</p> <p>to:</p> <p> Returns: do_narrow(c) or do_narrow(low, high, to), respectively.</p> + + <p><b>Rationale:</b></p> <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 paragraphs.</p> + + + + + + <hr> -<a name="213"><h3>213. Math function overloads ambiguous</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 26 Feb 2000</p> +<h3><a name="213"></a>213. Math function overloads ambiguous</h3> +<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> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 2000-02-26</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Due to the additional overloaded versions of numeric functions for float and long double according to Section 26.5, calls such as int x; std::pow (x, 4) are ambiguous now in a standard conforming @@ -1853,14 +2690,24 @@ different (overload for all types, don't overload for float and long double, use preprocessor, follow the standard and get ambiguities).</p> <p>This behavior should be standardized or at least identified as implementation defined.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>These math issues are an understood and accepted consequence of the design. They have been discussed several times in the past. Users must write casts or write floating point expressions as arguments.</p> + + + + <hr> -<a name="215"><h3>215. Can a map's key_type be const?</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 29 Feb 2000</p> +<h3><a name="215"></a>215. Can a map's key_type be const?</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-02-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>A user noticed that this doesn't compile with the Rogue Wave library because the rb_tree class declares a key_allocator, and allocator<const int> is not legal, I think:</p> @@ -1877,13 +2724,24 @@ so. It does turn out to work in SGI's library, though, and someone in the compiler group even used it. Perhaps this deserves to be written up as an issue too.</p> </blockquote> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The "key is assignable" requirement from table 69 in -23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> already implies the key cannot be const.</p> +23.1.2 [associative.reqmts] already implies the key cannot be const.</p> + + + + <hr> -<a name="216"><h3>216. setbase manipulator description flawed</h3></a><p><b>Section:</b> 27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Hyman Rosen <b>Date:</b> 29 Feb 2000</p> -<p>27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> paragraph 5 says:</p> +<h3><a name="216"></a>216. setbase manipulator description flawed</h3> +<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> + <b>Submitter:</b> Hyman Rosen <b>Date:</b> 2000-02-29</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a></p> +<p><b>Discussion:</b></p> +<p>27.6.3 [std.manip] paragraph 5 says:</p> <blockquote> <pre>smanip setbase(int base);</pre> <p> Returns: An object s of unspecified type such that if out is an @@ -1910,15 +2768,29 @@ There needs to be an "and" after the first comma, and the "Where f" sentence fragment needs to be merged into its preceding sentence. You may also want to format the function a little better. The formatting above is more-or-less what the Standard contains.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The resolution of this defect is subsumed by the proposed resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#193">193</a>.</p> <p><i>[Tokyo: The LWG agrees that this is a defect and notes that it occurs additional places in the section, all requiring fixes.]</i></p> + + + + + + + + <hr> -<a name="218"><h3>218. Algorithms do not use binary predicate objects for default comparisons</h3></a><p><b>Section:</b> 25.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.sorting"> [lib.alg.sorting]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Pablo Halpern <b>Date:</b> 6 Mar 2000</p> +<h3><a name="218"></a>218. Algorithms do not use binary predicate objects for default comparisons</h3> +<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> + <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Many of the algorithms take an argument, pred, of template parameter type BinaryPredicate or an argument comp of template parameter type Compare. These algorithms usually have an overloaded version that does not take the predicate @@ -1937,14 +2809,24 @@ sort(vec.begin(), vec.end());</pre> std::sort used less<> to compare elements, then the above code would be well-defined, since less<> is explicitly specialized to produce a total ordering of pointers.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This use of operator== and operator< was a very deliberate, conscious, and explicitly made design decision; these operators are often more efficient. The predicate forms are available for users who don't want to rely on operator== and operator<.</p> + + + + <hr> -<a name="219"><h3>219. find algorithm missing version that takes a binary predicate argument</h3></a><p><b>Section:</b> 25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Pablo Halpern <b>Date:</b> 6 Mar 2000</p> +<h3><a name="219"></a>219. find algorithm missing version that takes a binary predicate argument</h3> +<p><b>Section:</b> 25.1.2 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Pablo Halpern <b>Date:</b> 2000-03-06</p> +<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> +<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> +<p><b>Discussion:</b></p> <p>The find function always searches for a value using operator== to compare the value argument to each element in the input iterator range. This is inconsistent with other find-related functions such as find_end and find_first_of, which @@ -1952,9 +2834,11 @@ allow the caller to specify a binary predicate object to be used for determining equality. The fact that this can be accomplished using a combination of find_if and bind_1st or bind_2nd does not negate the desirability of a consistent, simple, alternative interface to find.</p> + + <p><b>Proposed resolution:</b></p> <blockquote> -<p>In section 25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a>, add a second prototype for find +<p>In section 25.1.2 [alg.find], add a second prototype for find (between the existing prototype and the prototype for find_if), as follows:</p> <pre> template<class InputIterator, class T, class BinaryPredicate> @@ -1972,33 +2856,58 @@ follows:</p> != false. Return last if no such iterator is found.</p> </blockquote> </blockquote> + + <p><b>Rationale:</b></p> <p>This is request for a pure extension, so it is not a defect in the current standard. As the submitter pointed out, "this can be accomplished using a combination of find_if and bind_1st or bind_2nd".</p> + + + + <hr> -<a name="236"><h3>236. ctype<char>::is() member modifies facet</h3></a><p><b>Section:</b> 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 24 Apr 2000</p> -<p>The description of the <tt>is()</tt> member in paragraph 4 of 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> is broken: According to this description, the +<h3><a name="236"></a>236. ctype<char>::is() member modifies facet</h3> +<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> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#28">28</a></p> +<p><b>Discussion:</b></p> +<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 second form of the <tt>is()</tt> method modifies the masks in the <tt>ctype</tt> object. The correct semantics if, of course, to obtain an array of masks. The corresponding method in the general case, -ie. the <tt>do_is()</tt> method as described in 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> paragraph 1 does the right thing.</p> +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> + + <p><b>Proposed resolution:</b></p> <p>Change paragraph 4 from</p> - <blockquote> + <blockquote><p> The second form, for all *p in the range [low, high), assigns vec[p-low] to table()[(unsigned char)*p]. - </blockquote> + </p></blockquote> <p>to become</p> - <blockquote> + <blockquote><p> The second form, for all *p in the range [low, high), assigns table()[(unsigned char)*p] to vec[p-low]. - </blockquote> + </p></blockquote> + + <p><b>Rationale:</b></p> -<p>Duplicate. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#28">28</a>.</p> + + + + + <hr> -<a name="244"><h3>244. Must <tt>find</tt>'s third argument be CopyConstructible?</h3></a><p><b>Section:</b> 25.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find"> [lib.alg.find]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 02 May 2000</p> +<h3><a name="244"></a>244. Must <tt>find</tt>'s third argument be CopyConstructible?</h3> +<p><b>Section:</b> 25.1.2 [alg.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>Is the following implementation of <tt>find</tt> acceptable?</p> <pre> template<class Iter, class X> @@ -2022,14 +2931,23 @@ whether the following fragment is well formed:</p> <p>At issue is whether there is a requirement that the third argument of find be CopyConstructible. There may be no problem here, but analysis is necessary.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>There is no indication in the standard that find's third argument is required to be Copy Constructible. The LWG believes that no such requirement was intended. As noted above, there are times when a user might reasonably pass an argument that is not Copy Constructible.</p> + + + + <hr> -<a name="245"><h3>245. Which operations on <tt>istream_iterator</tt> trigger input operations?</h3></a><p><b>Section:</b> 24.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istream.iterator"> [lib.istream.iterator]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 02 May 2000</p> +<h3><a name="245"></a>245. Which operations on <tt>istream_iterator</tt> trigger input operations?</h3> +<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> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-05-02</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>I do not think the standard specifies what operation(s) on istream iterators trigger input operations. So, for example:</p> @@ -2041,7 +2959,8 @@ iterators trigger input operations. So, for example:</p> <p>I do not think it is specified how many integers have been read from cin. The number must be at least 1, of course, but can it be 2? More?</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The standard is clear as written: the stream is read every time operator++ is called, and it is also read either when the iterator is @@ -2051,8 +2970,18 @@ example above, exactly two integers are read from cin.</p> <p>There may be a problem with the interaction between istream_iterator and some STL algorithms, such as find. There are no guarantees about how many times find may invoke operator++.</p> + + + + <hr> -<a name="246"><h3>246. <tt>a.insert(p,t)</tt> is incorrectly specified</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Mark Rodgers <b>Date:</b> 19 May 2000</p> +<h3><a name="246"></a>246. <tt>a.insert(p,t)</tt> is incorrectly specified</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> + <b>Submitter:</b> Mark Rodgers <b>Date:</b> 2000-05-19</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#233">233</a></p> +<p><b>Discussion:</b></p> <p>Closed issue 192 raised several problems with the specification of this function, but was rejected as Not A Defect because it was too big a change with unacceptable impacts on existing implementations. @@ -2060,8 +2989,7 @@ However, issues remain that could be addressed with a smaller change and with little or no consequent impact.</p> <ol> - <li> -<p> The specification is inconsistent with the original + <li><p> The specification is inconsistent with the original proposal and with several implementations.</p> <p>The initial implementation by Hewlett Packard only ever looked @@ -2074,22 +3002,18 @@ and with little or no consequent impact.</p> is therefore doubtful that existing code would be relying on the behavior defined in the standard, and it would seem that fixing this defect as proposed below would standardize existing - practice.</p> -</li> + practice.</p></li> - <li> -<p> + <li><p> The specification is inconsistent with insertion for sequence containers.</p> <p>This is difficult and confusing to teach to newcomers. All insert operations that specify an iterator as an insertion location should have a consistent meaning for the location represented by - that iterator.</p> -</li> + that iterator.</p></li> - <li> -<p> As specified, there is no way to hint that the insertion + <li><p> As specified, there is no way to hint that the insertion should occur at the beginning of the container, and the way to hint that it should occur at the end is long winded and unnatural.</p> @@ -2097,11 +3021,9 @@ and with little or no consequent impact.</p> insertion locations and n+1 valid iterators. For there to be a one-to-one mapping between iterators and insertion locations, the iterator must represent an insertion location immediately before - the iterator.</p> -</li> + the iterator.</p></li> - <li> -<p> When appending sorted ranges using insert_iterators, + <li><p> When appending sorted ranges using insert_iterators, insertions are guaranteed to be sub-optimal.</p> <p>In such a situation, the optimum location for insertion is @@ -2110,32 +3032,43 @@ and with little or no consequent impact.</p> insert after the element after that, which will never be correct. However, if the container first tried to insert before the hint, all insertions would be performed in amortized constant - time.</p> -</li> + time.</p></li> </ol> + + <p><b>Proposed resolution:</b></p> <p>In 23.1.2 [lib.associative.reqmts] paragraph 7, table 69, make the following changes in the row for a.insert(p,t):</p> <p><i>assertion/note pre/post condition:</i> <br>Change the last sentence from</p> - <blockquote> + <blockquote><p> "iterator p is a hint pointing to where the insert should start to search." - </blockquote> + </p></blockquote> <p>to</p> - <blockquote> + <blockquote><p> "iterator p is a hint indicating that immediately before p may be a correct location where the insertion could occur." - </blockquote> + </p></blockquote> <p><i>complexity:</i><br> Change the words "right after" to "immediately before".</p> + + <p><b>Rationale:</b></p> -<p>Duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#233">233</a>.</p> + + + + + <hr> -<a name="249"><h3>249. Return Type of <tt>auto_ptr::operator=</tt> -</h3></a><p><b>Section:</b> 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Joseph Gottman <b>Date:</b> 30 Jun 2000</p> +<h3><a name="249"></a>249. Return Type of <tt>auto_ptr::operator=</tt></h3> +<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> + <b>Submitter:</b> Joseph Gottman <b>Date:</b> 2000-06-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>According to section 20.4.5, the function <tt>auto_ptr::operator=()</tt> returns a reference to an auto_ptr. The reason that <tt>operator=()</tt> usually returns a reference is to @@ -2155,16 +3088,29 @@ facilitate code like</p> NULL, instead of all the <tt>auto_ptr</tt>s being set to the same value. This makes such cascading assignments useless and counterintuitive for <tt>auto_ptr</tt>s.</p> + + <p><b>Proposed resolution:</b></p> <p>Change <tt>auto_ptr::operator=()</tt> to return <tt>void</tt> instead of an <tt>auto_ptr</tt> reference.</p> + + <p><b>Rationale:</b></p> <p>The return value has uses other than cascaded assignments: a user can call an auto_ptr member function, pass the auto_ptr to a function, etc. Removing the return value could break working user code.</p> + + + + <hr> -<a name="257"><h3>257. STL functional object and iterator inheritance.</h3></a><p><b>Section:</b> 20.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple.tuple"> [lib.tuple.tuple]</a>, 24.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.basic"> [lib.iterator.basic]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Robert Dick <b>Date:</b> 17 Aug 2000</p> +<h3><a name="257"></a>257. STL functional object and iterator inheritance.</h3> +<p><b>Section:</b> 20.5.3 [base], 24.3.2 [iterator.basic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Robert Dick <b>Date:</b> 2000-08-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> According to the November 1997 Draft Standard, the results of deleting an object of a derived class through a pointer to an object of its base class are @@ -2184,6 +3130,8 @@ destructors. Wil Evers and William E. Kempf suggested this modification for functional objects. </p> + + <p><b>Proposed resolution:</b></p> <p> When a base class in the standard library is useful only as an interface @@ -2224,6 +3172,8 @@ Affected definitions: <br> 24.3.2 [lib.iterator.basic] -- iterator </p> + + <p><b>Rationale:</b></p> <p> The standard is clear as written; this is a request for change, not a @@ -2233,8 +3183,18 @@ creating objects of type <tt>unary_function</tt> and <tt>binary_function</tt>. Doing so can sometimes be legitimate, if users want to pass temporaries as traits or tag types in generic code. </p> + + + + + <hr> -<a name="267"><h3>267. interaction of strstreambuf::overflow() and seekoff()</h3></a><p><b>Section:</b> D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Oct 2000</p> +<h3><a name="267"></a>267. interaction of strstreambuf::overflow() and seekoff()</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-10-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> It appears that the interaction of the strstreambuf members overflow() and seekoff() can lead to undefined behavior in cases where defined @@ -2289,40 +3249,56 @@ return 0. Buf if the function made more than one write position available, epptr() and gptr() will both point past pptr() and the behavior of the program is undefined. </p> + + <p><b>Proposed resolution:</b></p> - <p>Change the last sentence of D.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf"> [depr.strstreambuf]</a> paragraph 4 from</p> + <p>Change the last sentence of D.7.1 [depr.strstreambuf] paragraph 4 from</p> - <blockquote> + <blockquote><p> Otherwise, seeklow equals gbeg and seekhigh is either pend, if pend is not a null pointer, or gend. - </blockquote> + </p></blockquote> <p>to become</p> - <blockquote> + <blockquote><p> Otherwise, seeklow equals gbeg and seekhigh is either gend if 0 == pptr(), or pbase() + max where max is the maximum value of pptr() - pbase() ever reached for this stream. - </blockquote> + </p></blockquote> <p><i>[ pre-Copenhagen: Dietmar provided wording for proposed resolution. ]</i></p> + <p><i>[ post-Copenhagen: Fixed a typo: proposed resolution said to fix 4.7.1, not D.7.1. ]</i></p> + + + <p><b>Rationale:</b></p> <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 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>, the library working group does not wish to invest time nailing down corner cases in a deprecated feature.</p> + + + + + <hr> -<a name="269"><h3>269. cstdarg and unnamed parameters</h3></a><p><b>Section:</b> 18.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.exception"> [lib.support.exception]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> J. Stephen Adamczyk <b>Date:</b> 10 Oct 2000</p> +<h3><a name="269"></a>269. cstdarg and unnamed parameters</h3> +<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> + <b>Submitter:</b> J. Stephen Adamczyk <b>Date:</b> 2000-10-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> One of our customers asks whether this is valid C++: </p> @@ -2354,7 +3330,8 @@ is no such identifier? My personal opinion is that this should be allowed, but some tweak might be required in the C++ standard. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p> Not a defect, the C and C++ standards are clear. It is impossible to @@ -2372,8 +3349,18 @@ changes in this part of the C++ standard. The C committee has already been requested not to touch this part of the C standard unless necessary. </p> + + + + <hr> -<a name="277"><h3>277. Normative encouragement in allocator requirements unclear</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 07 Nov 2000</p> +<h3><a name="277"></a>277. Normative encouragement in allocator requirements unclear</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-11-07</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> In 20.1.5, paragraph 5, the standard says that "Implementors are encouraged to supply libraries that can accept allocators that @@ -2382,18 +3369,33 @@ instances." This is intended as normative encouragement to standard library implementors. However, it is possible to interpret this sentence as applying to nonstandard third-party libraries. </p> + + <p><b>Proposed resolution:</b></p> <p> In 20.1.5, paragraph 5, change "Implementors" to "Implementors of the library described in this International Standard". </p> + + <p><b>Rationale:</b></p> <p>The LWG believes the normative encouragement is already sufficiently clear, and that there are no important consequences even if it is misunderstood.</p> + + + + + <hr> -<a name="279"><h3>279. const and non-const iterators should have equivalent typedefs</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Steve Cleary <b>Date:</b> 27 Nov 2000</p> +<h3><a name="279"></a>279. const and non-const iterators should have equivalent typedefs</h3> +<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> + <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-11-27</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> This came from an email from Steve Cleary to Fergus in reference to @@ -2413,9 +3415,11 @@ const and non-const iterators in a particular container, or if it means the container's iterator can't be compared with the container's const_iterator unless the above it true. I suspect the former. </p> + + <p><b>Proposed resolution:</b></p> <p> -In <b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a>, +In <b>Section:</b> 23.1 [container.requirements], table 65, in the assertion/note pre/post condition for X::const_iterator, add the following: </p> @@ -2433,6 +3437,8 @@ typeid(X::const_iterator::size_type) == typeid(X::iterator::size_type) typeid(X::const_iterator::category) == typeid(X::iterator::category) </p> </blockquote> + + <p><b>Rationale:</b></p> <p>Going through the types one by one: Iterators don't have a <tt>size_type</tt>. We already know that the difference types are @@ -2446,8 +3452,18 @@ it would be useful for the categories to be different.</p> <p>It may be desirable to require X::iterator and X::const_iterator to 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> + + + + + <hr> -<a name="287"><h3>287. conflicting ios_base fmtflags</h3></a><p><b>Section:</b> 27.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.state"> [lib.fmtflags.state]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 30 Dec 2000</p> +<h3><a name="287"></a>287. conflicting ios_base fmtflags</h3> +<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> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The Effects clause for ios_base::setf(fmtflags fmtfl) says "Sets fmtfl in flags()". What happens if the user first calls @@ -2485,37 +3501,53 @@ constructor says that each ios_base member has an indeterminate value after construction, all the existing implementations I tried explicitly set ios_base::dec. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p> <tt>adjustfield</tt>, <tt>basefield</tt>, and <tt>floatfield</tt> are each multi-bit fields. It is possible to set multiple bits within each of those fields. (For example, <tt>dec</tt> and -<tt>oct</tt>). These fields are used by locale facets. The LWG +<tt>oct</tt>). These fields are used by locale facets. The LWG reviewed the way in which each of those three fields is used, and believes that in each case the behavior is well defined for any -possible combination of bits. See for example Table 58, in 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, noting the requirement in paragraph 6 of that +possible combination of bits. See for example Table 58, in 22.2.2.2.2 +[facet.num.put.virtuals], noting the requirement in paragraph 6 of that section. </p> <p> Users are advised to use manipulators, or else use the two-argument version of <tt>setf</tt>, to avoid unexpected behavior. </p> + + + + + <hr> -<a name="289"><h3>289. <cmath> requirements missing C float and long double versions</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 30 Dec 2000</p> +<h3><a name="289"></a>289. <cmath> requirements missing C float and long double versions</h3> +<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> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> In ISO/IEC 9899:1990 Programming Languages C we find the following concerning <math.h>: </p> -<blockquote> +<blockquote><p> 7.13.4 Mathematics <math.h> <br> The names of all existing functions declared in the <math.h> header, suffixed with f or l, are reserved respectively for corresponding functions with float and long double arguments are return values. -</blockquote> +</p></blockquote> <p> For example, <tt>float sinf(float)</tt> @@ -2531,6 +3563,8 @@ version of <tt>setf</tt>, to avoid unexpected behavior. So, is it acceptable for an implementor to add these prototypes to the C++ versions of the math headers? Are they required? </p> + + <p><b>Proposed resolution:</b></p> <p> Add these Functions to Table 80, section 26.5 and to Table 99, @@ -2553,13 +3587,25 @@ are optional and, if supplied, should match the description in the 1999 version of the C standard. In the next round of C++ standardization they can then become mandatory. </p> + + <p><b>Rationale:</b></p> <p>The C90 standard, as amended, already permits (but does not require) these functions, and the C++ standard incorporates the C90 standard by reference. C99 is not an issue, because it is never referred to by the C++ standard.</p> + + + + + <hr> -<a name="293"><h3>293. Order of execution in transform algorithm</h3></a><p><b>Section:</b> 25.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.transform"> [lib.alg.transform]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 04 Jan 2001</p> +<h3><a name="293"></a>293. Order of execution in transform algorithm</h3> +<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> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 2001-01-04</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>This issue is related to issue 242. In case that the resolution proposed for issue 242 is accepted, we have have the following situation: The 4 numeric algorithms (accumulate and consorts) as well @@ -2590,48 +3636,73 @@ eliminate the uncertainty that users would otherwise have regarding the order of execution of their potentially order-sensitive function objects. </p> + + <p><b>Proposed resolution:</b></p> <p>In section 25.2.3 - Transform [lib.alg.transform] change:</p> -<blockquote> +<blockquote><p> -1- Effects: Assigns through every iterator i in the range [result, result + (last1 - first1)) a new corresponding value equal to op(*(first1 + (i - result)) or binary_op(*(first1 + (i - result), *(first2 + (i - result))). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -1- Effects: Computes values by invoking the operation op or binary_op for every iterator in the range [first1, last1) in order. Assigns through every iterator i in the range [result, result + (last1 - first1)) a new corresponding value equal to op(*(first1 + (i - result)) or binary_op(*(first1 + (i - result), *(first2 + (i - result))). -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>For Input Iterators an order is already guaranteed, because only one order is possible. If a user who passes a Forward Iterator to one of these algorithms really needs a specific order of execution, it's possible to achieve that effect by wrapping it in an Input Iterator adaptor.</p> + + + + + <hr> -<a name="296"><h3>296. Missing descriptions and requirements of pair operators</h3></a><p><b>Section:</b> 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 14 Jan 2001</p> -<p>The synopsis of the header <tt><utility></tt> in 20.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.utility"> [lib.utility]</a> +<h3><a name="296"></a>296. Missing descriptions and requirements of pair operators</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-14</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p>The synopsis of the header <tt><utility></tt> in 20.2 [utility] lists the complete set of equality and relational operators for <tt>pair</tt> but the section describing the template and the operators only describes <tt>operator==()</tt> and <tt>operator<()</tt>, and it fails to mention any requirements on the template arguments. The remaining operators are not mentioned at all. </p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>20.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.operators"> [lib.operators]</a> paragraph 10 already specifies the semantics. +<p>20.2.1 [operators] paragraph 10 already specifies the semantics. That paragraph says that, if declarations of operator!=, operator>, operator<=, and operator>= appear without definitions, they are -defined as specified in 20.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.operators"> [lib.operators]</a>. There should be no user +defined as specified in 20.2.1 [operators]. There should be no user confusion, since that paragraph happens to immediately precede the specification of <tt>pair</tt>.</p> + + + + + <hr> -<a name="302"><h3>302. Need error indication from codecvt<>::do_length</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Gregory Bumgardner <b>Date:</b> 25 Jan 2001</p> +<h3><a name="302"></a>302. Need error indication from codecvt<>::do_length</h3> +<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> + <b>Submitter:</b> Gregory Bumgardner <b>Date:</b> 2001-01-25</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The effects of <tt>codecvt<>::do_length()</tt> are described in 22.2.1.5.2, paragraph 10. As implied by that paragraph, and clarified @@ -2649,6 +3720,8 @@ to indicate that an untranslatable character has been encountered, but <tt>do_length()</tt> already has a return value (the number of source characters that have been processed by the method). </p> + + <p><b>Proposed resolution:</b></p> <p> This issue cannot be resolved without modifying the interface. An exception @@ -2683,12 +3756,25 @@ Then an exception could be used to report any translation errors and the from_next argument, if used, could then be used to retrieve the location of the offending character sequence. </p> + + <p><b>Rationale:</b></p> <p>The standard is already clear: the return value is the number of "valid complete characters". If it encounters an invalid sequence of external characters, it stops.</p> + + + + + <hr> -<a name="304"><h3>304. Must <tt>*a</tt> return an lvalue when <tt>a</tt> is an input iterator?</h3></a><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 5 Feb 2001</p> +<h3><a name="304"></a>304. Must <tt>*a</tt> return an lvalue when <tt>a</tt> is an input iterator?</h3> +<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> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-02-05</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> We all "know" that input iterators are allowed to produce values when dereferenced of which there is no other in-memory copy. @@ -2714,15 +3800,26 @@ buffered somewhere to make a legal input iterator. </p> <p>I don't think this was intentional.</p> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The current standard is clear and consistent. Input iterators that return rvalues are in fact implementable. They may in some cases require extra work, but it is still possible to define an operator-> in such cases: it doesn't have to return a T*, but may return a proxy type. No change to the standard is justified.</p> + + + + + <hr> -<a name="313"><h3>313. set_terminate and set_unexpected question</h3></a><p><b>Section:</b> 18.7.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.terminate"> [lib.terminate]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 3 Apr 2001</p> +<h3><a name="313"></a>313. set_terminate and set_unexpected question</h3> +<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> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2001-04-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> According to section 18.7.3.3 of the standard, std::terminate() is supposed to call the terminate_handler in effect immediately after @@ -2752,13 +3849,27 @@ Is the implementation allowed to go into an infinite loop? <p> I think the same issue applies to std::set_unexpected. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Infinite recursion is to be expected: users who set the terminate handler to <tt>terminate</tt> are explicitly asking for <tt>terminate</tt> to call itself.</p> + + + + + <hr> -<a name="314"><h3>314. Is the stack unwound when terminate() is called?</h3></a><p><b>Section:</b> 18.7.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.terminate"> [lib.terminate]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 11 Apr 2001</p> +<h3><a name="314"></a>314. Is the stack unwound when terminate() is called?</h3> +<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> + <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-04-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard appears to contradict itself about whether the stack is @@ -2766,32 +3877,47 @@ unwound when the implementation calls terminate(). </p> <p>From 18.7.3.3p2:</p> -<blockquote> +<blockquote><p> Calls the terminate_handler function in effect immediately after evaluating the throw-expression (lib.terminate.handler), if called by the implementation [...] -</blockquote> +</p></blockquote> <p>So the stack is guaranteed not to be unwound.</p> <p>But from 15.3p9:</p> -<blockquote> +<blockquote><p> [...]whether or not the stack is unwound before this call to terminate() is implementation-defined (except.terminate). -</blockquote> +</p></blockquote> <p> And 15.5.1 actually defines that in most cases the stack is unwound. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>There is definitely no contradiction between the core and library clauses; nothing in the core clauses says that stack unwinding happens after <tt>terminate</tt> is called. 18.7.3.3p2 does not say anything about when terminate() is called; it merely specifies which <tt>terminate_handler</tt> is used.</p> + + + + + <hr> -<a name="323"><h3>323. abs() overloads in different headers</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 4 June 2001</p> +<h3><a name="323"></a>323. abs() overloads in different headers</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-06-04</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<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> +<p><b>Discussion:</b></p> <p>Currently the standard mandates the following overloads of abs():</p> @@ -2826,9 +3952,10 @@ the correct headers are #included. <p>Redmond: PJP reports that C99 adds two new kinds of abs: complex, and int_max_abs.</p> -<p>Related issue: <font color="red">343</font>.</p> +<p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#343">343</a>.</p> + + -<p><b>Proposed resolution:</b></p> <p><b>Rationale:</b></p> <p>The programs that could potentially be broken by this situation are already fragile, and somewhat contrived: For example, a user-defined @@ -2848,20 +3975,43 @@ and int_max_abs.</p> define an <tt><all></tt> header that would include all Standard Library headers. Second, we should at least make sure that future library extensions don't make this problem worse.</p> + + + + + <hr> -<a name="326"><h3>326. Missing typedef in moneypunct_byname</h3></a><p><b>Section:</b> 22.2.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.byname"> [lib.locale.moneypunct.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 05 Jul 2001</p> +<h3><a name="326"></a>326. Missing typedef in moneypunct_byname</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-05</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The definition of the moneypunct facet contains the typedefs char_type and string_type. Only one of these names, string_type, is defined in the derived facet, moneypunct_byname.</p> + + <p><b>Proposed resolution:</b></p> <p>For consistency with the numpunct facet, add a typedef for char_type to the definition of the moneypunct_byname facet in -22.2.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.byname"> [lib.locale.moneypunct.byname]</a>.</p> +22.2.6.4 [locale.moneypunct.byname].</p> + + <p><b>Rationale:</b></p> <p>The absence of the typedef is irrelevant. Users can still access the typedef, because it is inherited from the base class.</p> + + + + + <hr> -<a name="330"><h3>330. Misleading "exposition only" value in class locale definition</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Jul 2001</p> +<h3><a name="330"></a>330. Misleading "exposition only" value in class locale definition</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The "exposition only" value of the std::locale::none constant shown in the definition of class locale is misleading in that it on many @@ -2882,12 +4032,13 @@ belonging to the collate category from the German locale on AIX: <pre> std::locale l (std::locale ("C"), "de_DE", std::locale::none); </pre> -<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG agrees that it may be difficult to implement locale member functions in such a way that they can take either <tt>category</tt> arguments or the LC_ constants defined in <cctype>. In light of -this requirement (22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, paragraph 2), and in light +this requirement (22.1.1.1.1 [locale.category], paragraph 2), and in light of the requirement in the preceding paragraph that it is possible to combine <tt>category</tt> bitmask elements with bitwise operations, defining the <tt>category</tt> elements is delicate, @@ -2899,12 +4050,24 @@ matter. The non-normative example we're giving is no worse than any other choice would be.</p> <p>See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#347">347</a>.</p> + + + + + <hr> -<a name="332"><h3>332. Consider adding increment and decrement operators to std::fpos< T > </h3></a><p><b>Section:</b> 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 27 Aug 2001</p> +<h3><a name="332"></a>332. Consider adding increment and decrement operators to std::fpos< T > </h3> +<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> + <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-27</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> Increment and decrement operators are missing from -Table 88 -- Position type requirements in 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a>. +Table 88 -- Position type requirements in 27.4.3 [fpos]. </p> + + <p><b>Proposed resolution:</b></p> <p> Table 88 (section 27.4.3) -- Position type requirements @@ -2923,12 +4086,23 @@ p-- fpos { P tmp = p; return tmp; } </pre> + + <p><b>Rationale:</b></p> <p>The LWG believes this is a request for extension, not a defect report. Additionally, nobody saw a clear need for this extension; <tt>fpos</tt> is used only in very limited ways.</p> + + + + + <hr> -<a name="344"><h3>344. grouping + showbase</h3></a><p><b>Section:</b> 22.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.numeric"> [lib.category.numeric]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 13 Oct 2001</p> +<h3><a name="344"></a>344. grouping + showbase</h3> +<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> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-10-13</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> When both grouping and showbase are active and the basefield is octal, does the leading 0 participate in the grouping or not? For example, @@ -2940,19 +4114,21 @@ preferred over 0x,123,456. However, this analogy is not universally accepted to apply to the octal base. The standard is not clear on how to format (or parse) in this manner. </p> + <p><b>Proposed resolution:</b></p> <p> -Insert into 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a> paragraph 3, just before the last +Insert into 22.2.3.1.2 [facet.numpunct.virtuals] paragraph 3, just before the last sentence: </p> -<blockquote> +<blockquote><p> The leading hexadecimal base specifier "0x" does not participate in grouping. The leading '0' octal base specifier may participate in grouping. It is unspecified if the leading '0' participates in formatting octal numbers. In parsing octal numbers, the implementation is encouraged to accept both the leading '0' participating in the grouping, and not participating (e.g. 0123,456 or 0,123,456). -</blockquote> +</p></blockquote> + <p><b>Rationale:</b></p> <p> The current behavior may be unspecified, but it's not clear that it @@ -2961,14 +4137,25 @@ intended for the benefit of humans and oct/hex prefixes are usually intended for the benefit of machines. There is not a strong enough consensus in the LWG for action. </p> + + + + <hr> -<a name="348"></a><h3><a name="348">348. Minor issue with std::pair operator<</a></h3><p><b>Section:</b> 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 23 Oct 2001</p> +<h3><a name="348"></a>348. Minor issue with std::pair operator<</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-10-23</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> The current wording of 20.2.2 [lib.pairs] p6 precludes the use of operator< on any pair type which contains a pointer. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> paragraph 6, replace:</p> +<p>In 20.2.3 [pairs] paragraph 6, replace:</p> <pre> Returns: x.first < y.first || (!(y.first < x.first) && x.second < y.second). </pre> @@ -2978,6 +4165,8 @@ operator< on any pair type which contains a pointer. std::less<T2>()( x.second, y.second ) ) </pre> + + <p><b>Rationale:</b></p> <p>This is an instance of a much more general problem. If we want operator< to translate to std::less for pairs of pointers, where @@ -2992,8 +4181,19 @@ operator< on any pair type which contains a pointer. which ordering it is. Another example of the later is typeinfo's <tt>before</tt>.</p> + + + + + <hr> -<a name="350"><h3>350. allocator<>::address</h3></a><p><b>Section:</b> 20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>, 20.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.requirements"> [lib.allocator.requirements]</a>, 17.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.contents"> [lib.contents]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 25 Oct 2001</p> +<h3><a name="350"></a>350. allocator<>::address</h3> +<p><b>Section:</b> 20.6.1.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#NAD%20Future">NAD Future</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 2001-10-25</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#634">634</a></p> +<p><b>Discussion:</b></p> <p>See c++std-lib-9006 and c++std-lib-9007. This issue is taken verbatim from -9007.</p> @@ -3017,12 +4217,14 @@ no semantics at all for member address(), and allocator<>::address is defined in terms of unadorned operator &. </p> + + <p><b>Proposed resolution:</b></p> <p> In 20.6.1.1, Change the definition of allocator<>::address from:</p> -<blockquote> +<blockquote><p> Returns: &x -</blockquote> +</p></blockquote> <p>to:</p> @@ -3042,14 +4244,16 @@ a.address(s) lines, respectively: <p>In addition, in clause 17.4.1.1, add a statement:</p> -<blockquote> +<blockquote><p> The Standard Library does not apply operator& to any type for which operator& may be overloaded. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>The LWG believes both examples are ill-formed. The contained type -is required to be CopyConstructible (20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>), and that +is required to be CopyConstructible (20.1.1 [utility.arg.requirements]), and that includes the requirement that &t return the usual types and values. Since allocators are intended to be used in conjunction with containers, and since the CopyConstructible requirements appear to @@ -3062,27 +4266,52 @@ exhibiting a problem.</p> CopyConstructive requirements should be relaxed, but that's a far larger issue. Marking this issue as "future" as a pointer to that larger issue.</p> + + + + + <hr> -<a name="351"><h3>351. unary_negate and binary_negate: struct or class?</h3></a><p><b>Section:</b> 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Dale Riley <b>Date:</b> 12 Nov 2001</p> +<h3><a name="351"></a>351. unary_negate and binary_negate: struct or class?</h3> +<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a> + <b>Submitter:</b> Dale Riley <b>Date:</b> 2001-11-12</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#function.objects">active issues</a> in [function.objects].</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> -In 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> the header <functional> synopsis declares +In 20.5 [function.objects] the header <functional> synopsis declares the unary_negate and binary_negate function objects as struct. -However in <font color="red">20.3.5</font> the unary_negate and binary_negate +However in 20.5.9 [negators] the unary_negate and binary_negate function objects are defined as class. Given the context, they are not "basic function objects" like negate, so this is either a typo or an editorial oversight. </p> <p><i>[Taken from comp.std.c++]</i></p> + + + <p><b>Proposed resolution:</b></p> -<p>Change the synopsis to reflect the useage in <font color="red">20.3.5</font></p> +<p>Change the synopsis to reflect the useage in 20.5.9 [negators]</p> <p><i>[Curaçao: Since the language permits "struct", the LWG views this as NAD. They suggest, however, that the Project Editor might wish to make the change as editorial.]</i></p> + + + + + + <hr> -<a name="353"><h3>353. <tt>std::pair</tt> missing template assignment</h3></a><p><b>Section:</b> 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 2 Dec 2001</p> +<h3><a name="353"></a>353. <tt>std::pair</tt> missing template assignment</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-12-02</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> The class template <tt>std::pair</tt> defines a template ctor (20.2.2, p4) but no template assignment operator. This may lead to inefficient code since @@ -3093,6 +4322,8 @@ ctor to construct an unnamed temporary of type <tt>pair<A, B></tt> followed by an ordinary (perhaps implicitly defined) assignment operator, instead of just a straight assignment. </p> + + <p><b>Proposed resolution:</b></p> <p> Add the following declaration to the definition of <tt>std::pair</tt>: @@ -3117,8 +4348,18 @@ end of 20.2.2: a design decision, and thus NAD. May be appropriate for a future standard.]</i></p> + + + + + <hr> -<a name="356"><h3>356. Meaning of ctype_base::mask enumerators</h3></a><p><b>Section:</b> 22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 23 Jan 2002</p> +<h3><a name="356"></a>356. Meaning of ctype_base::mask enumerators</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-01-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>What should the following program print?</p> @@ -3162,7 +4403,7 @@ The above program assumes that ctype_base::mask enumerators like <tt>space</tt> and <tt>print</tt> are disjoint, and that the way to say that a character is both a space and a printing character is to or those two enumerators together. This is suggested by the "exposition -only" values in 22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a>, but it is nowhere specified in +only" values in 22.2.1 [category.ctype], but it is nowhere specified in normative text. An alternative interpretation is that the more specific categories subsume the less specific. The above program gives the results it does on the Microsoft compiler because, on that @@ -3237,6 +4478,8 @@ int main() </pre> </blockquote> + + <p><b>Proposed resolution:</b></p> <p>Informally, we have three choices:</p> <ol> @@ -3252,14 +4495,27 @@ program is not portable.</li> <p>Either of the first two options is just as good from the standpoint of portability. Either one will require some implementations to change.</p> + + <p><b>Rationale:</b></p> <p>The LWG agrees that this is a real ambiguity, and that both interpretations are conforming under the existing standard. However, there's no evidence that it's causing problems for real users. Users who want to define ctype facets portably can test the ctype_base masks to see which interpretation is being used.</p> + + + + + <hr> -<a name="357"><h3>357. <cmath> float functions cannot return HUGE_VAL</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 26 Feb 2002</p> +<h3><a name="357"></a>357. <cmath> float functions cannot return HUGE_VAL</h3> +<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> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-02-26</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> The float versions of the math functions have no meaningful value to return for a range error. The long double versions have a value they can return, @@ -3294,6 +4550,8 @@ long double value, and might fall well within the range of normal return values for a long double function. Therefore, it does not make sense for a long double function to return a double (HUGE_VAL) for a range error. </p> + + <p><b>Proposed resolution:</b></p> <p>Curaçao: C99 was faced with a similar problem, which they fixed by adding HUGE_VALF and HUGE_VALL in addition to HUGE_VAL.</p> @@ -3303,10 +4561,22 @@ general C99 based changes to C++, not via DR. Thus the LWG in Curaçao felt the resolution should be NAD, FUTURE, but the issue is being held open for one more meeting to ensure LWG members not present during the discussion concur.</p> + + <p><b>Rationale:</b></p> <p>Will be fixed as part of more general work in the TR.</p> + + + + + <hr> -<a name="361"><h3>361. num_get<>::do_get (..., void*&) checks grouping</h3></a><p><b>Section:</b> 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 12 Mar 2002</p> +<h3><a name="361"></a>361. num_get<>::do_get (..., void*&) checks grouping</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> 22.2.2.2.2, p12 specifies that <tt>thousands_sep</tt> is to be inserted only for integral types (issue 282 suggests that this should be done for @@ -3323,30 +4593,44 @@ I don't think that's right. <tt>void*</tt> values should not be checked for grouping, should they? (Although if they should, then <tt>num_put</tt> needs to write them out, otherwise their extraction will fail.) </p> + + <p><b>Proposed resolution:</b></p> <p> Change the first sentence of 22.2.2.2.2, p12 from </p> -<blockquote> +<blockquote><p> Digit grouping is checked. That is, the positions of discarded separators is examined for consistency with use_facet<numpunct<charT> >(loc).grouping(). If they are not consistent then ios_base::failbit is assigned to err. -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> Except for conversions to void*, digit grouping is checked... -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>This would be a change: as it stands, the standard clearly specifies that grouping applies to void*. A survey of existing practice shows that most existing implementations do that, as they should.</p> + + + + + <hr> -<a name="366"><h3>366. Excessive const-qualification</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 10 May 2002</p> +<h3><a name="366"></a>366. Excessive const-qualification</h3> +<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> + <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The following member functions are declared const, yet return non-const pointers. We believe they are should be changed, because they allow code @@ -3362,6 +4646,9 @@ constness policy is for iostreams. N1360 relies on a distinction between physical constness and logical constness; that distinction, or those terms, does not appear in the standard.]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>In 27.4.4 and 27.4.4.2</p> <p>Replace</p> @@ -3447,6 +4734,8 @@ those terms, does not appear in the standard.]</i></p> <pre> basic_filebuf<charT,traits>* rdbuf(); const basic_filebuf<charT,traits>* rdbuf() const; </pre> + + <p><b>Rationale:</b></p> <p>The existing specification is a bit sloppy, but there's no particular reason to change this other than tidiness, and there are @@ -3454,10 +4743,20 @@ those terms, does not appear in the standard.]</i></p> differently if we were starting today. There's no evidence that the existing constness policy is harming users. We might consider a different constness policy as part of a full stream redesign.</p> + + + + + <hr> -<a name="367"><h3>367. remove_copy/remove_copy_if and Input Iterators</h3></a><p><b>Section:</b> 25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Anthony Williams <b>Date:</b> 13 May 2002</p> +<h3><a name="367"></a>367. remove_copy/remove_copy_if and Input Iterators</h3> +<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> + <b>Submitter:</b> Anthony Williams <b>Date:</b> 2002-05-13</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> -remove_copy and remove_copy_if (25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a>) permit their +remove_copy and remove_copy_if (25.2.8 [alg.remove]) permit their input range to be marked with Input Iterators. However, since two operations are required against the elements to copy (comparison and assigment), when the input range uses Input Iterators, a temporary @@ -3467,20 +4766,33 @@ CopyConstructible. If the iterators are at least Forward Iterators, then the iterator can be dereferenced twice, or a reference to the result maintained, so the temporary is not required. </p> + + <p><b>Proposed resolution:</b></p> <p> Add "If InputIterator does not meet the requirements of forward iterator, then the value type of InputIterator must be copy constructible. Otherwise copy constructible is not required." to -25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a> paragraph 6. +25.2.8 [alg.remove] paragraph 6. </p> + + <p><b>Rationale:</b></p> <p>The assumption is that an input iterator can't be dereferenced twice. There's no basis for that assumption in the Standard.</p> + + + + + <hr> -<a name="368"><h3>368. basic_string::replace has two "Throws" paragraphs</h3></a><p><b>Section:</b> 21.3.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::replace"> [lib.string::replace]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 3 Jun 2002</p> +<h3><a name="368"></a>368. basic_string::replace has two "Throws" paragraphs</h3> +<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> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2002-06-03</p> +<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> +<p><b>Discussion:</b></p> <p> -21.3.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::replace"> [lib.string::replace]</a> basic_string::replace, second +21.3.6.6 [string::replace] basic_string::replace, second signature, given in paragraph 1, has two "Throws" paragraphs (3 and 5). </p> @@ -3490,16 +4802,30 @@ In addition, the second "Throws" paragraph (5) includes specification (beginning with "Otherwise, the function replaces ...") that should be part of the "Effects" paragraph. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is editorial. Both "throws" statements are true. The bug is just that the second one should be a sentence, part of the "Effects" clause, not a separate "Throws". The project editor has been notified.</p> + + + + + <hr> -<a name="372"><h3>372. Inconsistent description of stdlib exceptions</h3></a><p><b>Section:</b> 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>, 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a>, <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Randy Maddox <b>Date:</b> 22 Jul 2002</p> +<h3><a name="372"></a>372. Inconsistent description of stdlib exceptions</h3> +<p><b>Section:</b> 17.4.4.8 [res.on.exception.handling], 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Randy Maddox <b>Date:</b> 2002-07-22</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> -<p>Paragraph 3 under clause 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a>, Restrictions on +<p>Paragraph 3 under clause 17.4.4.8 [res.on.exception.handling], Restrictions on Exception Handling, states that "Any other functions defined in the C++ Standard Library that do not have an exception-specification may throw implementation-defined exceptions unless otherwise specified." @@ -3510,54 +4836,94 @@ not required) to report errors by throwing exceptions from (or derived from) the standard exceptions."</p> <p>These statements appear to be in direct contradiction to clause -18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a>, which states "The class exception defines the +18.6.1 [type.info], which states "The class exception defines the base class for the types of objects thrown as exceptions by the C++ Standard library components ...".</p> <p>Is this inconsistent?</p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Clause 17 is setting the overall library requirements, and it's clear and consistent. This sentence from Clause 18 is descriptive, not setting a requirement on any other class. </p> + + + + + <hr> -<a name="374"><h3>374. moneypunct::frac_digits returns int not unsigned</h3></a><p><b>Section:</b> 22.2.6.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.members"> [lib.locale.moneypunct.members]</a>, 22.2.6.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.virtuals"> [lib.locale.moneypunct.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 8 Aug 2002</p> +<h3><a name="374"></a>374. moneypunct::frac_digits returns int not unsigned</h3> +<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> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-08</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> -In section 22.2.6.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.members"> [lib.locale.moneypunct.members]</a>, frac_digits() returns type +In section 22.2.6.3.1 [locale.moneypunct.members], frac_digits() returns type "int". This implies that frac_digits() might return a negative value, but a negative value is nonsensical. It should return "unsigned". </p> <p> -Similarly, in section 22.2.6.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.virtuals"> [lib.locale.moneypunct.virtuals]</a>, do_frac_digits() +Similarly, in section 22.2.6.3.2 [locale.moneypunct.virtuals], do_frac_digits() should return "unsigned". </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Regardless of whether the return value is int or unsigned, it's always conceivable that frac_digits might return a nonsensical value. (Is 4294967295 really any better than -1?) The clients of moneypunct, the get and put facets, can and do perform range checks.</p> + + + + + <hr> -<a name="377"><h3>377. basic_string::insert and length_error</h3></a><p><b>Section:</b> 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 16 Aug 2002</p> +<h3><a name="377"></a>377. basic_string::insert and length_error</h3> +<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> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-16</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> -Section 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, paragraph 4, contains the following, +Section 21.3.6.4 [string::insert], paragraph 4, contains the following, "Then throws length_error if size() >= npos - rlen." </p> <p> Related to DR 83, this sentence should probably be removed. </p> + + <p><b>Proposed resolution:</b></p> -<p><b>Rationale:</b></p> -<p>This requirement is redundant but correct. No change is + + +<p><b>Rationale:</b></p><p>This requirement is redundant but correct. No change is needed.</p> + + + + <hr> -<a name="378"><h3>378. locale immutability and locale::operator=()</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 6 Sep 2002</p> +<h3><a name="378"></a>378. locale immutability and locale::operator=()</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#31">31</a></p> +<p><b>Discussion:</b></p> <p> I think there is a problem with 22.1.1, p6 which says that </p> @@ -3586,14 +4952,105 @@ in the locale object? Imagine a program such as this Is r0 really supposed to be preserved and destroyed only when loc goes out of scope? </p> + + <p><b>Proposed resolution:</b></p> <p><i>[Summer '04 mid-meeting mailing: Martin and Dietmar believe this 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 closed. ]</i></p> + + + + + +<hr> +<h3><a name="385"></a>385. Does call by value imply the CopyConstructible requirement?</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-10-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Many function templates have parameters that are passed by value; +a typical example is <tt>find_if</tt>'s <i>pred</i> parameter in +25.1.2 [alg.find]. Are the corresponding template parameters +(<tt>Predicate</tt> in this case) implicitly required to be +CopyConstructible, or does that need to be spelled out explicitly? +</p> + +<p> +This isn't quite as silly a question as it might seem to be at first +sight. If you call <tt>find_if</tt> in such a way that template +argument deduction applies, then of course you'll get call by value +and you need to provide a copy constructor. If you explicitly provide +the template arguments, however, you can force call by reference by +writing something like <tt>find_if<my_iterator, +my_predicate&></tt>. The question is whether implementation +are required to accept this, or whether this is ill-formed because +my_predicate& is not CopyConstructible. +</p> + +<p> +The scope of this problem, if it is a problem, is unknown. Function +object arguments to generic algorithms in clauses 25 [algorithms] +and 26 [numerics] are obvious examples. A review of the whole +library is necessary. +</p> +<p><i>[ +This is really two issues. First, predicates are typically passed by +value but we don't say they must be Copy Constructible. They should +be. Second: is specialization allowed to transform value arguments +into references? References aren't copy constructible, so this should +not be allowed. +]</i></p> + +<p><i>[ +2007-01-12, Howard: First, despite the note above, references <b>are</b> +copy constructible. They just aren't assignable. Second, this is very +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. +That issue already says that implementations are allowed to copy +function objects. If one passes in a reference, it is copyable, but +susceptible to slicing if one passes in a reference to a base. Third, +with rvalue reference in the language one only needs to satisfy +MoveConstructible to pass an rvalue "by value". Though the function +might still copy the function object internally (requiring +CopyConstructible). Finally (and fwiw), if we wanted to, it is easy to +code all of the std::algorithms such that they do not copy function +objects internally. One merely passes them by reference internally if +desired (this has been fully implemented and shipped for several years). + 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 +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. +]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Recommend NAD. +</p> + + +<p><b>Rationale:</b></p> +<p> +Generic algorithms will be marked with concepts and these will imply a requirement +of MoveConstructible (not CopyConstructible). The signature of the function will +then precisely describe and enforce the precise requirements. +</p> + + + + + <hr> -<a name="388"><h3>388. Use of complex as a key in associative containers</h3></a><p><b>Section:</b> 26.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cfenv"> [lib.cfenv]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 8 Nov 2002</p> +<h3><a name="388"></a>388. Use of complex as a key in associative containers</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#complex.numbers">active issues</a> in [complex.numbers].</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> Practice with std::complex<> and the associative containers occasionally reveals artificial and distracting issues with constructs @@ -3618,8 +5075,12 @@ containers as an ordering useful to meet complexity requirements. <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348">348</a>.</p> + + <p><b>Proposed resolution:</b></p> <p>Informally: Add a specialization of std::less for std::complex.</p> + + <p><b>Rationale:</b></p> <p>Discussed in Santa Cruz. An overwhelming majority of the LWG believes this should not be treated a DR: it's a request for a design @@ -3629,8 +5090,18 @@ issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#348"> The LWG noted that users who want to put objects into an associative container for which <tt>operator<</tt> isn't defined can simply provide their own comparison function object.</p> + + + + + <hr> -<a name="390"><h3>390. CopyConstructible requirements too strict</h3></a><p><b>Section:</b> 20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Future">Future</a> <b>Submitter:</b> Doug Gregor <b>Date:</b> 24 Oct 2002</p> +<h3><a name="390"></a>390. CopyConstructible requirements too strict</h3> +<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%20Future">NAD Future</a> + <b>Submitter:</b> Doug Gregor <b>Date:</b> 2002-10-24</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> The CopyConstructible requirements in Table 30 state that for an object t of type T (where T is CopyConstructible), the expression &t @@ -3674,25 +5145,39 @@ Note: this relates directly to library issue <a href="http://www.open-std.org/jt will need to be reexamined if the CopyConstructible requirements change. </p> + + <p><b>Proposed resolution:</b></p> <p> Remove the last two rows of Table 30, eliminating the requirements that &t and &u return the address of t and u, respectively. </p> + + <p><b>Rationale:</b></p> <p>This was a deliberate design decision. Perhaps it should be reconsidered for C++0x. </p> + + + + + <hr> -<a name="392"><h3>392. 'equivalence' for input iterators</h3></a><p><b>Section:</b> 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Corwin Joy <b>Date:</b> 11 Dec 2002</p> +<h3><a name="392"></a>392. 'equivalence' for input iterators</h3> +<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> + <b>Submitter:</b> Corwin Joy <b>Date:</b> 2002-12-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> -In section 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> table 72 - +In section 24.1.1 [input.iterators] table 72 - 'Input Iterator Requirements' we have as a postcondition of *a: "If a==b and (a, b) is in the domain of == then *a is equivalent to *b". </p> <p> -In section 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a> it states that +In section 24.5.3.5 [istreambuf.iterator::equal] it states that "istreambuf_iterator::equal returns true if and only if both iterators are at end-of-stream, or neither is at end-of-stream, <i>regardless of what streambuf object they use</i>." (My emphasis). @@ -3700,7 +5185,7 @@ what streambuf object they use</i>." (My emphasis). <p> The defect is that either 'equivalent' needs to be more precisely -defined or the conditions for equality in 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a> +defined or the conditions for equality in 24.5.3.5 [istreambuf.iterator::equal] are incorrect. (Or both). </p> @@ -3721,7 +5206,7 @@ are incorrect. (Or both). </pre> <p>Now assuming that neither f1 or f2 are at the end-of-stream then -f1 == f2 by 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>.</p> +f1 == f2 by 24.5.3.5 [istreambuf.iterator::equal].</p> <p>However, it is unlikely that *f1 will give the same value as *f2 except by accident.</p> @@ -3730,11 +5215,26 @@ by accident.</p> be clearer on this point, or at least be explicit that this does not mean that *f1 and *f2 are required to have the same value in the case of input iterators.</p> + + <p><b>Proposed resolution:</b></p> -<p><b>Rationale:</b></p> -<p>The two iterators aer not in the domain of ==</p> + + +<p><b>Rationale:</b></p><p>The two iterators aer not in the domain of ==</p> + + + + + + <hr> -<a name="399"><h3>399. volations of unformatted input function requirements</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Jan 2003</p> +<h3><a name="399"></a>399. volations of unformatted input function requirements</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-01-05</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The Effects clauses for the two functions below violate the general requirements on unformatted input functions outlined @@ -3755,7 +5255,11 @@ a call to num_get<charT>::get()) will be caught and cause badbit to be set, these two functions should not be treated differently for the sake of consistency. </p> - <p><b>Proposed resolution:</b></p> + + +<p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p> Not a defect. The standard is consistent, and the behavior required @@ -3765,8 +5269,20 @@ facet or for most real-world replacement ctype facets.) Users who define ctype facets that can throw, and who care about this behavior, can use alternative signatures that don't call widen. </p> + + + + + + <hr> -<a name="429"><h3>429. typo in basic_ios::clear(iostate)</h3></a><p><b>Section:</b> 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="429"></a>429. typo in basic_ios::clear(iostate)</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#412">412</a></p> +<p><b>Discussion:</b></p> <p> The Effects clause in 27.4.4.3, p5 describing the effects of a call to @@ -3777,6 +5293,7 @@ on an object for which (rdstate() == goodbit && exceptions() == badbit) holds would not result in an exception being thrown. </p> + <p><b>Proposed resolution:</b></p> <p> @@ -3791,12 +5308,23 @@ to "If (state & exceptions()) == 0, returns. ..." </p> + + <p><b>Rationale:</b></p> -<p>This is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#412">412</a>.</p> + + + + + + <hr> -<a name="433"><h3>433. Contradiction in specification of unexpected()</h3></a><p><b>Section:</b> 18.7.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.unexpected"> [lib.unexpected]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Vyatcheslav Sysoltsev <b>Date:</b> 29 Sep 2003</p> +<h3><a name="433"></a>433. Contradiction in specification of unexpected()</h3> +<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> + <b>Submitter:</b> Vyatcheslav Sysoltsev <b>Date:</b> 2003-09-29</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> -Clause 15.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/except.html#except.unexpected"> [except.unexpected]</a> paragraph 1 says that "void unexpected(); +Clause 15.5.2 [except.unexpected] paragraph 1 says that "void unexpected(); is called (18.7.2) immediately after completing the stack unwinding for the former function", but 18.7.2.4 (Effects) says that "void unexpected(); . . . Calls the unexpected_handler function in effect @@ -3809,12 +5337,26 @@ for stack to be unwound therefore? I think the phrase "in effect immediately" should be removed from the standard because it brings ambiguity in understanding. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>There is no contradiction. The phrase "in effect immediately" is just to clarify which handler is to be called.</p> + + + + + <hr> -<a name="437"><h3>437. Formatted output of function pointers is confusing</h3></a><p><b>Section:</b> 27.6.2.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.arithmetic"> [lib.ostream.inserters.arithmetic]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Ivan Godard <b>Date:</b> 24 Oct 2003</p> +<h3><a name="437"></a>437. Formatted output of function pointers is confusing</h3> +<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> + <b>Submitter:</b> Ivan Godard <b>Date:</b> 2003-10-24</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> Given: </p> @@ -3840,13 +5382,28 @@ conversions from C and the function pointer is converted to bool. <p>There should be an analogous inserter that prints the address of a function pointer.</p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is indeed a wart, but there is no good way to solve it. C doesn't provide a portable way of outputting the address of a function point either.</p> + + + + + <hr> -<a name="439"><h3>439. Should facets be copyable?</h3></a><p><b>Section:</b> 22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 2 Nov 2003</p> +<h3><a name="439"></a>439. Should facets be copyable?</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-02</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The following facets classes have no copy constructors described in the standard, which, according to the standard, means that they are supposed to use the compiler-generated defaults. Default copy @@ -3884,11 +5441,24 @@ conversions from C and the function pointer is converted to bool. messages_byname </pre> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The copy constructor in the base class is private.</p> + + + + + <hr> -<a name="440"></a><h3><a name="440">440. Should std::complex use unqualified transcendentals?</a></h3><p><b>Section:</b> 26.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.transcendentals"> [lib.complex.transcendentals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 5 Nov 2003</p> +<h3><a name="440"></a>440. Should std::complex use unqualified transcendentals?</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-11-05</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> Operations like <tt>pow</tt> and <tt>exp</tt> on <tt>complex<T></tt> are typically implemented in terms of @@ -3905,17 +5475,32 @@ transcendentals, as discussed in issue <a href="http://www.open-std.org/jtc1/sc2 <p>This issue differs from valarray transcendentals in two important ways. First, "the effect of instantiating the template <tt>complex</tt> for types other than float, double or long double is -unspecified." (26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a>) Second, the standard does not +unspecified." (26.3.1 [complex.synopsis]) Second, the standard does not dictate implementation, so there is no guarantee that a particular real math function is used in the implementation of a particular complex function.</p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>If you instantiate std::complex for user-defined types, all bets are off.</p> + + + + + <hr> -<a name="447"><h3>447. Wrong template argument for time facets</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Pete Becker <b>Date:</b> 26 Dec 2003</p> +<h3><a name="447"></a>447. Wrong template argument for time facets</h3> +<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> + <b>Submitter:</b> Pete Becker <b>Date:</b> 2003-12-26</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#327">327</a></p> +<p><b>Discussion:</b></p> <p> 22.1.1.1.1/4, table 52, "Required Instantiations", lists, among others: </p> @@ -3929,14 +5514,29 @@ are off.</p> The second argument to the last two should be InputIterator, not OutputIterator. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the second template argument to InputIterator. </p> + + <p><b>Rationale:</b></p> -Duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#327">327</a> + + + + + + <hr> -<a name="450"><h3>450. set::find is inconsistent with associative container requirements</h3></a><p><b>Section:</b> 23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> +<h3><a name="450"></a>450. set::find is inconsistent with associative container requirements</h3> +<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> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a></p> +<p><b>Discussion:</b></p> <p>map/multimap have:</p> <pre> iterator find(const key_type& x) const; @@ -3954,11 +5554,26 @@ But set/multiset have: set/multiset should look like map/multimap, and honor the requirements table, in this regard. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> -<p>Duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#214">214</a>.</p> + + + + + + <hr> -<a name="451"><h3>451. Associative erase should return an iterator</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, 23.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative"> [lib.associative]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> +<h3><a name="451"></a>451. Associative erase should return an iterator</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts], 23.3 [associative] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a></p> +<p><b>Discussion:</b></p> <p>map/multimap/set/multiset have:</p> <pre> void erase(iterator); void erase(iterator, iterator); @@ -3970,16 +5585,30 @@ vector/deque/list:</p> iterator erase(iterator, iterator); </pre> + + <p><b>Proposed resolution:</b></p> <p> Informally: The table of associative container requirements, and the relevant template classes, should return an iterator designating the first element beyond the erased subrange. </p> + + <p><b>Rationale:</b></p> -<p>Duplicate of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a></p> + + + + + + <hr> -<a name="452"><h3>452. locale::combine should be permitted to generate a named locale</h3></a><p><b>Section:</b> 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> +<h3><a name="452"></a>452. locale::combine should be permitted to generate a named locale</h3> +<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> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <pre>template<class Facet> locale::combine(const locale&) const; </pre> @@ -4001,28 +5630,432 @@ standard facets. implementations more freedom. Bill will provide wording. ]</i></p> -<p><b>Proposed resolution:</b></p> + + + <p><b>Rationale:</b></p> <p>After further discussion the LWG decided to close this as NAD. The fundamental problem is that names right now are per-category, not per-facet. The <tt>combine</tt> member function works at the wrong level of granularity.</p> + + + + + <hr> -<a name="472"><h3>472. Missing "Returns" clause in std::equal_range</h3></a><p><b>Section:</b> 25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Prateek R Karandikar <b>Date:</b> 29 Feb 1900</p> +<h3><a name="463"></a>463. auto_ptr usability issues</h3> +<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> + <b>Submitter:</b> Rani Sharoni <b>Date:</b> 2003-12-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> + +<p> +TC1 CWG DR #84 effectively made the template<class Y> operator auto_ptr<Y>() +member of auto_ptr (20.4.5.3/4) obsolete. +</p> + +<p> +The sole purpose of this obsolete conversion member is to enable copy +initialization base from r-value derived (or any convertible types like +cv-types) case: +</p> +<pre>#include <memory> +using std::auto_ptr; + +struct B {}; +struct D : B {}; + +auto_ptr<D> source(); +int sink(auto_ptr<B>); +int x1 = sink( source() ); // #1 EDG - no suitable copy constructor +</pre> + +<p> +The excellent analysis of conversion operations that was given in the final +auto_ptr proposal +(http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/1997/N1128.pdf) +explicitly specifies this case analysis (case 4). DR #84 makes the analysis +wrong and actually comes to forbid the loophole that was exploited by the +auto_ptr designers. +</p> + +<p> +I didn't encounter any compliant compiler (e.g. EDG, GCC, BCC and VC) that +ever allowed this case. This is probably because it requires 3 user defined +conversions and in fact current compilers conform to DR #84. +</p> + +<p> +I was surprised to discover that the obsolete conversion member actually has +negative impact of the copy initialization base from l-value derived +case:</p> +<pre>auto_ptr<D> dp; +int x2 = sink(dp); // #2 EDG - more than one user-defined conversion applies +</pre> + +<p> +I'm sure that the original intention was allowing this initialization using +the template<class Y> auto_ptr(auto_ptr<Y>& a) constructor (20.4.5.1/4) but +since in this copy initialization it's merely user defined conversion (UDC) +and the obsolete conversion member is UDC with the same rank (for the early +overloading stage) there is an ambiguity between them. +</p> + +<p> +Removing the obsolete member will have impact on code that explicitly +invokes it: +</p> +<pre>int y = sink(source().operator auto_ptr<B>()); +</pre> + +<p> +IMHO no one ever wrote such awkward code and the reasonable workaround for +#1 is: +</p> +<pre>int y = sink( auto_ptr<B>(source()) ); +</pre> + +<p> +I was even more surprised to find out that after removing the obsolete +conversion member the initialization was still ill-formed: +int x3 = sink(dp); // #3 EDG - no suitable copy constructor +</p> + +<p> +This copy initialization semantically requires copy constructor which means +that both template conversion constructor and the auto_ptr_ref conversion +member (20.4.5.3/3) are required which is what was explicitly forbidden in +DR #84. This is a bit amusing case in which removing ambiguity results with +no candidates. +</p> + +<p> +I also found exception safety issue with auto_ptr related to auto_ptr_ref: +</p> +<pre>int f(auto_ptr<B>, std::string); +auto_ptr<B> source2(); + +// string constructor throws while auto_ptr_ref +// "holds" the pointer +int x4 = f(source2(), "xyz"); // #4 +</pre> + +<p> +The theoretic execution sequence that will cause a leak: +</p> +<ol> +<li>call auto_ptr<B>::operator auto_ptr_ref<B>()</li> +<li>call string::string(char const*) and throw</li> +</ol> + +<p> +According to 20.4.5.3/3 and 20.4.5/2 the auto_ptr_ref conversion member +returns auto_ptr_ref<Y> that holds *this and this is another defect since +the type of *this is auto_ptr<X> where X might be different from Y. Several +library vendors (e.g. SGI) implement auto_ptr_ref<Y> with Y* as member which +is much more reasonable. Other vendor implemented auto_ptr_ref as +defectively required and it results with awkward and catastrophic code: +int oops = sink(auto_ptr<B>(source())); // warning recursive on all control +paths +</p> + +<p> +Dave Abrahams noticed that there is no specification saying that +auto_ptr_ref copy constructor can't throw. +</p> + +<p> +My proposal comes to solve all the above issues and significantly simplify +auto_ptr implementation. One of the fundamental requirements from auto_ptr +is that it can be constructed in an intuitive manner (i.e. like ordinary +pointers) but with strict ownership semantics which yield that source +auto_ptr in initialization must be non-const. My idea is to add additional +constructor template with sole propose to generate ill-formed, diagnostic +required, instance for const auto_ptr arguments during instantiation of +declaration. This special constructor will not be instantiated for other +types which is achievable using 14.8.2/2 (SFINAE). Having this constructor +in hand makes the constructor template<class Y> auto_ptr(auto_ptr<Y> const&) +legitimate since the actual argument can't be const yet non const r-value +are acceptable. +</p> + +<p> +This implementation technique makes the "private auxiliary class" +auto_ptr_ref obsolete and I found out that modern C++ compilers (e.g. EDG, +GCC and VC) consume the new implementation as expected and allow all +intuitive initialization and assignment cases while rejecting illegal cases +that involve const auto_ptr arguments. +</p> + +<p>The proposed auto_ptr interface:</p> + +<pre>namespace std { + template<class X> class auto_ptr { + public: + typedef X element_type; + + // 20.4.5.1 construct/copy/destroy: + explicit auto_ptr(X* p=0) throw(); + auto_ptr(auto_ptr&) throw(); + template<class Y> auto_ptr(auto_ptr<Y> const&) throw(); + auto_ptr& operator=(auto_ptr&) throw(); + template<class Y> auto_ptr& operator=(auto_ptr<Y>) throw(); + ~auto_ptr() throw(); + + // 20.4.5.2 members: + X& operator*() const throw(); + X* operator->() const throw(); + X* get() const throw(); + X* release() throw(); + void reset(X* p=0) throw(); + + private: + template<class U> + auto_ptr(U& rhs, typename +unspecified_error_on_const_auto_ptr<U>::type = 0); + }; +} +</pre> + +<p> +One compliant technique to implement the unspecified_error_on_const_auto_ptr +helper class is using additional private auto_ptr member class template like +the following: +</p> +<pre>template<typename T> struct unspecified_error_on_const_auto_ptr; + +template<typename T> +struct unspecified_error_on_const_auto_ptr<auto_ptr<T> const> +{ typedef typename auto_ptr<T>::const_auto_ptr_is_not_allowed type; }; +</pre> + +<p> +There are other techniques to implement this helper class that might work +better for different compliers (i.e. better diagnostics) and therefore I +suggest defining its semantic behavior without mandating any specific +implementation. IMO, and I didn't found any compiler that thinks otherwise, +14.7.1/5 doesn't theoretically defeat the suggested technique but I suggest +verifying this with core language experts. +</p> + +<p><b>Further changes in standard text:</b></p> +<p>Remove section 20.4.5.3</p> + +<p>Change 20.4.5/2 to read something like: +Initializing auto_ptr<X> from const auto_ptr<Y> will result with unspecified +ill-formed declaration that will require unspecified diagnostic.</p> + +<p>Change 20.4.5.1/4,5,6 to read:</p> + +<pre>template<class Y> auto_ptr(auto_ptr<Y> const& a) throw();</pre> +<p> 4 Requires: Y* can be implicitly converted to X*.</p> +<p> 5 Effects: Calls const_cast<auto_ptr<Y>&>(a).release().</p> +<p> 6 Postconditions: *this holds the pointer returned from a.release().</p> + +<p>Change 20.4.5.1/10</p> +<pre>template<class Y> auto_ptr& operator=(auto_ptr<Y> a) throw(); +</pre> +<p> +10 Requires: Y* can be implicitly converted to X*. The expression delete +get() is well formed. +</p> + +<p>LWG TC DR #127 is obsolete.</p> + +<p> +Notice that the copy constructor and copy assignment operator should remain +as before and accept non-const auto_ptr& since they have effect on the form +of the implicitly declared copy constructor and copy assignment operator of +class that contains auto_ptr as member per 12.8/5,10: +</p> +<pre>struct X { + // implicit X(X&) + // implicit X& operator=(X&) + auto_ptr<D> aptr_; +}; +</pre> + +<p> +In most cases this indicates about sloppy programming but preserves the +current auto_ptr behavior. +</p> + +<p> +Dave Abrahams encouraged me to suggest fallback implementation in case that +my suggestion that involves removing of auto_ptr_ref will not be accepted. +In this case removing the obsolete conversion member to auto_ptr<Y> and +20.4.5.3/4,5 is still required in order to eliminate ambiguity in legal +cases. The two constructors that I suggested will co exist with the current +members but will make auto_ptr_ref obsolete in initialization contexts. +auto_ptr_ref will be effective in assignment contexts as suggested in DR +#127 and I can't see any serious exception safety issues in those cases +(although it's possible to synthesize such). auto_ptr_ref<X> semantics will +have to be revised to say that it strictly holds pointer of type X and not +reference to an auto_ptr for the favor of cases in which auto_ptr_ref<Y> is +constructed from auto_ptr<X> in which X is different from Y (i.e. assignment +from r-value derived to base). +</p> + + + +<p><b>Proposed resolution:</b></p> +<p><i>[Redmond: punt for the moment. We haven't decided yet whether we + want to fix auto_ptr for C++-0x, or remove it and replace it with + move_ptr and unique_ptr.]</i></p> + + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. We're just going to deprecate it. It still works for simple use cases +and people know how to deal with it. Going forward <tt>unique_ptr</tt> is the recommended +tool. +</p> + + + + + +<hr> +<h3><a name="466"></a>466. basic_string ctor should prevent null pointer error</h3> +<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> + <b>Submitter:</b> Daniel Frey <b>Date:</b> 2004-06-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Today, my colleagues and me wasted a lot of time. After some time, I +found the problem. It could be reduced to the following short example: +</p> + +<pre> #include <string> + int main() { std::string( 0 ); } +</pre> + +<p>The problem is that the tested compilers (GCC 2.95.2, GCC 3.3.1 and +Comeau online) compile the above without errors or warnings! The +programs (at least for the GCC) resulted in a SEGV.</p> + +<p>I know that the standard explicitly states that the ctor of string +requires a char* which is not zero. STLs could easily detect the above +case with a private ctor for basic_string which takes a single 'int' +argument. This would catch the above code at compile time and would not +ambiguate any other legal ctors.</p> + +<p><i>[Redmond: No great enthusiasm for doing this. If we do, + however, we want to do it for all places that take <tt>charT*</tt> + pointers, not just the single-argument constructor. The other + question is whether we want to catch this at compile time (in which + case we catch the error of a literal 0, but not an expression whose + value is a null pointer), at run time, or both.]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. Relegate this functionality to debugging implementations. +</p> + + + + + +<hr> +<h3><a name="470"></a>470. accessing containers from their elements' special functions</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> + +<p> +The standard doesn't prohibit the destructors (or any other special +functions) of containers' elements invoked from a member function +of the container from "recursively" calling the same (or any other) +member function on the same container object, potentially while the +container is in an intermediate state, or even changing the state +of the container object while it is being modified. This may result +in some surprising (i.e., undefined) behavior. +</p> + +<p>Read email thread starting with c++std-lib-13637 for more.</p> + + + +<p><b>Proposed resolution:</b></p> + +<p>Add to Container Requirements the following new paragraph:</p> + +<pre> Unless otherwise specified, the behavior of a program that + invokes a container member function f from a member function + g of the container's value_type on a container object c that + called g from its mutating member function h, is undefined. + I.e., if v is an element of c, directly or indirectly calling + c.h() from v.g() called from c.f(), is undefined. +</pre> + +<p><i>[Redmond: This is a real issue, but it's probably a clause 17 + issue, not clause 23. We get the same issue, for example, if we + try to destroy a stream from one of the stream's callback functions.]</i></p> + + + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. We agree this is an issue, but not a defect. +We believe that there is no wording we can put in the standard +that will cover all cases without introducing unfortunate +corner cases. +</p> + + + + + +<hr> +<h3><a name="472"></a>472. Missing "Returns" clause in std::equal_range</h3> +<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> + <b>Submitter:</b> Prateek R Karandikar <b>Date:</b> 2004-06-30</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a></p> +<p><b>Discussion:</b></p> <p> There is no "Returns:" clause for std::equal_range, which returns non-void. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Fixed as part of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270">270</a>.</p> + + + + + + <hr> -<a name="476"><h3>476. Forward Iterator implied mutability</h3></a><p><b>Section:</b> 24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 9 Jul 2004</p> +<h3><a name="476"></a>476. Forward Iterator implied mutability</h3> +<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> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-09</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>24.1/3 says:</p> -<blockquote> +<blockquote><p> Forward iterators satisfy all the requirements of the input and output iterators and can be used whenever either kind is specified -</blockquote> +</p></blockquote> <p> The problem is that satisfying the requirements of output iterator @@ -4034,15 +6067,30 @@ relationship between forward iterator and output iterator. <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> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Yes, 24.1/3 does say that. But it's introductory material. The precise specification is in 24.1.3, and the requrements table there is right. We don't need to fine-tune introductory wording. (Especially since this wording is likely to be changed as part of the iterator overhaul.)</p> + + + + + <hr> -<a name="477"><h3>477. Operator-> for const forward iterators</h3></a><p><b>Section:</b> 24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 11 Jul 2004</p> +<h3><a name="477"></a>477. Operator-> for const forward iterators</h3> +<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> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-11</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p> +<p><b>Discussion:</b></p> <p> The Forward Iterator requirements table contains the following: </p> @@ -4061,26 +6109,89 @@ it implies that the const-ness of the iterator affects the const-ness of referenced members. But Paragraph 11 of [lib.iterator.requirements] says: </p> -<blockquote> +<blockquote><p> In the following sections, a and b denote values of type const X, n denotes a value of the difference type Distance, u, tmp, and m denote identifiers, r denotes a value of X&, t denotes a value of value type T, o denotes a value of some type that is writable to the output iterator. -</blockquote> +</p></blockquote> <p>AFAICT if we need the second line at all, it should read the same as the first line.</p> <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a></p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG agrees that this is a real problem. Marked as a DUP because the LWG chose to adopt the solution proposed in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>. </p> + + + + + <hr> -<a name="480"><h3>480. unary_function and binary_function should have protected nonvirtual destructors</h3></a><p><b>Section:</b> 20.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple.tuple"> [lib.tuple.tuple]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Joe Gottman <b>Date:</b> 19 Aug 2004</p> +<h3><a name="479"></a>479. Container requirements and placement new</h3> +<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> + <b>Submitter:</b> Herb Sutter <b>Date:</b> 2004-08-01</p> +<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> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a></p> +<p><b>Discussion:</b></p> +<p>Nothing in the standard appears to make this program ill-formed:</p> + +<pre> struct C { + void* operator new( size_t s ) { return ::operator new( s ); } + // NOTE: this hides in-place and nothrow new + }; + + int main() { + vector<C> v; + v.push_back( C() ); + } +</pre> + +<p>Is that intentional? We should clarify whether or not we intended + to require containers to support types that define their own special + versions of <tt>operator new</tt>.</p> + +<p><i>[ +Lillehammer: A container will definitely never use this overridden +operator new, but whether it will fail to compile is unclear from the +standard. Are containers supposed to use qualified or unqualified +placement new? 20.4.1.1 is somewhat relevant, but the standard +doesn't make it completely clear whether containers have to use +Allocator::construct(). If containers don't use it, the details of how +containers use placement new are unspecified. That is the real bug, +but it needs to be fixed as part of the allocator overhaul. Weak +support that the eventual solution should make this code well formed. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + + + + + + + +<hr> +<h3><a name="480"></a>480. unary_function and binary_function should have protected nonvirtual destructors</h3> +<p><b>Section:</b> 20.5.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Joe Gottman <b>Date:</b> 2004-08-19</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>The classes std::unary_function and std::binary_function are both designed to be inherited from but contain no virtual functions. This makes it too easy for a novice programmer to write code like @@ -4093,6 +6204,8 @@ binary_function have no other virtual functions, (note in particular the absence of an operator()() ), it would cost too much to give them public virtual destructors. Therefore, they should be given protected nonvirtual destructors.</p> + + <p><b>Proposed resolution:</b></p> <p>Change Paragraph 20.3.1 of the Standard from</p> <pre> template <class Arg, class Result> @@ -4127,11 +6240,23 @@ nonvirtual destructors.</p> ~binary_function() {} }; </pre> + + <p><b>Rationale:</b></p> <p>The LWG doesn't believe the existing definition causes anybody any concrete harm.</p> + + + + + <hr> -<a name="481"><h3>481. unique's effects on the range [result, last)</h3></a><p><b>Section:</b> 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 30 Aug 2004</p> +<h3><a name="481"></a>481. unique's effects on the range [result, last)</h3> +<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> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-08-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard says that unique(first, last) "eliminates all but the first element from every consecutive group of equal elements" in @@ -4146,15 +6271,71 @@ last) except that duplicates have been eliminated. doesn't permit those values to be changed, so they must not be. Should the standard say something explicit one way or the other?</p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + <p><b>Rationale:</b></p> <p>We don't want to make many guarantees about what's in [result, end). Maybe we aren't being quite explicit enough about not being explicit, but it's hard to think that's a major problem.</p> + + + + + <hr> -<a name="483"><h3>483. Heterogeneous equality and EqualityComparable</h3></a><p><b>Section:</b> 25.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.nonmodifying"> [lib.alg.nonmodifying]</a>, 25.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.modifying.operations"> [lib.alg.modifying.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Peter Dimov <b>Date:</b> 20 Sep 2004</p> +<h3><a name="482"></a>482. Swapping pairs</h3> +<p><b>Section:</b> 20.2.3 [pairs], 20.3 [tuple] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2004-09-14</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p>(Based on recent comp.std.c++ discussion)</p> + +<p>Pair (and tuple) should specialize std::swap to work in terms of +std::swap on their components. For example, there's no obvious reason +why swapping two objects of type pair<vector<int>, +list<double> > should not take O(1).</p> + +<p><i>[Lillehammer: We agree it should be swappable. Howard will + provide wording.]</i></p> + + +<p><i>[ +Post Oxford: We got <tt>swap</tt> for <tt>pair</tt> but accidently +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>. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> +<p> +Wording provided in +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>. +</p> + +<p><b>Rationale:</b></p> +<p> +Recommend NAD, fixed by +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20.2.3%20-%20Pairs">N1856</a>. +</p> + + + + + +<hr> +<h3><a name="483"></a>483. Heterogeneous equality and EqualityComparable</h3> +<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> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2004-09-20</p> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#283">283</a></p> +<p><b>Discussion:</b></p> <p>c++std-lib-14262</p> <p>[lib.alg.find] requires T to be EqualityComparable:</p> @@ -4178,22 +6359,24 @@ operator that takes a T, or a T may be convertible to the type of *i. <p>Further discussion (c++std-lib-14264): this problem affects a number of algorithsm in clause 25, not just <tt>find</tt>. We should try to resolve this problem everywhere it appears.</p> + + <p><b>Proposed resolution:</b></p> <p>[lib.alg.find]:</p> -<blockquote> +<blockquote><p> Remove [lib.alg.find]/1. -</blockquote> +</p></blockquote> <p>[lib.alg.count]:</p> -<blockquote> +<blockquote><p> Remove [lib.alg.count]/1. -</blockquote> +</p></blockquote> <p>[lib.alg.search]:</p> -<blockquote> +<blockquote><p> Remove "Type T is EqualityComparable (20.1.1), " from [lib.alg.search]/4. -</blockquote> +</p></blockquote> <p>[lib.alg.replace]:</p> @@ -4203,20 +6386,20 @@ operator that takes a T, or a T may be convertible to the type of *i. Replace [lb.alg.replace]/2 with: </p> - <blockquote> + <blockquote><p> For every iterator i in the range [first, last) for which *i == value or pred(*i) holds perform *i = new_value. - </blockquote> + </p></blockquote> <p> Remove the first sentence of /4. Replace the beginning of /5 with: </p> - <blockquote> + <blockquote><p> For every iterator i in the range [result, result + (last - first)), assign to *i either... - </blockquote> + </p></blockquote> <p>(Note the defect here, current text says assign to i, not *i).</p> </blockquote> @@ -4229,30 +6412,59 @@ operator that takes a T, or a T may be convertible to the type of *i. Replace /2 with: </p> - <blockquote> + <blockquote><p> For every iterator i in the range [first, last) or [first, first + n), perform *i = value. - </blockquote> + </p></blockquote> </blockquote> <p>[lib.alg.remove]:</p> -<blockquote> +<blockquote><p> Remove /1. Remove the first sentence of /6. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <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> + + + + + + <hr> -<a name="486"><h3>486. min/max CopyConstructible requirement is too strict</h3></a><p><b>Section:</b> 25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 13 Oct 2004</p> +<h3><a name="486"></a>486. min/max CopyConstructible requirement is too strict</h3> +<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> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-10-13</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a></p> +<p><b>Discussion:</b></p> <p>A straightforward implementation of these algorithms does not need to copy T.</p> + + <p><b>Proposed resolution:</b></p> <p>drop the the words "and CopyConstructible" from paragraphs 1 and 4</p> + + <p><b>Rationale:</b></p> -<p>Dup of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#281">281</a>.</p> + + + + + + <hr> -<a name="487"><h3>487. Allocator::construct is too limiting</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Dhruv Matani <b>Date:</b> 17 Oct 2004</p> +<h3><a name="487"></a>487. Allocator::construct is too limiting</h3> +<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> + <b>Submitter:</b> Dhruv Matani <b>Date:</b> 2004-10-17</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard's version of allocator::construct(pointer, const_reference) severely limits what you can construct using this @@ -4275,14 +6487,28 @@ allocator::construct(), making it: Now, the ctor of the class T which matches the one that takes a T1 can be called! Doesn't that sound great? </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>NAD. STL uses copying all the time, and making it possible for allocators to construct noncopyable objects is useless in the absence of corresponding container changes. We might consider this as part of a larger redesign of STL.</p> + + + + + <hr> -<a name="489"><h3>489. std::remove / std::remove_if wrongly specified</h3></a><p><b>Section:</b> 25.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.remove"> [lib.alg.remove]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Thomas Mang <b>Date:</b> 12 Dec 2004</p> +<h3><a name="489"></a>489. std::remove / std::remove_if wrongly specified</h3> +<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> + <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In Section 25.2.7 [lib.alg.remove], paragraphs 1 to 5 describe the behavior of the mutating sequence operations std::remove and std::remove_if. However, the wording does not reflect the intended @@ -4462,12 +6688,26 @@ examples partially contradict verbal description of the algorithms, because the verbal description resembles the problematic wording of ISO/IEC 14882:2003. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG believes that the standard is sufficiently clear, and that there is no evidence of any real-world confusion about this point.</p> + + + + + <hr> -<a name="490"><h3>490. std::unique wrongly specified</h3></a><p><b>Section:</b> 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Thomas Mang <b>Date:</b> 12 Dec 2004</p> +<h3><a name="490"></a>490. std::unique wrongly specified</h3> +<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> + <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>In Section 25.2.8 [lib.alg.unique], paragraphs 1 to 3 describe the behavior of the mutating sequence operation std::unique. However, the wording does not reflect the intended behavior [Note: See definition of @@ -4698,14 +6938,28 @@ In case of a sequence consisting of elements being all 'equal' [Note: See DR 202], substituting each r-element by the single s-element is the only possible solution according to current wording. </p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>The LWG believes the standard is sufficiently clear. No implementers get it wrong, and changing it wouldn't cause any code to change, so there is no real-world harm here.</p> + + + + + <hr> -<a name="491"><h3>491. std::list<>::unique incorrectly specified</h3></a><p><b>Section:</b> 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Thomas Mang <b>Date:</b> 12 Dec 2004</p> -<p>In Section 23.2.2.4 [lib.list.ops], paragraphs 19 to 21 describe the +<h3><a name="491"></a>491. std::list<>::unique incorrectly specified</h3> +<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Thomas Mang <b>Date:</b> 2004-12-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p>In Section 23.2.3.4 [list.ops], paragraphs 19 to 21 describe the behavior of the std::list<T, Allocator>::unique operation. However, the current wording is defective for various reasons.</p> @@ -4715,7 +6969,7 @@ current wording is defective for various reasons.</p> 1) Analysis of current wording: </p> -<p>23.2.2.4 [lib.list.ops], paragraph 19:</p> +<p>23.2.3.4 [list.ops], paragraph 19:</p> <p> Current wording says: @@ -4729,7 +6983,7 @@ predicate argument) holds."</p> This sentences makes use of the undefined term "Eliminates". Although it is, to a certain degree, reasonable to consider the term "eliminate" synonymous with "erase", using "Erase" in the first place, as the -wording of 23.2.2.4 [lib.list.ops], paragraph 15 does, would be clearer.</p> +wording of 23.2.3.4 [list.ops], paragraph 15 does, would be clearer.</p> <p> The range of the elements referred to by iterator i is "[first + 1, @@ -4746,7 +7000,7 @@ The same problems as pointed out in DR 202 (equivalence relation / order of arguments for pred()) apply to this paragraph.</p> <p> -23.2.2.4 [lib.list.ops], paragraph 20: +23.2.3.4 [list.ops], paragraph 20: </p> <p> @@ -4763,7 +7017,7 @@ expressions ( "*i == *(i - 1)", "pred(*i, *(i -1))" ). </p> <p> -23.2.2.4 [lib.list.ops], paragraph 21:</p> +23.2.3.4 [list.ops], paragraph 21:</p> <p> Current wording says: @@ -4802,7 +7056,7 @@ of DR 202, no impact on current code is expected.</p> 3) Proposed fixes:</p> <p> -Change 23.2.2.4 [lib.list.ops], paragraph 19 to:</p> +Change 23.2.3.4 [list.ops], paragraph 19 to:</p> <p> "Effect: Erases all but the first element from every consecutive group @@ -4821,7 +7075,7 @@ wording need also additional review. b) "Erases" refers in the author's opinion unambiguously to the member function "erase". In case there is doubt this might not be unamgibuous, a direct reference to the member function "erase" is suggested [Note: -This would also imply a change of 23.2.2.4 [lib.list.ops], paragraph +This would also imply a change of 23.2.3.4 [list.ops], paragraph 15.]. c) The expression "(i - 1)" was left, but is expected that DR submitted by Thomas Mang regarding invalid iterator arithmetic expressions will @@ -4841,7 +7095,7 @@ elements consists of only a single element, this element is also considered the first element."</p> <p> -Change 23.2.2.4 [lib.list.ops], paragraph 20 to:</p> +Change 23.2.3.4 [list.ops], paragraph 20 to:</p> <p> "Throws: Nothing unless an exception is thrown by *(i-1) == *i or @@ -4852,7 +7106,7 @@ Comments to the new wording:</p> <p> a) The wording regarding the conditions is identical to proposed -23.2.2.4 [lib.list.ops], paragraph 19. If 23.2.2.4 [lib.list.ops], +23.2.3.4 [list.ops], paragraph 19. If 23.2.3.4 [list.ops], paragraph 19 is resolved in another way, the proposed wording need also additional review. b) The expression "(i - 1)" was left, but is expected that DR submitted @@ -4861,7 +7115,7 @@ take this into account. c) Typos fixed.</p> <p> -Change 23.2.2.4 [lib.list.ops], paragraph 21 to:</p> +Change 23.2.3.4 [list.ops], paragraph 21 to:</p> <p> "Complexity: If empty() == false, exactly size() - 1 applications of the @@ -4885,14 +7139,28 @@ See DR 315. See DR submitted by Thomas Mang regarding invalid iterator arithmetic expressions.</p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>"All implementations known to the author of this Defect Report comply with these assumption", and "no impact on current code is expected", i.e. there is no evidence of real-world confusion or harm.</p> + + + + + <hr> -<a name="493"><h3>493. Undefined Expression in Input Iterator Note Title</h3></a><p><b>Section:</b> 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Chris Jefferson <b>Date:</b> 13 Dec 2004</p> +<h3><a name="493"></a>493. Undefined Expression in Input Iterator Note Title</h3> +<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> + <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2004-12-13</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>1) In 24.1.1/3, the following text is currently present.</p> <p>"Note: For input iterators, a==b does not imply ++a=++b (Equality does @@ -4914,11 +7182,25 @@ perhaps still be made more clear.</p> when its behaviour is defined ++a==++b may still be false (Equality does not guarantee the substitution property or referential transparency).</p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>This is descriptive text, not normative, and the meaning is clear.</p> + + + + + <hr> -<a name="494"><h3>494. Wrong runtime complexity for associative container's insert and delete</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Hans B os <b>Date:</b> 19 Dec 2004</p> +<h3><a name="494"></a>494. Wrong runtime complexity for associative container's insert and delete</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Hans B os <b>Date:</b> 2004-12-19</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p>According to [lib.associative.reqmts] table 69, the runtime comlexity of insert(p, t) and erase(q) can be done in amortized constant time.</p> @@ -4956,15 +7238,27 @@ requires two extra links per node. To me this is a bit overkill since you can already efficiently insert or erase ranges with erase(first, last) and insert(first, last).</p> + + <p><b>Proposed resolution:</b></p> + + <p><b>Rationale:</b></p> <p>Only "amortized constant" in special circumstances, and we believe that's implementable. That is: doing this N times will be O(N), not O(log N).</p> + + + + + <hr> -<a name="499"><h3>499. Std. doesn't seem to require stable_sort() to be stable!</h3></a><p><b>Section:</b> 25.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.stable.sort"> [lib.stable.sort]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Prateek Karandikar <b>Date:</b> 12 Apr 2005</p> -<blockquote> -<p> +<h3><a name="499"></a>499. Std. doesn't seem to require stable_sort() to be stable!</h3> +<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> + <b>Submitter:</b> Prateek Karandikar <b>Date:</b> 2005-04-12</p> +<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> +<p><b>Discussion:</b></p> +<blockquote><p> 17.3.1.1 Summary</p> <p> @@ -4976,13 +7270,11 @@ provided in each header. <p> 2 Paragraphs labelled "Note(s):" or "Example(s):" are informative, other paragraphs are normative. -</p> -</blockquote> +</p></blockquote> <p>So this means that a "Notes" paragraph wouldn't be normative. </p> -<blockquote> -<p> +<blockquote><p> 25.3.1.2 stable_sort </p> <pre>template<class RandomAccessIterator> @@ -5001,8 +7293,7 @@ comparisons; if enough extra memory is available, it is N log N. <p> 3 Notes: Stable: the relative order of the equivalent elements is preserved. -</p> -</blockquote> +</p></blockquote> <p> The Notes para is informative, and nowhere else is stability mentioned above. @@ -5015,15 +7306,29 @@ is repeated several times in the Standard library clauses for describing various functions. How is it that stability is talked about in the informative paragraph? Or am I missing something obvious? </p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + <p><b>Rationale:</b></p> <p> This change has already been made. </p> + + + + + <hr> -<a name="500"><h3>500. do_length cannot be implemented correctly</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Krzysztof ¯elechowski <b>Date:</b> 24 May 2005</p> +<h3><a name="500"></a>500. do_length cannot be implemented correctly</h3> +<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> + <b>Submitter:</b> Krzysztof Żelechowski <b>Date:</b> 2005-05-24</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <ol> <li>codecvt::do_length is of type int;</li> <li>it is assumed to be sort-of returning from_next - from of type ptrdiff_t;</li> @@ -5032,16 +7337,28 @@ This change has already been made. <p> Contradiction. </p> + + <p><b>Proposed resolution:</b></p> <p> </p> + + + + + <hr> -<a name="501"><h3>501. Proposal: strengthen guarantees of lib.comparisons</h3></a><p><b>Section:</b> 20.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.base"> [lib.base]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Me <anti_spam_email2003@yahoo.com> <b>Date:</b> 7 Jun 2005</p> -<blockquote> +<h3><a name="501"></a>501. Proposal: strengthen guarantees of lib.comparisons</h3> +<p><b>Section:</b> 20.5.3 [base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Me <anti_spam_email2003@yahoo.com> <b>Date:</b> 2005-06-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<blockquote><p> "For templates greater, less, greater_equal, and less_equal, the specializations for any pointer type yield a total order, even if the built-in operators <, >, <=, >= do not." -</blockquote> +</p></blockquote> <p> The standard should do much better than guarantee that these provide a @@ -5054,12 +7371,14 @@ std::less with the intent of making a portable memmove, comparison on an array that straddles the 0x7FFFFFFF/0x8000000 boundary can give incorrect results. </p> + + <p><b>Proposed resolution:</b></p> <p> Add a footnote to 20.5.3/8 saying: </p> -<blockquote> +<blockquote><p> Given a p1 and p2 such that p1 points to N objects of type T and p2 points to M objects of type T. If [p1,p1+N) does not overlap [p2,p2+M), less returns the same value when comparing all pointers in [p1,p1+N) to @@ -5075,7 +7394,7 @@ semantics of less. For T of void, treat it as having similar semantics as T of char i.e. less<cv T*>(a, b) gives the same results as less<cv void*>(a, b) which gives the same results as less<cv char*>((cv char*)(cv void*)a, (cv char*)(cv void*)b). -</blockquote> +</p></blockquote> <p> I'm also thinking there should be a footnote to 20.5.3/1 saying that if @@ -5088,46 +7407,66 @@ guaranteed for all POD types (especially pointers) that use the built-in comparison operators. </p> + + <p><b>Rationale:</b></p> +<p> less is already required to provide a strict weak ordering which is good enough to detect overlapping memory situations. +</p> + + + + + <hr> -<a name="504"><h3>504. Integer types in pseudo-random number engine requirements</h3></a><p><b>Section:</b> TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="504"></a>504. Integer types in pseudo-random number engine requirements</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> In [tr.rand.req], Paragraph 2 states that "... s is a value of integral type, g is an ... object returning values of unsigned integral type ..." </p> + + <p><b>Proposed resolution:</b></p> <p> In 5.1.1 [tr.rand.req], Paragraph 2 replace </p> -<blockquote> +<blockquote><p> ... s is a value of integral type, g is an lvalue of a type other than X that defines a zero-argument function object returning values of <del>unsigned integral</del> type <ins><tt>unsigned long int</tt></ins>, ... -</blockquote> +</p></blockquote> <p> In 5.1.1 [tr.rand.seq], Table 16, replace in the line for X(s) </p> -<blockquote> +<blockquote><p> creates an engine with the initial internal state determined by <ins><tt>static_cast<unsigned long>(</tt></ins><tt><i>s</i></tt><ins><tt>)</tt></ins> -</blockquote> +</p></blockquote> <p><i>[ Mont Tremblant: Both s and g should be unsigned long. This should refer to the constructor signatures. Jens provided wording post Mont Tremblant. ]</i></p> + <p><i>[ Berlin: N1932 adopts the proposed resolution: see 26.3.1.3/1e and Table 3 row 2. Moved to Ready. ]</i></p> + + + <p><b>Rationale:</b></p> <p> Jens: Just requiring X(unsigned long) still makes it possible @@ -5139,8 +7478,23 @@ see no additional use in actually requiring a X(unsigned long) signature. u.seed(s) is covered by its reference to X(s), same arguments. </p> + + +<p><i>[ +Portland: Subsumed by N2111. +]</i></p> + + + + + <hr> -<a name="506"><h3>506. Requirements of Distribution parameter for variate_generator</h3></a><p><b>Section:</b> TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="506"></a>506. Requirements of Distribution parameter for variate_generator</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> Paragraph 3 requires that template argument U (which corresponds to template parameter Engine) satisfy all uniform random number generator requirements. @@ -5149,6 +7503,8 @@ that corresponds to template parameter Distribution. We believe there should be, and that it should require that this template argument satisfy all random distribution requirements. </p> + + <p><b>Proposed resolution:</b></p> <p> Consequence 1: Remove the precondition clauses [tr.rand.var]/16 and /18. @@ -5163,20 +7519,34 @@ Mont Tremblant: Jens reccommends NAD, min/max not needed everywhere. Marc supports having min and max to satisfy generic programming interface. ]</i></p> + + + <p><b>Rationale:</b></p> -Berlin: N1932 makes this moot: variate_generator has been eliminated. +<p>Berlin: N1932 makes this moot: variate_generator has been eliminated.</p> + + + + + <hr> -<a name="509"><h3>509. Uniform_int template parameters</h3></a><p><b>Section:</b> TR1 5.1.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.iunif"> [tr.rand.dist.iunif]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="509"></a>509. Uniform_int template parameters</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> In [tr.rand.dist.iunif] the uniform_int distribution currently has a single template parameter, IntType, used as the input_type and as the result_type of the distribution. We believe there is no reason to conflate these types in this way. </p> + + <p><b>Proposed resolution:</b></p> <p> We recommend that there be a second template parameter to -reflect the distributionÕs input_type, and that the existing first template +reflect the distribution's input_type, and that the existing first template parameter continue to reflect (solely) the result_type: </p> <blockquote><pre>template< class IntType = int, UIntType = unsigned int > @@ -5193,13 +7563,25 @@ Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter eliminated. ]</i></p> + + + + + + <hr> -<a name="510"><h3>510. Input_type for bernoulli_distribution</h3></a><p><b>Section:</b> TR1 5.1.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.bern"> [tr.rand.dist.bern]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="510"></a>510. Input_type for bernoulli_distribution</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> In [tr.rand.dist.bern] the distribution currently requires; </p> <blockquote><pre>typedef int input_type; </pre></blockquote> + + <p><b>Proposed resolution:</b></p> <p> We believe this is an unfortunate choice, and recommend instead: @@ -5212,8 +7594,19 @@ Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter eliminated. ]</i></p> + + + + + + <hr> -<a name="511"><h3>511. Input_type for binomial_distribution</h3></a><p><b>Section:</b> TR1 5.1.7.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.bin"> [tr.rand.dist.bin]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="511"></a>511. Input_type for binomial_distribution</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> Unlike all other distributions in TR1, this binomial_distribution has an implementation-defined input_type. We believe this is an unfortunate choice, @@ -5241,19 +7634,19 @@ Implementations of binomial distributions commonly use Stirling approximations for values in certain ranges. It is far more natural to use real values to represent these approximations than it would be to use integral values to do so. In other ranges, implementations reply on the Bernoulli distribution to -obtain values. While TR1Õs bernoulli_distribution::input_type is specified as +obtain values. While TR1's bernoulli_distribution::input_type is specified as int, we believe this would be better specified as double. </p> <p> This brings us to our main point: The notion of a random distribution rests on the notion of a cumulative distribution function, which in turn mathematically depends on a continuous dependent variable. Indeed, such a distribution function -would be meaningless if it depended on discrete values such as integersÑand this +would be meaningless if it depended on discrete values such as integers - and this remains true even if the distribution function were to take discrete steps. </p> <p> Although this note is specifically about binomial_distribution::input_type, -we intend to recommend that all of the random distributionsÕ input_types be +we intend to recommend that all of the random distributions input_types be specified as a real type (either a RealType template parameter, or double, as appropriate). </p> @@ -5277,10 +7670,12 @@ Finally, we believe that in the case of the bernoulli_distribution (briefly mentioned earlier), as well as the cases of the geometric_distribution and the poisson_distribution, it would be far more natural to have a real input_type. This is because the most natural computation involves the random number -delivered and the distributionÕs parameter p (in the case of bernoulli_distribution, +delivered and the distribution's parameter p (in the case of bernoulli_distribution, for example, the computation is a comparison against p), and p is already specified in each case as having some real type. </p> + + <p><b>Proposed resolution:</b></p> <blockquote><pre>typedef RealType input_type; </pre></blockquote> @@ -5289,17 +7684,28 @@ in each case as having some real type. Berlin: Moved to NAD. N1932 makes this moot: the input_type template parameter has been eliminated. ]</i></p> + + + + + + <hr> -<a name="512"><h3>512. Seeding subtract_with_carry_01 from a single unsigned long</h3></a><p><b>Section:</b> TR1 5.1.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub1"> [tr.rand.eng.sub1]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="512"></a>512. Seeding subtract_with_carry_01 from a single unsigned long</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> Paragraph 8 specifies the algorithm by which a subtract_with_carry_01 engine is to be seeded given a single unsigned long. This algorithm is seriously flawed in the case where the engine parameter w (also known as word_size) exceeds 31 [bits]. The key part of the paragraph reads: </p> -<blockquote> +<blockquote><p> sets x(-r) ... x(-1) to (lcg(1)*2**(-w)) mod 1 -</blockquote> +</p></blockquote> <p> and so forth. </p> @@ -5316,41 +7722,48 @@ in [tr.rand.predef], namely ranlux64_base_01, has w = 48 and would exhibit this poor behavior, while the original N1378 proposal states that these pre-defined engines are intended to be of "known good properties." </p> + + <p><b>Proposed resolution:</b></p> <p> In 5.1.4.4 [tr.rand.eng.sub1], replace the "effects" clause for void seed(unsigned long value = 19780503) by </p> -<blockquote> +<blockquote><p> <i>Effects:</i> If <tt>value == 0</tt>, sets value to <tt>19780503</tt>. In any case, <del>with a linear congruential generator <tt>lcg</tt>(i) having parameters <tt><i>m<sub>lcg</sub></i> = 2147483563</tt>, <tt><i>a<sub>lcg</sub></i> = 40014</tt>, <tt><i>c<sub>lcg</sub></i> = 0</tt>, and <tt><i>lcg</i>(0) = value</tt>,</del> sets <ins>carry<tt>(-1)</tt> and</ins> <tt>x(-r) … x(-1)</tt> -<ins>as if executing</ins> +<ins>as if executing</ins></p> <blockquote><pre><ins> linear_congruential<unsigned long, 40014, 0, 2147483563> lcg(value); seed(lcg); </ins></pre></blockquote> +<p> <del>to <tt>(<i>lcg</i>(1) · 2<sup>-<i>w</i></sup>) mod 1 … (<i>lcg</i>(<i>r</i>) · 2<sup>-<i>w</i></sup>) mod 1</tt>, respectively. If <tt><i>x</i>(-1) == 0</tt>, sets carry<tt>(-1) = 2<sup>-<i>w</i></sup></tt>, -else sets carry<tt>(-1) = 0</tt>.</del> +else sets carry<tt>(-1) = 0</tt>.</del></p> </blockquote> <p><i>[ Jens provided revised wording post Mont Tremblant. ]</i></p> + <p><i>[ Berlin: N1932 adopts the originally-proposed resolution of the issue. Jens's supplied wording is a clearer description of what is intended. Moved to Ready. ]</i></p> + + + <p><b>Rationale:</b></p> <p> Jens: I'm using an explicit type here, because fixing the @@ -5361,35 +7774,47 @@ stricter) requirements we have for seed(Gen&). <p><i>[ Portland: Subsumed by N2111. ]</i></p> + + + + + + <hr> -<a name="513"><h3>513. Size of state for subtract_with_carry_01</h3></a><p><b>Section:</b> TR1 5.1.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub1"> [tr.rand.eng.sub1]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="513"></a>513. Size of state for subtract_with_carry_01</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> Paragraph 3 begins: </p> -<blockquote> +<blockquote><p> The size of the state is r. -</blockquote> +</p></blockquote> <p> However, this is not quite consistent with the remainder of the paragraph which specifies a total of nr+1 items in the textual representation of the state. We recommend the sentence be corrected to match: </p> -<blockquote> +<blockquote><p> The size of the state is nr+1. -</blockquote> +</p></blockquote> <p> To give meaning to the coefficient n, it may be also desirable to move -nÕs definition from later in the paragraph. Either of the following +n's definition from later in the paragraph. Either of the following seem reasonable formulations: </p> -<blockquote> +<blockquote><p> With n=..., the size of the state is nr+1. -</blockquote> -<blockquote> +</p></blockquote> +<blockquote><p> The size of the state is nr+1, where n=... . -</blockquote> -<p> -</p> +</p></blockquote> + + + <p><b>Proposed resolution:</b></p> <p><i>[ Jens: I plead for "NAD" on the grounds that "size of state" is only @@ -5397,31 +7822,44 @@ used as an argument for big-O complexity notation, thus constant factors and additions don't count. ]</i></p> + <p><i>[ Berlin: N1932 adopts the proposed NAD. ]</i></p> + + + + + + <hr> -<a name="514"><h3>514. Size of state for subtract_with_carry</h3></a><p><b>Section:</b> TR1 5.1.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub"> [tr.rand.eng.sub]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="514"></a>514. Size of state for subtract_with_carry</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>Discussion:</b></p> <p> Paragraph 2 begins: </p> -<blockquote> +<blockquote><p> The size of the state is r. -</blockquote> +</p></blockquote> <p> However, the next sentence specifies a total of r+1 items in the textual -representation of the state, r specific xÕs as well as a specific carry. +representation of the state, r specific x's as well as a specific carry. This makes a total of r+1 items that constitute the size of the state, rather than r. </p> + + <p><b>Proposed resolution:</b></p> <p> We recommend the sentence be corrected to match: </p> -<blockquote> +<blockquote><p> The size of the state is r+1. -</blockquote> +</p></blockquote> <p><i>[ Jens: I plead for "NAD" on the grounds that "size of state" is only @@ -5429,27 +7867,115 @@ used as an argument for big-O complexity notation, thus constant factors and additions don't count. ]</i></p> + <p><i>[ Berlin: N1932 adopts the proposed NAD. ]</i></p> + + + + + + <hr> -<a name="516"><h3>516. Seeding subtract_with_carry_01 using a generator</h3></a><p><b>Section:</b> TR1 5.1.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.eng.sub1"> [tr.rand.eng.sub1]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="515"></a>515. Random number engine traits</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p> +To accompany the concept of a pseudo-random number engine as defined in Table 17, +we propose and recommend an adjunct template, engine_traits, to be declared in +[tr.rand.synopsis] as: +</p> +<blockquote><pre>template< class PSRE > +class engine_traits; +</pre></blockquote> +<p> +This template's primary purpose would be as an aid to generic programming involving +pseudo-random number engines. Given only the facilities described in tr1, it would +be very difficult to produce any algorithms involving the notion of a generic engine. +The intent of this proposal is to provide, via engine_traits<>, sufficient +descriptive information to allow an algorithm to employ a pseudo-random number engine +without regard to its exact type, i.e., as a template parameter. +</p> +<p> +For example, today it is not possible to write an efficient generic function that +requires any specific number of random bits. More specifically, consider a +cryptographic application that internally needs 256 bits of randomness per call: +</p> +<blockquote><pre>template< class Eng, class InIter, class OutIter > +void crypto( Eng& e, InIter in, OutIter out ); +</pre></blockquote> +<p> +Without knowning the number of bits of randomness produced per call to a provided +engine, the algorithm has no means of determining how many times to call the engine. +</p> +<p> +In a new section [tr.rand.eng.traits], we proposed to define the engine_traits +template as: +</p> +<blockquote><pre>template< class PSRE > +class engine_traits +{ + static std::size_t bits_of_randomness = 0u; + static std::string name() { return "unknown_engine"; } + // TODO: other traits here +}; +</pre></blockquote> +<p> +Further, each engine described in [tr.rand.engine] would be accompanied by a +complete specialization of this new engine_traits template. +</p> + + + +<p><b>Proposed resolution:</b></p> +<p><i>[ +Berlin: Walter: While useful for implementation per TR1, N1932 has no need for this +feature. Recommend close as NAD. +]</i></p> + + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD, +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1932.pdf">N1932</a>, +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a> +covers this. Already in WP. +</p> + + + + + +<hr> +<h3><a name="516"></a>516. Seeding subtract_with_carry_01 using a generator</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> Paragraph 6 says: </p> -<blockquote> +<blockquote><p> ... obtained by successive invocations of g, ... -</blockquote> +</p></blockquote> <p> We recommend instead: </p> -<blockquote> +<blockquote><p> ... obtained by taking successive invocations of g mod 2**32, ... -</blockquote> +</p></blockquote> <p> as the context seems to require only 32-bit quantities be used here. </p> + + <p><b>Proposed resolution:</b></p> <p> Berlin: N1932 adopts the proposed resultion: see 26.3.3.4/7. Moved to Ready. @@ -5458,20 +7984,33 @@ Berlin: N1932 adopts the proposed resultion: see 26.3.3.4/7. Moved to Ready. <p><i>[ Portland: Subsumed by N2111. ]</i></p> + + + + + + <hr> -<a name="517"><h3>517. Should include name in external representation</h3></a><p><b>Section:</b> TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="517"></a>517. Should include name in external representation</h3> +<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> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> The last two rows of Table 16 deal with the i/o requirements of an engine, -specifying that the textual representation of an engineÕs state, -appropriately formatted, constitute the engineÕs external representation. +specifying that the textual representation of an engine's state, +appropriately formatted, constitute the engine's external representation. </p> <p> -This seems adequate when an engineÕs type is known. However, it seems +This seems adequate when an engine's type is known. However, it seems inadequate in the context of generic code, where it becomes useful and -perhaps even necessary to determine an engineÕs type via input. +perhaps even necessary to determine an engine's type via input. </p> <p> </p> + + <p><b>Proposed resolution:</b></p> <p> We therefore recommend that, in each of these two rows of Table 16, the @@ -5483,8 +8022,314 @@ followed by the textual representation." Berlin: N1932 considers this NAD. This is a QOI issue. ]</i></p> + + + + + + +<hr> +<h3><a name="526"></a>526. Is it undefined if a function in the standard changes in parameters?</h3> +<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> + <b>Submitter:</b> Chris Jefferson <b>Date:</b> 2005-09-14</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Problem: There are a number of places in the C++ standard library where +it is possible to write what appear to be sensible ways of calling +functions, but which can cause problems in some (or all) +implementations, as they cause the values given to the function to be +changed in a way not specified in standard (and therefore not coded to +correctly work). These fall into two similar categories. +</p> + +<p> +1) Parameters taken by const reference can be changed during execution +of the function +</p> + +<p> +Examples: +</p> + +<p> +Given std::vector<int> v: +</p> +<p> +v.insert(v.begin(), v[2]); +</p> +<p> +v[2] can be changed by moving elements of vector +</p> + + +<p> +Given std::list<int> l: +</p> +<p> +l.remove(*l.begin()); +</p> +<p> +Will delete the first element, and then continue trying to access it. +This is particularily vicious, as it will appear to work in almost all +cases. +</p> + +<p> +2) A range is given which changes during the execution of the function: +Similarly, +</p> + +<p> +v.insert(v.begin(), v.begin()+4, v.begin()+6); +</p> + +<p> +This kind of problem has been partly covered in some cases. For example +std::copy(first, last, result) states that result cannot be in the range +[first, last). However, does this cover the case where result is a +reverse_iterator built from some iterator in the range [first, last)? +Also, std::copy would still break if result was reverse_iterator(last + +1), yet this is not forbidden by the standard +</p> + +<p> +Solution: +</p> + +<p> +One option would be to try to more carefully limit the requirements of +each function. There are many functions which would have to be checked. +However as has been shown in the std::copy case, this may be difficult. +A simpler, more global option would be to somewhere insert text similar to: +</p> + +<p> +If the execution of any function would change either any values passed +by reference or any value in any range passed to a function in a way not +defined in the definition of that function, the result is undefined. +</p> + +<p> +Such code would have to at least cover chapters 23 and 25 (the sections +I read through carefully). I can see no harm on applying it to much of +the rest of the standard. +</p> + +<p> +Some existing parts of the standard could be improved to fit with this, +for example the requires for 25.2.1 (Copy) could be adjusted to: +</p> + +<p> +Requires: For each non-negative integer n < (last - first), assigning to +*(result + n) must not alter any value in the range [first + n, last). +</p> + +<p> +However, this may add excessive complication. +</p> + +<p> +One other benefit of clearly introducing this text is that it would +allow a number of small optimisations, such as caching values passed +by const reference. +</p> + +<p> +Matt Austern adds that this issue also exists for the <tt>insert</tt> and +<tt>erase</tt> members of the ordered and unordered associative containers. +</p> + +<p><i>[ +Berlin: Lots of controversey over how this should be solved. Lots of confusion +as to whether we're talking about self referencing iterators or references. +Needs a good survey as to the cases where this matters, for which +implementations, and how expensive it is to fix each case. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. +</p> +<ul> +<li><tt>vector::insert(iter, value)</tt> is required to work because the standard +doesn't give permission for it not to work.</li> +<li><tt>list::remove(value)</tt> is required to work because the standard +doesn't give permission for it not to work.</li> +<li><tt>vector::insert(iter, iter, iter)</tt> is not required to work because +23.1.1 [sequence.reqmts], p4 says so.</li> +<li><tt>copy</tt> has to work, except where 25.2.1 [alg.copy] says +it doesn't have to work. While a language lawyer can tear this wording apart, +it is felt that the wording is not prone to accidental interpretation.</li> +<li>The current working draft provide exceptions for the unordered associative +containers similar to the containers requirements which exempt the member +template insert functions from self referencing.</li> +</ul> + + + + + +<hr> +<h3><a name="532"></a>532. Tuple comparison</h3> +<p><b>Section:</b> 20.3.1.5 [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> + <b>Submitter:</b> David Abrahams <b>Date:</b> 2005-11-29</p> +<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> +<p><b>Discussion:</b></p> +<p> +Where possible, tuple comparison operators <,<=,=>, and > ought to be +defined in terms of std::less rather than operator<, in order to +support comparison of tuples of pointers. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +change 6.1.3.5/5 from: +</p> + +<blockquote><p> + Returns: The result of a lexicographical comparison between t and + u. The result is defined as: (bool)(get<0>(t) < get<0>(u)) || + (!(bool)(get<0>(u) < get<0>(t)) && ttail < utail), where rtail for + some tuple r is a tuple containing all but the first element of + r. For any two zero-length tuples e and f, e < f returns false. +</p></blockquote> + +<p> +to: +</p> + +<blockquote> +<p> + Returns: The result of a lexicographical comparison between t and + u. For any two zero-length tuples e and f, e < f returns false. + Otherwise, the result is defined as: cmp( get<0>(t), get<0>(u)) || + (!cmp(get<0>(u), get<0>(t)) && ttail < utail), where rtail for some + tuple r is a tuple containing all but the first element of r, and + cmp(x,y) is an unspecified function template defined as follows. +</p> +<p> + Where T is the type of x and U is the type of y: +</p> + +<p> + if T and U are pointer types and T is convertible to U, returns + less<U>()(x,y) +</p> + +<p> + otherwise, if T and U are pointer types, returns less<T>()(x,y) +</p> + +<p> + otherwise, returns (bool)(x < y) +</p> +</blockquote> + +<p><i>[ +Berlin: This issue is much bigger than just tuple (pair, containers, +algorithms). Dietmar will survey and work up proposed wording. +]</i></p> + + + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. This will be fixed with the next revision of concepts. +</p> + + + + + +<hr> +<h3><a name="536"></a>536. Container iterator constructor and explicit convertibility</h3> +<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> + <b>Submitter:</b> Joaquín M López Muñoz <b>Date:</b> 2005-12-17</p> +<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> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#589">589</a></p> +<p><b>Discussion:</b></p> +<p> +The iterator constructor X(i,j) for containers as defined in 23.1.1 and +23.2.2 does only require that i and j be input iterators but +nothing is said about their associated value_type. There are three +sensible +options: +</p> +<ol> +<li>iterator's value_type is exactly X::value_type (modulo cv).</li> +<li>iterator's value_type is *implicitly* convertible to X::value_type.</li> +<li>iterator's value_type is *explicitly* convertible to X::value_type.</li> +</ol> +<p> +The issue has practical implications, and stdlib vendors have +taken divergent approaches to it: Dinkumware follows 2, +libstdc++ follows 3. +</p> +<p> +The same problem applies to the definition of insert(p,i,j) for +sequences and insert(i,j) for associative contianers, as well as +assign. +</p> + +<p><i>[ +The following added by Howard and the example code was originally written by +Dietmar. +]</i></p> + +<p> +Valid code below? +</p> + +<blockquote><pre>#include <vector> +#include <iterator> +#include <iostream> + +struct foo +{ + explicit foo(int) {} +}; + +int main() +{ + std::vector<int> v_int; + std::vector<foo> v_foo1(v_int.begin(), v_int.end()); + std::vector<foo> v_foo2((std::istream_iterator<int>(std::cin)), + std::istream_iterator<int>()); +} +</pre></blockquote> +<p><i>[ +Berlin: Some support, not universal, for respecting the explicit qualifier. +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + + + + + + <hr> -<a name="544"><h3>544. minor NULL problems in C.2</h3></a><p><b>Section:</b> C.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/diff.html#diff.library"> [diff.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 25 Nov 2005</p> +<h3><a name="544"></a>544. minor NULL problems in C.2</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-11-25</p> +<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> +<p><b>Discussion:</b></p> <p> According to C.2.2.3, p1, "the macro NULL, defined in any of <clocale>, <cstddef>, <cstdio>, <cstdlib>, <cstring>, <ctime>, @@ -5500,29 +8345,77 @@ table 95 does have 54 entries, since a couple of them (including the NULL macro) are listed more than once, the actual number of macros defined by the C++ Standard Library may not be 54. </p> + + <p><b>Proposed resolution:</b></p> <p> I propose we add <clocale> and <cstdlib> to Table 96 and remove the number of macros from C.2, p2 and reword the sentence as follows: </p> -<blockquote> +<blockquote><p> The C++ Standard library <del>provides 54 standard macros from</del> <ins>defines a number macros corresponding to those defined by</ins> the C <ins>Standard</ins> library, as shown in Table 96. -</blockquote> +</p></blockquote> <p><i>[ Portland: Resolution is considered editorial. It will be incorporated into the WD. ]</i></p> + + + + + + +<hr> +<h3><a name="547"></a>547. division should be floating-point, not integer</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Paragraph 10 describes how a variate generator uses numbers produced by an +engine to pass to a generator. The sentence that concerns me is: "Otherwise, if +the value for engine_value_type::result_type is true and the value for +Distribution::input_type is false [i.e. if the engine produces integers and the +engine wants floating-point values], then the numbers in s_eng are divided by +engine().max() - engine().min() + 1 to obtain the numbers in s_e." Since the +engine is producing integers, both the numerator and the denominator are +integers and we'll be doing integer division, which I don't think is what we +want. Shouldn't we be performing a conversion to a floating-point type first? +</p> + + +<p><b>Proposed resolution:</b></p> + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD as the affected section is now gone and so the issue is moot. +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2111.pdf">N2111</a>. +</p> + + + + + <hr> -<a name="549"><h3>549. Undefined variable in binomial_distribution</h3></a><p><b>Section:</b> TR1 5.1.7.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.dist.bin"> [tr.rand.dist.bin]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 10 Jan 2006</p> +<h3><a name="549"></a>549. Undefined variable in binomial_distribution</h3> +<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> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p> +<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> +<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> +<p><b>Discussion:</b></p> <p> Paragraph 1 says that "A binomial distributon random distribution produces integer values i>0 with p(i) = (n choose i) * p*i * (1-p)^(t-i), where t and p are the parameters of the distribution. OK, that tells us what t, p, and i are. What's n? </p> + + <p><b>Proposed resolution:</b></p> <p> Berlin: Typo: "n" replaced by "t" in N1932: see 26.3.7.2.2/1. @@ -5531,8 +8424,56 @@ Berlin: Typo: "n" replaced by "t" in N1932: see 26.3.7.2.2/1. <p><i>[ Portland: Subsumed by N2111. ]</i></p> + + + + + + <hr> -<a name="554"><h3>554. Problem with lwg DR 184 numeric_limits<bool></h3></a><p><b>Section:</b> 18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 29 Jan 2006</p> +<h3><a name="553"></a>553. very minor editorial change intptr_t / uintptr_t</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-01-30</p> +<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> +<p><b>Discussion:</b></p> +<p> +In the synopsis, some types are identified as optional: int8_t, int16_t, +and so on, consistently with C99, indeed. +</p> +<p> +On the other hand, intptr_t and uintptr_t, are not marked as such and +probably should, consistently with C99, 7.18.1.4. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 18.3.1 [cstdint.syn]: +</p> + +<blockquote><pre>... +typedef <i>signed integer type</i> intptr_t; <ins><i>// optional</i></ins> +... +typedef <i>unsigned integer type</i> uintptr_t; <ins><i>// optional</i></ins> +... +</pre></blockquote> + + + +<p><b>Rationale:</b></p> +Recommend NAD and fix as editorial with the proposed resolution. + + + + + +<hr> +<h3><a name="554"></a>554. Problem with lwg DR 184 numeric_limits<bool></h3> +<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> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-01-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> <p> I believe we have a bug in the resolution of: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#184">lwg 184</a> @@ -5562,13 +8503,15 @@ Should this not be implementation defined? Given: If this causes a trap, shouldn't <tt>numeric_limits<bool>::traps</tt> be <tt>true</tt>? </p> + + <p><b>Proposed resolution:</b></p> <p> Change 18.2.1.5p3: </p> -<blockquote> --3- The specialization for <tt>bool</tt> shall be provided as follows: +<blockquote><p> +-3- The specialization for <tt>bool</tt> shall be provided as follows: </p> <blockquote><pre>namespace std { template <> class numeric_limits<bool> { ... @@ -5584,27 +8527,50 @@ Redmond: NAD because traps refers to values, not operations. There is no bool value that will trap. ]</i></p> + + + + + + <hr> -<a name="555"><h3>555. TR1, 8.21/1: typo</h3></a><p><b>Section:</b> TR1 8.21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.c99.boolh"> [tr.c99.boolh]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2 Feb 2006</p> +<h3><a name="555"></a>555. TR1, 8.21/1: typo</h3> +<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> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-02</p> +<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> +<p><b>Discussion:</b></p> <p> This one, if nobody noticed it yet, seems really editorial: s/cstbool/cstdbool/ </p> + + <p><b>Proposed resolution:</b></p> <p> Change 8.21p1: </p> -<blockquote> +<blockquote><p> -1- The header behaves as if it defines the additional macro defined in <tt><cst<ins>d</ins>bool></tt> by including the header <tt><cstdbool></tt>. -</blockquote> +</p></blockquote> <p><i>[ Redmond: Editorial. ]</i></p> + + + + + + <hr> -<a name="558"><h3>558. lib.input.iterators Defect</h3></a><p><b>Section:</b> 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD">NAD</a> <b>Submitter:</b> David Abrahams <b>Date:</b> 9 Feb 2006</p> +<h3><a name="558"></a>558. lib.input.iterators Defect</h3> +<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> + <b>Submitter:</b> David Abrahams <b>Date:</b> 2006-02-09</p> +<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> +<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> +<p><b>Discussion:</b></p> <blockquote> <p> 24.1.1 Input iterators [lib.input.iterators] @@ -5623,23 +8589,176 @@ no description in 24.1.1 of what lowercase a means. IMO the above should have been...Hah, a and b are already covered in 24.1/11, so maybe it should have just been: </p> + + <p><b>Proposed resolution:</b></p> <p> Change 24.1.1p1: </p> -<blockquote> +<blockquote><p> -1- A class or a built-in type <tt>X</tt> satisfies the requirements of an input iterator for the value type <tt>T</tt> if the following expressions are valid<del>, where <tt>U</tt> is the type of any specified member of type <tt>T</tt>,</del> as shown in Table 73. -</blockquote> +</p></blockquote> <p><i>[ Portland: Editorial. ]</i></p> + + + + + + <hr> -<a name="569"><h3>569. Postcondition for basic_ios::clear(iostate) incorrectly stated</h3></a><p><b>Section:</b> 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#Dup">Dup</a> <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 10 Mar 2006</p> +<h3><a name="560"></a>560. User-defined allocators without default constructor</h3> +<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> + <b>Submitter:</b> Sergey P. Derevyago <b>Date:</b> 2006-02-17</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<h4>1. The essence of the problem.</h4> +<p> +User-defined allocators without default constructor are not explicitly +supported by the standard but they can be supported just like std::vector +supports elements without default constructor. +</p> +<p> +As a result, there exist implementations that work well with such allocators +and implementations that don't. +</p> + +<h4>2. The cause of the problem.</h4> +<p> +1) The standard doesn't explicitly state this intent but it should. In +particular, 20.1.5p5 explicitly state the intent w.r.t. the allocator +instances that compare non-equal. So it can similarly state the intent w.r.t. +the user-defined allocators without default constructor. +</p> +<p> +2) Some container operations are obviously underspecified. In particular, +21.3.7.1p2 tells: +</p> +<blockquote><pre>template<class charT, class traits, class Allocator> + basic_string<charT,traits,Allocator> operator+( + const charT* lhs, + const basic_string<charT,traits,Allocator>& rhs + ); +</pre> +<p> +Returns: <tt>basic_string<charT,traits,Allocator>(lhs) + rhs</tt>. +</p> +</blockquote> +<p> +That leads to the basic_string<charT,traits,Allocator>(lhs, Allocator()) call. +Obviously, the right requirement is: +</p> +<blockquote><p> +Returns: <tt>basic_string<charT,traits,Allocator>(lhs, rhs.get_allocator()) + rhs</tt>. +</p></blockquote> +<p> +It seems like a lot of DRs can be submitted on this "Absent call to +get_allocator()" topic. +</p> + +<h4>3. Proposed actions.</h4> +<p> +1) Explicitly state the intent to allow for user-defined allocators without +default constructor in 20.1.5 Allocator requirements. +</p> +<p> +2) Correct all the places, where a correct allocator object is available +through the get_allocator() call but default Allocator() gets passed instead. +</p> +<h4>4. Code sample.</h4> +<p> +Let's suppose that the following memory pool is available: +</p> +<blockquote><pre>class mem_pool { + // ... + void* allocate(size_t size); + void deallocate(void* ptr, size_t size); +}; +</pre></blockquote> +<p> +So the following allocator can be implemented via this pool: +</p> +<blockquote><pre>class stl_allocator { + mem_pool& pool; + + public: + explicit stl_allocator(mem_pool& mp) : pool(mp) {} + stl_allocator(const stl_allocator& sa) : pool(sa.pool) {} + template <class U> + stl_allocator(const stl_allocator<U>& sa) : pool(sa.get_pool()) {} + ~stl_allocator() {} + + pointer allocate(size_type n, std::allocator<void>::const_pointer = 0) + { + return (n!=0) ? static_cast<pointer>(pool.allocate(n*sizeof(T))) : 0; + } + + void deallocate(pointer p, size_type n) + { + if (n!=0) pool.deallocate(p, n*sizeof(T)); + } + + // ... +}; +</pre></blockquote> +<p> +Then the following code works well on some implementations and doesn't work on +another: +</p> +<blockquote><pre>typedef basic_string<char, char_traits<char>, stl_allocator<char> > + tl_string; +mem_pool mp; +tl_string s1("abc", stl_allocator<int>(mp)); +printf("(%s)\n", ("def"+s1).c_str()); +</pre></blockquote> +<p> +In particular, on some implementations the code can't be compiled without +default stl_allocator() constructor. +</p> +<p> +The obvious way to solve the compile-time problems is to intentionally define +a NULL pointer dereferencing default constructor +</p> +<blockquote><pre>stl_allocator() : pool(*static_cast<mem_pool*>(0)) {} +</pre></blockquote> +<p> +in a hope that it will not be called. The problem is that it really gets +called by operator+(const char*, const string&) under the current 21.3.7.1p2 +wording. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. <tt>operator+()</tt> with <tt>string</tt> already requires the desired +semantics of copying the allocator from one of the strings (<i>lhs</i> when there is a choice). +</p> + + + + + +<hr> +<h3><a name="569"></a>569. Postcondition for basic_ios::clear(iostate) incorrectly stated</h3> +<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> + <b>Submitter:</b> Seungbeom Kim <b>Date:</b> 2006-03-10</p> +<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> +<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> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a></p> +<p><b>Discussion:</b></p> <p> Section: 27.4.4.3 [lib.iostate.flags] </p> @@ -5660,10 +8779,830 @@ The postcondition "rdstate()==state|ios_base::badbit" is parsed as "(rdstate()==state)|ios_base::badbit", which is probably what the committee meant. </p> + + + + +<p><b>Rationale:</b></p> + + + + + + +<hr> +<h3><a name="571"></a>571. Update C90 references to C99?</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-04-08</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +1.2 Normative references [intro.refs] of the WP currently refers to ISO/IEC +9899:1990, Programming languages - C. Should that be changed to ISO/IEC +9899:1999? +</p> +<p> +What impact does this have on the library? +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +In 1.2/1 [intro.refs] of the WP, change: +</p> +<blockquote> +<ul> +<li>ISO/IEC 9899:<del>1990</del><ins>1999 + TC1 + TC2</ins>, <i>Programming languages - C</i></li> +</ul> +</blockquote> + + + +<p><b>Rationale:</b></p> +Recommend NAD, fixed editorially. + + + + + +<hr> +<h3><a name="572"></a>572. Oops, we gave 507 WP status</h3> +<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> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-04-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#NAD">NAD</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In Berlin, as a working group, we voted in favor of N1932 which makes issue 507 moot: +variate_generator has been eliminated. Then in full committee we voted to give +this issue WP status (mistakenly). +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Strike the proposed resolution of issue 507. +</p> +<p><i>[ +post-Portland: Walter and Howard recommend NAD. The proposed resolution of 507 no longer +exists in the current WD. +]</i></p> + + + +<p><b>Rationale:</b></p> +<p> +NAD. Will be moot once +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2135.pdf">N2135</a> +is adopted. +</p> + + + + + +<hr> +<h3><a name="587"></a>587. iststream ctor missing description</h3> +<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> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-22</p> +<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> +<p><b>Discussion:</b></p> + <p> + +The <code>iststream(char*, streamsize)</code> ctor is in the class +synopsis in D.7.2 but its signature is missing in the description +below (in D.7.2.1). + + </p> + + + <p><b>Proposed resolution:</b></p> + <p> + +This seems like a simple editorial issue and the missing signature can +be added to the one for <code>const char*</code> in paragraph 2. + + </p> + +<p><i>[ +post Oxford: Noted that it is already fixed in +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf">N2284</a> +]</i></p> + + + + + + +<hr> +<h3><a name="590"></a>590. Type traits implementation latitude should be removed for C++0x</h3> +<p><b>Section:</b> 20.4 [meta], TR1 4.9 [tr.meta.req] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2006-08-10</p> +<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> +<p><b>Discussion:</b></p> +<p> +20.4.9 [lib.meta.req], Implementation requirements, provides latitude for type +traits implementers that is not needed in C++0x. It includes the wording: +</p> + +<blockquote><p> +[<i>Note:</i> the latitude granted to implementers in this clause is temporary, +and is expected to be removed in future revisions of this document. -- <i>end note</i>] +</p></blockquote> + +<p> +Note: +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2157.html">N2157: Minor Modifications to the type traits Wording</a> +also has the intent of removing this wording from the WP. +</p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Remove 20.4.9 [lib.meta.req] in its entirety from the WP. +</p> + +<p><i>[ +post-Oxford: Recommend NAD Editorial. This resolution is now in the +current working draft. +]</i></p> + + + + + + + +<hr> +<h3><a name="591"></a>591. Misleading "built-in</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> whyglinux <b>Date:</b> 2006-08-08</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +18.2.1.2 numeric_limits members [lib.numeric.limits.members] +Paragraph 7: +</p> +<blockquote><p> +"For built-in integer types, the number of non-sign bits in the +representation." +</p></blockquote> + +<p> +26.1 Numeric type requirements [lib.numeric.requirements] +Footnote: +</p> + +<blockquote><p> +"In other words, value types. These include built-in arithmetic types, +pointers, the library class complex, and instantiations of valarray for +value types." +</p></blockquote> + +<p> +Integer types (which are bool, char, wchar_t, and the signed and +unsigned integer types) and arithmetic types (which are integer and +floating types) are all built-in types and thus there are no +non-built-in (that is, user-defined) integer or arithmetic types. Since +the redundant "built-in" in the above 2 sentences can mislead that +there may be built-in or user-defined integer and arithmetic types +(which is not correct), the "built-in" should be removed. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +18.2.1.2 numeric_limits members [lib.numeric.limits.members] +Paragraph 7: +</p> +<blockquote><p> +"For <del>built-in</del> integer types, the number of non-sign bits in the +representation." +</p></blockquote> + +<p> +26.1 Numeric type requirements [lib.numeric.requirements] +Footnote: +</p> + +<blockquote><p> +"In other words, value types. These include <del>built-in</del> arithmetic types, +pointers, the library class complex, and instantiations of valarray for +value types." +</p></blockquote> + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD / Editorial. The proposed resolution is accepted as editorial. +</p> + + + + + +<hr> +<h3><a name="594"></a>594. Disadvantages of defining Swappable in terms of CopyConstructible and Assignable</h3> +<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> + <b>Submitter:</b> Niels Dekker <b>Date:</b> 2006-11-02</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +It seems undesirable to define the Swappable requirement in terms of +CopyConstructible and Assignable requirements. And likewise, once the +MoveConstructible and MoveAssignable requirements (N1860) have made it +into the Working Draft, it seems undesirable to define the Swappable +requirement in terms of those requirements. Instead, it appears +preferable to have the Swappable requirement defined exclusively in +terms of the existence of an appropriate swap function. +</p> +<p> +Section 20.1.4 [lib.swappable] of the current Working Draft (N2009) +says: +</p> +<blockquote><p> +The Swappable requirement is met by satisfying one or more of the +following conditions:</p> +<ul> +<li> +T is Swappable if T satisfies the CopyConstructible requirements +(20.1.3) and the Assignable requirements (23.1); +</li> +<li> +T is Swappable if a namespace scope function named swap exists in the +same namespace as the definition of T, such that the expression +swap(t,u) is valid and has the semantics described in Table 33. +</li> +</ul> +</blockquote> +I can think of three disadvantages of this definition: +<ol> +<li> +If a client's type T satisfies the first condition (T is both +CopyConstructible and Assignable), the client cannot stop T from +satisfying the Swappable requirement without stopping T from +satisfying the first condition. +<p> +A client might want to stop T from satisfying the Swappable +requirement, because swapping by means of copy construction and +assignment might throw an exception, and she might find a throwing +swap unacceptable for her type. On the other hand, she might not feel +the need to fully implement her own swap function for this type. In +this case she would want to be able to simply prevent algorithms that +would swap objects of type T from being used, e.g., by declaring a +swap function for T, and leaving this function purposely undefined. +This would trigger a link error, if an attempt would be made to use +such an algorithm for this type. For most standard library +implementations, this practice would indeed have the effect of +stopping T from satisfying the Swappable requirement. +</p> +</li> +<li> +A client's type T that does not satisfy the first condition can not be +made Swappable by providing a specialization of std::swap for T. +<p> +While I'm aware about the fact that people have mixed feelings about +providing a specialization of std::swap, it is well-defined to do so. +It sounds rather counter-intuitive to say that T is not Swappable, if +it has a valid and semantically correct specialization of std::swap. +Also in practice, providing such a specialization will have the same +effect as satisfying the Swappable requirement. +</p> +</li> +<li> +For a client's type T that satisfies both conditions of the Swappable +requirement, it is not specified which of the two conditions prevails. +After reading section 20.1.4 [lib.swappable], one might wonder whether +objects of T will be swapped by doing copy construction and +assignments, or by calling the swap function of T. +<p> +I'm aware that the intention of the Draft is to prefer calling the +swap function of T over doing copy construction and assignments. Still +in my opinion, it would be better to make this clear in the wording of +the definition of Swappable. +</p> +</li> +</ol> +<p> +I would like to have the Swappable requirement defined in such a way +that the following code fragment will correctly swap two objects of a +type T, if and only if T is Swappable: +</p> +<pre> using std::swap; + swap(t, u); // t and u are of type T. +</pre> +<p> +This is also the way Scott Meyers recommends calling a swap function, +in Effective C++, Third Edition, item 25. +</p> +<p> +Most aspects of this issue have been dealt with in a discussion on +comp.std.c++ about the Swappable requirement, from 13 September to 4 +October 2006, including valuable input by David Abrahams, Pete Becker, +Greg Herlihy, Howard Hinnant and others. +</p> + +<p><b>Proposed resolution:</b></p> +<p> +Change section 20.1.4 [lib.swappable] as follows: +</p> +<blockquote><p> +The Swappable requirement is met by satisfying +<del>one or more of the following conditions:</del> +<ins>the following condition:</ins></p> +<ul> + +<li> +<del>T is Swappable if T satisfies the CopyConstructible requirements +(20.1.3) and the Assignable requirements (23.1);</del> +</li> +<li> +<del> +T is Swappable if a namespace scope function named swap exists in the +same namespace as the definition of T, such that the expression +swap(t,u) is valid and has the semantics described in Table 33. +</del> +T is Swappable if an unqualified function call swap(t,u) is valid +within the namespace std, and has the semantics described in Table 33. +</li> +</ul> +</blockquote> + + +<p><b>Rationale:</b></p> +<p> +Recommend NAD. Concepts, specifically +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2082.pdf">N2082</a> +and +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2084.pdf">N2084</a>, +will essentially rewrite this section and provide the desired semantics. +</p> + + + + + +<hr> +<h3><a name="615"></a>615. Inconsistencies in Section 21.4</h3> +<p><b>Section:</b> 21.4 [c.strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#NAD%20Editorial">NAD Editorial</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2006-12-11</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +In the current draft N2134, 21.4/1 says +</p> +<p> +"Tables 59,228) 60, 61, 62,and 63 229) 230) describe headers <cctype>, +<cwctype>, <cstring>, <cwchar>, and <cstdlib> (character conversions), +respectively." +</p> +<p> +Here footnote 229 applies to table 62, not table 63. +</p> +<p> +Also, footnote 230 lists the new functions in table 63, "atoll, strtoll, +strtoull, strtof, and strtold added by TR1". However, strtof is not present +in table 63. +</p> + + <p><b>Proposed resolution:</b></p> +<p> +</p> + + <p><b>Rationale:</b></p> <p> -This is a duplicate of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#272">272</a>. +Recommend NAD, editorial. Send to Pete. +</p> + + + + + +<hr> +<h3><a name="633"></a>633. Return clause mentions undefined "type()"</h3> +<p><b>Section:</b> 20.5.14.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">Pending NAD Editorial</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-03</p> +<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> +<p><b>Discussion:</b></p> +<p> +20.5.14.2.5 [func.wrap.func.targ], p4 says: </p> -<p>----- End of document -----</p> +<blockquote><p> +<i>Returns:</i> If <tt>type() == typeid(T)</tt>, a pointer to the stored +function target; otherwise a null pointer. +</p></blockquote> + +<ol> +<li> +There exists neither a type, a typedef <tt>type</tt>, nor member +function <tt>type()</tt> in class template function nor in the global or +<tt>std</tt> namespace. +</li> +<li> +Assuming that <tt>type</tt> should have been <tt>target_type()</tt>, +this description would lead to false results, if <tt>T = <i>cv</i> +void</tt> due to returns clause 20.5.14.2.5 [func.wrap.func.targ], p1. +</li> +</ol> + + + +<p><b>Proposed resolution:</b></p> +<p> +Change 20.5.14.2.5 [func.wrap.func.targ], p4: +</p> + +<blockquote><p> +<i>Returns:</i> If <tt><del>type()</del> <ins>target_type()</ins> == typeid(T) <ins>&& typeid(T) != +typeid(void)</ins></tt>, a pointer to the stored function target; +otherwise a null pointer. +</p></blockquote> + +<p><i>[ +Pete: Agreed. It's editorial, so I'll fix it. +]</i></p> + + + + + + + +<hr> +<h3><a name="636"></a>636. 26.5.2.3 valarray::operator[]</h3> +<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> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2007-02-11</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +The signature of the const operator[] has been changed to return a const +reference. +</p> +<p> +The description in paragraph 1 still says that the operator returns by +value. +</p> +<p><i>[ +Pete recommends editorial fix. +]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + +<hr> +<h3><a name="641"></a>641. Editorial fix for 27.6.4 (N2134)</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-18</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +The function <tt>f</tt> in para 4 (27.6.4 [ext.manip]) references an unknown <tt>strm</tt> +in the following line: +</p> + +<blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, strm, err, mon); +</pre></blockquote> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 27.6.4 [ext.manip], p4: +</p> + +<blockquote><pre>mg.get(Iter(str.rdbuf()), Iter(), intl, str<del>m</del>, err, mon); +</pre></blockquote> + +<p><i>[ +Oxford: Editorial. +]</i></p> + + + + + + + +<hr> +<h3><a name="642"></a>642. Invalidated fstream footnotes in N2134</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-02-20</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +The standard wording of N2134 has extended the 14882:2003(E) +wording for the ifstream/ofstream/fstream open function to fix +a long standing problem, see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#409">409</a>. +</p> + +<p> +Now it's properly written as +</p> + +<blockquote><p> +"If that function does not return a null pointer calls clear(), +otherwise +calls setstate(failbit)[..]" +</p></blockquote> + +<p> +instead of the previous +</p> + +<blockquote><p> +"If that function returns a null pointer, calls setstate(failbit)[..] +</p></blockquote> + +<p> +While the old footnotes saying +</p> + +<blockquote><p> +"A successful open does not change the error state." +</p></blockquote> + +<p> +where correct and important, they are invalid now for ifstream and +ofstream (because clear *does* indeed modify the error state) and +should be removed (Interestingly fstream itself never had these, +although +they where needed for that time). +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +In 27.8.1.9 [ifstream.members], remove footnote: +</p> + +<blockquote><p> +<del><sup>334)</sup> A successful open does not change the error state.</del> +</p></blockquote> + +<p> +In 27.8.1.13 [ofstream.members], remove footnote: +</p> + +<blockquote><p> +<del><sup>335)</sup> A successful open does not change the error state.</del> +</p></blockquote> + + + + + + +<hr> +<h3><a name="648"></a>648. regex_iterator c'tor needs clarification/editorial fix</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p> +<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> +<p><b>Discussion:</b></p> +<p> +In 28.12.1.1 [re.regiter.cnstr]/2 the effects paragraph starts with: +</p> + +<blockquote> +<p> +<i>Effects:</i> Initializes begin and end to point to the beginning and the +end of the target sequence, sets pregex to &re, sets flags to f,[..] +</p></blockquote> + +<p> +There are two issues with this description: +</p> + +<ol> +<li> +The meaning of very first part of this quote is unclear, because +there is no target sequence provided, instead there are given two +parameters a and b, both of type BidirectionalIterator. The mentioned +part does not explain what a and b represent. +</li> +<li> +There does not exist any parameter f, but instead a parameter +m in the constructor declaration, so this is actually an editorial +fix. +</li> +</ol> + + +<p><b>Proposed resolution:</b></p> +<p> +In 28.12.1.1 [re.regiter.cnstr]/2 change the above quoted part by +</p> + +<blockquote><p> +<i>Effects:</i> Initializes <tt>begin</tt> and <tt>end</tt> to point to +the beginning and the end of the target sequence <ins>designated by the +iterator range <tt>[a, b)</tt></ins>, sets <tt>pregex</tt> to +<tt>&re</tt>, sets <tt>flags</tt> to <tt><del>f</del> +<ins>m</ins></tt>, then calls <tt>regex_search(begin, end, match, +*pregex, flags)</tt>. If this call returns <tt>false</tt> the +constructor sets <tt>*this</tt> to the end-of-sequence iterator. +</p></blockquote> + + + + + +<hr> +<h3><a name="649"></a>649. Several typos in regex_token_iterator constructors</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-03</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +In 28.12.2.1 [re.tokiter.cnstr]/1+2 both the constructor declaration +and the following text shows some obvious typos: +</p> +<p> +1) The third constructor form is written as +</p> +<blockquote><pre>template <std::size_t N> + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, + const int (&submatches)[R], + regex_constants::match_flag_type m = + regex_constants::match_default); +</pre></blockquote> + +<p> +where the dimensions of submatches are specified by an +unknown value R, which should be N. +</p> +<p> +2) Paragraph 2 of the same section says in its last sentence: +</p> + +<blockquote><p> +The third constructor initializes the member <tt>subs</tt> to hold a +copy of the sequence of integer values pointed to by the iterator range +<tt>[&submatches, &submatches + R)</tt>. +</p></blockquote> + +<p> +where again R must be replaced by N. +</p> + +<p> +3) Paragraph 3 of the same section says in its first sentence: +</p> + +<blockquote><p> +Each constructor then sets <tt>N</tt> to <tt>0</tt>, and +<tt>position</tt> to <tt>position_iterator(a, b, re, f)</tt>. +</p></blockquote> + +<p> +where a non-existing parameter "f" is mentioned, which must be +replaced +by the parameter "m". +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 28.12.2.1 [re.tokiter.cnstr]/1: +</p> +<blockquote><pre>template <std::size_t N> + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, + const int (&submatches)[<del>R</del> <ins>N</ins>], + regex_constants::match_flag_type m = + regex_constants::match_default); +</pre></blockquote> + +<p> +Change 28.12.2.1 [re.tokiter.cnstr]/2: +</p> + +<blockquote><p> +<i>Effects:</i> The first constructor initializes the member +<tt>subs</tt> to hold the single value <tt>submatch</tt>. The second +constructor initializes the member <tt>subs</tt> to hold a copy of the +argument <tt>submatches</tt>. The third constructor initializes the +member <tt>subs</tt> to hold a copy of the sequence of integer values +pointed to by the iterator range <tt>[&submatches, &submatches + +<del>R</del> <ins>N</ins>)</tt>. +</p></blockquote> + +<p> +Change 28.12.2.1 [re.tokiter.cnstr]/3: +</p> + +<blockquote><p> +Each constructor then sets <tt>N</tt> to <tt>0</tt>, and +<tt>position</tt> to <tt>position_iterator(a, b, re, <del>f</del> +<ins>m</ins>)</tt>. If <tt>position</tt> is not an end-of-sequence +iterator the constructor sets <tt>result</tt> to the address of the +current match. Otherwise if any of the values stored in <tt>subs</tt> is +equal to <tt>-1</tt> the constructor sets <tt>*this</tt> to a suffix +iterator that points to the range <tt>[a, b)</tt>, otherwise the +constructor sets <tt>*this</tt> to an end-of-sequence iterator. +</p></blockquote> + + + + + + +<hr> +<h3><a name="656"></a>656. Typo in subtract_with_carry_engine declaration</h3> +<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">Pending NAD Editorial</a> + <b>Submitter:</b> Daniel Krügler <b>Date:</b> 2007-03-08</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +26.4.2 [rand.synopsis] the header <tt><random></tt> synopsis +contains an unreasonable closing curly brace inside the +<tt>subtract_with_carry_engine</tt> declaration. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change the current declaration in 26.4.2 [rand.synopsis] +</p> + +<blockquote><pre>template <class UIntType, size_t w<del>}</del>, size_t s, size_t r> +class subtract_with_carry_engine; +</pre></blockquote> + + +<p><i>[ +Pete: Recommends editorial. +]</i></p> + + + + + +<hr> +<h3><a name="683"></a>683. regex_token_iterator summary error</h3> +<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> + <b>Submitter:</b> Eric Niebler <b>Date:</b> 2007-06-02</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +28.12.2 [re.tokiter], p3 says: +</p> +<blockquote> +<p> +After it is constructed, the iterator finds and stores a value +<tt>match_results<BidirectionalIterator></tt> position and sets the +internal count <tt>N</tt> to zero. +</p> +</blockquote> + +<p> +Should read: +</p> + +<blockquote> +<p> +After it is constructed, the iterator finds and stores a value +<tt><del>match_results</del><ins>regex_iterator</ins><BidirectionalIterator<ins>, charT, traits</ins>></tt> +position and sets the internal count <tt>N</tt> to zero. +</p> +</blockquote> + +<p><i>[ +John adds: +]</i></p> + + +<blockquote><p> +Yep, looks like a typo/administrative fix to me. +</p></blockquote> + + + +<p><b>Proposed resolution:</b></p> +<p> +</p> + + + + + </body></html>
\ No newline at end of file diff --git a/libstdc++-v3/docs/html/ext/lwg-defects.html b/libstdc++-v3/docs/html/ext/lwg-defects.html index 94e4cb0..3f4b20c 100644 --- a/libstdc++-v3/docs/html/ext/lwg-defects.html +++ b/libstdc++-v3/docs/html/ext/lwg-defects.html @@ -1,18 +1,22 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><title>C++ Standard Library Defect Report List</title> -<style>ins {background-color:#FFFFA0} -del {background-color:#FFFFA0}</style></head> +<style type="text/css"> +p {text-align:justify} +li {text-align:justify} +ins {background-color:#FFFFA0} +del {background-color:#FFFFA0} +</style></head> -<body bgcolor="#ffffff" text="#000000"> +<body> <table> <tbody><tr> <td align="left">Doc. no.</td> -<td align="left">N2131=06-0201</td> +<td align="left">N2318=07-0178</td> </tr> <tr> <td align="left">Date:</td> -<td align="left">2006-11-03</td> +<td align="left">2007-06-24</td> </tr> <tr> <td align="left">Project:</td> @@ -20,73 +24,202 @@ del {background-color:#FFFFA0}</style></head> </tr> <tr> <td align="left">Reply to:</td> -<td align="left">Howard Hinnant <howard.hinnant@gmail.com></td> +<td align="left">Howard Hinnant <<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>></td> </tr> </tbody></table> -<h1>C++ Standard Library Defect Report List (Revision R45)</h1> +<h1>C++ Standard Library Defect Report List (Revision R49)</h1> + <p>Reference ISO/IEC IS 14882:1998(E)</p> <p>Also see:</p> <ul> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li> - <li> -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html">Table of Contents</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html">Index by Section</a> for all library issues.</li> + <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html">Index by Status</a> for all library issues.</li> <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a></li> <li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a></li> </ul> <p>This document contains only library issues which have been closed by the Library Working Group (LWG) after being found to be defects - in the standard. That is, issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>, or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#RR">RR</a>. See the + in the standard. That is, issues which have a status of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a>, + <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a>, or <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#RR">RR</a>. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html">Library Closed Issues List</a> for issues closed as non-defects. See the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html">Library Active Issues List</a> for active issues and more information. The introductory material in that document also applies to this document.</p> + <h2>Revision History</h2> <ul> +<li>R49: +2007-06-23 pre-Toronto mailing. +<ul> +<li><b>Summary:</b><ul> +<li>158 open issues, up by 13.</li> +<li>538 closed issues, up by 7.</li> +<li>696 issues total, up by 20.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#677">677</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#678">678</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#679">679</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#680">680</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#681">681</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#682">682</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#684">684</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#685">685</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#686">686</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#689">689</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#693">693</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#694">694</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#695">695</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#696">696</a>.</li> +<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> +<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> +<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> +<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> +</ul></li> +</ul> +</li> +<li>R48: +2007-05-06 post-Oxford mailing. +<ul> +<li><b>Summary:</b><ul> +<li>145 open issues, down by 33.</li> +<li>531 closed issues, up by 53.</li> +<li>676 issues total, up by 20.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#657">657</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#660">660</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#661">661</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#662">662</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#663">663</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#664">664</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#665">665</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#666">666</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#667">667</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#668">668</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#669">669</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#670">670</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#671">671</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#672">672</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#673">673</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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> +<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> +<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-closed.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> +<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> +<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> +<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-closed.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-closed.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-closed.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> +<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> +<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> +<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> +<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> +<li>Changed the following issues from New to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#628">628</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#640">640</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#646">646</a>.</li> +<li>Changed the following issues from Review to Ready: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a>.</li> +<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> +<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> +<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> +</ul></li> +</ul> +</li> +<li>R47: +2007-03-09 pre-Oxford mailing. +<ul> +<li><b>Summary:</b><ul> +<li>178 open issues, up by 37.</li> +<li>478 closed issues, up by 0.</li> +<li>656 issues total, up by 37.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added the following New issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#620">620</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621">621</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#622">622</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#623">623</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#624">624</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#627">627</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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-active.html#637">637</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#638">638</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#639">639</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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-active.html#645">645</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#646">646</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#650">650</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#651">651</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#652">652</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#653">653</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#654">654</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#655">655</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#656">656</a>.</li> +<li>Added the following Open issues: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#625">625</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#626">626</a>.</li> +<li>Changed the following issues from New to Open: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#570">570</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#580">580</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#590">590</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#612">612</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#614">614</a>.</li> +<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> +<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-closed.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> +<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> +</ul></li> +</ul> +</li> +<li>R46: +2007-01-12 mid-term mailing. +<ul> +<li><b>Summary:</b><ul> +<li>141 open issues, up by 11.</li> +<li>478 closed issues, down by 1.</li> +<li>619 issues total, up by 10.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +</ul></li> +</ul> +</li> <li>R45: 2006-11-03 post-Portland mailing. -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. -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. -Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#524">524</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#557">557</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#543">543</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#598">598</a> - <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#603">603</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#605">605</a> to Ready. -Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#593">593</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#609">609</a>. +<ul> +<li><b>Summary:</b><ul> +<li>130 open issues, up by 0.</li> +<li>479 closed issues, up by 17.</li> +<li>609 issues total, up by 17.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +<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> +<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a> to Dup.</li> +<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518">518</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#523">523</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.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> +<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> +<li>Moved issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#531">531</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#551">551</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#604">604</a> to Review.</li> +<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> +</ul></li> +</ul> </li> <li>R44: 2006-09-08 pre-Portland mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>. +<ul> +<li><b>Summary:</b><ul> +<li>130 open issues, up by 6.</li> +<li>462 closed issues, down by 1.</li> +<li>592 issues total, up by 5.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#583">583</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#592">592</a>.</li> +</ul></li> +</ul> </li> <li>R43: 2006-06-23 mid-term mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#575">575</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#582">582</a>. -Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>. -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. +<ul> +<li><b>Summary:</b><ul> +<li>124 open issues, up by 14.</li> +<li>463 closed issues, down by 1.</li> +<li>587 issues total, up by 13.</li> +</ul></li> +<li><b>Details:</b><ul> +<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> +<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#255">255</a>.</li> +<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> +</ul></li> +</ul> </li> <li>R42: 2006-04-21 post-Berlin mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#572">572</a>. -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. -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-active.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-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#532">532</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#548">548</a> to Open. -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-active.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. -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. -Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#534">534</a> to Review. +<ul> +<li><b>Summary:</b><ul> +<li>110 open issues, down by 16.</li> +<li>464 closed issues, up by 24.</li> +<li>574 issues total, up by 8.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#567">567</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#572">572</a>.</li> +<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> +<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-active.html#525">525</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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-active.html#548">548</a> to Open.</li> +<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-active.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> +<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> +<li>Moved issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#534">534</a> to Review.</li> +</ul></li> +</ul> </li> <li>R41: 2006-02-24 pre-Berlin mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#536">536</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#566">566</a>. -Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open. -Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>. +<ul> +<li><b>Summary:</b><ul> +<li>126 open issues, up by 31.</li> +<li>440 closed issues, up by 0.</li> +<li>566 issues total, up by 31.</li> +</ul></li> +<li><b>Details:</b><ul> +<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-active.html#566">566</a>.</li> +<li>Moved <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#342">342</a> from Ready to Open.</li> +<li>Reopened <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#309">309</a>.</li> +</ul></li> +</ul> </li> <li>R40: 2005-12-16 mid-term mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>. +<ul> +<li><b>Summary:</b><ul> +<li>95 open issues.</li> +<li>440 closed issues.</li> +<li>535 issues total.</li> +</ul></li> +<li><b>Details:</b><ul> +<li>Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#529">529</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#535">535</a>.</li> +</ul></li> +</ul> </li> <li>R39: 2005-10-14 post-Mont Tremblant mailing. -Added new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#526">526</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#528">528</a>. +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-active.html#528">528</a>. 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. 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. 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. @@ -120,12 +253,12 @@ previously in "DR" status were moved to "WP". <li>R32: 2004-09 pre-Redmond mailing: reflects new proposed resolutions and new issues received after the 2004-07 mailing. Added -new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#479">479</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#481">481</a>. +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>. </li> <li>R31: 2004-07 mid-term mailing: reflects new proposed resolutions and new issues received after the post-Sydney mailing. Added -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>. +new issues <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#463">463</a>-<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#478">478</a>. </li> <li>R30: Post-Sydney mailing: reflects decisions made at the Sydney meeting. @@ -177,8 +310,8 @@ All Ready issues were moved to DR status, with the exception of issues <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>. Noteworthy issues discussed at Redmond include -<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-active.html#233">233</a>, -<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-active.html#254">254</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-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>, +<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>. </li> <li>R19: Pre-Redmond mailing. Added new issues @@ -247,7 +380,7 @@ the bug in enough places. </li> <li>R15: pre-Toronto mailing. Added issues -<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.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 +<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 changes so that we pass Weblint tests. </li> <li>R14: @@ -320,15 +453,22 @@ Correction to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-def format, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#64">64</a> title. (17 Sep 98) </li> </ul> + <h2>Defect Reports</h2> <hr> -<a name="1"><h3>1. C library linkage editing oversight</h3></a><p><b>Section:</b> 17.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.using.linkage"> [lib.using.linkage]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 16 Nov 1997</p> +<h3><a name="1"></a>1. C library linkage editing oversight</h3> +<p><b>Section:</b> 17.4.2.2 [using.linkage] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 1997-11-16</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The change specified in the proposed resolution below did not make it into the Standard. This change was accepted in principle at the London meeting, and the exact wording below was accepted at the Morristown meeting.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 17.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.using.linkage"> [lib.using.linkage]</a> paragraph 2 +<p>Change 17.4.2.2 [using.linkage] paragraph 2 from:</p> <blockquote> @@ -345,8 +485,17 @@ from:</p> is implementation defined. It is recommended that an implementation use extern "C++" linkage for this purpose.</p> </blockquote> + + + + + <hr> -<a name="3"><h3>3. Atexit registration during atexit() call is not described</h3></a><p><b>Section:</b> 18.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.cstdint"> [lib.cstdint]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 12 Dec 1997</p> +<h3><a name="3"></a>3. Atexit registration during atexit() call is not described</h3> +<p><b>Section:</b> 18.4 [support.start.term] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1997-12-12</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>We appear not to have covered all the possibilities of exit processing with respect to atexit registration. <br> @@ -427,9 +576,12 @@ committee decides. </p> <p><i>[See reflector message lib-6500 for further discussion.]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change section 18.3/8 from:</p> -<blockquote> +<blockquote><p> First, objects with static storage duration are destroyed and functions registered by calling atexit are called. Objects with static storage duration are destroyed in the reverse order of the @@ -441,9 +593,9 @@ committee decides. </p> destruction has completed. A function registered with atexit after an object obj2 of static storage duration is initialized will be called before obj2's destruction starts. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> First, objects with static storage duration are destroyed and functions registered by calling atexit are called. Non-local objects with static storage duration are destroyed in the reverse order of @@ -460,12 +612,25 @@ committee decides. </p> static object obj3 is destroyed at the same time it would be if a function calling the obj3 destructor were registered with atexit at the completion of the obj3 constructor. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>See 99-0039/N1215, October 22, 1999, by Stephen D. Clamage for the analysis supporting to the proposed resolution.</p> + + + + + <hr> -<a name="5"><h3>5. String::compare specification questionable</h3></a><p><b>Section:</b> 21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Jack Reeves <b>Date:</b> 11 Dec 1997</p> +<h3><a name="5"></a>5. String::compare specification questionable</h3> +<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#TC">TC</a> + <b>Submitter:</b> Jack Reeves <b>Date:</b> 1997-12-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#87">87</a></p> +<p><b>Discussion:</b></p> <p>At the very end of the basic_string class definition is the signature: int compare(size_type pos1, size_type n1, const charT* s, size_type n2 = npos) const; In the following text this is defined as: returns @@ -484,8 +649,10 @@ something like: str.compare(1, str.size()-1, s, strlen(s)-1); </p> <p>This would imply that what was really intended was two signatures int compare(size_type pos1, size_type n1, const charT* s) const int compare(size_type pos1, size_type n1, const charT* s, size_type n2) const; each defined in terms of the corresponding constructor. </p> + + <p><b>Proposed resolution:</b></p> -<p>Replace the compare signature in 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> +<p>Replace the compare signature in 21.3 [basic.string] (at the very end of the basic_string synopsis) which reads:</p> <blockquote> @@ -504,7 +671,7 @@ charT* s, size_type n2) const; each defined in terms of the corresponding constr size_type n2) const;</tt></p> </blockquote> -<p>Replace the portion of 21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a> +<p>Replace the portion of 21.3.6.8 [string::swap] paragraphs 5 and 6 which read:</p> <blockquote> @@ -538,13 +705,25 @@ paragraphs 5 and 6 which read:</p> <p>Editors please note that in addition to splitting the signature, the third argument becomes const, matching the existing synopsis.</p> + + <p><b>Rationale:</b></p> <p>While the LWG dislikes adding signatures, this is a clear defect in the Standard which must be fixed. The same problem was also identified in issues 7 (item 5) and 87.</p> + + + + + <hr> -<a name="7"><h3>7. String clause minor problems</h3></a><p><b>Section:</b> 21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.strings"> [lib.strings]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 15 Dec 1997</p> -<p>(1) In 21.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::insert"> [lib.string::insert]</a>, the description of template +<h3><a name="7"></a>7. String clause minor problems</h3> +<p><b>Section:</b> 21 [strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>(1) In 21.3.6.4 [string::insert], the description of template <class InputIterator> insert(iterator, InputIterator, InputIterator) makes no sense. It refers to a member function that doesn't exist. It also talks about the return value of a void @@ -565,9 +744,9 @@ possible const charT&. </p> charT* in the description. Second, given what it says in RETURNS, leaving out the final argument will always result in an exception getting thrown. This is paragraphs 5 and 6 of -21.3.6.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::compare"> [lib.string::compare]</a></p> +21.3.6.8 [string::swap]</p> -<p>(6) In table 37, in section 21.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.require"> [lib.char.traits.require]</a>, +<p>(6) In table 37, in section 21.1.1 [char.traits.require], there's a note for X::move(s, p, n). It says "Copies correctly even where p is in [s, s+n)". This is correct as far as it goes, but it doesn't go far enough; it should also guarantee that the copy @@ -577,6 +756,8 @@ are necessary if X::move is supposed to have the same sort of semantics as memmove (which was clearly the intent), and both guarantees are necessary if X::move is actually supposed to be useful. </p> + + <p><b>Proposed resolution:</b></p> <p>ITEM 1: In 21.3.5.4 [lib.string::insert], change paragraph 16 to <br> <br> @@ -611,8 +792,17 @@ with:<br> <br> "Copies correctly even where the ranges [p, p+n) and [s, s+n) overlap."</p> + + + + + <hr> -<a name="8"><h3>8. Locale::global lacks guarantee</h3></a><p><b>Section:</b> 22.1.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.statics"> [lib.locale.statics]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 24 Dec 1997</p> +<h3><a name="8"></a>8. Locale::global lacks guarantee</h3> +<p><b>Section:</b> 22.1.1.5 [locale.statics] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1997-12-24</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>It appears there's an important guarantee missing from clause 22. We're told that invoking locale::global(L) sets the C locale if L has a name. However, we're not told whether or not invoking @@ -620,8 +810,10 @@ setlocale(s) sets the global C++ locale. </p> <p>The intent, I think, is that it should not, but I can't find any such words anywhere. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add a sentence at the end of 22.1.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.statics"> [lib.locale.statics]</a>, +<p>Add a sentence at the end of 22.1.1.5 [locale.statics], paragraph 2: </p> <blockquote> @@ -629,14 +821,25 @@ paragraph 2: </p> the value returned by <tt>locale()</tt>. </p> </blockquote> + + + + + <hr> -<a name="9"><h3>9. Operator new(0) calls should not yield the same pointer</h3></a><p><b>Section:</b> 18.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete"> [lib.new.delete]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 4 Jan 1998</p> +<h3><a name="9"></a>9. Operator new(0) calls should not yield the same pointer</h3> +<p><b>Section:</b> 18.5.1 [new.delete] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-01-04</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Scott Meyers, in a comp.std.c++ posting: I just noticed that section 3.7.3.1 of CD2 seems to allow for the possibility that all calls to operator new(0) yield the same pointer, an implementation technique specifically prohibited by ARM 5.3.3.Was this prohibition really lifted? Does the FDIS agree with CD2 in the regard? [Issues list maintainer's note: the IS is the same.]</p> + + <p><b>Proposed resolution:</b></p> <p>Change the last paragraph of 3.7.3 from:</p> <blockquote> @@ -680,11 +883,24 @@ list maintainer's note: the IS is the same.]</p> <p>The provisions of 3.7.3 do not apply to these reserved placement forms of operator new and operator delete.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>See 99-0040/N1216, October 22, 1999, by Stephen D. Clamage for the analysis supporting to the proposed resolution.</p> + + + + + <hr> -<a name="11"><h3>11. Bitset minor problems</h3></a><p><b>Section:</b> 23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 22 Jan 1998</p> +<h3><a name="11"></a>11. Bitset minor problems</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-01-22</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#template.bitset">active issues</a> in [template.bitset].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>(1) bitset<>::operator[] is mentioned in the class synopsis (23.3.5), but it is not documented in 23.3.5.2. </p> @@ -695,10 +911,12 @@ on const. reference operator[](size_t pos); bool operator[](size_t pos) const. < <p>(3) Bitset's stream input function (23.3.5.3) ought to skip all whitespace before trying to extract 0s and 1s. The standard doesn't explicitly say that, though. This should go in the Effects clause.</p> + + <p><b>Proposed resolution:</b></p> <p>ITEMS 1 AND 2:<br> <br> -In the bitset synopsis (23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a>), +In the bitset synopsis (23.3.5 [template.bitset]), replace the member function <br> <br> <tt> reference operator[](size_t pos);<br> @@ -708,7 +926,7 @@ with the two member functions<br> <tt> bool operator[](size_t pos) const; <br> reference operator[](size_t pos); <br> </tt><br> -Add the following text at the end of 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a>, +Add the following text at the end of 23.3.5.2 [bitset.members], immediately after paragraph 45:</p> <blockquote> @@ -724,20 +942,44 @@ immediately after paragraph 45:</p> == this->test(pos)</tt>, and such that <tt>(*this)[pos] = val</tt> is equivalent to <tt>this->set(pos, val);</tt></p> </blockquote> + + <p><b>Rationale:</b></p> <p>The LWG believes Item 3 is not a defect. "Formatted -input" implies the desired semantics. See 27.6.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted"> [lib.istream.formatted]</a>. +input" implies the desired semantics. See 27.6.1.2 [istream.formatted]. </p> + + + + + <hr> -<a name="13"><h3>13. Eos refuses to die</h3></a><p><b>Section:</b> 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> William M. Miller <b>Date:</b> 3 Mar 1998</p> +<h3><a name="13"></a>13. Eos refuses to die</h3> +<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#TC">TC</a> + <b>Submitter:</b> William M. Miller <b>Date:</b> 1998-03-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In 27.6.1.2.3, there is a reference to "eos", which is the only one in the whole draft (at least using Acrobat search), so it's undefined. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>, replace "eos" with +<p>In 27.6.1.2.3 [istream::extractors], replace "eos" with "charT()"</p> + + + + + <hr> -<a name="14"><h3>14. Locale::combine should be const</h3></a><p><b>Section:</b> 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="14"></a>14. Locale::combine should be const</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>locale::combine is the only member function of locale (other than constructors and destructor) that is not const. There is no reason for it not to be const, and good reasons why it should have been const. Furthermore, leaving it non-const conflicts with 22.1.1 @@ -748,32 +990,69 @@ interface it specified had no corresponding language syntax, so it was changed t function. As constructors are never const, there was no "const" in the interface which was transformed into member "combine". It should have been added at that time, but the omission was not noticed. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> and also in 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>, add +<p>In 22.1.1 [locale] and also in 22.1.1.3 [locale.members], add "const" to the declaration of member combine: </p> <blockquote> <pre>template <class Facet> locale combine(const locale& other) const; </pre> </blockquote> + + + + + <hr> -<a name="15"><h3>15. Locale::name requirement inconsistent</h3></a><p><b>Section:</b> 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="15"></a>15. Locale::name requirement inconsistent</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>locale::name() is described as returning a string that can be passed to a locale constructor, but there is no matching constructor. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.members"> [lib.locale.members]</a>, paragraph 5, replace +<p>In 22.1.1.3 [locale.members], paragraph 5, replace "<tt>locale(name())</tt>" with "<tt>locale(name().c_str())</tt>". </p> + + + + + <hr> -<a name="16"><h3>16. Bad ctype_byname<char> decl</h3></a><p><b>Section:</b> 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="16"></a>16. Bad ctype_byname<char> decl</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The new virtual members ctype_byname<char>::do_widen and do_narrow did not get edited in properly. Instead, the member do_widen appears four times, with wrong argument lists. </p> + + <p><b>Proposed resolution:</b></p> <p>The correct declarations for the overloaded members <tt>do_narrow</tt> and <tt>do_widen</tt> should be copied -from 22.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.special"> [lib.facet.ctype.special]</a>.</p> +from 22.2.1.3 [facet.ctype.special].</p> + + + + + <hr> -<a name="17"><h3>17. Bad bool parsing</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="17"></a>17. Bad bool parsing</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>This section describes the process of parsing a text boolean value from the input stream. It does not say it recognizes either of the sequences "true" or "false" and returns the corresponding bool value; instead, it says it recognizes @@ -814,8 +1093,10 @@ I believe the correct algorithm is "as if": </p> <p>Notice this works reasonably when the candidate strings are both empty, or equal, or when one is a substring of the other. The proposed text below captures the logic of the code above.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>, in the first line of paragraph 14, +<p>In 22.2.2.1.2 [facet.num.get.virtuals], in the first line of paragraph 14, change "&&" to "&".</p> <p>Then, replace paragraphs 15 and 16 as follows:</p> @@ -851,28 +1132,53 @@ change "&&" to "&".</p> and <tt>err=str.goodbit</tt>. For empty targets (""), any input sequence yields <tt>err==str.failbit</tt>. --end example]</p> </blockquote> + + + + + <hr> -<a name="18"><h3>18. Get(...bool&) omitted</h3></a><p><b>Section:</b> 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="18"></a>18. Get(...bool&) omitted</h3> +<p><b>Section:</b> 22.2.2.1.1 [facet.num.get.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.members">issues</a> in [facet.num.get.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In the list of num_get<> non-virtual members on page 22-23, the member that parses bool values was omitted from the list of definitions of non-virtual members, though it is listed in the class definition and the corresponding virtual is listed everywhere appropriate. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add at the beginning of 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a> +<p>Add at the beginning of 22.2.2.1.1 [facet.num.get.members] another get member for bool&, copied from the entry in -22.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.num.get"> [lib.locale.num.get]</a>.</p> +22.2.2.1 [locale.num.get].</p> + + + + + <hr> -<a name="19"><h3>19. "Noconv" definition too vague</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="19"></a>19. "Noconv" definition too vague</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#10">10</a></p> +<p><b>Discussion:</b></p> <p> In the definitions of codecvt<>::do_out and do_in, they are specified to return noconv if "no conversion is needed". This definition is too vague, and does not say normatively what is done with the buffers. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the entry for noconv in the table under paragraph 4 in section -<font color="red">22.2.1.5.2</font> to read: +22.2.1.4.2 [locale.codecvt.virtuals] to read: </p> <blockquote> <p><tt>noconv</tt>: <tt>internT</tt> and <tt>externT</tt> are the same type, @@ -885,23 +1191,46 @@ Change the entry for noconv in the table under paragraph 4 in section <tt>to_next</tt> is set equal to <tt>to</tt>, the value of <tt>state</tt> is unchanged, and there are no changes to the values in <tt>[to, to_limit)</tt>.</p> </blockquote> + + + + + <hr> -<a name="20"></a><h3><a name="20">20. Thousands_sep returns wrong type</a></h3><p><b>Section:</b> 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="20"></a>20. Thousands_sep returns wrong type</h3> +<p><b>Section:</b> 22.2.3.1.2 [facet.numpunct.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The synopsis for numpunct<>::do_thousands_sep, and the definition of numpunct<>::thousands_sep which calls it, specify that it returns a value of type char_type. Here it is erroneously described as returning a "string_type". </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>, above paragraph 2, change +<p>In 22.2.3.1.2 [facet.numpunct.virtuals], above paragraph 2, change "string_type" to "char_type". </p> + + + + + <hr> -<a name="21"><h3>21. Codecvt_byname<> instantiations</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="21"></a>21. Codecvt_byname<> instantiations</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In the second table in the section, captioned "Required instantiations", the instantiations for codecvt_byname<> have been omitted. These are necessary to allow users to construct a locale by name from facets. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add in 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> to the table captioned +<p>Add in 22.1.1.1.1 [locale.category] to the table captioned "Required instantiations", in the category "ctype" the lines </p> @@ -909,21 +1238,35 @@ the lines </p> <pre>codecvt_byname<char,char,mbstate_t>, codecvt_byname<wchar_t,char,mbstate_t> </pre> </blockquote> + + + + + <hr> -<a name="22"><h3>22. Member open vs. flags</h3></a><p><b>Section:</b> 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="22"></a>22. Member open vs. flags</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The description of basic_istream<>::open leaves unanswered questions about how it responds to or changes flags in the error status for the stream. A strict reading indicates that it ignores the bits and does not change them, which confuses users who do not expect eofbit and failbit to remain set after a successful open. There are three reasonable resolutions: 1) status quo 2) fail if fail(), ignore eofbit 3) clear failbit and eofbit on call to open(). </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a> paragraph 3, <i>and</i> in 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a> paragraph 3, under open() effects, add a footnote: +<p>In 27.8.1.9 [ifstream.members] paragraph 3, <i>and</i> in 27.8.1.13 [ofstream.members] paragraph 3, under open() effects, add a footnote: </p> <blockquote> <p>A successful open does not change the error state.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>This may seem surprising to some users, but it's just an instance of a general rule: error flags are never cleared by the @@ -935,23 +1278,49 @@ important enough so that an exception shouldn't be made just for this one case. The resolution of this issue clarifies what the LWG believes to have been the original intent.</p> + + + + + <hr> -<a name="24"><h3>24. "do_convert" doesn't exist</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="24"></a>24. "do_convert" doesn't exist</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#72">72</a></p> +<p><b>Discussion:</b></p> <p>The description of codecvt<>::do_out and do_in mentions a symbol "do_convert" which is not defined in the standard. This is a leftover from an edit, and should be "do_in and do_out". </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>, paragraph 3, change -"do_convert" to "do_in or do_out". Also, in <font color="red">22.2.1.5.2</font>, change "do_convert()" to "do_in +<p>In 22.2.1.4 [locale.codecvt], paragraph 3, change +"do_convert" to "do_in or do_out". Also, in 22.2.1.4.2 [locale.codecvt.virtuals], change "do_convert()" to "do_in or do_out". </p> + + + + + <hr> -<a name="25"><h3>25. String operator<< uses width() value wrong</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="25"></a>25. String operator<< uses width() value wrong</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#67">67</a></p> +<p><b>Discussion:</b></p> <p>In the description of operator<< applied to strings, the standard says that uses the smaller of os.width() and str.size(), to pad "as described in stage 3" elsewhere; but this is inconsistent, as this allows no possibility of space for padding. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> paragraph 4 from:<br> +<p>Change 21.3.8.9 [string.io] paragraph 4 from:<br> <br> "... where <tt>n</tt> is the smaller of <tt>os.width()</tt> and <tt>str.size()</tt>; ..."<br> @@ -960,8 +1329,18 @@ to: <br> <br> "... where <tt>n</tt> is the larger of <tt>os.width()</tt> and <tt>str.size()</tt>; ..."</p> + + + + + <hr> -<a name="26"><h3>26. Bad sentry example</h3></a><p><b>Section:</b> 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="26"></a>26. Bad sentry example</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In paragraph 6, the code in the example: </p> <pre> template <class charT, class traits = char_traits<charT> > @@ -984,9 +1363,13 @@ to: <br> particular, it fails to use traits operators, and specifies incorrect semantics. (E.g. it specifies skipping over the first character in the sequence without examining it.) </p> + + <p><b>Proposed resolution:</b></p> -<p>Remove the example above from 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> +<p>Remove the example above from 27.6.1.1.3 [istream::sentry] paragraph 6.</p> + + <p><b>Rationale:</b></p> <p>The originally proposed replacement code for the example was not correct. The LWG tried in Kona and again in Tokyo to correct it @@ -994,14 +1377,26 @@ without success. In Tokyo, an implementor reported that actual working code ran over one page in length and was quite complicated. The LWG decided that it would be counter-productive to include such a lengthy example, which might well still contain errors.</p> + + + + + <hr> -<a name="27"><h3>27. String::erase(range) yields wrong iterator</h3></a><p><b>Section:</b> 21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="27"></a>27. String::erase(range) yields wrong iterator</h3> +<p><b>Section:</b> 21.3.6.5 [string::erase] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::erase">issues</a> in [string::erase].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The string::erase(iterator first, iterator last) is specified to return an element one place beyond the next element after the last one erased. E.g. for the string "abcde", erasing the range ['b'..'d') would yield an iterator for element 'e', while 'd' has not been erased. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a>, paragraph 10, change: </p> +<p>In 21.3.6.5 [string::erase], paragraph 10, change: </p> <blockquote> <p>Returns: an iterator which points to the element immediately following _last_ prior to @@ -1014,8 +1409,19 @@ while 'd' has not been erased. </p> <p>Returns: an iterator which points to the element pointed to by _last_ prior to the other elements being erased. </p> </blockquote> + + + + + <hr> -<a name="28"><h3>28. Ctype<char>is ambiguous</h3></a><p><b>Section:</b> 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="28"></a>28. Ctype<char>is ambiguous</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#236">236</a></p> +<p><b>Discussion:</b></p> <p>The description of the vector form of ctype<char>::is can be interpreted to mean something very different from what was intended. Paragraph 4 says </p> @@ -1026,23 +1432,37 @@ something very different from what was intended. Paragraph 4 says </p> <p>This is intended to copy the value indexed from table()[] into the place identified in vec[]. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a>, paragraph 4, to read </p> +<p>Change 22.2.1.3.2 [facet.ctype.char.members], paragraph 4, to read </p> <blockquote> <p>Effects: The second form, for all *p in the range [low, high), assigns into vec[p-low] the value table()[(unsigned char)*p]. </p> </blockquote> + + + + + <hr> -<a name="29"><h3>29. Ios_base::init doesn't exist</h3></a><p><b>Section:</b> 27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> -<p>Sections 27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a> and 27.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.wide.stream.objects"> [lib.wide.stream.objects]</a> mention +<h3><a name="29"></a>29. Ios_base::init doesn't exist</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>Sections 27.3.1 [narrow.stream.objects] and 27.3.2 [wide.stream.objects] mention a function ios_base::init, which is not defined. Probably they mean -basic_ios<>::init, defined in 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>, +basic_ios<>::init, defined in 27.4.4.1 [basic.ios.cons], paragraph 3. </p> + + <p><b>Proposed resolution:</b></p> <p>[R12: modified to include paragraph 5.]</p> -<p>In 27.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.narrow.stream.objects"> [lib.narrow.stream.objects]</a> paragraph 2 and 5, change </p> +<p>In 27.3.1 [narrow.stream.objects] paragraph 2 and 5, change </p> <blockquote> <p>ios_base::init </p> @@ -1054,27 +1474,52 @@ paragraph 3. </p> <p>basic_ios<char>::init </p> </blockquote> -<p>Also, make a similar change in 27.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.wide.stream.objects"> [lib.wide.stream.objects]</a> except it +<p>Also, make a similar change in 27.3.2 [wide.stream.objects] except it should read </p> <blockquote> <p>basic_ios<wchar_t>::init </p> </blockquote> + + + + + <hr> -<a name="30"><h3>30. Wrong header for LC_*</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="30"></a>30. Wrong header for LC_*</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 2 implies that the C macros LC_CTYPE etc. are defined in <cctype>, where they are in fact defined elsewhere to appear in <clocale>. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, paragraph 2, change +<p>In 22.1.1.1.1 [locale.category], paragraph 2, change "<cctype>" to read "<clocale>". </p> + + + + + <hr> -<a name="31"><h3>31. Immutable locale values</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="31"></a>31. Immutable locale values</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#378">378</a></p> +<p><b>Discussion:</b></p> <p>Paragraph 6, says "An instance of <tt>locale</tt> is <i>immutable</i>; once a facet reference is obtained from it, ...". This has caused some confusion, because locale variables are manifestly assignable. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> replace paragraph 6</p> +<p>In 22.1.1 [locale] replace paragraph 6</p> <blockquote> <p>An instance of <tt>locale</tt> is immutable; once a facet @@ -1090,8 +1535,17 @@ are manifestly assignable. </p> results from member functions of it may be cached and re-used, as long as some locale object refers to that facet.</p> </blockquote> + + + + + <hr> -<a name="32"><h3>32. Pbackfail description inconsistent</h3></a><p><b>Section:</b> 27.5.2.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.pback"> [lib.streambuf.virt.pback]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="32"></a>32. Pbackfail description inconsistent</h3> +<p><b>Section:</b> 27.5.2.4.4 [streambuf.virt.pback] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The description of the required state before calling virtual member basic_streambuf<>::pbackfail requirements is inconsistent with the conditions described in 27.5.2.2.4 [lib.streambuf.pub.pback] where member sputbackc calls it. @@ -1104,8 +1558,10 @@ Specifically, the latter says it calls pbackfail if: </p> <p> traits::eq(*gptr(),traits::to_char_type(c)) returns false </p> <p>It appears that the pbackfail description is wrong. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.5.2.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.pback"> [lib.streambuf.virt.pback]</a>, paragraph 1, change:</p> +<p>In 27.5.2.4.4 [streambuf.virt.pback], paragraph 1, change:</p> <blockquote> <p>"<tt>traits::eq(*gptr(),traits::to_char_type( c))</tt>"</p> @@ -1117,11 +1573,24 @@ Specifically, the latter says it calls pbackfail if: </p> <p>"<tt>traits::eq(traits::to_char_type(c),gptr()[-1])</tt>" </p> </blockquote> + + <p><b>Rationale:</b></p> <p>Note deliberate reordering of arguments for clarity in addition to the correction of the argument value.</p> + + + + + <hr> -<a name="33"><h3>33. Codecvt<> mentions from_type</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="33"></a>33. Codecvt<> mentions from_type</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#43">43</a></p> +<p><b>Discussion:</b></p> <p>In the table defining the results from do_out and do_in, the specification for the result <i>error</i> says </p> @@ -1131,20 +1600,34 @@ result <i>error</i> says </p> <p>but from_type is not defined. This clearly is intended to be an externT for do_in, or an internT for do_out. </p> + + <p><b>Proposed resolution:</b></p> -<p>In <font color="red">22.2.1.5.2</font> paragraph 4, replace the definition +<p>In 22.2.1.4.2 [locale.codecvt.virtuals] paragraph 4, replace the definition in the table for the case of _error_ with </p> <blockquote> <p>encountered a character in <tt>[from,from_end)</tt> that it could not convert. </p> </blockquote> + + + + + <hr> -<a name="34"><h3>34. True/falsename() not in ctype<></h3></a><p><b>Section:</b> 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="34"></a>34. True/falsename() not in ctype<></h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In paragraph 19, Effects:, members truename() and falsename are used from facet ctype<charT>, but it has no such members. Note that this is also a problem in 22.2.2.1.2, addressed in (4). </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, paragraph 19, in the Effects: +<p>In 22.2.2.2.2 [facet.num.put.virtuals], paragraph 19, in the Effects: clause for member put(...., bool), replace the initialization of the string_type value s as follows: </p> @@ -1152,21 +1635,42 @@ string_type value s as follows: </p> <pre>const numpunct& np = use_facet<numpunct<charT> >(loc); string_type s = val ? np.truename() : np.falsename(); </pre> </blockquote> + + + + + <hr> -<a name="35"><h3>35. No manipulator unitbuf in synopsis</h3></a><p><b>Section:</b> 27.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreams.base"> [lib.iostreams.base]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> -<p>In 27.4.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.manip"> [lib.fmtflags.manip]</a>, we have a definition for a manipulator +<h3><a name="35"></a>35. No manipulator unitbuf in synopsis</h3> +<p><b>Section:</b> 27.4 [iostreams.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 27.4.5.1 [fmtflags.manip], we have a definition for a manipulator named "unitbuf". Unlike other manipulators, it's not listed in synopsis. Similarly for "nounitbuf". </p> + + <p><b>Proposed resolution:</b></p> -<p>Add to the synopsis for <ios> in 27.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreams.base"> [lib.iostreams.base]</a>, after +<p>Add to the synopsis for <ios> in 27.4 [iostreams.base], after the entry for "nouppercase", the prototypes: </p> <blockquote> <pre>ios_base& unitbuf(ios_base& str); ios_base& nounitbuf(ios_base& str); </pre> </blockquote> + + + + + <hr> -<a name="36"><h3>36. Iword & pword storage lifetime omitted</h3></a><p><b>Section:</b> 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="36"></a>36. Iword & pword storage lifetime omitted</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In the definitions for ios_base::iword and pword, the lifetime of the storage is specified badly, so that an implementation which only keeps the last value stored appears to conform. In particular, it says: </p> @@ -1175,8 +1679,10 @@ to conform. In particular, it says: </p> member with a different index ... </p> <p>This is not idle speculation; at least one implementation was done this way. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add in 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a>, in both paragraph 2 and also in +<p>Add in 27.4.2.5 [ios.base.storage], in both paragraph 2 and also in paragraph 4, replace the sentence: </p> <blockquote> @@ -1194,8 +1700,18 @@ paragraph 4, replace the sentence: </p> </blockquote> <p>substituting "iword" or "pword" as appropriate. </p> + + + + + <hr> -<a name="37"><h3>37. Leftover "global" reference</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="37"></a>37. Leftover "global" reference</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In the overview of locale semantics, paragraph 4, is the sentence </p> <blockquote> @@ -1205,21 +1721,34 @@ paragraph 4, replace the sentence: </p> <p>This is not supported by the definition of use_facet<>, and represents semantics from an old draft. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a>, paragraph 4, delete the parenthesized +<p>In 22.1.1 [locale], paragraph 4, delete the parenthesized expression </p> <blockquote> <p>(or, failing that, in the global locale) </p> </blockquote> + + + + + <hr> -<a name="38"><h3>38. Facet definition incomplete</h3></a><p><b>Section:</b> 22.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.global.templates"> [lib.locale.global.templates]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="38"></a>38. Facet definition incomplete</h3> +<p><b>Section:</b> 22.1.2 [locale.global.templates] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>It has been noticed by Esa Pulkkinen that the definition of "facet" is incomplete. In particular, a class derived from another facet, but which does not define a member <i>id</i>, cannot safely serve as the argument <i>F</i> to use_facet<F>(loc), because there is no guarantee that a reference to the facet instance stored in <i>loc</i> is safely convertible to <i>F</i>. </p> + + <p><b>Proposed resolution:</b></p> <p>In the definition of std::use_facet<>(), replace the text in paragraph 1 which reads: </p> @@ -1232,7 +1761,7 @@ reads: </p> <blockquote> <p>Requires: <tt>Facet</tt> is a facet class whose definition - contains the public static member <tt>id</tt> as defined in 22.1.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.facet"> [lib.locale.facet]</a>. </p> + contains the public static member <tt>id</tt> as defined in 22.1.1.1.2 [locale.facet]. </p> </blockquote> <p><i>[ @@ -1242,8 +1771,18 @@ contains (not inherits) the public static member <tt>id</tt>..." ]</i></p> + + + + + + <hr> -<a name="39"><h3>39. istreambuf_iterator<>::operator++(int) definition garbled</h3></a><p><b>Section:</b> 24.5.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::op++"> [lib.istreambuf.iterator::op++]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="39"></a>39. istreambuf_iterator<>::operator++(int) definition garbled</h3> +<p><b>Section:</b> 24.5.3.4 [istreambuf.iterator::op++] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Following the definition of istreambuf_iterator<>::operator++(int) in paragraph 3, the standard contains three lines of garbage text left over from a previous edit. </p> @@ -1252,27 +1791,54 @@ contains (not inherits) the public static member sbuf_->sbumpc(); return(tmp); </pre> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>In 24.5.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::op++"> [lib.istreambuf.iterator::op++]</a>, delete the three lines of code at the +<p>In 24.5.3.4 [istreambuf.iterator::op++], delete the three lines of code at the end of paragraph 3. </p> + + + + + <hr> -<a name="40"><h3>40. Meaningless normative paragraph in examples</h3></a><p><b>Section:</b> 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="40"></a>40. Meaningless normative paragraph in examples</h3> +<p><b>Section:</b> 22.2.8 [facets.examples] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facets.examples">issues</a> in [facets.examples].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 3 of the locale examples is a description of part of an implementation technique that has lost its referent, and doesn't mean anything. </p> + + <p><b>Proposed resolution:</b></p> -<p>Delete 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> paragraph 3 which begins "This +<p>Delete 22.2.8 [facets.examples] paragraph 3 which begins "This initialization/identification system depends...", or (at the editor's option) replace it with a place-holder to keep the paragraph numbering the same. </p> + + + + + <hr> -<a name="41"><h3>41. Ios_base needs clear(), exceptions()</h3></a><p><b>Section:</b> 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> -<p>The description of ios_base::iword() and pword() in 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a>, say that if they fail, they "set badbit, +<h3><a name="41"></a>41. Ios_base needs clear(), exceptions()</h3> +<p><b>Section:</b> 27.4.2 [ios.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base">issues</a> in [ios.base].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#157">157</a></p> +<p><b>Discussion:</b></p> +<p>The description of ios_base::iword() and pword() in 27.4.2.4 [ios.members.static], say that if they fail, they "set badbit, which may throw an exception". However, ios_base offers no interface to set or to test badbit; those interfaces are defined in basic_ios<>. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change the description in 27.4.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.storage"> [lib.ios.base.storage]</a> in +<p>Change the description in 27.4.2.5 [ios.base.storage] in paragraph 2, and also in paragraph 4, as follows. Replace</p> <blockquote> @@ -1291,8 +1857,19 @@ paragraph 2, and also in paragraph 4, as follows. Replace</p> <p><i>[Kona: LWG reviewed wording; setstate(failbit) changed to setstate(badbit).]</i></p> + + + + + + <hr> -<a name="42"><h3>42. String ctors specify wrong default allocator</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="42"></a>42. String ctors specify wrong default allocator</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The basic_string<> copy constructor: </p> <pre>basic_string(const basic_string& str, size_type pos = 0, @@ -1307,8 +1884,10 @@ default-argument notation, overloading suffices. </p> vector) do not have this form of constructor, so it is inconsistent, and an evident source of confusion, for basic_string<> to have it, so it might better be removed. </p> + + <p><b>Proposed resolution:</b></p> -<p> In 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, replace the declaration of the copy +<p> In 21.3 [basic.string], replace the declaration of the copy constructor as follows: </p> <blockquote> @@ -1317,20 +1896,22 @@ basic_string(const basic_string& str, size_type pos, size_type n = npos, const Allocator& a = Allocator());</pre> </blockquote> -<p>In 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, replace the copy constructor declaration +<p>In 21.3.1 [string.require], replace the copy constructor declaration as above. Add to paragraph 5, Effects:</p> <blockquote> <p>In the first form, the Allocator value used is copied from <tt>str.get_allocator()</tt>.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>The LWG believes the constructor is actually broken, rather than just an unfortunate design choice.</p> <p>The LWG considered two other possible resolutions:</p> -<p>A. In 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, replace the declaration of the copy +<p>A. In 21.3 [basic.string], replace the declaration of the copy constructor as follows:</p> <blockquote> @@ -1340,7 +1921,7 @@ basic_string(const basic_string& str, size_type pos, size_type n, const Allocator& a); </pre> </blockquote> -<p>In 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, replace the copy constructor declaration +<p>In 21.3.1 [string.require], replace the copy constructor declaration as above. Add to paragraph 5, Effects: </p> <blockquote> @@ -1348,7 +1929,7 @@ as above. Add to paragraph 5, Effects: </p> value <tt>str.get_allocator()</tt>. </p> </blockquote> -<p>B. In 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, and also in 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, replace +<p>B. In 21.3 [basic.string], and also in 21.3.1 [string.require], replace the declaration of the copy constructor as follows: </p> <blockquote> @@ -1364,32 +1945,44 @@ a small amount of existing code to now work correctly."</p> Kona: issue editing snafu fixed - the proposed resolution now correctly reflects the LWG consensus. ]</i></p> + + + + + + <hr> -<a name="44"><h3>44. Iostreams use operator== on int_type values</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 6 Aug 1998</p> +<h3><a name="44"></a>44. Iostreams use operator== on int_type values</h3> +<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Many of the specifications for iostreams specify that character values or their int_type equivalents are compared using operators == or !=, though in other places traits::eq() or traits::eq_int_type is specified to be used throughout. This is an inconsistency; we should change uses of == and != to use the traits members instead. </p> + + <p><b>Proposed resolution:</b></p> <p><i>[Pre-Kona: Dietmar supplied wording]</i></p> + <p>List of changes to clause 27:</p> <ol> <li> In lib.basic.ios.members paragraph 13 (postcondition clause for 'fill(cT)') change -<blockquote> - fillch == fill() -</blockquote> +<blockquote><pre> fillch == fill() +</pre></blockquote> to -<blockquote> - traits::eq(fillch, fill()) -</blockquote> +<blockquote><pre> traits::eq(fillch, fill()) +</pre></blockquote> </li> @@ -1397,92 +1990,80 @@ change uses of == and != to use the traits members instead. </p> In lib.istream.unformatted paragraph 7 (effects clause for 'get(cT,streamsize,cT)'), third bullet, change -<blockquote> - c == delim for the next available input character c -</blockquote> +<blockquote><pre> c == delim for the next available input character c +</pre></blockquote> to -<blockquote> - traits::eq(c, delim) for the next available input character c - </blockquote> +<blockquote><pre> traits::eq(c, delim) for the next available input character c +</pre></blockquote> </li> <li> In lib.istream.unformatted paragraph 12 (effects clause for 'get(basic_streambuf<cT,Tr>&,cT)'), third bullet, change -<blockquote> - c == delim for the next available input character c -</blockquote> +<blockquote><pre> c == delim for the next available input character c +</pre></blockquote> to -<blockquote> - traits::eq(c, delim) for the next available input character c -</blockquote> +<blockquote><pre> traits::eq(c, delim) for the next available input character c +</pre></blockquote> </li> <li> In lib.istream.unformatted paragraph 17 (effects clause for 'getline(cT,streamsize,cT)'), second bullet, change -<blockquote> - c == delim for the next available input character c -</blockquote> +<blockquote><pre> c == delim for the next available input character c +</pre></blockquote> to -<blockquote> - traits::eq(c, delim) for the next available input character c - </blockquote> +<blockquote><pre> traits::eq(c, delim) for the next available input character c + </pre></blockquote> </li> <li> In lib.istream.unformatted paragraph 24 (effects clause for 'ignore(int,int_type)'), second bullet, change -<blockquote> - c == delim for the next available input character c -</blockquote> +<blockquote><pre> c == delim for the next available input character c +</pre></blockquote> to -<blockquote> - traits::eq_int_type(c, delim) for the next available input +<blockquote><pre> traits::eq_int_type(c, delim) for the next available input character c -</blockquote> +</pre></blockquote> </li> <li> In lib.istream.unformatted paragraph 25 (notes clause for 'ignore(int,int_type)'), second bullet, change -<blockquote> - The last condition will never occur if delim == traits::eof() -</blockquote> +<blockquote><pre> The last condition will never occur if delim == traits::eof() +</pre></blockquote> to -<blockquote> - The last condition will never occur if +<blockquote><pre> The last condition will never occur if traits::eq_int_type(delim, traits::eof()). -</blockquote> +</pre></blockquote> </li> <li> In lib.istream.sentry paragraph 6 (example implementation for the sentry constructor) change -<blockquote> - while ((c = is.rdbuf()->snextc()) != traits::eof()) { -</blockquote> +<blockquote><pre> while ((c = is.rdbuf()->snextc()) != traits::eof()) { +</pre></blockquote> to -<blockquote> - while (!traits::eq_int_type(c = is.rdbuf()->snextc(), traits::eof())) { -</blockquote> +<blockquote><pre> while (!traits::eq_int_type(c = is.rdbuf()->snextc(), traits::eof())) { +</pre></blockquote> </li> </ol> @@ -1494,105 +2075,91 @@ change uses of == and != to use the traits members instead. </p> In lib.string::find paragraph 1 (effects clause for find()), second bullet, change -<blockquote> - at(xpos+I) == str.at(I) for all elements ... -</blockquote> +<blockquote><pre> at(xpos+I) == str.at(I) for all elements ... +</pre></blockquote> to -<blockquote> - traits::eq(at(xpos+I), str.at(I)) for all elements ... -</blockquote> +<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ... +</pre></blockquote> </li> <li> In lib.string::rfind paragraph 1 (effects clause for rfind()), second bullet, change -<blockquote> - at(xpos+I) == str.at(I) for all elements ... -</blockquote> +<blockquote><pre> at(xpos+I) == str.at(I) for all elements ... +</pre></blockquote> to -<blockquote> - traits::eq(at(xpos+I), str.at(I)) for all elements ... -</blockquote> +<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ... +</pre></blockquote> </li> <li> In lib.string::find.first.of paragraph 1 (effects clause for find_first_of()), second bullet, change -<blockquote> - at(xpos+I) == str.at(I) for all elements ... -</blockquote> +<blockquote><pre> at(xpos+I) == str.at(I) for all elements ... +</pre></blockquote> to -<blockquote> - traits::eq(at(xpos+I), str.at(I)) for all elements ... -</blockquote> +<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ... +</pre></blockquote> </li> <li> In lib.string::find.last.of paragraph 1 (effects clause for find_last_of()), second bullet, change -<blockquote> - at(xpos+I) == str.at(I) for all elements ... -</blockquote> +<blockquote><pre> at(xpos+I) == str.at(I) for all elements ... +</pre></blockquote> to -<blockquote> - traits::eq(at(xpos+I), str.at(I)) for all elements ... -</blockquote> +<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ... +</pre></blockquote> </li> <li> In lib.string::find.first.not.of paragraph 1 (effects clause for find_first_not_of()), second bullet, change -<blockquote> - at(xpos+I) == str.at(I) for all elements ... -</blockquote> +<blockquote><pre> at(xpos+I) == str.at(I) for all elements ... +</pre></blockquote> to -<blockquote> - traits::eq(at(xpos+I), str.at(I)) for all elements ... -</blockquote> +<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ... +</pre></blockquote> </li> <li> In lib.string::find.last.not.of paragraph 1 (effects clause for find_last_not_of()), second bullet, change -<blockquote> - at(xpos+I) == str.at(I) for all elements ... -</blockquote> +<blockquote><pre> at(xpos+I) == str.at(I) for all elements ... +</pre></blockquote> to -<blockquote> - traits::eq(at(xpos+I), str.at(I)) for all elements ... -</blockquote> +<blockquote><pre> traits::eq(at(xpos+I), str.at(I)) for all elements ... +</pre></blockquote> </li> <li> In lib.string.ios paragraph 5 (effects clause for getline()), second bullet, change -<blockquote> - c == delim for the next available input character c -</blockquote> +<blockquote><pre> c == delim for the next available input character c +</pre></blockquote> to -<blockquote> - traits::eq(c, delim) for the next available input character c -</blockquote> +<blockquote><pre> traits::eq(c, delim) for the next available input character c +</pre></blockquote> </li> </ol> @@ -1630,11 +2197,20 @@ change uses of == and != to use the traits members instead. </p> </li> </ul> + + + + + <hr> -<a name="46"><h3>46. Minor Annex D errors</h3></a><p><b>Section:</b> D.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.str.strstreams"> [depr.str.strstreams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1 Jun 1998</p> -<p>See lib-6522 and edit-814.</p> +<h3><a name="46"></a>46. Minor Annex D errors</h3> +<p><b>Section:</b> D.7 [depr.str.strstreams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Brendan Kehoe <b>Date:</b> 1998-06-01</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p><p>See lib-6522 and edit-814.</p> + <p><b>Proposed resolution:</b></p> -<p>Change D.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf"> [depr.strstreambuf]</a> (since streambuf is a typedef of +<p>Change D.7.1 [depr.strstreambuf] (since streambuf is a typedef of basic_streambuf<char>) from:</p> <pre> virtual streambuf<char>* setbuf(char* s, streamsize n);</pre> @@ -1643,7 +2219,7 @@ basic_streambuf<char>) from:</p> <pre> virtual streambuf* setbuf(char* s, streamsize n);</pre> -<p>In D.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstream"> [depr.strstream]</a> insert the semicolon now missing after +<p>In D.7.4 [depr.strstream] insert the semicolon now missing after int_type:</p> <pre> namespace std { @@ -1654,28 +2230,61 @@ int_type:</p> typedef char char_type; typedef typename char_traits<char>::int_type int_type typedef typename char_traits<char>::pos_type pos_type;</pre> + + + + + <hr> -<a name="47"><h3>47. Imbue() and getloc() Returns clauses swapped</h3></a><p><b>Section:</b> 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 21 Jun 1998</p> +<h3><a name="47"></a>47. Imbue() and getloc() Returns clauses swapped</h3> +<p><b>Section:</b> 27.4.2.3 [ios.base.locales] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.locales">issues</a> in [ios.base.locales].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Section 27.4.2.3 specifies how imbue() and getloc() work. That section has two RETURNS clauses, and they make no sense as stated. They make perfect sense, though, if you swap them. Am I correct in thinking that paragraphs 2 and 4 just got mixed up by accident?</p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> swap paragraphs 2 and 4.</p> +<p>In 27.4.2.3 [ios.base.locales] swap paragraphs 2 and 4.</p> + + + + + <hr> -<a name="48"><h3>48. Use of non-existent exception constructor</h3></a><p><b>Section:</b> 27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 21 Jun 1998</p> +<h3><a name="48"></a>48. Use of non-existent exception constructor</h3> +<p><b>Section:</b> 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios::failure">issues</a> in [ios::failure].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>27.4.2.1.1, paragraph 2, says that class failure initializes the base class, exception, with exception(msg). Class exception (see 18.6.1) has no such constructor.</p> + + <p><b>Proposed resolution:</b></p> -<p>Replace 27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a>, paragraph 2, with</p> +<p>Replace 27.4.2.1.1 [ios::failure], paragraph 2, with</p> <blockquote> <p>EFFECTS: Constructs an object of class <tt>failure</tt>.</p> </blockquote> + + + + + <hr> -<a name="49"><h3>49. Underspecification of ios_base::sync_with_stdio</h3></a><p><b>Section:</b> 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 21 Jun 1998</p> +<h3><a name="49"></a>49. Underspecification of ios_base::sync_with_stdio</h3> +<p><b>Section:</b> 27.4.2.4 [ios.members.static] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Two problems</p> <p>(1) 27.4.2.4 doesn't say what ios_base::sync_with_stdio(f) @@ -1687,8 +2296,10 @@ doesn't say so.</p> synchronized with stdio. Again, of course, I can make some guesses. (And I'm unhappy about the performance implications of those guesses, but that's another matter.)</p> + + <p><b>Proposed resolution:</b></p> -<p>Change the following sentence in 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a> +<p>Change the following sentence in 27.4.2.4 [ios.members.static] returns clause from:</p> <blockquote> @@ -1704,7 +2315,7 @@ returns clause from:</p> <tt>false</tt>.</p> </blockquote> -<p>Add the following immediately after 27.4.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.members.static"> [lib.ios.members.static]</a>, +<p>Add the following immediately after 27.4.2.4 [ios.members.static], paragraph 2:</p> <blockquote> @@ -1745,11 +2356,23 @@ and a standard stdio object share a buffer. <i>--End Footnote</i>]</p> <p><i>[pre-Copenhagen: PJP and Matt contributed the definition of "synchronization"]</i></p> + <p><i>[post-Copenhagen: proposed resolution was revised slightly: text was added in the non-normative footnote to say that operations on the two streams can be mixed arbitrarily.]</i></p> + + + + + + <hr> -<a name="50"><h3>50. Copy constructor and assignment operator of ios_base</h3></a><p><b>Section:</b> 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 21 Jun 1998</p> +<h3><a name="50"></a>50. Copy constructor and assignment operator of ios_base</h3> +<p><b>Section:</b> 27.4.2 [ios.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base">issues</a> in [ios.base].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>As written, ios_base has a copy constructor and an assignment operator. (Nothing in the standard says it doesn't have one, and all classes have copy constructors and assignment operators unless you @@ -1768,14 +2391,29 @@ entire state of a stream for future use. As you note, to carry out that intention would have required a explicit description of the semantics (e.g. what happens to the iarray and parray stuff). </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a>, class ios_base, specify the copy +<p>In 27.4.2 [ios.base], class ios_base, specify the copy constructor and operator= members as being private.</p> + + <p><b>Rationale:</b></p> <p>The LWG believes the difficulty of specifying correct semantics outweighs any benefit of allowing ios_base objects to be copyable.</p> + + + + + <hr> -<a name="51"><h3>51. Requirement to not invalidate iterators missing</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> David Vandevoorde <b>Date:</b> 23 Jun 1998</p> +<h3><a name="51"></a>51. Requirement to not invalidate iterators missing</h3> +<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#TC">TC</a> + <b>Submitter:</b> David Vandevoorde <b>Date:</b> 1998-06-23</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The std::sort algorithm can in general only sort a given sequence by moving around values. The list<>::sort() member on the other hand could move around values or just update internal pointers. Either @@ -1805,6 +2443,8 @@ didn't find it for list. It looks like it just got omitted. </p> invalidate any iterators and does not change the values that any iterator points to. There would be no reason to have the member function otherwise.</p> + + <p><b>Proposed resolution:</b></p> <p>Add a new paragraph at the end of 23.1:</p> @@ -1814,22 +2454,33 @@ function otherwise.</p> argument to a library function shall not invalidate iterators to, or change the values of, objects within that container. </p> </blockquote> + + <p><b>Rationale:</b></p> <p>This was US issue CD2-23-011; it was accepted in London but the change was not made due to an editing oversight. The wording in the proposed resolution below is somewhat updated from CD2-23-011, particularly the addition of the phrase "or change the values of"</p> + + + + + <hr> -<a name="52"><h3>52. Small I/O problems</h3></a><p><b>Section:</b> 27.4.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.operations"> [lib.fpos.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 23 Jun 1998</p> -<p>First, 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>, table 89. This is pretty obvious: +<h3><a name="52"></a>52. Small I/O problems</h3> +<p><b>Section:</b> 27.4.3.2 [fpos.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>First, 27.4.4.1 [basic.ios.cons], table 89. This is pretty obvious: it should be titled "basic_ios<>() effects", not "ios_base() effects". </p> <p>[The second item is a duplicate; see issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#6">6</a> for resolution.]</p> -<p>Second, 27.4.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.operations"> [lib.fpos.operations]</a> table 88 . There are a couple +<p>Second, 27.4.3.2 [fpos.operations] table 88 . There are a couple different things wrong with it, some of which I've already discussed with Jerry, but the most obvious mechanical sort of error is that it uses expressions like P(i) and p(i), without ever defining what sort @@ -1843,44 +2494,82 @@ tells me that the intention was to require syntactic support for streampos arithmetic, but that it wasn't actually supposed to do anything meaningful except on platforms, like Unix, where genuine arithmetic is possible.) </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a> table 89 title from +<p>Change 27.4.4.1 [basic.ios.cons] table 89 title from "ios_base() effects" to "basic_ios<>() effects". </p> + + + + + <hr> -<a name="53"><h3>53. Basic_ios destructor unspecified</h3></a><p><b>Section:</b> 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 23 Jun 1998</p> +<h3><a name="53"></a>53. Basic_ios destructor unspecified</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>There's nothing in 27.4.4 saying what basic_ios's destructor does. The important question is whether basic_ios::~basic_ios() destroys rdbuf().</p> + + <p><b>Proposed resolution:</b></p> -<p>Add after 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a> paragraph 2:</p> +<p>Add after 27.4.4.1 [basic.ios.cons] paragraph 2:</p> <blockquote> <p><tt>virtual ~basic_ios();</tt></p> <p><b>Notes</b>: The destructor does not destroy <tt>rdbuf()</tt>.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>The LWG reviewed the additional question of whether or not <tt>rdbuf(0)</tt> may set <tt>badbit</tt>. The answer is -clearly yes; it may be set via <tt>clear()</tt>. See 27.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.members"> [lib.basic.ios.members]</a>, paragraph 6. This issue was reviewed at length +clearly yes; it may be set via <tt>clear()</tt>. See 27.4.4.2 [basic.ios.members], paragraph 6. This issue was reviewed at length by the LWG, which removed from the original proposed resolution a footnote which incorrectly said "<tt>rdbuf(0)</tt> does not set <tt>badbit</tt>".</p> + + + + + <hr> -<a name="54"><h3>54. Basic_streambuf's destructor</h3></a><p><b>Section:</b> 27.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.cons"> [lib.streambuf.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 25 Jun 1998</p> +<h3><a name="54"></a>54. Basic_streambuf's destructor</h3> +<p><b>Section:</b> 27.5.2.1 [streambuf.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-25</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.cons">issues</a> in [streambuf.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The class synopsis for basic_streambuf shows a (virtual) destructor, but the standard doesn't say what that destructor does. My assumption is that it does nothing, but the standard should say so explicitly. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add after 27.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.cons"> [lib.streambuf.cons]</a> paragraph 2:</p> +<p>Add after 27.5.2.1 [streambuf.cons] paragraph 2:</p> <blockquote> <p><tt>virtual ~basic_streambuf();</tt></p> <p><b>Effects</b>: None.</p> </blockquote> + + + + + <hr> -<a name="55"><h3>55. Invalid stream position is undefined</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 26 Jun 1998</p> +<h3><a name="55"></a>55. Invalid stream position is undefined</h3> +<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-26</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Several member functions in clause 27 are defined in certain circumstances to return an "invalid stream position", a term that is defined nowhere in the standard. Two places (27.5.2.4.2, @@ -1901,52 +2590,75 @@ should not be changed. Here are the three places where "invalid stream position" should not be changed:</p> <blockquote> - <p>27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>, paragraph 14<br> - 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 14<br> - D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 17 + <p>27.7.1.4 [stringbuf.virtuals], paragraph 14<br> + 27.8.1.5 [filebuf.virtuals], paragraph 14<br> + D.7.1.3 [depr.strstreambuf.virtuals], paragraph 17 </p> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>In 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>, paragraph 4, change "Returns an +<p>In 27.5.2.4.2 [streambuf.virt.buffer], paragraph 4, change "Returns an object of class pos_type that stores an invalid stream position (_lib.iostreams.definitions_)" to "Returns <tt>pos_type(off_type(-1))</tt>". </p> -<p>In 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>, paragraph 6, change "Returns +<p>In 27.5.2.4.2 [streambuf.virt.buffer], paragraph 6, change "Returns an object of class pos_type that stores an invalid stream position" to "Returns <tt>pos_type(off_type(-1))</tt>".</p> -<p>In 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>, paragraph 13, change "the object +<p>In 27.7.1.4 [stringbuf.virtuals], paragraph 13, change "the object stores an invalid stream position" to "the return value is <tt>pos_type(off_type(-1))</tt>". </p> -<p>In 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 13, change "returns an +<p>In 27.8.1.5 [filebuf.virtuals], paragraph 13, change "returns an invalid stream position (27.4.3)" to "returns <tt>pos_type(off_type(-1))</tt>" </p> -<p>In 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 15, change "Otherwise +<p>In 27.8.1.5 [filebuf.virtuals], paragraph 15, change "Otherwise returns an invalid stream position (_lib.iostreams.definitions_)" to "Otherwise returns <tt>pos_type(off_type(-1))</tt>" </p> -<p>In D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 15, change "the object +<p>In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 15, change "the object stores an invalid stream position" to "the return value is <tt>pos_type(off_type(-1))</tt>" </p> -<p>In D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 18, change "the object +<p>In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 18, change "the object stores an invalid stream position" to "the return value is <tt>pos_type(off_type(-1))</tt>"</p> + + + + + <hr> -<a name="56"><h3>56. Showmanyc's return type</h3></a><p><b>Section:</b> 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 29 Jun 1998</p> +<h3><a name="56"></a>56. Showmanyc's return type</h3> +<p><b>Section:</b> 27.5.2 [streambuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-06-29</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf">issues</a> in [streambuf].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The class summary for basic_streambuf<>, in 27.5.2, says that showmanyc has return type int. However, 27.5.2.4.3 says that its return type is streamsize. </p> + + <p><b>Proposed resolution:</b></p> <p>Change <tt>showmanyc</tt>'s return type in the -27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> class summary to <tt>streamsize</tt>.</p> +27.5.2 [streambuf] class summary to <tt>streamsize</tt>.</p> + + + + + <hr> -<a name="57"><h3>57. Mistake in char_traits</h3></a><p><b>Section:</b> 21.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.specializations.wchar.t"> [lib.char.traits.specializations.wchar.t]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 1 Jul 1998</p> +<h3><a name="57"></a>57. Mistake in char_traits</h3> +<p><b>Section:</b> 21.1.3.4 [char.traits.specializations.wchar.t] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-01</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>21.1.3.2, paragraph 3, says "The types streampos and wstreampos may be different if the implementation supports no shift encoding in narrow-oriented iostreams but supports one or more shift @@ -1959,12 +2671,23 @@ fpos<char_traits<wchar_t>::state_type>, and, flipping back to clause 21, we see in 21.1.3.1 and 21.1.3.2 that char_traits<char>::state_type and char_traits<wchar_t>::state_type must both be mbstate_t. </p> + + <p><b>Proposed resolution:</b></p> -<p>Remove the sentence in 21.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.specializations.wchar.t"> [lib.char.traits.specializations.wchar.t]</a> paragraph 3 which +<p>Remove the sentence in 21.1.3.4 [char.traits.specializations.wchar.t] paragraph 3 which begins "The types streampos and wstreampos may be different..." . </p> + + + + + <hr> -<a name="59"><h3>59. Ambiguity in specification of gbump</h3></a><p><b>Section:</b> 27.5.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.get.area"> [lib.streambuf.get.area]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 28 Jul 1998</p> +<h3><a name="59"></a>59. Ambiguity in specification of gbump</h3> +<p><b>Section:</b> 27.5.2.3.2 [streambuf.get.area] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-07-28</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>27.5.2.3.1 says that basic_streambuf::gbump() "Advances the next pointer for the input sequence by n." </p> @@ -1976,8 +2699,10 @@ pbump. </p> <p>(The "classic" AT&T implementation used the former interpretation.)</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.5.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.get.area"> [lib.streambuf.get.area]</a> paragraph 4 gbump effects from:</p> +<p>Change 27.5.2.3.2 [streambuf.get.area] paragraph 4 gbump effects from:</p> <blockquote> <p>Effects: Advances the next pointer for the input sequence by n.</p> @@ -1989,10 +2714,21 @@ former interpretation.)</p> <p>Effects: Adds <tt>n</tt> to the next pointer for the input sequence.</p> </blockquote> -<p>Make the same change to 27.5.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.put.area"> [lib.streambuf.put.area]</a> paragraph 4 pbump +<p>Make the same change to 27.5.2.3.3 [streambuf.put.area] paragraph 4 pbump effects.</p> + + + + + <hr> -<a name="60"><h3>60. What is a formatted input function?</h3></a><p><b>Section:</b> 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 3 Aug 1998</p> +<h3><a name="60"></a>60. What is a formatted input function?</h3> +<p><b>Section:</b> 27.6.1.2.1 [istream.formatted.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-03</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.reqmts">issues</a> in [istream.formatted.reqmts].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#162">162</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#163">163</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#166">166</a></p> +<p><b>Discussion:</b></p> <p>Paragraph 1 of 27.6.1.2.1 contains general requirements for all formatted input functions. Some of the functions defined in section 27.6.1.2 explicitly say that those requirements apply ("Behaves @@ -2024,16 +2760,18 @@ that the "Common requirements" listed in section 27.6.1.2.1 apply to them. </p> <p>Additional comments from Dietmar Kühl: It appears to be somewhat -nonsensical to consider the functions defined in 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> paragraphs 1 to 5 to be "Formatted input +nonsensical to consider the functions defined in 27.6.1.2.3 +[istream::extractors] paragraphs 1 to 5 to be "Formatted input function" but since these functions are defined in a section labeled "Formatted input functions" it is unclear to me whether these operators are considered formatted input functions which -have to conform to the "common requirements" from 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>: If this is the case, all manipulators, not +have to conform to the "common requirements" from 27.6.1.2.1 +[istream.formatted.reqmts]: If this is the case, all manipulators, not just <tt>ws</tt>, would skip whitespace unless <tt>noskipws</tt> is set (... but setting <tt>noskipws</tt> using the manipulator syntax would also skip whitespace :-)</p> <p>It is not clear which functions are to be considered unformatted input functions. As written, it seems -that all functions in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> are unformatted input +that all functions in 27.6.1.3 [istream.unformatted] are unformatted input functions. However, it does not really make much sense to construct a sentry object for <tt>gcount()</tt>, <tt>sync()</tt>, ... Also it is unclear what happens to the <tt>gcount()</tt> if @@ -2049,6 +2787,8 @@ function <tt>putback()</tt> did "extract" back into the stream). Correspondingly for <tt>unget()</tt>. Is this what is intended? If so, this should be clarified. Otherwise, a corresponding clarification should be used.</p> + + <p><b>Proposed resolution:</b></p> <p> In 27.6.1.2.2 [lib.istream.formatted.arithmetic], paragraph 1. @@ -2283,12 +3023,25 @@ In 27.6.2.6 [lib.ostream.unformatted], paragraph 7. Add a new sentence at the end of the paragraph: "Does not behave as an unformatted output function (as described in 27.6.2.6, paragraph 1)." </p> + + <p><b>Rationale:</b></p> <p>See J16/99-0043==WG21/N1219, Proposed Resolution to Library Issue 60, by Judy Ward and Matt Austern. This proposed resolution is section VI of that paper.</p> + + + + + <hr> -<a name="61"><h3>61. Ambiguity in iostreams exception policy</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 6 Aug 1998</p> +<h3><a name="61"></a>61. Ambiguity in iostreams exception policy</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-06</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The introduction to the section on unformatted input (27.6.1.3) says that every unformatted input function catches all exceptions that were thrown during input, sets badbit, and then conditionally rethrows @@ -2312,6 +3065,8 @@ this concrete, suppose you have the following snippet. </p> <p>Now suppose we reach EOF before we've read N characters. What iostate bits can we expect to be set, and what exception (if any) will be thrown? </p> + + <p><b>Proposed resolution:</b></p> <p> In 27.6.1.3, paragraph 1, after the sentence that begins @@ -2319,29 +3074,56 @@ In 27.6.1.3, paragraph 1, after the sentence that begins parenthetical comment: "(Exceptions thrown from <tt>basic_ios<>::clear()</tt> are not caught or rethrown.)" </p> + + <p><b>Rationale:</b></p> <p>The LWG looked to two alternative wordings, and choose the proposed resolution as better standardese.</p> + + + + + <hr> -<a name="62"><h3>62. <tt>Sync</tt>'s return value</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 6 Aug 1998</p> +<h3><a name="62"></a>62. <tt>Sync</tt>'s return value</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-06</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The Effects clause for sync() (27.6.1.3, paragraph 36) says that it "calls rdbuf()->pubsync() and, if that function returns -1 ... returns traits::eof()." </p> <p>That looks suspicious, because traits::eof() is of type traits::int_type while the return type of sync() is int. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>, paragraph 36, change "returns +<p>In 27.6.1.3 [istream.unformatted], paragraph 36, change "returns <tt>traits::eof()</tt>" to "returns <tt>-1</tt>". </p> + + + + + <hr> -<a name="63"><h3>63. Exception-handling policy for unformatted output</h3></a><p><b>Section:</b> 27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 11 Aug 1998</p> +<h3><a name="63"></a>63. Exception-handling policy for unformatted output</h3> +<p><b>Section:</b> 27.6.2.7 [ostream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-11</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.unformatted">issues</a> in [ostream.unformatted].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Clause 27 details an exception-handling policy for formatted input, unformatted input, and formatted output. It says nothing for unformatted output (27.6.2.6). 27.6.2.6 should either include the same kind of exception-handling policy as in the other three places, or else it should have a footnote saying that the omission is deliberate. </p> + + <p><b>Proposed resolution:</b></p> <p> In 27.6.2.6, paragraph 1, replace the last sentence ("In any @@ -2349,7 +3131,7 @@ case, the unformatted output function ends by destroying the sentry object, then returning the value specified for the formatted output function.") with the following text: </p> -<blockquote> +<blockquote><p> If an exception is thrown during output, then <tt>ios::badbit</tt> is turned on [Footnote: without causing an <tt>ios::failure</tt> to be thrown.] in <tt>*this</tt>'s error state. If <tt>(exceptions() & @@ -2357,20 +3139,33 @@ badbit) != 0</tt> then the exception is rethrown. In any case, the unformatted output function ends by destroying the sentry object, then, if no exception was thrown, returning the value specified for the formatted output function. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p> This exception-handling policy is consistent with that of formatted input, unformatted input, and formatted output. </p> + + + + + <hr> -<a name="64"><h3>64. Exception handling in <tt>basic_istream::operator>>(basic_streambuf*)</tt> -</h3></a><p><b>Section:</b> 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 11 Aug 1998 </p> +<h3><a name="64"></a>64. Exception handling in <tt>basic_istream::operator>>(basic_streambuf*)</tt></h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>27.6.1.2.3, paragraph 13, is ambiguous. It can be interpreted two different ways, depending on whether the second sentence is read as an elaboration of the first. </p> + + <p><b>Proposed resolution:</b></p> -<p>Replace 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>, paragraph 13, which begins +<p>Replace 27.6.1.2.3 [istream::extractors], paragraph 13, which begins "If the function inserts no characters ..." with:</p> <blockquote> @@ -2381,15 +3176,27 @@ elaboration of the first. </p> from <tt>sb</tt> and <tt>failbit</tt> is on in <tt>exceptions()</tt> (27.4.4.3), then the caught exception is rethrown. </p> </blockquote> + + + + + <hr> -<a name="66"><h3>66. Strstreambuf::setbuf</h3></a><p><b>Section:</b> D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 18 Aug 1998</p> +<h3><a name="66"></a>66. Strstreambuf::setbuf</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-08-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>D.7.1.3, paragraph 19, says that strstreambuf::setbuf "Performs an operation that is defined separately for each class derived from strstreambuf". This is obviously an incorrect cut-and-paste from basic_streambuf. There are no classes derived from strstreambuf. </p> + + <p><b>Proposed resolution:</b></p> -<p>D.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstreambuf.virtuals"> [depr.strstreambuf.virtuals]</a>, paragraph 19, replace the setbuf effects +<p>D.7.1.3 [depr.strstreambuf.virtuals], paragraph 19, replace the setbuf effects clause which currently says "Performs an operation that is defined separately for each class derived from strstreambuf" with:</p> @@ -2398,8 +3205,18 @@ with:</p> <p><b>Effects</b>: implementation defined, except that <tt>setbuf(0,0)</tt> has no effect.</p> </blockquote> + + + + + <hr> -<a name="68"><h3>68. Extractors for char* should store null at end</h3></a><p><b>Section:</b> 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 14 Jul 1998</p> +<h3><a name="68"></a>68. Extractors for char* should store null at end</h3> +<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#TC">TC</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1998-07-14</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Extractors for char* (27.6.1.2.3) do not store a null character after the extracted character sequence whereas the unformatted functions like get() do. Why is this?</p> @@ -2408,32 +3225,46 @@ functions like get() do. Why is this?</p> glitch. You'll notice that the last item of the list of what stops extraction doesn't make any sense. It was supposed to be the line that said a null is stored.</p> + + <p><b>Proposed resolution:</b></p> -<p>27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a>, paragraph 7, change the last list +<p>27.6.1.2.3 [istream::extractors], paragraph 7, change the last list item from:</p> -<blockquote> +<blockquote><p> A null byte (<tt>charT()</tt>) in the next position, which may be the first position if no characters were extracted. -</blockquote> +</p></blockquote> <p>to become a new paragraph which reads:</p> -<blockquote> +<blockquote><p> Operator>> then stores a null byte (<tt>charT()</tt>) in the next position, which may be the first position if no characters were extracted. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="69"><h3>69. Must elements of a vector be contiguous?</h3></a><p><b>Section:</b> 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 29 Jul 1998</p> +<h3><a name="69"></a>69. Must elements of a vector be contiguous?</h3> +<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1998-07-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The issue is this: Must the elements of a vector be in contiguous memory?</p> <p>(Please note that this is entirely separate from the question of whether a vector iterator is required to be a pointer; the answer to that question is clearly "no," as it would rule out debugging implementations)</p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following text to the end of 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, +<p>Add the following text to the end of 23.2.5 [vector], paragraph 1. </p> <blockquote> @@ -2442,6 +3273,8 @@ paragraph 1. </p> other than <tt>bool</tt>, then it obeys the identity <tt>&v[n] == &v[0] + n</tt> for all <tt>0 <= n < v.size()</tt>.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>The LWG feels that as a practical matter the answer is clearly "yes". There was considerable discussion as to the best way @@ -2450,15 +3283,25 @@ directly defined in the standard. Discussion included:</p> <ul> <li>An operational definition similar to the above proposed resolution is - already used for valarray (<font color="red">26.3.2.3</font>).</li> + already used for valarray (26.5.2.3 [valarray.access]).</li> <li>There is no need to explicitly consider a user-defined operator& - because elements must be copyconstructible (23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> para 3) - and copyconstructible (20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>) specifies + because elements must be copyconstructible (23.1 [container.requirements] para 3) + and copyconstructible (20.1.1 [utility.arg.requirements]) specifies requirements for operator&.</li> <li>There is no issue of one-past-the-end because of language rules.</li> </ul> + + + + + <hr> -<a name="70"><h3>70. Uncaught_exception() missing throw() specification</h3></a><p><b>Section:</b> 18.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.exception"> [lib.support.exception]</a>, 18.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.uncaught"> [lib.uncaught]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> Unknown</p> +<h3><a name="70"></a>70. Uncaught_exception() missing throw() specification</h3> +<p><b>Section:</b> 18.7 [support.exception], 18.7.4 [uncaught] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-08-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In article 3E04@pratique.fr, Valentin Bonnard writes: </p> <p>uncaught_exception() doesn't have a throw specification.</p> @@ -2468,42 +3311,74 @@ handle exceptions thrown from uncaught_exception() ?</p> <p>uncaught_exception() is called in exception handling contexts where exception safety is very important.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 15.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/except.html#except.uncaught"> [except.uncaught]</a>, paragraph 1, 18.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.exception"> [lib.support.exception]</a>, and 18.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.uncaught"> [lib.uncaught]</a>, add "throw()" to uncaught_exception().</p> +<p>In 15.5.3 [except.uncaught], paragraph 1, 18.7 [support.exception], +and 18.7.4 [uncaught], add "throw()" to uncaught_exception().</p> + + + + <hr> -<a name="71"><h3>71. Do_get_monthname synopsis missing argument</h3></a><p><b>Section:</b> 22.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get"> [lib.locale.time.get]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 13 Aug 1998</p> +<h3><a name="71"></a>71. Do_get_monthname synopsis missing argument</h3> +<p><b>Section:</b> 22.2.5.1 [locale.time.get] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-08-13</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The locale facet member <tt>time_get<>::do_get_monthname</tt> -is described in 22.2.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get.virtuals"> [lib.locale.time.get.virtuals]</a> with five arguments, +is described in 22.2.5.1.2 [locale.time.get.virtuals] with five arguments, consistent with do_get_weekday and with its specified use by member get_monthname. However, in the synopsis, it is specified instead with four arguments. The missing argument is the "end" iterator value.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get"> [lib.locale.time.get]</a>, add an "end" argument to +<p>In 22.2.5.1 [locale.time.get], add an "end" argument to the declaration of member do_monthname as follows:</p> <pre> virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&, ios_base::iostate& err, tm* t) const;</pre> + + + + <hr> -<a name="74"><h3>74. Garbled text for <tt>codecvt::do_max_length</tt> -</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 8 Sep 1998</p> +<h3><a name="74"></a>74. Garbled text for <tt>codecvt::do_max_length</tt></h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-09-08</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The text of <tt>codecvt::do_max_length</tt>'s "Returns" clause (22.2.1.5.2, paragraph 11) is garbled. It has unbalanced parentheses and a spurious <b>n</b>.</p> + + <p><b>Proposed resolution:</b></p> -<p>Replace <font color="red">22.2.1.5.2</font> paragraph 11 with the +<p>Replace 22.2.1.4.2 [locale.codecvt.virtuals] paragraph 11 with the following:</p> -<blockquote> +<blockquote><p> <b>Returns</b>: The maximum value that <tt>do_length(state, from, from_end, 1)</tt> can return for any valid range <tt>[from, from_end)</tt> and <tt>stateT</tt> value <tt>state</tt>. The specialization <tt>codecvt<char, char, mbstate_t>::do_max_length()</tt> returns 1. -</blockquote> +</p></blockquote> + + + + <hr> -<a name="75"><h3>75. Contradiction in <tt>codecvt::length</tt>'s argument types</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt -Austern <b>Date:</b> 18 Sep 1998</p> +<h3><a name="75"></a>75. Contradiction in <tt>codecvt::length</tt>'s argument types</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt +Austern <b>Date:</b> 1998-09-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The class synopses for classes <tt>codecvt<></tt> (22.2.1.5) and <tt>codecvt_byname<></tt> (22.2.1.6) say that the first parameter of the member functions <tt>length</tt> and @@ -2515,8 +3390,10 @@ synopsis or the summary must be changed. </p> <p>If (as I believe) the member function descriptions are correct, then we must also add text saying how <tt>do_length</tt> changes its <tt>stateT</tt> argument. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a>, and also in <font color="red">22.2.1.6</font>, +<p>In 22.2.1.4 [locale.codecvt], and also in 22.2.1.5 [locale.codecvt.byname], change the <tt>stateT</tt> argument type on both member <tt>length()</tt> and member <tt>do_length()</tt> from </p> @@ -2530,7 +3407,7 @@ change the <tt>stateT</tt> argument type on both member <p><tt>stateT&</tt></p> </blockquote> -<p>In <font color="red">22.2.1.5.2</font>, add to the definition for member +<p>In 22.2.1.4.2 [locale.codecvt.virtuals], add to the definition for member <tt>do_length</tt> a paragraph:</p> <blockquote> @@ -2539,8 +3416,17 @@ change the <tt>stateT</tt> argument type on both member to)</tt> for <tt>to</tt> pointing to a buffer of at least <tt>max</tt> elements.</p> </blockquote> + + + + <hr> -<a name="76"><h3>76. Can a <tt>codecvt</tt> facet always convert one internal character at a time?</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 25 Sep 1998</p> +<h3><a name="76"></a>76. Can a <tt>codecvt</tt> facet always convert one internal character at a time?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-09-25</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>This issue concerns the requirements on classes derived from <tt>codecvt</tt>, including user-defined classes. What are the restrictions on the conversion from external characters @@ -2575,8 +3461,8 @@ sequence of <i>M</i> external characters that maps to a sequence of subsequence that maps to <i>N-1</i> internal characters.) </p> <p>Some of the wording in the standard, such as the description of -<tt>codecvt::do_max_length</tt> (<font color="red">22.2.1.5.2</font>, -paragraph 11) and <tt>basic_filebuf::underflow</tt> (27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a>, paragraph 3) suggests that it must always be +<tt>codecvt::do_max_length</tt> (22.2.1.4.2 [locale.codecvt.virtuals], +paragraph 11) and <tt>basic_filebuf::underflow</tt> (27.8.1.5 [filebuf.virtuals], paragraph 3) suggests that it must always be possible to pick off internal characters one at a time from a sequence of external characters. However, this is never explicitly stated one way or the other. </p> @@ -2588,21 +3474,23 @@ set of requirements for the user-supplied code is crucial. Users must be aware of the assumptions that the library makes. This issue affects positioning operations on <tt>basic_filebuf</tt>, unbuffered input, and several of <tt>codecvt</tt>'s member functions. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following text as a new paragraph, following <font color="red">22.2.1.5.2</font> paragraph 2:</p> +<p>Add the following text as a new paragraph, following 22.2.1.4.2 [locale.codecvt.virtuals] paragraph 2:</p> <blockquote> <p>A <tt>codecvt</tt> facet that is used by <tt>basic_filebuf</tt> -(27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>) must have the property that if</p> +(27.8 [file.streams]) must have the property that if</p> <pre> do_out(state, from, from_end, from_next, to, to_lim, to_next) </pre> -would return <tt>ok</tt>, where <tt>from != from_end</tt>, then +<p>would return <tt>ok</tt>, where <tt>from != from_end</tt>, then </p> <pre> do_out(state, from, from + 1, from_next, to, to_end, to_next) </pre> -must also return <tt>ok</tt>, and that if +<p>must also return <tt>ok</tt>, and that if</p> <pre> do_in(state, from, from_end, from_next, to, to_lim, to_next) </pre> -would return <tt>ok</tt>, where <tt>to != to_lim</tt>, then +<p>would return <tt>ok</tt>, where <tt>to != to_lim</tt>, then</p> <pre> do_in(state, from, from_end, from_next, to, to + 1, to_next) </pre> <p>must also return <tt>ok</tt>. [<i>Footnote:</i> Informally, this @@ -2618,6 +3506,9 @@ comment that success meant returning <tt>ok</tt>. New wording removes all talk about "success", and just talks about the return value.]</i></p> + + + <p><b>Rationale:</b></p> <p>The proposed resoluion says that conversions can be performed one @@ -2647,43 +3538,90 @@ return value.]</i></p> mapping, there is no reason to prohibit it, so long as the user does not expect <tt>basic_filebuf</tt> to be able to use it. </p> + + + + + <hr> -<a name="78"><h3>78. Typo: event_call_back</h3></a><p><b>Section:</b> 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="78"></a>78. Typo: event_call_back</h3> +<p><b>Section:</b> 27.4.2 [ios.base] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base">issues</a> in [ios.base].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>typo: event_call_back should be event_callback </p> + + <p><b>Proposed resolution:</b></p> -<p>In the 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> synopsis change +<p>In the 27.4.2 [ios.base] synopsis change "event_call_back" to "event_callback". </p> + + + + <hr> -<a name="79"><h3>79. Inconsistent declaration of polar()</h3></a><p><b>Section:</b> 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a>, 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> -<p>In 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a> polar is declared as follows:</p> +<h3><a name="79"></a>79. Inconsistent declaration of polar()</h3> +<p><b>Section:</b> 26.3.1 [complex.synopsis], 26.3.7 [complex.value.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.synopsis">issues</a> in [complex.synopsis].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 26.3.1 [complex.synopsis] polar is declared as follows:</p> <pre> template<class T> complex<T> polar(const T&, const T&); </pre> -<p>In 26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> it is declared as follows:</p> +<p>In 26.3.7 [complex.value.ops] it is declared as follows:</p> <pre> template<class T> complex<T> polar(const T& rho, const T& theta = 0); </pre> <p>Thus whether the second parameter is optional is not clear. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 26.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.synopsis"> [lib.complex.synopsis]</a> change:</p> +<p>In 26.3.1 [complex.synopsis] change:</p> <pre> template<class T> complex<T> polar(const T&, const T&);</pre> <p>to:</p> <pre> template<class T> complex<T> polar(const T& rho, const T& theta = 0); </pre> + + + + + <hr> -<a name="80"><h3>80. Global Operators of complex declared twice</h3></a><p><b>Section:</b> 26.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cfenv.syn"> [lib.cfenv.syn]</a>, 26.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.fenv"> [lib.fenv]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="80"></a>80. Global Operators of complex declared twice</h3> +<p><b>Section:</b> 26.3.1 [complex.synopsis], 26.3.2 [complex] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#complex.synopsis">issues</a> in [complex.synopsis].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Both 26.2.1 and 26.2.2 contain declarations of global operators for class complex. This redundancy should be removed.</p> + + <p><b>Proposed resolution:</b></p> <p>Reduce redundancy according to the general style of the standard. </p> + + + + <hr> -<a name="83"><h3>83. String::npos vs. string::max_size()</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="83"></a>83. String::npos vs. string::max_size()</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#89">89</a></p> +<p><b>Discussion:</b></p> <p>Many string member functions throw if size is getting or exceeding npos. However, I wonder why they don't throw if size is getting or exceeding max_size() instead of npos. May be npos is known at compile time, while max_size() is known at runtime. However, what happens if size exceeds max_size() but not npos, then? It seems the standard lacks some clarifications here.</p> + + <p><b>Proposed resolution:</b></p> -<p>After 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> paragraph 4 ("The functions +<p>After 21.3 [basic.string] paragraph 4 ("The functions described in this clause...") add a new paragraph:</p> <blockquote> @@ -2691,10 +3629,21 @@ described in this clause...") add a new paragraph:</p> <tt> max_size()</tt> then the operation throws <tt>length_error</tt>.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>The LWG believes length_error is the correct exception to throw.</p> + + + + <hr> -<a name="86"><h3>86. String constructors don't describe exceptions</h3></a><p><b>Section:</b> 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="86"></a>86. String constructors don't describe exceptions</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The constructor from a range:</p> <pre>template<class InputIterator> @@ -2704,24 +3653,39 @@ described in this clause...") add a new paragraph:</p> <p>lacks a throws clause. However, I would expect that it throws according to the other constructors if the numbers of characters in the range equals npos (or exceeds max_size(), see above). </p> + + <p><b>Proposed resolution:</b></p> -<p>In 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a>, Strike throws paragraphs for +<p>In 21.3.1 [string.require], Strike throws paragraphs for constructors which say "Throws: length_error if n == npos."</p> + + <p><b>Rationale:</b></p> <p>Throws clauses for length_error if n == npos are no longer needed because they are subsumed by the general wording added by the resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#83">83</a>.</p> + + + + <hr> -<a name="90"><h3>90. Incorrect description of operator >> for strings</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="90"></a>90. Incorrect description of operator >> for strings</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The effect of operator >> for strings contain the following item:</p> <p> <tt>isspace(c,getloc())</tt> is true for the next available input character c.</p> <p>Here <tt>getloc()</tt> has to be replaced by <tt>is.getloc()</tt>. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> paragraph 1 Effects clause replace:</p> +<p>In 21.3.8.9 [string.io] paragraph 1 Effects clause replace:</p> <blockquote> <p><tt>isspace(c,getloc())</tt> is true for the next available input character c.</p> @@ -2732,15 +3696,27 @@ character c.</p> <blockquote> <p><tt>isspace(c,is.getloc())</tt> is true for the next available input character c.</p> </blockquote> + + + + + <hr> -<a name="91"><h3>91. Description of operator>> and getline() for string<> might cause endless loop</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="91"></a>91. Description of operator>> and getline() for string<> might cause endless loop</h3> +<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#WP">WP</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Operator >> and getline() for strings read until eof() in the input stream is true. However, this might never happen, if the stream can't read anymore without reaching EOF. So shouldn't it be changed into that it reads until !good() ? </p> + + <p><b>Proposed resolution:</b></p> -<p>In 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>, paragraph 1, replace:</p> -<blockquote> +<p>In 21.3.8.9 [string.io], paragraph 1, replace:</p> +<blockquote><p> Effects: Begins by constructing a sentry object k as if k were constructed by typename basic_istream<charT,traits>::sentry k( is). If bool( k) is true, it calls str.erase() and then extracts characters @@ -2748,35 +3724,37 @@ from is and appends them to str as if by calling str.append(1, c). If is.width() is greater than zero, the maximum number n of characters appended is is.width(); otherwise n is str.max_size(). Characters are extracted and appended until any of the following occurs: -</blockquote> +</p></blockquote> <p>with:</p> -<blockquote> -Effects: Behaves as a formatted input function (27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>). After constructing a sentry object, if the +<blockquote><p> +Effects: Behaves as a formatted input function (27.6.1.2.1 +[istream.formatted.reqmts]). After constructing a sentry object, if the sentry converts to true, calls str.erase() and then extracts characters from is and appends them to str as if by calling str.append(1,c). If is.width() is greater than zero, the maximum number n of characters appended is is.width(); otherwise n is str.max_size(). Characters are extracted and appended until any of the following occurs: -</blockquote> +</p></blockquote> -<p>In 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>, paragraph 6, replace</p> -<blockquote> +<p>In 21.3.8.9 [string.io], paragraph 6, replace</p> +<blockquote><p> Effects: Begins by constructing a sentry object k as if by typename basic_istream<charT,traits>::sentry k( is, true). If bool( k) is true, it calls str.erase() and then extracts characters from is and appends them to str as if by calling str.append(1, c) until any of the following occurs: -</blockquote> +</p></blockquote> <p>with:</p> -<blockquote> -Effects: Behaves as an unformatted input function (27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>), except that it does not affect the value returned -by subsequent calls to basic_istream<>::gcount(). After +<blockquote><p>Effects: Behaves as an unformatted input function +(27.6.1.3 [istream.unformatted]), except that it does not affect the +value returned +by subsequent calls to basic_istream<>::gcount(). After constructing a sentry object, if the sentry converts to true, calls str.erase() and then extracts characters from is and appends them to str as if by calling str.append(1,c) until any of the following occurs: -</blockquote> +</p></blockquote> <p><i>[Redmond: Made changes in proposed resolution. <tt>operator>></tt> should be a formatted input function, not an unformatted input function. @@ -2784,8 +3762,12 @@ should be a formatted input function, not an unformatted input function. there is no mechanism for <tt>gcount</tt> to be set except by one of <tt>basic_istream</tt>'s member functions.]</i></p> + <p><i>[Curaçao: Nico agrees with proposed resolution.]</i></p> + + + <p><b>Rationale:</b></p> <p>The real issue here is whether or not these string input functions get their characters from a streambuf, rather than by calling an @@ -2793,8 +3775,18 @@ istream's member functions, a streambuf signals failure either by returning eof or by throwing an exception; there are no other possibilities. The proposed resolution makes it clear that these two functions do get characters from a streambuf.</p> + + + + + <hr> -<a name="92"><h3>92. Incomplete Algorithm Requirements</h3></a><p><b>Section:</b> 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 29 Sep 1998</p> +<h3><a name="92"></a>92. Incomplete Algorithm Requirements</h3> +<p><b>Section:</b> 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 1998-09-29</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#algorithms">issues</a> in [algorithms].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The standard does not state, how often a function object is copied, called, or the order of calls inside an algorithm. This may lead to surprising/buggy behavior. Consider the following example: </p> @@ -2841,16 +3833,18 @@ and removes also the sixth element. This behavior compromises the advantage of function objects being able to have a state. Without any cost it could be avoided (just implement it directly instead of calling find_if()). </p> + + <p><b>Proposed resolution:</b></p> -<p>Add a new paragraph following 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> paragraph 8:</p> -<blockquote> +<p>Add a new paragraph following 25 [algorithms] paragraph 8:</p> +<blockquote><p> [Note: Unless otherwise specified, algorithms that take function objects as arguments are permitted to copy those function objects freely. Programmers for whom object identity is important should consider using a wrapper class that points to a noncopied implementation object, or some equivalent solution.] -</blockquote> +</p></blockquote> <p><i>[Dublin: Pete Becker felt that this may not be a defect, but rather something that programmers need to be educated about. @@ -2858,6 +3852,7 @@ There was discussion of adding wording to the effect that the number and order of calls to function objects, including predicates, not affect the behavior of the function object.]</i></p> + <p><i>[Pre-Kona: Nico comments: It seems the problem is that we don't have a clear statement of "predicate" in the standard. People including me seemed to think "a function @@ -2868,10 +3863,12 @@ never change its behavior due to a call or being copied. IMHO we have to state this in the standard. If you like, see section 8.1.4 of my library book for a detailed discussion.]</i></p> + <p><i>[Kona: Nico will provide wording to the effect that "unless otherwise specified, the number of copies of and calls to function objects by algorithms is unspecified". Consider placing in -25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> after paragraph 9.]</i></p> +25 [algorithms] after paragraph 9.]</i></p> + <p><i>[Santa Cruz: The standard doesn't currently guarantee that functions object won't be copied, and what isn't forbidden is @@ -2882,12 +3879,24 @@ objects by algorithms is unspecified". Consider placing in programmers that if they want to guarantee the lack of copying they should use something like the <tt>ref</tt> wrapper.]</i></p> + <p><i>[Oxford: Matt provided wording.]</i></p> + + + + + + <hr> -<a name="98"><h3>98. Input iterator requirements are badly written</h3></a><p><b>Section:</b> 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> -<p>Table 72 in 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a> specifies semantics for +<h3><a name="98"></a>98. Input iterator requirements are badly written</h3> +<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#WP">WP</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>Table 72 in 24.1.1 [input.iterators] specifies semantics for <tt>*r++</tt> of:</p> <p> <tt>{ T tmp = *r; ++r; return tmp; }</tt></p> @@ -2903,9 +3912,13 @@ should invoke the copy constructor exactly as many times as the sample code above would?) See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#334">334</a> for a similar problem.</p> + + <p><b>Proposed resolution:</b></p> -In Table 72 in 24.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.input.iterators"> [lib.input.iterators]</a>, change the return type -for <tt>*r++</tt> from <tt>T</tt> to "convertible to T". +<p>In Table 72 in 24.1.1 [input.iterators], change the return type +for <tt>*r++</tt> from <tt>T</tt> to "convertible to T".</p> + + <p><b>Rationale:</b></p> <p>This issue has two parts: the return type, and the number of times the copy constructor is invoked.</p> @@ -2925,8 +3938,18 @@ for <tt>*r++</tt> from <tt>T</tt> to "convertible to T". we're told (24.1/3) that forward iterators satisfy all the requirements of input iterators, we can't impose any requirements in the Input Iterator requirements table that forward iterators don't satisfy.</p> + + + + + <hr> -<a name="103"><h3>103. set::iterator is required to be modifiable, but this allows modification of keys</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="103"></a>103. set::iterator is required to be modifiable, but this allows modification of keys</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Set::iterator is described as implementation-defined with a reference to the container requirement; the container requirement says that const_iterator is an iterator pointing to const T and iterator an @@ -2941,7 +3964,7 @@ const_iterator. Set, for example, has the following: </p> <p><tt>typedef implementation defined iterator;<br> // See _lib.container.requirements_</tt></p> -<p>23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> actually requires that iterator type pointing +<p>23.1 [container.requirements] actually requires that iterator type pointing to T (table 65). Disallowing user modification of keys by changing the standard to require an iterator for associative container to be the same as const_iterator would be overkill since that will unnecessarily @@ -2954,7 +3977,7 @@ goes in line with trusting user knows what he is doing. </p> <p><b>Other Options Evaluated:</b> </p> -<p>Option A. In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, paragraph 2, after +<p>Option A. In 23.1.2 [associative.reqmts], paragraph 2, after first sentence, and before "In addition,...", add one line: </p> @@ -2962,7 +3985,7 @@ first sentence, and before "In addition,...", add one line: <p>Modification of keys shall not change their strict weak ordering. </p> </blockquote> -<p>Option B. Add three new sentences to 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>:</p> +<p>Option B. Add three new sentences to 23.1.2 [associative.reqmts]:</p> <blockquote> <p>At the end of paragraph 5: "Keys in an associative container @@ -2974,7 +3997,7 @@ first sentence, and before "In addition,...", add one line: type."</p> </blockquote> -<p>Option C. To 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, paragraph 3, which +<p>Option C. To 23.1.2 [associative.reqmts], paragraph 3, which currently reads:</p> <blockquote> @@ -2996,8 +4019,11 @@ currently reads:</p> reinserted, comp(k1, k2) must again return a consistent value but this value may be different than it was the previous time k2 was in the container.]</p> </blockquote> + + + <p><b>Proposed resolution:</b></p> -<p>Add the following to 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> at +<p>Add the following to 23.1.2 [associative.reqmts] at the indicated location:</p> <blockquote> @@ -3010,6 +4036,8 @@ the indicated location:</p> iterators. It is unspecified whether or not <tt>iterator</tt> and <tt>const_iterator</tt> are the same type."</p> </blockquote> + + <p><b>Rationale:</b></p> <p>Several arguments were advanced for and against allowing set elements to be mutable as long as the ordering was not effected. The argument which swayed the @@ -3034,46 +4062,79 @@ conversion from <tt>iterator</tt> to <tt>const_iterator</tt>. </p> <p><i>[Tokyo: The LWG crafted the proposed resolution and rationale.]</i></p> + + + + + + <hr> -<a name="106"><h3>106. Numeric library private members are implementation defined</h3></a><p><b>Section:</b> 26.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.member.ops"> [lib.complex.member.ops]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="106"></a>106. Numeric library private members are implementation defined</h3> +<p><b>Section:</b> 26.5.5 [template.slice.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>This is the only place in the whole standard where the implementation has to document something private.</p> + + <p><b>Proposed resolution:</b></p> <p> Remove the comment which says "// remainder implementation defined" from: </p> <ul> - <li>26.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.member.ops"> [lib.complex.member.ops]</a> -</li> - <li>26.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.value.ops"> [lib.complex.value.ops]</a> -</li> - <li>26.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.transcendentals"> [lib.complex.transcendentals]</a> -</li> - <li>26.3.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cmplx.over"> [lib.cmplx.over]</a> -</li> + <li>26.5.5 [template.slice.array]</li> + <li>26.5.7 [template.gslice.array]</li> + <li>26.5.8 [template.mask.array]</li> + <li>26.5.9 [template.indirect.array]</li> </ul> + + + + + <hr> -<a name="108"><h3>108. Lifetime of exception::what() return unspecified</h3></a><p><b>Section:</b> 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> AFNOR <b>Date:</b> 7 Oct 1998</p> +<h3><a name="108"></a>108. Lifetime of exception::what() return unspecified</h3> +<p><b>Section:</b> 18.6.1 [type.info] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> AFNOR <b>Date:</b> 1998-10-07</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#type.info">issues</a> in [type.info].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In 18.6.1, paragraphs 8-9, the lifetime of the return value of exception::what() is left unspecified. This issue has implications with exception safety of exception handling: some exceptions should not throw bad_alloc.</p> + + <p><b>Proposed resolution:</b></p> -<p>Add to 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> paragraph 9 (exception::what notes +<p>Add to 18.6.1 [type.info] paragraph 9 (exception::what notes clause) the sentence:</p> <blockquote> <p>The return value remains valid until the exception object from which it is obtained is destroyed or a non-const member function of the exception object is called.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>If an exception object has non-const members, they may be used to set internal state that should affect the contents of the string returned by <tt>what()</tt>. </p> + + + + + <hr> -<a name="109"><h3>109. Missing binders for non-const sequence elements</h3></a><p><b>Section:</b> 20.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.arithmetic.operations"> [lib.arithmetic.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Bjarne Stroustrup <b>Date:</b> 7 Oct 1998</p> +<h3><a name="109"></a>109. Missing binders for non-const sequence elements</h3> +<p><b>Section:</b> D.8 [depr.lib.binders] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Bjarne Stroustrup <b>Date:</b> 1998-10-07</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.lib.binders">issues</a> in [depr.lib.binders].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>There are no versions of binders that apply to non-const elements of a sequence. This makes examples like for_each() using bind2nd() on @@ -3143,12 +4204,14 @@ public: } };</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> <p><b>Howard believes there is a flaw</b> in this resolution. See c++std-lib-9127. We may need to reopen this issue.</p> -<p>In <font color="red">20.5.6.1</font> in the declaration of binder1st after:</p> +<p>In D.8 [depr.lib.binders] in the declaration of binder1st after:</p> <blockquote> <p><tt>typename Operation::result_type<br> operator()(const typename Operation::second_argument_type& x) const;</tt></p> @@ -3158,7 +4221,7 @@ See c++std-lib-9127. We may need to reopen this issue.</p> <p><tt>typename Operation::result_type<br> operator()(typename Operation::second_argument_type& x) const;</tt></p> </blockquote> -<p>In <font color="red">20.5.6.3</font> in the declaration of binder2nd after:</p> +<p>In D.8 [depr.lib.binders] in the declaration of binder2nd after:</p> <blockquote> <p><tt>typename Operation::result_type<br> operator()(const typename Operation::first_argument_type& x) const;</tt></p> @@ -3174,17 +4237,31 @@ this is a mistake in the design, but there was no consensus on whether it was a defect in the Standard. Straw vote: NAD - 5. Accept proposed resolution - 3. Leave open - 6.]</i></p> + <p><i>[Copenhagen: It was generally agreed that this was a defect. Strap poll: NAD - 0. Accept proposed resolution - 10. Leave open - 1.]</i></p> + + + + + + <hr> -<a name="110"><h3>110. istreambuf_iterator::equal not const</h3></a><p><b>Section:</b> 24.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator"> [lib.istreambuf.iterator]</a>, 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 15 Oct 1998</p> +<h3><a name="110"></a>110. istreambuf_iterator::equal not const</h3> +<p><b>Section:</b> 24.5.3 [istreambuf.iterator], 24.5.3.5 [istreambuf.iterator::equal] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 1998-10-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istreambuf.iterator">issues</a> in [istreambuf.iterator].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Member istreambuf_iterator<>::equal is not declared -"const", yet 24.5.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::op=="> [lib.istreambuf.iterator::op==]</a> says that operator==, +"const", yet 24.5.3.6 [istreambuf.iterator::op==] says that operator==, which is const, calls it. This is contradictory. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 24.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator"> [lib.istreambuf.iterator]</a> and also in 24.5.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator::equal"> [lib.istreambuf.iterator::equal]</a>, +<p>In 24.5.3 [istreambuf.iterator] and also in 24.5.3.5 [istreambuf.iterator::equal], replace:</p> <blockquote> @@ -3196,14 +4273,25 @@ replace:</p> <blockquote> <pre>bool equal(const istreambuf_iterator& b) const;</pre> </blockquote> + + + + + <hr> -<a name="112"><h3>112. Minor typo in <tt>ostreambuf_iterator</tt> constructor</h3></a><p><b>Section:</b> 24.5.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostreambuf.iter.cons"> [lib.ostreambuf.iter.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 20 Oct 1998</p> +<h3><a name="112"></a>112. Minor typo in <tt>ostreambuf_iterator</tt> constructor</h3> +<p><b>Section:</b> 24.5.4.1 [ostreambuf.iter.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-10-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The <b>requires</b> clause for <tt>ostreambuf_iterator</tt>'s constructor from an <tt>ostream_type</tt> (24.5.4.1, paragraph 1) reads "<i>s</i> is not null". However, <i>s</i> is a reference, and references can't be null. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 24.5.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostreambuf.iter.cons"> [lib.ostreambuf.iter.cons]</a>:</p> +<p>In 24.5.4.1 [ostreambuf.iter.cons]:</p> <p>Move the current paragraph 1, which reads "Requires: s is not null.", from the first constructor to the second constructor.</p> @@ -3214,8 +4302,19 @@ reading:</p> <blockquote> <p><b>Requires</b>: <tt>s.rdbuf()</tt> is not null.</p> </blockquote> + + + + + <hr> -<a name="114"><h3>114. Placement forms example in error twice</h3></a><p><b>Section:</b> 18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 28 Oct 1998</p> +<h3><a name="114"></a>114. Placement forms example in error twice</h3> +<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#TC">TC</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-10-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#196">196</a></p> +<p><b>Discussion:</b></p> <p>Section 18.5.1.3 contains the following example: </p> <pre>[Example: This can be useful for constructing an object at a known address: @@ -3231,16 +4330,27 @@ believes the () are correct.]</p> <p>Examples are not normative, but nevertheless should not show code that is invalid or likely to fail.</p> + + <p><b>Proposed resolution:</b></p> -<p>Replace the <u> first line of code</u> in the example in -18.5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.placement"> [lib.new.delete.placement]</a> with: +<p>Replace the first line of code in the example in +18.5.1.3 [new.delete.placement] with: </p> <blockquote> <pre>void* place = operator new(sizeof(Something));</pre> </blockquote> + + + + + <hr> -<a name="115"><h3>115. Typo in strstream constructors</h3></a><p><b>Section:</b> D.7.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstream.cons"> [depr.strstream.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 2 Nov 1998</p> +<h3><a name="115"></a>115. Typo in strstream constructors</h3> +<p><b>Section:</b> D.7.4.1 [depr.strstream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 1998-11-02</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>D.7.4.1 strstream constructors paragraph 2 says: </p> <blockquote> @@ -3256,12 +4366,24 @@ likely to fail.</p> <p>Notice the second condition is the same as the first. I think the second condition should be "If mode&app==app", or "mode&app!=0", meaning that the append bit is set.</p> + + <p><b>Proposed resolution:</b></p> -<p>In D.7.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ostrstream.cons"> [depr.ostrstream.cons]</a> paragraph 2 and D.7.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.strstream.cons"> [depr.strstream.cons]</a> +<p>In D.7.3.1 [depr.ostrstream.cons] paragraph 2 and D.7.4.1 [depr.strstream.cons] paragraph 2, change the first condition to <tt>(mode&app)==0</tt> and the second condition to <tt>(mode&app)!=0</tt>.</p> + + + + + <hr> -<a name="117"><h3>117. <tt>basic_ostream</tt> uses nonexistent <tt>num_put</tt> member functions</h3></a><p><b>Section:</b> 27.6.2.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.arithmetic"> [lib.ostream.inserters.arithmetic]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 20 Nov 1998</p> +<h3><a name="117"></a>117. <tt>basic_ostream</tt> uses nonexistent <tt>num_put</tt> member functions</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-11-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The <b>effects</b> clause for numeric inserters says that insertion of a value <tt>x</tt>, whose type is either <tt>bool</tt>, <tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>, <tt>unsigned @@ -3285,12 +4407,14 @@ int</tt>, and <tt>float</tt>. </p> <p>We must either add new member functions to <tt>num_put</tt>, or else change the description in <tt>ostream</tt> so that it only calls functions that are actually there. I prefer the latter. </p> + + <p><b>Proposed resolution:</b></p> <p>Replace 27.6.2.5.2, paragraph 1 with the following: </p> <blockquote> <p> -The classes num_get<> and num_put<> handle localedependent numeric +The classes num_get<> and num_put<> handle locale-dependent numeric formatting and parsing. These inserter functions use the imbued locale value to perform numeric formatting. When val is of type bool, long, unsigned long, double, long double, or const void*, the @@ -3358,6 +4482,9 @@ failed(); <p><i>[post-Toronto: This differs from the previous proposed resolution; PJP provided the new wording. The differences are in signed short and int output.]</i></p> + + + <p><b>Rationale:</b></p> <p>The original proposed resolution was to cast int and short to long, unsigned int and unsigned short to unsigned long, and float to double, @@ -3366,8 +4493,19 @@ member functions. The current proposed resolution is more complicated, but gives more expected results for hex and octal output of signed short and signed int. (On a system with 16-bit short, for example, printing short(-1) in hex format should yield 0xffff.)</p> + + + + + <hr> -<a name="118"><h3>118. <tt>basic_istream</tt> uses nonexistent <tt>num_get</tt> member functions</h3></a><p><b>Section:</b> 27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 20 Nov 1998</p> +<h3><a name="118"></a>118. <tt>basic_istream</tt> uses nonexistent <tt>num_get</tt> member functions</h3> +<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1998-11-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Formatted input is defined for the types <tt>short</tt>, <tt>unsigned short</tt>, <tt>int</tt>, <tt>unsigned int</tt>, <tt>long</tt>, <tt>unsigned long</tt>, <tt>float</tt>, <tt>double</tt>, <tt>long double</tt>, <tt>bool</tt>, and <tt>void*</tt>. According to section 27.6.1.2.2, @@ -3378,7 +4516,7 @@ iostate err = 0; use_facet< numget >(loc).get(*this, 0, *this, err, val); setstate(err);</pre> -<p>According to section 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>, however, +<p>According to section 22.2.2.1.1 [facet.num.get.members], however, <tt>num_get<>::get()</tt> is only overloaded for the types <tt>bool</tt>, <tt>long</tt>, <tt>unsigned short</tt>, <tt>unsigned int</tt>, <tt>unsigned long</tt>, <tt>unsigned long</tt>, @@ -3386,8 +4524,10 @@ int</tt>, <tt>unsigned long</tt>, <tt>unsigned long</tt>, <tt>void*</tt>. Comparing the lists from the two sections, we find that 27.6.1.2.2 is using a nonexistent function for types <tt>short</tt> and <tt>int</tt>. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a> Arithmetic Extractors, remove the +<p>In 27.6.1.2.2 [istream.formatted.arithmetic] Arithmetic Extractors, remove the two lines (1st and 3rd) which read:</p> <blockquote> <pre>operator>>(short& val); @@ -3423,9 +4563,20 @@ operator>>(int& val);</pre> </blockquote> <p><i>[Post-Tokyo: PJP provided the above wording.]</i></p> + + + + + + <hr> -<a name="119"><h3>119. Should virtual functions be allowed to strengthen the exception specification?</h3></a><p><b>Section:</b> 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> -<p>Section 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> states: </p> +<h3><a name="119"></a>119. Should virtual functions be allowed to strengthen the exception specification?</h3> +<p><b>Section:</b> 17.4.4.8 [res.on.exception.handling] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>Section 17.4.4.8 [res.on.exception.handling] states: </p> <p>"An implementation may strengthen the exception-specification for a function by removing listed exceptions." </p> @@ -3446,8 +4597,10 @@ public: ~D(); // error - exception specification must be compatible with // overridden virtual function ios_base::failure::~failure() };</pre> + + <p><b>Proposed resolution:</b></p> -<p>Change Section 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> from:</p> +<p>Change Section 17.4.4.8 [res.on.exception.handling] from:</p> <p> "may strengthen the exception-specification for a function"</p> @@ -3456,8 +4609,18 @@ exception-specification for a function"</p> <p> "may strengthen the exception-specification for a non-virtual function". </p> + + + + + <hr> -<a name="120"><h3>120. Can an implementor add specializations?</h3></a><p><b>Section:</b> 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> +<h3><a name="120"></a>120. Can an implementor add specializations?</h3> +<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The original issue asked whether a library implementor could specialize standard library templates for built-in types. (This was @@ -3501,29 +4664,34 @@ some platforms, library implementors might not need to do anything special: the "undefined behavior" that results from having two different explicit instantiations might be harmless.</p> + + <p><b>Proposed resolution:</b></p> - <p>Append to 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> paragraph 1: </p> - <blockquote> + <p>Append to 17.4.3.1 [reserved.names] paragraph 1: </p> + <blockquote><p> A program may explicitly instantiate any templates in the standard library only if the declaration depends on the name of a user-defined type of external linkage and the instantiation meets the standard library requirements for the original template. - </blockquote> + </p></blockquote> <p><i>[Kona: changed the wording from "a user-defined name" to "the name of a user-defined type"]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG considered another possible resolution:</p> <blockquote> <p>In light of the resolution to core issue 259, no normative changes in the library clauses are necessary. Add the following non-normative - note to the end of 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> paragraph 1:</p> - <blockquote> + note to the end of 17.4.3.1 [reserved.names] paragraph 1:</p> + <blockquote><p> [<i>Note:</i> A program may explicitly instantiate standard library templates, even when an explicit instantiation does not depend on a user-defined name. <i>--end note</i>] - </blockquote> + </p></blockquote> </blockquote> <p>The LWG rejected this because it was believed that it would make @@ -3556,8 +4724,18 @@ different explicit instantiations might be harmless.</p> <p>The Committee is now considering standardization of dynamic linking. If there are such changes in the future, it may be appropriate to revisit this issue later.</p> + + + + + <hr> -<a name="122"><h3>122. streambuf/wstreambuf description should not say they are specializations</h3></a><p><b>Section:</b> 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> +<h3><a name="122"></a>122. streambuf/wstreambuf description should not say they are specializations</h3> +<p><b>Section:</b> 27.5.2 [streambuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf">issues</a> in [streambuf].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Section 27.5.2 describes the streambuf classes this way: </p> <blockquote> @@ -3573,28 +4751,43 @@ specialized for the type wchar_t. </p> <p>This implies that these classes must be template specializations, not typedefs. </p> <p>It doesn't seem this was intended, since Section 27.5 has them declared as typedefs. </p> + + <p><b>Proposed resolution:</b></p> -<p>Remove 27.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf"> [lib.streambuf]</a> paragraphs 2 and 3 (the above two +<p>Remove 27.5.2 [streambuf] paragraphs 2 and 3 (the above two sentences). </p> + + <p><b>Rationale:</b></p> <p>The <tt>streambuf</tt> synopsis already has a declaration for the typedefs and that is sufficient. </p> + + + + + <hr> -<a name="123"><h3>123. Should valarray helper arrays fill functions be const?</h3></a><p><b>Section:</b> 26.5.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.fill"> [lib.slice.arr.fill]</a>, 26.5.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.fill"> [lib.gslice.array.fill]</a>, 26.5.8.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.fill"> [lib.mask.array.fill]</a>, 26.5.9.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.fill"> [lib.indirect.array.fill]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998 </p> +<h3><a name="123"></a>123. Should valarray helper arrays fill functions be const?</h3> +<p><b>Section:</b> 26.5.5.4 [slice.arr.fill], 26.5.7.4 [gslice.array.fill], 26.5.8.4 [mask.array.fill], 26.5.9.4 [indirect.array.fill] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>One of the operator= in the valarray helper arrays is const and one is not. For example, look at slice_array. This operator= in Section -26.5.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.assign"> [lib.slice.arr.assign]</a> is const: </p> +26.5.5.2 [slice.arr.assign] is const: </p> <p> <tt>void operator=(const valarray<T>&) const;</tt> </p> -<p>but this one in Section 26.5.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.fill"> [lib.slice.arr.fill]</a> is not: </p> +<p>but this one in Section 26.5.5.4 [slice.arr.fill] is not: </p> <p> <tt>void operator=(const T&); </tt></p> <p>The description of the semantics for these two functions is similar. </p> + + <p><b>Proposed resolution:</b></p> -<p>26.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.slice.array"> [lib.template.slice.array]</a> Template class slice_array</p> +<p>26.5.5 [template.slice.array] Template class slice_array</p> <blockquote> <p>In the class template definition for slice_array, replace the member @@ -3606,7 +4799,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.fill"> [lib.slice.arr.fill]</a> slice_array fill function</p> +<p>26.5.5.4 [slice.arr.fill] slice_array fill function</p> <blockquote> <p>Change the function declaration</p> @@ -3617,7 +4810,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.gslice.array"> [lib.template.gslice.array]</a> Template class gslice_array</p> +<p>26.5.7 [template.gslice.array] Template class gslice_array</p> <blockquote> <p>In the class template definition for gslice_array, replace the member @@ -3629,7 +4822,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.fill"> [lib.gslice.array.fill]</a> gslice_array fill function</p> +<p>26.5.7.4 [gslice.array.fill] gslice_array fill function</p> <blockquote> <p>Change the function declaration</p> @@ -3640,7 +4833,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.mask.array"> [lib.template.mask.array]</a> Template class mask_array</p> +<p>26.5.8 [template.mask.array] Template class mask_array</p> <blockquote> <p>In the class template definition for mask_array, replace the member @@ -3652,7 +4845,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.8.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.fill"> [lib.mask.array.fill]</a> mask_array fill function</p> +<p>26.5.8.4 [mask.array.fill] mask_array fill function</p> <blockquote> <p>Change the function declaration</p> @@ -3663,7 +4856,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.indirect.array"> [lib.template.indirect.array]</a> Template class indirect_array</p> +<p>26.5.9 [template.indirect.array] Template class indirect_array</p> <blockquote> <p>In the class template definition for indirect_array, replace the member @@ -3675,7 +4868,7 @@ is not. For example, look at slice_array. This operator= in Section </pre> </blockquote> -<p>26.5.9.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.fill"> [lib.indirect.array.fill]</a> indirect_array fill function</p> +<p>26.5.9.4 [indirect.array.fill] indirect_array fill function</p> <blockquote> <p>Change the function declaration</p> @@ -3689,34 +4882,72 @@ is not. For example, look at slice_array. This operator= in Section <p><i>[Redmond: Robert provided wording.]</i></p> + + + <p><b>Rationale:</b></p> <p>There's no good reason for one version of operator= being const and another one not. Because of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#253">253</a>, this now matters: these functions are now callable in more circumstances. In many existing implementations, both versions are already const.</p> + + + + + <hr> -<a name="124"><h3>124. ctype_byname<charT>::do_scan_is & do_scan_not return type should be const charT*</h3></a><p><b>Section:</b> 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> -<p>In Section 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a> +<h3><a name="124"></a>124. ctype_byname<charT>::do_scan_is & do_scan_not return type should be const charT*</h3> +<p><b>Section:</b> 22.2.1.2 [locale.ctype.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.byname">issues</a> in [locale.ctype.byname].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In Section 22.2.1.2 [locale.ctype.byname] ctype_byname<charT>::do_scan_is() and do_scan_not() are declared to return a const char* not a const charT*. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change Section 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a> <tt>do_scan_is()</tt> and +<p>Change Section 22.2.1.2 [locale.ctype.byname] <tt>do_scan_is()</tt> and <tt>do_scan_not()</tt> to return a <tt> const charT*</tt>. </p> + + + + + <hr> -<a name="125"><h3>125. valarray<T>::operator!() return type is inconsistent</h3></a><p><b>Section:</b> 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> -<p>In Section 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> valarray<T>::operator!() is -declared to return a valarray<T>, but in Section <font color="red">26.3.2.5</font> it is declared to return a valarray<bool>. The +<h3><a name="125"></a>125. valarray<T>::operator!() return type is inconsistent</h3> +<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#TC">TC</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In Section 26.5.2 [template.valarray] valarray<T>::operator!() +is +declared to return a valarray<T>, but in Section 26.5.2.5 +[valarray.unary] it is declared to return a valarray<bool>. The latter appears to be correct. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change in Section 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> the declaration of +<p>Change in Section 26.5.2 [template.valarray] the declaration of <tt>operator!()</tt> so that the return type is <tt>valarray<bool></tt>. </p> + + + + <hr> -<a name="126"><h3>126. typos in Effects clause of ctype::do_narrow()</h3></a><p><b>Section:</b> 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 15 Dec 1998</p> -<p>Typos in 22.2.1.1.2 need to be fixed.</p> +<h3><a name="126"></a>126. typos in Effects clause of ctype::do_narrow()</h3> +<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-12-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p><p>Typos in 22.2.1.1.2 need to be fixed.</p> + <p><b>Proposed resolution:</b></p> -<p>In Section 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> change: </p> +<p>In Section 22.2.1.1.2 [locale.ctype.virtuals] change: </p> <pre> do_widen(do_narrow(c),0) == c</pre> @@ -3731,8 +4962,18 @@ latter appears to be correct. </p> <p>to:</p> <pre> (is(M,c) || !ctc.is(M, do_narrow(c,dfault)) )</pre> + + + + + <hr> -<a name="127"><h3>127. auto_ptr<> conversion issues</h3></a><p><b>Section:</b> 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Greg Colvin <b>Date:</b> 17 Feb 1999</p> +<h3><a name="127"></a>127. auto_ptr<> conversion issues</h3> +<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#TC">TC</a> + <b>Submitter:</b> Greg Colvin <b>Date:</b> 1999-02-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>There are two problems with the current <tt>auto_ptr</tt> wording in the standard: </p> @@ -3769,34 +5010,47 @@ object parameter may be bound to an rvalue [13.3.3.1.4/3] <p>Tokyo: The LWG removed the following from the proposed resolution:</p> - <p>In 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>, paragraph 2, and 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a>, + <p>In 20.4.4 [meta.unary], paragraph 2, and 20.4.4.3 [meta.unary.prop], paragraph 2, make the conversion to auto_ptr_ref const:</p> <blockquote> <pre>template<class Y> operator auto_ptr_ref<Y>() const throw();</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>In 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>, paragraph 2, move +<p>In 20.4.4 [meta.unary], paragraph 2, move the <tt>auto_ptr_ref</tt> definition to namespace scope.</p> -<p>In 20.4.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary"> [lib.meta.unary]</a>, paragraph 2, add +<p>In 20.4.4 [meta.unary], paragraph 2, add a public assignment operator to the <tt>auto_ptr</tt> definition: </p> <blockquote> <pre>auto_ptr& operator=(auto_ptr_ref<X> r) throw();</pre> </blockquote> -<p>Also add the assignment operator to 20.4.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.unary.prop"> [lib.meta.unary.prop]</a>: </p> +<p>Also add the assignment operator to 20.4.4.3 [meta.unary.prop]: </p> <blockquote> <pre>auto_ptr& operator=(auto_ptr_ref<X> r) throw()</pre> - <b>Effects:</b> Calls <tt>reset(p.release())</tt> for the <tt>auto_ptr + <p><b>Effects:</b> Calls <tt>reset(p.release())</tt> for the <tt>auto_ptr p</tt> that <tt>r</tt> holds a reference to.<br> - <b>Returns: </b><tt>*this</tt>. + <b>Returns: </b><tt>*this</tt>.</p> </blockquote> + + + + + <hr> -<a name="129"><h3>129. Need error indication from seekp() and seekg()</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>, 27.6.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.seeks"> [lib.ostream.seeks]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 22 Feb 1999</p> +<h3><a name="129"></a>129. Need error indication from seekp() and seekg()</h3> +<p><b>Section:</b> 27.6.1.3 [istream.unformatted], 27.6.2.5 [ostream.seeks] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-02-22</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Currently, the standard does not specify how seekg() and seekp() indicate failure. They are not required to set failbit, and they can't return an error indication because they must return *this, i.e. the @@ -3807,29 +5061,45 @@ stream must perform a state-dependent code conversion, etc. </p> <p>The stream functions seekg() and seekp() should set failbit in the stream state in case of failure.</p> + + <p><b>Proposed resolution:</b></p> <p>Add to the Effects: clause of seekg() in -27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> and to the Effects: clause of seekp() in -27.6.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.seeks"> [lib.ostream.seeks]</a>: </p> +27.6.1.3 [istream.unformatted] and to the Effects: clause of seekp() in +27.6.2.5 [ostream.seeks]: </p> <blockquote> <p>In case of failure, the function calls <tt>setstate(failbit)</tt> (which may throw <tt>ios_base::failure</tt>). </p> </blockquote> + + <p><b>Rationale:</b></p> <p>Setting failbit is the usual error reporting mechanism for streams</p> + + + + <hr> -<a name="130"><h3>130. Return type of container::erase(iterator) differs for associative containers</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2 Mar 1999</p> +<h3><a name="130"></a>130. Return type of container::erase(iterator) differs for associative containers</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts], 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-03-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#451">451</a></p> +<p><b>Discussion:</b></p> <p>Table 67 (23.1.1) says that container::erase(iterator) returns an iterator. Table 69 (23.1.2) says that in addition to this requirement, associative containers also say that container::erase(iterator) returns void. That's not an addition; it's a change to the requirements, which has the effect of making associative containers fail to meet the requirements for containers.</p> + + <p><b>Proposed resolution:</b></p> <p> -In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, in Table 69 Associative container +In 23.1.2 [associative.reqmts], in Table 69 Associative container requirements, change the return type of <tt>a.erase(q)</tt> from <tt>void</tt> to <tt>iterator</tt>. Change the assertion/not/pre/post-condition from "erases the element pointed to @@ -3840,7 +5110,7 @@ is returned." </p> <p> -In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a>, in Table 69 Associative container +In 23.1.2 [associative.reqmts], in Table 69 Associative container requirements, change the return type of <tt>a.erase(q1, q2)</tt> from <tt>void</tt> to <tt>iterator</tt>. Change the assertion/not/pre/post-condition from "erases the elements in the @@ -3849,10 +5119,10 @@ q2)</tt>. Returns q2." </p> <p> -In 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, in the <tt>map</tt> class synopsis; and -in 23.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multimap"> [lib.multimap]</a>, in the <tt>multimap</tt> class synopsis; and -in 23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a>, in the <tt>set</tt> class synopsis; and -in 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a>, in the <tt>multiset</tt> class synopsis: +In 23.3.1 [map], in the <tt>map</tt> class synopsis; and +in 23.3.2 [multimap], in the <tt>multimap</tt> class synopsis; and +in 23.3.3 [set], in the <tt>set</tt> class synopsis; and +in 23.3.4 [multiset], in the <tt>multiset</tt> class synopsis: change the signature of the first <tt>erase</tt> overload to </p> <pre> iterator erase(iterator position); @@ -3864,10 +5134,12 @@ change the signature of the first <tt>erase</tt> overload to <p><i>[Pre-Kona: reopened at the request of Howard Hinnant]</i></p> + <p><i>[Post-Kona: the LWG agrees the return type should be <tt>iterator</tt>, not <tt>void</tt>. (Alex Stepanov agrees too.) Matt provided wording.]</i></p> + <p><i>[ Sydney: the proposed wording went in the right direction, but it wasn't good enough. We want to return an iterator from the range form @@ -3877,8 +5149,18 @@ Matt provided wording.]</i></p> which we will review at the next meeting. ]</i></p> + + + + + + <hr> -<a name="132"><h3>132. list::resize description uses random access iterators</h3></a><p><b>Section:</b> 23.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.capacity"> [lib.deque.capacity]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 6 Mar 1999</p> +<h3><a name="132"></a>132. list::resize description uses random access iterators</h3> +<p><b>Section:</b> 23.2.3.2 [list.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The description reads:</p> <p>-1- Effects:</p> @@ -3891,8 +5173,10 @@ Matt provided wording.]</i></p> ; // do nothing</pre> <p>Obviously list::resize should not be specified in terms of random access iterators.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 23.2.2.2 paragraph 1 to:</p> +<p>Change 23.2.3.2 [list.capacity] paragraph 1 to:</p> <p>Effects:</p> @@ -3908,23 +5192,44 @@ Matt provided wording.]</i></p> <p><i>[Dublin: The LWG asked Howard to discuss exception safety offline with David Abrahams. They had a discussion and believe there is no issue of exception safety with the proposed resolution.]</i></p> + + + + + + <hr> -<a name="133"><h3>133. map missing get_allocator()</h3></a><p><b>Section:</b> 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 6 Mar 1999</p> -<p>The title says it all.</p> +<h3><a name="133"></a>133. map missing get_allocator()</h3> +<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#TC">TC</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p><p>The title says it all.</p> + <p><b>Proposed resolution:</b></p> -<p>Insert in 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, paragraph 2, +<p>Insert in 23.3.1 [map], paragraph 2, after operator= in the map declaration:</p> <pre> allocator_type get_allocator() const;</pre> + + + + <hr> -<a name="134"><h3>134. vector constructors over specified</h3></a><p><b>Section:</b> 23.2.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.queue"> [lib.queue]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 6 Mar 1999</p> +<h3><a name="134"></a>134. vector constructors over specified</h3> +<p><b>Section:</b> 23.2.5.1 [vector.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The complexity description says: "It does at most 2N calls to the copy constructor of T and logN reallocations if they are just input iterators ...".</p> <p>This appears to be overly restrictive, dictating the precise memory/performance tradeoff for the implementor.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 23.2.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.queue"> [lib.queue]</a>, paragraph 1 to:</p> +<p>Change 23.2.5.1 [vector.cons], paragraph 1 to:</p> <p>-1- Complexity: The constructor template <class InputIterator> vector(InputIterator first, InputIterator last) @@ -3934,16 +5239,30 @@ first and last are of forward, bidirectional, or random access categories. It makes order N calls to the copy constructor of T and order logN reallocations if they are just input iterators. </p> + + <p><b>Rationale:</b></p> <p>"at most 2N calls" is correct only if the growth factor is greater than or equal to 2. </p> + + + + <hr> -<a name="136"><h3>136. seekp, seekg setting wrong streams?</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 6 Mar 1999</p> +<h3><a name="136"></a>136. seekp, seekg setting wrong streams?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-03-06</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>I may be misunderstanding the intent, but should not seekg set only the input stream and seekp set only the output stream? The description seems to say that each should set both input and output streams. If that's really the intent, I withdraw this proposal.</p> + + <p><b>Proposed resolution:</b></p> <p>In section 27.6.1.3 change:</p> @@ -3984,10 +5303,12 @@ Effects: If fail() != true, executes rdbuf()->pubseekoff(off, dir, ios_base:: <p><i>[Dublin: Dietmar Kühl thinks this is probably correct, but would like the opinion of more iostream experts before taking action.]</i></p> + <p><i>[Tokyo: Reviewed by the LWG. PJP noted that although his docs are incorrect, his implementation already implements the Proposed Resolution.]</i></p> + <p><i>[Post-Tokyo: Matt Austern comments:<br> Is it a problem with basic_istream and basic_ostream, or is it a problem with basic_stringbuf? @@ -3999,9 +5320,20 @@ s.pubseekoff(0, std::ios_base::beg); must fail.<br> This requirement is a bit weird. There's no similar requirement for basic_streambuf<>::seekpos, or for basic_filebuf<>::seekoff or basic_filebuf<>::seekpos.]</i></p> + + + + + + <hr> -<a name="137"><h3>137. Do use_facet and has_facet look in the global locale?</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 17 Mar 1999</p> -<p>Section 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> says:</p> +<h3><a name="137"></a>137. Do use_facet and has_facet look in the global locale?</h3> +<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#TC">TC</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-03-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>Section 22.1.1 [locale] says:</p> <p>-4- In the call to use_facet<Facet>(loc), the type argument chooses a facet, making available all members of the named type. If @@ -4011,7 +5343,7 @@ check if a locale implements a particular facet with the template function has_facet<Facet>(). </p> <p>This contradicts the specification given in section -22.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.global.templates"> [lib.locale.global.templates]</a>: +22.1.2 [locale.global.templates]: <br><br> template <class Facet> const Facet& use_facet(const locale& loc); <br> @@ -4021,14 +5353,27 @@ locale& loc); <br> -3- Throws: bad_cast if has_facet<Facet>(loc) is false. <br> -4- Notes: The reference returned remains valid at least as long as any copy of loc exists </p> + + <p><b>Proposed resolution:</b></p> <p>Remove the phrase "(or, failing that, in the global locale)" from section 22.1.1. </p> + + <p><b>Rationale:</b></p> <p>Needed for consistency with the way locales are handled elsewhere in the standard.</p> + + + + <hr> -<a name="139"><h3>139. Optional sequence operation table description unclear</h3></a><p><b>Section:</b> 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 30 Mar 1999</p> +<h3><a name="139"></a>139. Optional sequence operation table description unclear</h3> +<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-03-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The sentence introducing the Optional sequence operation table (23.1.1 paragraph 12) has two problems:</p> @@ -4040,6 +5385,8 @@ particular operations as being provided, implementations are free to omit them i cannot implement them in constant time.''<br> <br> B. That paragraph says nothing about amortized constant time, and it should. </p> + + <p><b>Proposed resolution:</b></p> <p>Replace the wording in 23.1.1 paragraph 12 which begins ``The operations in table 68 are provided only..." with:</p> @@ -4050,8 +5397,17 @@ with:</p> container types shown in the ``container'' column, and shall implement them so as to take amortized constant time.</p> </blockquote> + + + + <hr> -<a name="141"><h3>141. basic_string::find_last_of, find_last_not_of say pos instead of xpos</h3></a><p><b>Section:</b> 21.3.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::find.last.of"> [lib.string::find.last.of]</a>, 21.3.6.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::find.last.not.of"> [lib.string::find.last.not.of]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Arch Robison <b>Date:</b> 28 Apr 1999</p> +<h3><a name="141"></a>141. basic_string::find_last_of, find_last_not_of say pos instead of xpos</h3> +<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#TC">TC</a> + <b>Submitter:</b> Arch Robison <b>Date:</b> 1999-04-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1 surely have misprints where they say:<br> <br> @@ -4061,6 +5417,9 @@ say:<br> <p><i>[Judy Ward also sent in this issue for 21.3.6.4 with the same proposed resolution.]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1, the line which says:<br> <br> @@ -4069,8 +5428,16 @@ proposed resolution.]</i></p> </tt>to:<br> <tt><br> </tt>— <tt>xpos <= pos</tt> and <tt>xpos < size();</tt></p> + + + + <hr> -<a name="142"><h3>142. lexicographical_compare complexity wrong</h3></a><p><b>Section:</b> 25.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.lex.comparison"> [lib.alg.lex.comparison]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 20 Jun 1999</p> +<h3><a name="142"></a>142. lexicographical_compare complexity wrong</h3> +<p><b>Section:</b> 25.3.8 [alg.lex.comparison] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-06-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The lexicographical_compare complexity is specified as:<br> <br> "At most min((last1 - first1), (last2 - first2)) @@ -4082,15 +5449,17 @@ The best I can do is twice that expensive.</p> equality you have to check both < and >? Yes, IMO you are right! (and Matt states this complexity in his book)</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 25.3.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.lex.comparison"> [lib.alg.lex.comparison]</a> complexity to:</p> - <blockquote> +<p>Change 25.3.8 [alg.lex.comparison] complexity to:</p> + <blockquote><p> At most <tt>2*min((last1 - first1), (last2 - first2))</tt> applications of the corresponding comparison. - </blockquote> + </p></blockquote> <p>Change the example at the end of paragraph 3 to read:</p> - <blockquote> + <blockquote><p> [Example:<br> <br> for ( ; first1 != last1 && first2 != last2 ; @@ -4101,10 +5470,19 @@ right! (and Matt states this complexity in his book)</p> return first1 == last1 && first2 != last2;<br> <br> --end example] - </blockquote> + </p></blockquote> + + + + <hr> -<a name="144"><h3>144. Deque constructor complexity wrong </h3></a><p><b>Section:</b> 23.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array.cons"> [lib.array.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Herb Sutter <b>Date:</b> 9 May 1999</p> -<p>In 23.2.1.1 paragraph 6, the deque ctor that takes an iterator range appears +<h3><a name="144"></a>144. Deque constructor complexity wrong </h3> +<p><b>Section:</b> 23.2.2.1 [deque.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Herb Sutter <b>Date:</b> 1999-05-09</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#deque.cons">issues</a> in [deque.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 23.2.2.1 [deque.cons] paragraph 6, the deque ctor that takes an iterator range appears to have complexity requirements which are incorrect, and which contradict the complexity requirements for insert(). I suspect that the text in question, below, was taken from vector:</p> @@ -4126,16 +5504,27 @@ all of the following appears to be spurious:</p> <p>This makes perfect sense for vector, but not for deque. Why should deque gain an efficiency advantage from knowing in advance the number of elements to insert?</p> + + <p><b>Proposed resolution:</b></p> -<p>In 23.2.1.1 paragraph 6, replace the Complexity description, including the +<p>In 23.2.2.1 [deque.cons] paragraph 6, replace the Complexity description, including the footnote, with the following text (which also corrects the "abd" typo):</p> <blockquote> <p>Complexity: Makes last - first calls to the copy constructor of T.</p> </blockquote> + + + + <hr> -<a name="146"><h3>146. complex<T> Inserter and Extractor need sentries</h3></a><p><b>Section:</b> 26.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.ops"> [lib.complex.ops]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 12 May 1999</p> -<p>The <u> extractor</u> for complex numbers is specified as: </p> +<h3><a name="146"></a>146. complex<T> Inserter and Extractor need sentries</h3> +<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#TC">TC</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-05-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>The extractor for complex numbers is specified as: </p> <blockquote> @@ -4156,7 +5545,7 @@ Returns: is .</p> whitespace, unlike all other extractors in the standard library do? Shouldn't a sentry be used? <br> <br> -The <u>inserter</u> for complex numbers is specified as:</p> +The inserter for complex numbers is specified as:</p> <blockquote> @@ -4190,8 +5579,10 @@ field width is reset to zero after each insertion.</p> consistency with the other inserters and extractors in the library. Regarding the issue of padding in the inserter, I don't know what the intent was. </p> + + <p><b>Proposed resolution:</b></p> -<p>After 26.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex.ops"> [lib.complex.ops]</a> paragraph 14 (operator>>), add a +<p>After 26.3.6 [complex.ops] paragraph 14 (operator>>), add a Notes clause:</p> <blockquote> @@ -4201,14 +5592,25 @@ extractions. Therefore, the skipping of whitespace is specified to be the same for each of the simpler extractions.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>For extractors, the note is added to make it clear that skipping whitespace follows an "all-or-none" rule.</p> <p>For inserters, the LWG believes there is no defect; the standard is correct as written.</p> + + + + <hr> -<a name="147"><h3>147. Library Intro refers to global functions that aren't global</h3></a><p><b>Section:</b> 17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Lois Goldthwaite <b>Date:</b> 4 Jun 1999</p> +<h3><a name="147"></a>147. Library Intro refers to global functions that aren't global</h3> +<p><b>Section:</b> 17.4.4.3 [global.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Lois Goldthwaite <b>Date:</b> 1999-06-04</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#global.functions">issues</a> in [global.functions].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The library had many global functions until 17.4.1.1 [lib.contents] paragraph 2 was added: </p> @@ -4255,6 +5657,8 @@ virtual or global functions, however. </p> </blockquote> </blockquote> + + <p><b>Proposed resolution:</b></p> <p> Change "global" to "global or non-member" in:</p> <blockquote> @@ -4265,32 +5669,56 @@ virtual or global functions, however. </p> 17.4.4.3 [lib.global.functions] para 3,<br> 17.4.4.4 [lib.member.functions] para 2</p> </blockquote> + + <p><b>Rationale:</b></p> <p> Because operator new and delete are global, the proposed resolution was changed from "non-member" to "global or non-member. </p> + + + + <hr> -<a name="148"><h3>148. Functions in the example facet BoolNames should be const</h3></a><p><b>Section:</b> 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Jeremy Siek <b>Date:</b> 3 Jun 1999</p> -<p>In 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> paragraph 13, the do_truename() and +<h3><a name="148"></a>148. Functions in the example facet BoolNames should be const</h3> +<p><b>Section:</b> 22.2.8 [facets.examples] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Jeremy Siek <b>Date:</b> 1999-06-03</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facets.examples">issues</a> in [facets.examples].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 22.2.8 [facets.examples] paragraph 13, the do_truename() and do_falsename() functions in the example facet BoolNames should be const. The functions they are overriding in numpunct_byname<char> are const. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> paragraph 13, insert "const" in +<p>In 22.2.8 [facets.examples] paragraph 13, insert "const" in two places:</p> <blockquote> <p><tt>string do_truename() const { return "Oui Oui!"; }<br> string do_falsename() const { return "Mais Non!"; }</tt></p> </blockquote> + + + + <hr> -<a name="150"><h3>150. Find_first_of says integer instead of iterator </h3></a><p><b>Section:</b> 25.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find.first.of"> [lib.alg.find.first.of]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt McClure <b>Date:</b> 30 Jun 1999</p> +<h3><a name="150"></a>150. Find_first_of says integer instead of iterator </h3> +<p><b>Section:</b> 25.1.4 [alg.find.first.of] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Matt McClure <b>Date:</b> 1999-06-30</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find.first.of">issues</a> in [alg.find.first.of].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> + + <p><b>Proposed resolution:</b></p> -<p>Change 25.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.find.first.of"> [lib.alg.find.first.of]</a> paragraph 2 from:</p> +<p>Change 25.1.4 [alg.find.first.of] paragraph 2 from:</p> <blockquote> <p>Returns: The first iterator i in the range [first1, last1) such -that for some <u>integer</u> j in the range [first2, last2) ...</p> +that for some integer j in the range [first2, last2) ...</p> </blockquote> <p>to:</p> @@ -4299,8 +5727,17 @@ that for some <u>integer</u> j in the range [first2, last2) ...</p> <p>Returns: The first iterator i in the range [first1, last1) such that for some iterator j in the range [first2, last2) ...</p> </blockquote> + + + + <hr> -<a name="151"><h3>151. Can't currently clear() empty container</h3></a><p><b>Section:</b> 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Ed Brey <b>Date:</b> 21 Jun 1999</p> +<h3><a name="151"></a>151. Can't currently clear() empty container</h3> +<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Ed Brey <b>Date:</b> 1999-06-21</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>For both sequences and associative containers, a.clear() has the semantics of erase(a.begin(),a.end()), which is undefined for an empty container since erase(q1,q2) requires that q1 be dereferenceable @@ -4315,34 +5752,47 @@ Since q1 and q2 are only referenced in the range [q1, q2), and [q1, q2) is required to be a valid range, stating that q1 and q2 must be iterators or certain kinds of iterators is unnecessary. </p> + + <p><b>Proposed resolution:</b></p> <p>In 23.1.1, paragraph 3, change:</p> <blockquote> - <p>p and q2 denote valid iterators to a, q <u> and q1</u> denote valid dereferenceable iterators to a, [q1, q2) denotes a valid range</p> + <p>p and q2 denote valid iterators to a, q and q1 denote valid dereferenceable iterators to a, [q1, q2) denotes a valid range</p> </blockquote> <p>to:</p> <blockquote> - <p>p denotes a valid iterator to a, q denotes a valid dereferenceable iterator to a, [q1, q2) denotes a valid range<u> - in a</u></p> + <p>p denotes a valid iterator to a, q denotes a valid dereferenceable iterator to a, [q1, q2) denotes a valid range + in a</p> </blockquote> <p>In 23.1.2, paragraph 7, change:</p> <blockquote> - <p>p and q2 are valid iterators to a, q <u> and q1</u> are valid dereferenceable + <p>p and q2 are valid iterators to a, q and q1 are valid dereferenceable iterators to a, [q1, q2) is a valid range</p> </blockquote> <p>to</p> <blockquote> <p>p is a valid iterator to a, q is a valid dereferenceable iterator to a, [q1, q2) is a valid range - <u>into a</u></p> + into a</p> </blockquote> + + + + <hr> -<a name="152"><h3>152. Typo in <tt>scan_is()</tt> semantics</h3></a><p><b>Section:</b> 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="152"></a>152. Typo in <tt>scan_is()</tt> semantics</h3> +<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The semantics of <tt>scan_is()</tt> (paragraphs 4 and 6) is not exactly described because there is no function <tt>is()</tt> which only takes a character as argument. Also, in the effects clause (paragraph 3), the semantic is also kept vague.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> paragraphs 4 and 6, change the returns +<p>In 22.2.1.1.2 [locale.ctype.virtuals] paragraphs 4 and 6, change the returns clause from:</p> <blockquote> <p>"... such that <tt>is(*p)</tt> @@ -4350,8 +5800,19 @@ would..."</p> </blockquote> <p>to: "... such that <tt>is(m, *p)</tt> would...."</p> + + + + + <hr> -<a name="153"><h3>153. Typo in <tt>narrow()</tt> semantics</h3></a><p><b>Section:</b> 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="153"></a>153. Typo in <tt>narrow()</tt> semantics</h3> +<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#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#207">207</a></p> +<p><b>Discussion:</b></p> <p>The description of the array version of <tt>narrow()</tt> (in paragraph 11) is flawed: There is no member <tt>do_narrow()</tt> which takes only three arguments because in addition to the range a default @@ -4361,8 +5822,10 @@ character is needed.</p> two signatures followed by a <b>Returns</b> clause that only addresses one of them.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change the returns clause in 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> +<p>Change the returns clause in 22.2.1.3.2 [facet.ctype.char.members] paragraph 10 from:</p> <p> Returns: do_widen(low, high, to).</p> @@ -4370,7 +5833,7 @@ paragraph 10 from:</p> <p> Returns: do_widen(c) or do_widen(low, high, to), respectively.</p> -<p>Change 22.2.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.ctype.char.members"> [lib.facet.ctype.char.members]</a> paragraph 10 and 11 from:</p> +<p>Change 22.2.1.3.2 [facet.ctype.char.members] paragraph 10 and 11 from:</p> <pre> char narrow(char c, char /*dfault*/) const; const char* narrow(const char* low, const char* high, char /*dfault*/, char* to) const;</pre> @@ -4385,55 +5848,103 @@ respectively.</p> <p><i>[Kona: 1) the problem occurs in additional places, 2) a user defined version could be different.]</i></p> + <p><i>[Post-Tokyo: Dietmar provided the above wording at the request of the LWG. He could find no other places the problem occurred. He asks for clarification of the Kona "a user defined version..." comment above. Perhaps it was a circuitous way of saying "dfault" needed to be uncommented?]</i></p> + <p><i>[Post-Toronto: the issues list maintainer has merged in the proposed resolution from issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#207">207</a>, which addresses the same paragraphs.]</i></p> + + + + + + <hr> -<a name="154"><h3>154. Missing <tt>double</tt> specifier for <tt>do_get()</tt> -</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="154"></a>154. Missing <tt>double</tt> specifier for <tt>do_get()</tt></h3> +<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#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The table in paragraph 7 for the length modifier does not list the length modifier <tt>l</tt> to be applied if the type is <tt>double</tt>. Thus, the standard asks the implementation to do undefined things when using <tt>scanf()</tt> (the missing length modifier for <tt>scanf()</tt> when scanning <tt>double</tt>s is actually a problem I found quite often in production code, too).</p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>, paragraph 7, add a row in the Length +<p>In 22.2.2.1.2 [facet.num.get.virtuals], paragraph 7, add a row in the Length Modifier table to say that for <tt>double</tt> a length modifier <tt>l</tt> is to be used.</p> + + <p><b>Rationale:</b></p> <p>The standard makes an embarrassing beginner's mistake.</p> + + + + <hr> -<a name="155"><h3>155. Typo in naming the class defining the class <tt>Init</tt> -</h3></a><p><b>Section:</b> 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="155"></a>155. Typo in naming the class defining the class <tt>Init</tt></h3> +<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>There are conflicting statements about where the class -<tt>Init</tt> is defined. According to 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> paragraph 2 -it is defined as <tt>basic_ios::Init</tt>, according to 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> it is defined as <tt>ios_base::Init</tt>.</p> +<tt>Init</tt> is defined. According to 27.3 [iostream.objects] paragraph 2 +it is defined as <tt>basic_ios::Init</tt>, according to 27.4.2 [ios.base] it is defined as <tt>ios_base::Init</tt>.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> paragraph 2 from +<p>Change 27.3 [iostream.objects] paragraph 2 from "<tt>basic_ios::Init"</tt> to "<tt>ios_base::Init"</tt>.</p> + + <p><b>Rationale:</b></p> <p>Although not strictly wrong, the standard was misleading enough to warrant the change.</p> + + + + <hr> -<a name="156"><h3>156. Typo in <tt>imbue()</tt> description</h3></a><p><b>Section:</b> 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="156"></a>156. Typo in <tt>imbue()</tt> description</h3> +<p><b>Section:</b> 27.4.2.3 [ios.base.locales] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios.base.locales">issues</a> in [ios.base.locales].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>There is a small discrepancy between the declarations of -<tt>imbue()</tt>: in 27.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base"> [lib.ios.base]</a> the argument is passed as -<tt>locale const&</tt> (correct), in 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> it +<tt>imbue()</tt>: in 27.4.2 [ios.base] the argument is passed as +<tt>locale const&</tt> (correct), in 27.4.2.3 [ios.base.locales] it is passed as <tt>locale const</tt> (wrong).</p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.4.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.locales"> [lib.ios.base.locales]</a> change the <tt>imbue</tt> argument +<p>In 27.4.2.3 [ios.base.locales] change the <tt>imbue</tt> argument from "<tt>locale const" to "locale const&".</tt></p> + + + + <hr> -<a name="158"><h3>158. Underspecified semantics for <tt>setbuf()</tt> -</h3></a><p><b>Section:</b> 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="158"></a>158. Underspecified semantics for <tt>setbuf()</tt></h3> +<p><b>Section:</b> 27.5.2.4.2 [streambuf.virt.buffer] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.virt.buffer">issues</a> in [streambuf.virt.buffer].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The default behavior of <tt>setbuf()</tt> is described only for the situation that <tt>gptr() != 0 && gptr() != egptr()</tt>: namely to do nothing. What has to be done in other situations @@ -4444,45 +5955,79 @@ approach, namely to do nothing, too.</p> buffer management of derived classes unless these classes do it themselves, the default behavior of <tt>setbuf()</tt> should always be to do nothing.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a>, paragraph 3, Default behavior, +<p>Change 27.5.2.4.2 [streambuf.virt.buffer], paragraph 3, Default behavior, to: "Default behavior: Does nothing. Returns this."</p> + + + + <hr> -<a name="159"><h3>159. Strange use of <tt>underflow()</tt> -</h3></a><p><b>Section:</b> 27.5.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.get"> [lib.streambuf.virt.get]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="159"></a>159. Strange use of <tt>underflow()</tt></h3> +<p><b>Section:</b> 27.5.2.4.3 [streambuf.virt.get] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The description of the meaning of the result of <tt>showmanyc()</tt> seems to be rather strange: It uses calls to <tt>underflow()</tt>. Using <tt>underflow()</tt> is strange because this function only reads the current character but does not extract it, <tt>uflow()</tt> would extract the current character. This should be fixed to use <tt>sbumpc()</tt> instead.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.5.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.get"> [lib.streambuf.virt.get]</a> paragraph 1, +<p>Change 27.5.2.4.3 [streambuf.virt.get] paragraph 1, <tt>showmanyc()</tt>returns clause, by replacing the word "supplied" with the words "extracted from the stream".</p> + + + + <hr> -<a name="160"><h3>160. Typo: Use of non-existing function <tt>exception()</tt> -</h3></a><p><b>Section:</b> 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="160"></a>160. Typo: Use of non-existing function <tt>exception()</tt></h3> +<p><b>Section:</b> 27.6.1.1 [istream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The paragraph 4 refers to the function <tt>exception()</tt> which is not defined. Probably, the referred function is <tt>basic_ios<>::exceptions()</tt>.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a>, 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>, paragraph 1, -27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>, paragraph 3, and 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>, +<p>In 27.6.1.1 [istream], 27.6.1.3 [istream.unformatted], paragraph 1, +27.6.2.1 [ostream], paragraph 3, and 27.6.2.6.1 [ostream.formatted.reqmts], paragraph 1, change "<tt>exception()" to "exceptions()"</tt>.</p> <p><i>[Note to Editor: "exceptions" with an "s" is the correct spelling.]</i></p> + + + + + + <hr> -<a name="161"><h3>161. Typo: <tt>istream_iterator</tt> vs. <tt>istreambuf_iterator</tt> -</h3></a><p><b>Section:</b> 27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="161"></a>161. Typo: <tt>istream_iterator</tt> vs. <tt>istreambuf_iterator</tt></h3> +<p><b>Section:</b> 27.6.1.2.2 [istream.formatted.arithmetic] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.formatted.arithmetic">active issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.arithmetic">issues</a> in [istream.formatted.arithmetic].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The note in the second paragraph pretends that the first argument is an object of type <tt>istream_iterator</tt>. This is wrong: It is an object of type <tt>istreambuf_iterator</tt>.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.6.1.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.arithmetic"> [lib.istream.formatted.arithmetic]</a> from:</p> +<p>Change 27.6.1.2.2 [istream.formatted.arithmetic] from:</p> <blockquote> <p>The first argument provides an object of the istream_iterator class...</p> </blockquote> @@ -4490,9 +6035,18 @@ an object of type <tt>istreambuf_iterator</tt>.</p> <blockquote> <p>The first argument provides an object of the istreambuf_iterator class...</p> </blockquote> + + + + + <hr> -<a name="164"><h3>164. do_put() has apparently unused fill argument</h3></a><p><b>Section:</b> 22.2.5.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.virtuals"> [lib.locale.time.put.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> 23 Jul 1999</p> -<p>In 22.2.5.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.virtuals"> [lib.locale.time.put.virtuals]</a> the do_put() function is specified +<h3><a name="164"></a>164. do_put() has apparently unused fill argument</h3> +<p><b>Section:</b> 22.2.5.3.2 [locale.time.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 1999-07-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 22.2.5.3.2 [locale.time.put.virtuals] the do_put() function is specified as taking a fill character as an argument, but the description of the function does not say whether the character is used at all and, if so, in which way. The same holds for any format control parameters that @@ -4501,19 +6055,32 @@ adjustment or the field width. Is strftime() supposed to use the fill character in any way? In any case, the specification of time_put.do_put() looks inconsistent to me.<br> <br> Is the signature of do_put() wrong, or is the effects clause incomplete?</p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following note after 22.2.5.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.virtuals"> [lib.locale.time.put.virtuals]</a> +<p>Add the following note after 22.2.5.3.2 [locale.time.put.virtuals] paragraph 2:</p> <blockquote> <p> [Note: the <tt>fill</tt> argument may be used in the implementation-defined formats, or by derivations. A space character is a reasonable default for this argument. --end Note]</p> </blockquote> + + <p><b>Rationale:</b></p> <p>The LWG felt that while the normative text was correct, users need some guidance on what to pass for the <tt>fill</tt> argument since the standard doesn't say how it's used.</p> + + + + <hr> -<a name="165"><h3>165. <tt>xsputn()</tt>, <tt>pubsync()</tt> never called by <tt>basic_ostream</tt> members?</h3></a><p><b>Section:</b> 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="165"></a>165. <tt>xsputn()</tt>, <tt>pubsync()</tt> never called by <tt>basic_ostream</tt> members?</h3> +<p><b>Section:</b> 27.6.2.1 [ostream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream">issues</a> in [ostream].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 2 explicitly states that none of the <tt>basic_ostream</tt> functions falling into one of the groups "formatted output functions" and "unformatted output functions" calls any stream buffer function @@ -4537,6 +6104,8 @@ although the problem with the virtual members exists in both cases.</p> <li>relax the restriction and allow calling <tt>overflow()</tt> and <tt>xsputn()</tt>. Of course, the problem with <tt>flush()</tt> has to be resolved in some way.</li> </ol> + + <p><b>Proposed resolution:</b></p> <p>Change the last sentence of 27.6.2.1 (lib.ostream) paragraph 2 from:</p> <blockquote> @@ -4553,14 +6122,25 @@ although the problem with the virtual members exists in both cases.</p> <p><i>[Kona: the LWG believes this is a problem. Wish to ask Jerry or PJP why the standard is written this way.]</i></p> + <p><i>[Post-Tokyo: Dietmar supplied wording at the request of the LWG. He comments: The rules can be made a little bit more specific if necessary be explicitly spelling out what virtuals are allowed to be called from what functions and eg to state specifically that flush() is allowed to call sync() while other functions are not.]</i></p> + + + + + + <hr> -<a name="167"><h3>167. Improper use of <tt>traits_type::length()</tt> -</h3></a><p><b>Section:</b> 27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="167"></a>167. Improper use of <tt>traits_type::length()</tt></h3> +<p><b>Section:</b> 27.6.2.6.4 [ostream.inserters.character] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.character">issues</a> in [ostream.inserters.character].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 4 states that the length is determined using <tt>traits::length(s)</tt>. Unfortunately, this function is not defined for example if the character type is <tt>wchar_t</tt> and the @@ -4568,8 +6148,10 @@ type of <tt>s</tt> is <tt>char const*</tt>. Similar problems exist if the character type is <tt>char</tt> and the type of <tt>s</tt> is either <tt>signed char const*</tt> or <tt>unsigned char const*</tt>.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a> paragraph 4 from:</p> +<p>Change 27.6.2.6.4 [ostream.inserters.character] paragraph 4 from:</p> <blockquote> <p>Effects: Behaves like an formatted inserter (as described in lib.ostream.formatted.reqmts) of out. After a sentry object is @@ -4608,8 +6190,12 @@ const*</tt>.</p> <p><i>[Santa Cruz: Matt supplied new wording]</i></p> + <p><i>[Kona: changed "where <i>n</i> is" to " where <i>n</i> is the - number that would be computed as if by"]</i></p> + number that would be computed as if by"]</i></p> + + + <p><b>Rationale:</b></p> <p>We have five separate cases. In two of them we can use the @@ -4623,13 +6209,25 @@ there's one case where we just have to give up: where we've got a traits class for some arbitrary charT type, and we somehow have to deal with a const char*. There's nothing better to do but fall back to char_traits<char></p> + + + + + <hr> -<a name="168"><h3>168. Typo: formatted vs. unformatted</h3></a><p><b>Section:</b> 27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="168"></a>168. Typo: formatted vs. unformatted</h3> +<p><b>Section:</b> 27.6.2.7 [ostream.unformatted] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.unformatted">issues</a> in [ostream.unformatted].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The first paragraph begins with a descriptions what has to be done in <i>formatted</i> output functions. Probably this is a typo and the paragraph really want to describe unformatted output functions...</p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.6.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.unformatted"> [lib.ostream.unformatted]</a> paragraph 1, the first and last +<p>In 27.6.2.7 [ostream.unformatted] paragraph 1, the first and last sentences, change the word "formatted" to "unformatted":</p> <blockquote> @@ -4637,19 +6235,31 @@ sentences, change the word "formatted" to "... value specified for the <b>unformatted </b> output function."</p> </blockquote> + + + + <hr> -<a name="169"><h3>169. Bad efficiency of <tt>overflow()</tt> mandated</h3></a><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> +<h3><a name="169"></a>169. Bad efficiency of <tt>overflow()</tt> mandated</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Paragraph 8, Notes, of this section seems to mandate an extremely inefficient way of buffer handling for <tt>basic_stringbuf</tt>, especially in view of the restriction that <tt>basic_ostream</tt> -member functions are not allowed to use <tt>xsputn()</tt> (see 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>): For each character to be inserted, a new buffer +member functions are not allowed to use <tt>xsputn()</tt> (see 27.6.2.1 [ostream]): For each character to be inserted, a new buffer is to be created.</p> <p>Of course, the resolution below requires some handling of simultaneous input and output since it is no longer possible to update <tt>egptr()</tt> whenever <tt>epptr()</tt> is changed. A possible solution is to handle this in <tt>underflow()</tt>.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> paragraph 8, Notes, insert the words +<p>In 27.7.1.4 [stringbuf.virtuals] paragraph 8, Notes, insert the words "at least" as in the following:</p> <blockquote> <p>To make a write position available, the function reallocates (or initially @@ -4657,25 +6267,43 @@ solution is to handle this in <tt>underflow()</tt>.</p> current array object (if any), plus <b>at least</b> one additional write position.</p> </blockquote> + + + + <hr> -<a name="170"><h3>170. Inconsistent definition of <tt>traits_type</tt> -</h3></a><p><b>Section:</b> 27.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringstream"> [lib.stringstream]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> -<p>The classes <tt>basic_stringstream</tt> (27.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringstream"> [lib.stringstream]</a>), -<tt>basic_istringstream</tt> (27.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istringstream"> [lib.istringstream]</a>), and -<tt>basic_ostringstream</tt> (27.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream"> [lib.ostringstream]</a>) are inconsistent +<h3><a name="170"></a>170. Inconsistent definition of <tt>traits_type</tt></h3> +<p><b>Section:</b> 27.7.4 [stringstream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>The classes <tt>basic_stringstream</tt> (27.7.4 [stringstream]), +<tt>basic_istringstream</tt> (27.7.2 [istringstream]), and +<tt>basic_ostringstream</tt> (27.7.3 [ostringstream]) are inconsistent in their definition of the type <tt>traits_type</tt>: For <tt>istringstream</tt>, this type is defined, for the other two it is not. This should be consistent.</p> + + <p><b>Proposed resolution:</b></p> <p><b>Proposed resolution:</b></p> <p>To the declarations of -<tt>basic_ostringstream</tt> (27.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostringstream"> [lib.ostringstream]</a>) and -<tt>basic_stringstream</tt> (27.7.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringstream"> [lib.stringstream]</a>) add:</p> +<tt>basic_ostringstream</tt> (27.7.3 [ostringstream]) and +<tt>basic_stringstream</tt> (27.7.4 [stringstream]) add:</p> <blockquote> <pre>typedef traits traits_type;</pre> </blockquote> + + + + <hr> -<a name="171"><h3>171. Strange <tt>seekpos()</tt> semantics due to joint position</h3></a><p><b>Section:</b> 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Jul 1999</p> -<p>Overridden virtual functions, seekpos()</p> <p>In 27.8.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf"> [lib.filebuf]</a> paragraph 3, it is stated that a joint input and +<h3><a name="171"></a>171. Strange <tt>seekpos()</tt> semantics due to joint position</h3> +<p><b>Section:</b> 27.8.1.5 [filebuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.virtuals">issues</a> in [filebuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>Overridden virtual functions, seekpos()</p> <p>In 27.8.1.1 [filebuf] paragraph 3, it is stated that a joint input and output position is maintained by <tt>basic_filebuf</tt>. Still, the description of <tt>seekpos()</tt> seems to talk about different file positions. In particular, it is unclear (at least to me) what is @@ -4696,6 +6324,8 @@ this:</p> position is altered.</li> </ul> <p>Plus the appropriate error handling, that is...</p> + + <p><b>Proposed resolution:</b></p> <p>Change the unnumbered paragraph in 27.8.1.4 (lib.filebuf.virtuals) before paragraph 14 from:</p> @@ -4724,13 +6354,25 @@ paragraph 14 from:</p> </blockquote> <p><i>[Kona: Dietmar is working on a proposed resolution.]</i></p> + <p><i>[Post-Tokyo: Dietmar supplied the above wording.]</i></p> + + + + + + <hr> -<a name="172"><h3>172. Inconsistent types for <tt>basic_istream::ignore()</tt> -</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Greg Comeau, Dietmar Kühl <b>Date:</b> 23 Jul 1999</p> -<p>In 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a> the function +<h3><a name="172"></a>172. Inconsistent types for <tt>basic_istream::ignore()</tt></h3> +<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#TC">TC</a> + <b>Submitter:</b> Greg Comeau, Dietmar Kühl <b>Date:</b> 1999-07-23</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 27.6.1.1 [istream] the function <tt>ignore()</tt> gets an object of type <tt>streamsize</tt> as first -argument. However, in 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> +argument. However, in 27.6.1.3 [istream.unformatted] paragraph 23 the first argument is of type <tt>int.</tt></p> <p>As far as I can see this is not really a contradiction because @@ -4744,18 +6386,28 @@ submitted this issue, commenting: Either 27.6.1.1 should be modified to show a first parameter of type int, or 27.6.1.3 should be modified to show a first parameter of type streamsize and use numeric_limits<streamsize>::max.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> paragraph 23 and 24, change both uses +<p>In 27.6.1.3 [istream.unformatted] paragraph 23 and 24, change both uses of <tt>int</tt> in the description of <tt>ignore()</tt> to <tt>streamsize</tt>.</p> + + + + <hr> -<a name="173"><h3>173. Inconsistent types for <tt>basic_filebuf::setbuf()</tt> -</h3></a><p><b>Section:</b> 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Greg Comeau, Dietmar Kühl <b>Date:</b> 23 Jul 1999</p> +<h3><a name="173"></a>173. Inconsistent types for <tt>basic_filebuf::setbuf()</tt></h3> +<p><b>Section:</b> 27.8.1.5 [filebuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Greg Comeau, Dietmar Kühl <b>Date:</b> 1999-07-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.virtuals">issues</a> in [filebuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p> -In 27.8.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf"> [lib.filebuf]</a> the function <tt>setbuf()</tt> gets an +In 27.8.1.1 [filebuf] the function <tt>setbuf()</tt> gets an object of type <tt>streamsize</tt> as second argument. However, in -27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a> paragraph 9 the second argument is of type +27.8.1.5 [filebuf.virtuals] paragraph 9 the second argument is of type <tt>int</tt>. </p> @@ -4767,22 +6419,43 @@ intended. The same thing happened to <tt>basic_istream::ignore()</tt>, as described in issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#172">172</a>. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.8.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.virtuals"> [lib.filebuf.virtuals]</a> paragraph 9, change all uses of +<p>In 27.8.1.5 [filebuf.virtuals] paragraph 9, change all uses of <tt>int</tt> in the description of <tt>setbuf()</tt> to <tt>streamsize</tt>.</p> + + + + <hr> -<a name="174"><h3>174. Typo: <tt>OFF_T</tt> vs. <tt>POS_T</tt> -</h3></a><p><b>Section:</b> D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 23 Jul 1999</p> +<h3><a name="174"></a>174. Typo: <tt>OFF_T</tt> vs. <tt>POS_T</tt></h3> +<p><b>Section:</b> D.6 [depr.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.ios.members">issues</a> in [depr.ios.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>According to paragraph 1 of this section, <tt>streampos</tt> is the type <tt>OFF_T</tt>, the same type as <tt>streamoff</tt>. However, in paragraph 6 the <tt>streampos</tt> gets the type <tt>POS_T</tt></p> + + <p><b>Proposed resolution:</b></p> -<p>Change D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> paragraph 1 from "<tt>typedef +<p>Change D.6 [depr.ios.members] paragraph 1 from "<tt>typedef OFF_T streampos;</tt>" to "<tt>typedef POS_T streampos;</tt>"</p> + + + + <hr> -<a name="175"><h3>175. Ambiguity for <tt>basic_streambuf::pubseekpos()</tt> and a few other functions.</h3></a><p><b>Section:</b> D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 23 Jul 1999</p> +<h3><a name="175"></a>175. Ambiguity for <tt>basic_streambuf::pubseekpos()</tt> and a few other functions.</h3> +<p><b>Section:</b> D.6 [depr.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.ios.members">issues</a> in [depr.ios.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>According to paragraph 8 of this section, the methods <tt>basic_streambuf::pubseekpos()</tt>, <tt>basic_ifstream::open()</tt>, and <tt>basic_ofstream::open</tt> @@ -4794,24 +6467,47 @@ clause specifies, that the last argument has a default argument in three cases. However, this generates an ambiguity with the overloaded version because now the arguments are absolutely identical if the last argument is not specified.</p> + + <p><b>Proposed resolution:</b></p> -<p>In D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> paragraph 8, remove the default arguments for +<p>In D.6 [depr.ios.members] paragraph 8, remove the default arguments for <tt>basic_streambuf::pubseekpos()</tt>, <tt>basic_ifstream::open()</tt>, and <tt>basic_ofstream::open().</tt></p> + + + + <hr> -<a name="176"><h3>176. <tt>exceptions()</tt> in <tt>ios_base</tt>...?</h3></a><p><b>Section:</b> D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 23 Jul 1999</p> +<h3><a name="176"></a>176. <tt>exceptions()</tt> in <tt>ios_base</tt>...?</h3> +<p><b>Section:</b> D.6 [depr.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 1999-07-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.ios.members">issues</a> in [depr.ios.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The "overload" for the function <tt>exceptions()</tt> in paragraph 8 gives the impression that there is another function of this function defined in class <tt>ios_base</tt>. However, this is not the case. Thus, it is hard to tell how the semantics (paragraph 9) can be implemented: "Call the corresponding member function specified -in clause 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a>."</p> +in clause 27 [input.output]."</p> + + <p><b>Proposed resolution:</b></p> -<p>In D.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.ios.members"> [depr.ios.members]</a> paragraph 8, move the declaration of the +<p>In D.6 [depr.ios.members] paragraph 8, move the declaration of the function <tt>exceptions()</tt>into class <tt>basic_ios</tt>.</p> + + + + <hr> -<a name="179"><h3>179. Comparison of const_iterators to iterators doesn't work</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 2 Jul 1998</p> +<h3><a name="179"></a>179. Comparison of const_iterators to iterators doesn't work</h3> +<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#WP">WP</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 1998-07-02</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Currently the following will not compile on two well-known standard library implementations:</p> @@ -4883,8 +6579,10 @@ return i == ci; the begin and end iterators to be of the same type. </p> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>Insert this paragraph after 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 7:</p> +<p>Insert this paragraph after 23.1 [container.requirements] paragraph 7:</p> <blockquote> <p>In the expressions</p> <pre> i == j @@ -4905,9 +6603,13 @@ return i == ci; <tt>iterator</tt> and <tt>const_iterator</tt> could be freely mixed in iterator comparison and difference operations.]</i></p> + <p><i>[Redmond: Dave and Howard supplied a new proposed resolution which explicitly listed expressions; there was concern that the previous proposed resolution was too informal.]</i></p> + + + <p><b>Rationale:</b></p> <p> The LWG believes it is clear that the above wording applies only to @@ -4917,8 +6619,17 @@ where <tt>X</tt> is a container. There is no requirement that can be mixed. If mixing them is considered important, that's a separate issue. (Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#280">280</a>.) </p> + + + + <hr> -<a name="181"><h3>181. make_pair() unintended behavior</h3></a><p><b>Section:</b> 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 3 Aug 1999</p> +<h3><a name="181"></a>181. make_pair() unintended behavior</h3> +<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#TC">TC</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-08-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The claim has surfaced in Usenet that expressions such as<br> <br> <tt>make_pair("abc", 3)</tt><br> @@ -4928,8 +6639,10 @@ parameter to <tt> const char (&)[4]</tt>, which type is uncopyable.<br> <br> I doubt anyone intended that behavior... </p> + + <p><b>Proposed resolution:</b></p> -<p>In 20.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.utility"> [lib.utility]</a>, paragraph 1 change the following +<p>In 20.2 [utility], paragraph 1 change the following declaration of make_pair():</p> <blockquote> <pre>template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);</pre> @@ -4938,7 +6651,7 @@ declaration of make_pair():</p> <blockquote> <pre>template <class T1, class T2> pair<T1,T2> make_pair(T1, T2);</pre> </blockquote> -<p> In 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> paragraph 7 and the line before, change:</p> +<p> In 20.2.3 [pairs] paragraph 7 and the line before, change:</p> <blockquote> <pre>template <class T1, class T2> pair<T1, T2> make_pair(const T1& x, const T2& y);</pre> @@ -4954,6 +6667,8 @@ pair<T1, T2> make_pair(T1 x, T2 y);</pre> to not perform a copy of an argument, thus avoiding unnecessary copies.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>Two potential fixes were suggested by Matt Austern and Dietmar Kühl, respectively, 1) overloading with array arguments, and 2) use of @@ -4963,19 +6678,30 @@ that this was a much smaller change to the standard that the other two suggestions, and any efficiency concerns were more than offset by the advantages of the solution. Two implementors reported that the proposed resolution passed their test suites.</p> + + + + <hr> -<a name="182"><h3>182. Ambiguous references to size_t</h3></a><p><b>Section:</b> 17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Al Stevens <b>Date:</b> 15 Aug 1999</p> +<h3><a name="182"></a>182. Ambiguous references to size_t</h3> +<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Al Stevens <b>Date:</b> 1999-08-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Many references to <tt> size_t</tt> throughout the document omit the <tt> std::</tt> namespace qualification.</p> <p>For -example, 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> paragraph 2:</p> +example, 17.4.3.4 [replacement.functions] paragraph 2:</p> <blockquote> -<pre>— operator new(size_t) -— operator new(size_t, const std::nothrow_t&) -— operator new[](size_t) -— operator new[](size_t, const std::nothrow_t&)</pre> +<pre> operator new(size_t) + operator new(size_t, const std::nothrow_t&) + operator new[](size_t) + operator new[](size_t, const std::nothrow_t&)</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p> In 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> paragraph 2: replace:</p> +<p> In 17.4.3.4 [replacement.functions] paragraph 2: replace:</p> <blockquote> <p><tt> - operator new(size_t)<br> - operator new(size_t, const std::nothrow_t&)<br> @@ -5046,17 +6772,19 @@ declaration of template <class charT> class ctype.<br> template<class Iterator> struct iterator_traits<br> template<class T> struct iterator_traits<T*><br> template<class T> struct iterator_traits<const T*></p> + + <p><b>Rationale:</b></p> <p>The LWG believes correcting names like <tt>size_t</tt> and <tt>ptrdiff_t</tt> to <tt>std::size_t</tt> and <tt>std::ptrdiff_t</tt> to be essentially editorial. There there can't be another size_t or -ptrdiff_t meant anyway because, according to 17.4.3.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.extern.types"> [lib.extern.types]</a>,</p> +ptrdiff_t meant anyway because, according to 17.4.3.1.4 [extern.types],</p> -<blockquote> +<blockquote><p> For each type T from the Standard C library, the types ::T and std::T are reserved to the implementation and, when defined, ::T shall be identical to std::T. -</blockquote> +</p></blockquote> <p>The issue is treated as a Defect Report to make explicit the Project Editor's authority to make this change.</p> @@ -5064,18 +6792,31 @@ Editor's authority to make this change.</p> <p><i>[Post-Tokyo: Nico Josuttis provided the above wording at the request of the LWG.]</i></p> + <p><i>[Toronto: This is tangentially related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>, but only tangentially: the intent of this issue is to address use of the name <tt>size_t</tt> in contexts outside of namespace std, such as in the description of <tt>::operator new</tt>. The proposed changes should be reviewed to make sure they are correct.]</i></p> + <p><i>[pre-Copenhagen: Nico has reviewed the changes and believes them to be correct.]</i></p> + + + + + + <hr> -<a name="183"><h3>183. I/O stream manipulators don't work for wide character streams</h3></a><p><b>Section:</b> 27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 7 Jul 1999</p> -<p>27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> paragraph 3 says (clause numbering added for +<h3><a name="183"></a>183. I/O stream manipulators don't work for wide character streams</h3> +<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#WP">WP</a> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1999-07-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>27.6.3 [std.manip] paragraph 3 says (clause numbering added for exposition):</p> <blockquote> <p>Returns: An object s of unspecified type such that if [1] out is an (instance @@ -5102,8 +6843,10 @@ ostreams.</p> <p>I'd be happier if there was a better way of saying this, to make it clear that the value of the expression is "the same specialization of basic_ostream as out"&</p> + + <p><b>Proposed resolution:</b></p> -<p>Replace section 27.6.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.std.manip"> [lib.std.manip]</a> except paragraph 1 with the +<p>Replace section 27.6.3 [std.manip] except paragraph 1 with the following:</p> <blockquote> <p>2- The type designated smanip in each of the following function @@ -5249,19 +6992,32 @@ in. <p><i>[Kona: Andy Sawyer and Beman Dawes will work to improve the wording of the proposed resolution.]</i></p> + <p><i>[Tokyo - The LWG noted that issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a> involves the same paragraphs.]</i></p> + <p><i>[Post-Tokyo: The issues list maintainer combined the proposed resolution of this issue with the proposed resolution for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a> as they both involved the same paragraphs, and were so intertwined that dealing with them separately appear fraught with error. The full text was supplied by Bill Plauger; it was cross checked against changes supplied by Andy Sawyer. It should be further checked by the LWG.]</i></p> + + + + + + <hr> -<a name="184"><h3>184. numeric_limits<bool> wording problems</h3></a><p><b>Section:</b> 18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 21 Jul 1999</p> +<h3><a name="184"></a>184. numeric_limits<bool> wording problems</h3> +<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#WP">WP</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 1999-07-21</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>bools are defined by the standard to be of integer types, as per -3.9.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.fundamental"> [basic.fundamental]</a> paragraph 7. However "integer types" +3.9.1 [basic.fundamental] paragraph 7. However "integer types" seems to have a special meaning for the author of 18.2. The net effect is an unclear and confusing specification for numeric_limits<bool> as evidenced below.</p> @@ -5298,8 +7054,10 @@ types with base representation other than 2.</p> <p>Furthermore, numeric_limits<bool>::is_modulo and numeric_limits<bool>::is_signed have similar problems.</p> + + <p><b>Proposed resolution:</b></p> -<p>Append to the end of 18.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.special"> [lib.numeric.special]</a>:</p> +<p>Append to the end of 18.2.1.5 [numeric.special]:</p> <blockquote> <p>The specialization for bool shall be provided as follows:</p> <pre> namespace std { @@ -5348,11 +7106,24 @@ numeric_limits<bool>::is_signed have similar problems.</p> rather than more general wording in the original proposed resolution.]</i></p> + <p><i>[Post-Tokyo: At the request of the LWG in Tokyo, Nico Josuttis provided the above wording.]</i></p> + + + + + + <hr> -<a name="185"><h3>185. Questionable use of term "inline"</h3></a><p><b>Section:</b> 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> UK Panel <b>Date:</b> 26 Jul 1999</p> -<p>Paragraph 4 of 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> says:</p> +<h3><a name="185"></a>185. Questionable use of term "inline"</h3> +<p><b>Section:</b> 20.5 [function.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> UK Panel <b>Date:</b> 1999-07-26</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#function.objects">active issues</a> in [function.objects].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>Paragraph 4 of 20.5 [function.objects] says:</p> <blockquote> <p> [Example: To negate every element of a: transform(a.begin(), a.end(), a.begin(), negate<double>()); The corresponding functions will inline @@ -5376,28 +7147,42 @@ any "inlining" will take place in this case.</p> <p>take care to state that this may indeed NOT be the case.</p> <p>Thus the example "mandates" behavior that is explicitly not required elsewhere.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> paragraph 1, remove the sentence:</p> +<p>In 20.5 [function.objects] paragraph 1, remove the sentence:</p> <blockquote> <p>They are important for the effective use of the library.</p> </blockquote> -<p>Remove 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> paragraph 2, which reads:</p> +<p>Remove 20.5 [function.objects] paragraph 2, which reads:</p> <blockquote> <p> Using function objects together with function templates increases the expressive power of the library as well as making the resulting code much more efficient.</p> </blockquote> -<p>In 20.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.tuple"> [lib.tuple]</a> paragraph 4, remove the sentence:</p> +<p>In 20.5 [function.objects] paragraph 4, remove the sentence:</p> <blockquote> <p>The corresponding functions will inline the addition and the negation.</p> </blockquote> <p><i>[Kona: The LWG agreed there was a defect.]</i></p> + <p><i>[Tokyo: The LWG crafted the proposed resolution.]</i></p> + + + + + + <hr> -<a name="186"><h3>186. bitset::set() second parameter should be bool</h3></a><p><b>Section:</b> 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Darin Adler <b>Date:</b> 13 Aug 1999</p> -<p>In section 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a>, paragraph 13 defines the +<h3><a name="186"></a>186. bitset::set() second parameter should be bool</h3> +<p><b>Section:</b> 23.3.5.2 [bitset.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Darin Adler <b>Date:</b> 1999-08-13</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.members">issues</a> in [bitset.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>In section 23.3.5.2 [bitset.members], paragraph 13 defines the bitset::set operation to take a second parameter of type int. The function tests whether this value is non-zero to determine whether to set the bit to true or false. The type of this second parameter should @@ -5406,8 +7191,10 @@ another, the result type from test() is bool. In addition, it's possible to slice an integer that's larger than an int. This can't happen with bool, since conversion to bool has the semantic of translating 0 to false and any non-zero value to true.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a> Para 1 Replace:</p> +<p>In 23.3.5 [template.bitset] Para 1 Replace:</p> <blockquote> <pre>bitset<N>& set(size_t pos, int val = true ); </pre> </blockquote> @@ -5415,7 +7202,7 @@ translating 0 to false and any non-zero value to true.</p> <blockquote> <pre>bitset<N>& set(size_t pos, bool val = true );</pre> </blockquote> -<p>In 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> Para 12(.5) Replace:</p> +<p>In 23.3.5.2 [bitset.members] Para 12(.5) Replace:</p> <blockquote> <pre>bitset<N>& set(size_t pos, int val = 1 );</pre> </blockquote> @@ -5426,15 +7213,29 @@ translating 0 to false and any non-zero value to true.</p> <p><i>[Kona: The LWG agrees with the description. Andy Sawyer will work on better P/R wording.]</i></p> + <p><i>[Post-Tokyo: Andy provided the above wording.]</i></p> + + + <p><b>Rationale:</b></p> <p><tt>bool</tt> is a better choice. It is believed that binary compatibility is not an issue, because this member function is usually implemented as <tt>inline</tt>, and because it is already the case that users cannot rely on the type of a pointer to a nonvirtual member of a standard library class.</p> + + + + + <hr> -<a name="187"><h3>187. iter_swap underspecified</h3></a><p><b>Section:</b> 25.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.swap"> [lib.alg.swap]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 14 Aug 1999</p> +<h3><a name="187"></a>187. iter_swap underspecified</h3> +<p><b>Section:</b> 25.2.3 [alg.swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-08-14</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.swap">issues</a> in [alg.swap].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The description of iter_swap in 25.2.2 paragraph 7,says that it ``exchanges the values'' of the objects to which two iterators refer.<br> <br> What it doesn't say is whether it does so using swap @@ -5469,6 +7270,9 @@ make that optimization illegal. </p> <p><i>[Kona: The LWG notes the original need for iter_swap was proxy iterators which are no longer permitted.]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change the effect clause of iter_swap in 25.2.2 paragraph 7 from:</p> <blockquote> @@ -5479,6 +7283,8 @@ which are no longer permitted.]</i></p> <p><tt>swap(*a, *b)</tt>.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>It's useful to say just what <tt>iter_swap</tt> does. There may be some iterators for which we want to specialize <tt>iter_swap</tt>, @@ -5489,8 +7295,18 @@ iter_swap should not be specialized as suggested above. That would do much more than exchanging the two iterators' values: it would change predecessor/successor relationships, possibly moving the iterator from one list to another. That would surely be inappropriate.</p> + + + + + <hr> -<a name="189"><h3>189. setprecision() not specified correctly</h3></a><p><b>Section:</b> 27.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.state"> [lib.fmtflags.state]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 25 Aug 1999</p> +<h3><a name="189"></a>189. setprecision() not specified correctly</h3> +<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#TC">TC</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 1999-08-25</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>27.4.2.2 paragraph 9 claims that setprecision() sets the precision, and includes a parenthetical note saying that it is the number of digits after the decimal point.<br> @@ -5502,11 +7318,22 @@ point.<br> <br> I would like the committee to look at the definition carefully and correct the statement in 27.4.2.2</p> + + <p><b>Proposed resolution:</b></p> -<p>Remove from 27.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fmtflags.state"> [lib.fmtflags.state]</a>, paragraph 9, the text +<p>Remove from 27.4.2.2 [fmtflags.state], paragraph 9, the text "(number of digits after the decimal point)".</p> + + + + <hr> -<a name="193"><h3>193. Heap operations description incorrect</h3></a><p><b>Section:</b> 25.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.heap.operations"> [lib.alg.heap.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Markus Mauhart <b>Date:</b> 24 Sep 1999</p> +<h3><a name="193"></a>193. Heap operations description incorrect</h3> +<p><b>Section:</b> 25.3.6 [alg.heap.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Markus Mauhart <b>Date:</b> 1999-09-24</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#216">216</a></p> +<p><b>Discussion:</b></p> <p>25.3.6 [lib.alg.heap.operations] states two key properties of a heap [a,b), the first of them is<br> <br> @@ -5524,8 +7351,10 @@ could not be used for a priority queue as explained in 23.2.3.2.2 [lib.priqueue.members] (where I assume that a "priority queue" respects priority AND time).</p> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>Change 25.3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.heap.operations"> [lib.alg.heap.operations]</a> property (1) from:</p> +<p>Change 25.3.6 [alg.heap.operations] property (1) from:</p> <blockquote> <p>(1) *a is the largest element</p> </blockquote> @@ -5533,17 +7362,27 @@ priority AND time).</p> <blockquote> <p>(1) There is no element greater than <tt>*a</tt></p> </blockquote> + + + + + <hr> -<a name="195"><h3>195. Should <tt>basic_istream::sentry</tt>'s constructor ever set eofbit?</h3></a><p><b>Section:</b> 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 13 Oct 1999</p> +<h3><a name="195"></a>195. Should <tt>basic_istream::sentry</tt>'s constructor ever set eofbit?</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1999-10-13</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Suppose that <tt>is.flags() & ios_base::skipws</tt> is nonzero. What should <tt>basic_istream<>::sentry</tt>'s constructor do if it reaches eof while skipping whitespace? 27.6.1.1.2/5 suggests it should set failbit. Should it set eofbit as well? The standard doesn't seem to answer that question.</p> -<p>On the one hand, nothing in 27.6.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::sentry"> [lib.istream::sentry]</a> says that +<p>On the one hand, nothing in 27.6.1.1.3 [istream::sentry] says that <tt>basic_istream<>::sentry</tt> should ever set eofbit. On the -other hand, 27.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream"> [lib.istream]</a> paragraph 4 says that if +other hand, 27.6.1.1 [istream] paragraph 4 says that if extraction from a <tt>streambuf</tt> "returns <tt>traits::eof()</tt>, then the input function, except as explicitly noted otherwise, completes its actions and does @@ -5572,6 +7411,8 @@ an EOL indicator. By typing a "line" consisting solely of ^D you cause a read to return 0 bytes, and by convention this is interpreted as end of file.)</p> </blockquote> + + <p><b>Proposed resolution:</b></p> <p>Add a sentence to the end of 27.6.1.1.2 paragraph 2:</p> <blockquote> @@ -5581,8 +7422,18 @@ returns <tt>traits::eof()</tt>, the function calls <tt>ios_base::failure</tt>). </p> </blockquote> + + + + <hr> -<a name="198"><h3>198. Validity of pointers and references unspecified after iterator destruction</h3></a><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 3 Nov 1999</p> +<h3><a name="198"></a>198. Validity of pointers and references unspecified after iterator destruction</h3> +<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#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 1999-11-03</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Is a pointer or reference obtained from an iterator still valid after destruction of the iterator? @@ -5629,14 +7480,15 @@ elements of containers.</p> <p>The standard itself assumes that pointers and references obtained from an iterator are still valid after iterator destruction or -change. The definition of reverse_iterator::operator*(), 24.4.1.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.conv"> [lib.reverse.iter.conv]</a>, which returns a reference, defines +change. The definition of reverse_iterator::operator*(), 24.4.1.3.3 [reverse.iter.conv], which returns a reference, defines effects:</p> <blockquote> <pre>Iterator tmp = current; return *--tmp;</pre> </blockquote> -<p>The definition of reverse_iterator::operator->(), 24.4.1.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op.star"> [lib.reverse.iter.op.star]</a>, which returns a pointer, defines effects:</p> +<p>The definition of reverse_iterator::operator->(), 24.4.1.3.4 +[reverse.iter.op.star], which returns a pointer, defines effects:</p> <blockquote> <pre>return &(operator*());</pre> </blockquote> @@ -5646,14 +7498,16 @@ valid after iterator destruction or change, the standard should say so explicitly. This will also reduce the chance of user code breaking unexpectedly when porting to a different standard library implementation.</p> + + <p><b>Proposed resolution:</b></p> -<p>Add a new paragraph to 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>:</p> -<blockquote> +<p>Add a new paragraph to 24.1 [iterator.requirements]:</p> +<blockquote><p> Destruction of an iterator may invalidate pointers and references previously obtained from that iterator. -</blockquote> +</p></blockquote> -<p>Replace paragraph 1 of 24.4.1.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.conv"> [lib.reverse.iter.conv]</a> with:</p> +<p>Replace paragraph 1 of 24.4.1.3.3 [reverse.iter.conv] with:</p> <blockquote> <p><b>Effects:</b></p> @@ -5666,7 +7520,7 @@ previously obtained from that iterator. [<i>Note:</i> This operation must use an auxiliary member variable, rather than a temporary variable, to avoid returning a reference that persists beyond the lifetime of its associated iterator. (See -24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>.) The name of this member variable is shown for +24.1 [iterator.requirements].) The name of this member variable is shown for exposition only. <i>--end note</i>] </p> </blockquote> @@ -5674,10 +7528,12 @@ exposition only. <i>--end note</i>] <p><i>[Post-Tokyo: The issue has been reformulated purely in terms of iterators.]</i></p> + <p><i>[Pre-Toronto: Steve Cleary pointed out the no-invalidation assumption by reverse_iterator. The issue and proposed resolution was reformulated yet again to reflect this reality.]</i></p> + <p><i>[Copenhagen: Steve Cleary pointed out that reverse_iterator assumes its underlying iterator has persistent pointers and references. Andy Koenig pointed out that it is possible to rewrite @@ -5686,6 +7542,9 @@ However, this issue is related to issue <a href="http://www.open-std.org/jtc1/sc decide it is intentional that <tt>p[n]</tt> may return by value instead of reference when <tt>p</tt> is a Random Access Iterator, other changes in reverse_iterator will be necessary.]</i></p> + + + <p><b>Rationale:</b></p> <p>This issue has been discussed extensively. Note that it is <i>not</i> an issue about the behavior of predefined iterators. It is @@ -5704,8 +7563,19 @@ predefined iterators like <tt>list<int>::iterator</tt>. Clause 23 should be reviewed to make sure that guarantees for predefined iterators are as strong as users expect.</p> + + + + + <hr> -<a name="199"><h3>199. What does <tt>allocate(0)</tt> return?</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 19 Nov 1999</p> +<h3><a name="199"></a>199. What does <tt>allocate(0)</tt> return?</h3> +<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#TC">TC</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1999-11-19</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p> Suppose that <tt>A</tt> is a class that conforms to the Allocator requirements of Table 32, and <tt>a</tt> is an @@ -5715,10 +7585,14 @@ possibilities: forbid the argument <tt>0</tt>, return a null pointer, or require that the return value be a unique non-null pointer. </p> + + <p><b>Proposed resolution:</b></p> <p> Add a note to the <tt>allocate</tt> row of Table 32: "[<i>Note:</i> If <tt>n == 0</tt>, the return value is unspecified. <i>--end note</i>]"</p> + + <p><b>Rationale:</b></p> <p>A key to understanding this issue is that the ultimate use of allocate() is to construct an iterator, and that iterator for zero @@ -5726,8 +7600,17 @@ length sequences must be the container's past-the-end representation. Since this already implies special case code, it would be over-specification to mandate the return value. </p> + + + + <hr> -<a name="200"><h3>200. Forward iterator requirements don't allow constant iterators</h3></a><p><b>Section:</b> 24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 19 Nov 1999</p> +<h3><a name="200"></a>200. Forward iterator requirements don't allow constant iterators</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 1999-11-19</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> In table 74, the return type of the expression <tt>*a</tt> is given as <tt>T&</tt>, where <tt>T</tt> is the iterator's value type. @@ -5736,6 +7619,8 @@ is never defined very precisely, but it is clear that the value type of, say, <tt>std::list<int>::const_iterator</tt> is supposed to be <tt>int</tt>, not <tt>const int</tt>.) </p> + + <p><b>Proposed resolution:</b></p> <p> In table 74, in the <tt>*a</tt> and <tt>*r++</tt> rows, change the @@ -5752,14 +7637,102 @@ and that these should be addressed as a single package. Note that issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#180">180</a> has already been declared NAD Future for that very reason.]</i></p> + <p><i>[Redmond: the LWG thinks this is separable from other constness issues. This issue is just cleanup; it clarifies language that was written before we had iterator_traits. Proposed resolution was modified: the original version only discussed *a. It was pointed out that we also need to worry about *r++ and a->m.]</i></p> + + + + + + +<hr> +<h3><a name="201"></a>201. Numeric limits terminology wrong</h3> +<p><b>Section:</b> 18.2.1 [limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Stephen Cleary <b>Date:</b> 1999-12-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#limits">issues</a> in [limits].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In some places in this section, the terms "fundamental types" and +"scalar types" are used when the term "arithmetic types" is intended. +The current usage is incorrect because void is a fundamental type and +pointers are scalar types, neither of which should have +specializations of numeric_limits. +</p> +<p><i>[Lillehammer: it remains true that numeric_limits is using + imprecise language. However, none of the proposals for changed + wording are clearer. A redesign of numeric_limits is needed, but this + is more a task than an open issue.]</i></p> + + + +<p><b>Proposed resolution:</b></p> + +<p> +Change 18.2 [support.limits] to: +</p> + +<blockquote> +<p> +-1- The headers <tt><limits></tt>, <tt><climits></tt>, +<tt><cfloat></tt>, and <tt><cinttypes></tt> supply +characteristics of implementation-dependent <del>fundamental</del> +<ins>arithmetic</ins> types (3.9.1). +</p> +</blockquote> + +<p> +Change 18.2.1 [limits] to: +</p> + +<blockquote> +<p> +-1- The <tt>numeric_limits</tt> component provides a C++ program with +information about various properties of the implementation's +representation of the <del>fundamental</del> <ins>arithmetic</ins> +types. +</p> +<p> +-2- Specializations shall be provided for each <del>fundamental</del> +<ins>arithmetic</ins> type, both floating point and integer, including +<tt>bool</tt>. The member <tt>is_specialized</tt> shall be <tt>true</tt> +for all such specializations of <tt>numeric_limits</tt>. +</p> +<p> +-4- Non-<del>fundamental</del><ins>arithmetic</ins> standard types, such +as <tt>complex<T></tt> (26.3.2), shall not have specializations. +</p> +</blockquote> + +<p> +Change 18.2.1.1 [numeric.limits] to: +</p> + +<blockquote> +<p> +<del>-1- The member <tt>is_specialized</tt> makes it possible to distinguish +between fundamental types, which have specializations, and non-scalar types, +which do not.</del> +</p> +</blockquote> + + + + + + <hr> -<a name="202"><h3>202. unique() effects unclear when predicate not an equivalence relation</h3></a><p><b>Section:</b> 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andrew Koenig <b>Date:</b> 13 Jan 2000</p> +<h3><a name="202"></a>202. unique() effects unclear when predicate not an equivalence relation</h3> +<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#WP">WP</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-01-13</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> What should unique() do if you give it a predicate that is not an equivalence relation? There are at least two plausible answers: @@ -5825,15 +7798,17 @@ result should be 1, 3, 7, 2.<br> In fact, the SGI implementation of unique() does neither: It yields 1, 3, 7. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> paragraph 1 to:</p> -<blockquote> +<p>Change 25.2.9 [alg.unique] paragraph 1 to:</p> +<blockquote><p> For a nonempty range, eliminates all but the first element from every consecutive group of equivalent elements referred to by the iterator <tt>i</tt> in the range [first+1, last) for which the following conditions hold: <tt>*(i-1) == *i</tt> or <tt>pred(*(i-1), *i) != false</tt>. -</blockquote> +</p></blockquote> <p> Also insert a new paragraph, paragraph 2a, that reads: "Requires: The @@ -5850,22 +7825,26 @@ pointed out that "i-1" is incorrect, since "i" can refer to the first iterator in the range. Matt provided wording to address this problem.]</i></p> + <p><i>[Curaçao: The LWG changed "... the range (first, last)..." to "... the range [first+1, last)..." for clarity. They considered this change close enough to editorial to not require another round of review.]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG also considered an alternative resolution: change -25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> paragraph 1 to:</p> +25.2.9 [alg.unique] paragraph 1 to:</p> -<blockquote> +<blockquote><p> For a nonempty range, eliminates all but the first element from every consecutive group of elements referred to by the iterator <tt>i</tt> in the range (first, last) for which the following conditions hold: <tt>*(i-1) == *i</tt> or <tt>pred(*(i-1), *i) != false</tt>. -</blockquote> +</p></blockquote> <p> Also insert a new paragraph, paragraph 1a, that reads: "Notes: The @@ -5879,8 +7858,316 @@ alternative resolution does not, and it gives enough information so that the behavior of unique() for a non-equivalence relation is specified. Both resolutions are consistent with the behavior of existing implementations.</p> + + + + + <hr> -<a name="208"><h3>208. Unnecessary restriction on past-the-end iterators</h3></a><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Stephen Cleary <b>Date:</b> 02 Feb 2000</p> +<h3><a name="206"></a>206. operator new(size_t, nothrow) may become unlinked to ordinary operator new if ordinary version replaced</h3> +<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#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 1999-08-29</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>As specified, the implementation of the nothrow version of operator +new does not necessarily call the ordinary operator new, but may +instead simply call the same underlying allocator and return a null +pointer instead of throwing an exception in case of failure.</p> + +<p>Such an implementation breaks code that replaces the ordinary +version of new, but not the nothrow version. If the ordinary version +of new/delete is replaced, and if the replaced delete is not +compatible with pointers returned from the library versions of new, +then when the replaced delete receives a pointer allocated by the +library new(nothrow), crash follows.</p> + +<p>The fix appears to be that the lib version of new(nothrow) must +call the ordinary new. Thus when the ordinary new gets replaced, the +lib version will call the replaced ordinary new and things will +continue to work.</p> + +<p>An alternative would be to have the ordinary new call +new(nothrow). This seems sub-optimal to me as the ordinary version of +new is the version most commonly replaced in practice. So one would +still need to replace both ordinary and nothrow versions if one wanted +to replace the ordinary version.</p> + +<p>Another alternative is to put in clear text that if one version is +replaced, then the other must also be replaced to maintain +compatibility. Then the proposed resolution below would just be a +quality of implementation issue. There is already such text in +paragraph 7 (under the new(nothrow) version). But this nuance is +easily missed if one reads only the paragraphs relating to the +ordinary new.</p> + +<p> +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2158.html">N2158</a> +has been written explaining the rationale for the proposed resolution below. +</p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Change 18.5.1.1 [new.delete.single]: +</p> + +<blockquote> +<pre>void* operator new(std::size_t <i>size</i>, const std::nothrow_t&) throw(); +</pre> +<blockquote> +<p> +-5- <i>Effects:</i> Same as above, except that it is called by a placement +version of a <i>new-expression</i> when a C++ program prefers a null pointer result as +an error indication, instead of a <tt>bad_alloc</tt> exception. +</p> + +<p> +-6- <i>Replaceable:</i> a C++ program may define a function with this function +signature that displaces the default version defined by the C++ Standard +library. +</p> + +<p> +-7- <i>Required behavior:</i> Return a non-null pointer to suitably aligned +storage (3.7.4), or else return a null pointer. This nothrow version of operator +new returns a pointer obtained as if acquired from the <ins>(possibly +replaced)</ins> ordinary version. This requirement is binding on a replacement +version of this function. +</p> + +<p> +-8- <i>Default behavior:</i> +</p> +<ul> +<li><ins> +Calls <tt>operator new(<i>size</i>)</tt>. +</ins></li> +<li><ins> +If the call to <tt>operator new(<i>size</i>)</tt> returns normally, returns +the result of that call, else +</ins></li> +<li><ins> +if the call to <tt>operator new(<i>size</i>)</tt> throws an exception, returns +a null pointer. +</ins></li> +<li><del> +Executes a loop: Within the loop, the function first attempts to allocate the +requested storage. Whether the attempt involves a call to the Standard C library +function <tt>malloc</tt> is unspecified. +</del></li> +<li><del> +Returns a pointer to the allocated storage if the attempt is successful. +Otherwise, if the last argument to <tt>set_new_handler()</tt> was a null +pointer, return a null pointer. +</del></li> +<li><del> +Otherwise, the function calls the current <i>new_handler</i> (18.5.2.2). If the +called function returns, the loop repeats. +</del></li> +<li><del> +The loop terminates when an attempt to allocate the requested storage is +successful or when a called <i>new_handler</i> function does not return. If the +called <i>new_handler</i> function terminates by throwing a <tt>bad_alloc +exception</tt>, the function returns a null pointer. +</del></li> +</ul> +<p> +-9- [<i>Example:</i> +</p> +<blockquote><pre>T* p1 = new T; <i>// throws bad_alloc if it fails</i> +T* p2 = new(nothrow) T; <i>// returns 0 if it fails</i> +</pre></blockquote> +<p> +--<i>end example</i>] +</p> +</blockquote> + +<pre>void operator delete(void* <i>ptr</i>) throw(); +<del>void operator delete(void* <i>ptr</i>, const std::nothrow_t&) throw();</del> +</pre> + +<blockquote> +<p> +-10- <i>Effects:</i> The <i>deallocation function</i> (3.7.4.2) called by a +<i>delete-expression</i> to render the value of <tt><i>ptr</i></tt> invalid. +</p> +<p> +-11- <i>Replaceable:</i> a C++ program may define a function with this function +signature that displaces the default version defined by the C++ Standard +library. +</p> +<p> +-12- <i>Requires:</i> the value of <tt><i>ptr</i></tt> is null or the value +returned by an earlier call to the <del>default</del> <ins>(possibly +replaced)</ins> <tt>operator new(std::size_t)</tt> or <tt>operator +new(std::size_t, const std::nothrow_t&)</tt>. +</p> +<p> +-13- <i>Default behavior:</i> +</p> +<ul> +<li> +For a null value of <tt><i>ptr</i></tt>, do nothing. +</li> +<li> +Any other value of <tt><i>ptr</i></tt> shall be a value returned earlier by a +call to the default <tt>operator new</tt>, which was not invalidated by an +intervening call to <tt>operator delete(void*)</tt> (17.4.3.7). For such a +non-null value of <tt><i>ptr</i></tt>, reclaims storage allocated by the earlier +call to the default <tt>operator new</tt>. +</li> +</ul> +<p> +-14- <i>Remarks:</i> It is unspecified under what conditions part or all of +such reclaimed storage is allocated by a subsequent call to <tt>operator +new</tt> or any of <tt>calloc</tt>, <tt>malloc</tt>, or <tt>realloc</tt>, +declared in <tt><cstdlib></tt>. +</p> +</blockquote> + +<pre><ins>void operator delete(void* <i>ptr</i>, const std::nothrow_t&) throw();</ins> +</pre> + +<blockquote> +<p><ins> +-15- <i>Effects:</i> Same as above, except that it is called by the +implementation when an exception propagates from a nothrow placement version +of the <i>new-expression</i> (i.e. when the constructor throws an exception). +</ins></p> +<p><ins> +-16- <i>Replaceable:</i> a C++ program may define a function with this function +signature that displaces the default version defined by the C++ Standard +library. +</ins></p> +<p><ins> +-17- <i>Requires:</i> the value of <tt><i>ptr</i></tt> is null or the +value returned by an earlier call to the (possibly replaced) <tt>operator +new(std::size_t)</tt> or <tt>operator new(std::size_t, const +std::nothrow_t&)</tt>. </ins></p> +<p><ins> +-18- <i>Default behavior:</i> Calls <tt>operator delete(<i>ptr</i>)</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 18.5.1.2 [new.delete.array] +</p> + +<blockquote> +<pre>void* operator new[](std::size_t <i>size</i>, const std::nothrow_t&) throw(); +</pre> + +<blockquote> +<p> +-5- <i>Effects:</i> Same as above, except that it is called by a placement +version of a <i>new-expression</i> when a C++ program prefers a null pointer result as +an error indication, instead of a <tt>bad_alloc</tt> exception. +</p> + +<p> +-6- <i>Replaceable:</i> a C++ program can define a function with this function +signature that displaces the default version defined by the C++ Standard +library. +</p> + +<p> +-7- <i>Required behavior:</i> <del>Same as for operator <tt>new(std::size_t, +const std::nothrow_t&)</tt>. This nothrow version of operator <tt>new[]</tt> +returns a pointer obtained as if acquired from the ordinary version.</del> +<ins>Return a non-null pointer to suitably aligned storage (3.7.4), or else +return a null pointer. This nothrow version of operator new returns a pointer +obtained as if acquired from the (possibly replaced) <tt>operator +new[](std::size_t <i>size</i>)</tt>. This requirement is binding on a +replacement version of this function.</ins> +</p> + +<p> +-8- <i>Default behavior:</i> <del>Returns <tt>operator new(<i>size</i>, +nothrow)</tt>.</del> +</p> + +<ul> +<li><ins> +Calls <tt>operator new[](<i>size</i>)</tt>. +</ins></li> +<li><ins> +If the call to <tt>operator new[](<i>size</i>)</tt> returns normally, returns +the result of that call, else +</ins></li> +<li><ins> +if the call to <tt>operator new[](<i>size</i>)</tt> throws an exception, returns +a null pointer. +</ins></li> +</ul> +</blockquote> + +<pre>void operator delete[](void* <i>ptr</i>) throw(); +void operator delete[](void* <i>ptr</i>, const std::nothrow_t&) throw(); +</pre> + +<blockquote> +<p> +-9- <i>Effects:</i> The <i>deallocation function</i> (3.7.4.2) called by the +array form of a <i>delete-expression</i> to render the value of +<tt><i>ptr</i></tt> invalid. +</p> + +<p> +-10- <i>Replaceable:</i> a C++ program can define a function with this function +signature that displaces the default version defined by the C++ Standard +library. +</p> + +<p> +-11- <i>Requires:</i> the value of +<tt><i>ptr</i></tt> is null or the value returned by an earlier call to +<tt>operator new[](std::size_t)</tt> or <tt>operator new[](std::size_t, const +std::nothrow_t&)</tt>. +</p> + +<p> +-12- <i>Default behavior:</i> Calls <tt>operator delete(<i>ptr</i>)</tt> or +<tt>operator delete<ins>[]</ins>(<i>ptr</i><del>, std::nothrow</del>)</tt> respectively. +</p> +</blockquote> + +</blockquote> + + + +<p><b>Rationale:</b></p> +<p>Yes, they may become unlinked, and that is by design. If a user +replaces one, the user should also replace the other.</p> + +<p><i>[ +Reopened due to a gcc conversation between Howard, Martin and Gaby. Forwarding +or not is visible behavior to the client and it would be useful for the client +to know which behavior it could depend on. +]</i></p> + + +<p><i>[ +Batavia: Robert voiced serious reservations about backwards compatibility for +his customers. +]</i></p> + + + + + + +<hr> +<h3><a name="208"></a>208. Unnecessary restriction on past-the-end iterators</h3> +<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#TC">TC</a> + <b>Submitter:</b> Stephen Cleary <b>Date:</b> 2000-02-02</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In 24.1 paragraph 5, it is stated ". . . Dereferenceable and past-the-end values are always non-singular."</p> <p>This places an unnecessary restriction on past-the-end iterators for @@ -5891,8 +8178,10 @@ still satisfy all forward iterator requirements.</p> without a "footer" node.</p> <p>This would have an impact on existing code that expects past-the-end iterators obtained from different (generic) containers being not equal.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> paragraph 5, the last sentence, from:</p> +<p>Change 24.1 [iterator.requirements] paragraph 5, the last sentence, from:</p> <blockquote> <p>Dereferenceable and past-the-end values are always non-singular.</p> </blockquote> @@ -5900,14 +8189,25 @@ iterators obtained from different (generic) containers being not equal.</p> <blockquote> <p>Dereferenceable values are always non-singular. </p> </blockquote> + + <p><b>Rationale:</b></p> <p>For some kinds of containers, including singly linked lists and zero-length vectors, null pointers are perfectly reasonable past-the-end iterators. Null pointers are singular. </p> + + + + <hr> -<a name="209"><h3>209. basic_string declarations inconsistent</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Igor Stauder <b>Date:</b> 11 Feb 2000</p> -<p>In Section 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> the basic_string member function +<h3><a name="209"></a>209. basic_string declarations inconsistent</h3> +<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#TC">TC</a> + <b>Submitter:</b> Igor Stauder <b>Date:</b> 2000-02-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In Section 21.3 [basic.string] the basic_string member function declarations use a consistent style except for the following functions:</p> <blockquote> <pre>void push_back(const charT); @@ -5919,8 +8219,10 @@ void swap(basic_string<charT,traits,Allocator>&);</pre> not by reference - should be charT or const charT& )<br> - swap: redundant use of template parameters in argument basic_string<charT,traits,Allocator>&</p> + + <p><b>Proposed resolution:</b></p> -<p>In Section 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> change the basic_string member +<p>In Section 21.3 [basic.string] change the basic_string member function declarations push_back, assign, and swap to:</p> <blockquote> <pre>void push_back(charT c); @@ -5928,15 +8230,26 @@ function declarations push_back, assign, and swap to:</p> basic_string& assign(const basic_string& str); void swap(basic_string& str);</pre> </blockquote> + + <p><b>Rationale:</b></p> <p>Although the standard is in general not consistent in declaration style, the basic_string declarations are consistent other than the above. The LWG felt that this was sufficient reason to merit the change. </p> + + + + <hr> -<a name="210"><h3>210. distance first and last confused</h3></a><p><b>Section:</b> 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Lisa Lippincott <b>Date:</b> 15 Feb 2000</p> -<p>In paragraph 9 of section 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a>, it is written:</p> +<h3><a name="210"></a>210. distance first and last confused</h3> +<p><b>Section:</b> 25 [algorithms] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Lisa Lippincott <b>Date:</b> 2000-02-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#algorithms">issues</a> in [algorithms].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> +<p>In paragraph 9 of section 25 [algorithms], it is written:</p> <blockquote> <p> In the description of the algorithms operators + and - are used for some of the iterator categories for which they do not have to @@ -5945,15 +8258,28 @@ change. <br> <tt>return distance(a, b);</tt></p> </blockquote> + + <p><b>Proposed resolution:</b></p> -<p>On the last line of paragraph 9 of section 25 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.algorithms"> [lib.algorithms]</a> change +<p>On the last line of paragraph 9 of section 25 [algorithms] change <tt>"a-b"</tt> to <tt>"b-a".</tt></p> + + <p><b>Rationale:</b></p> <p>There are two ways to fix the defect; change the description to b-a or change the return to distance(b,a). The LWG preferred the former for consistency.</p> + + + + <hr> -<a name="211"><h3>211. operator>>(istream&, string&) doesn't set failbit</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Scott Snyder <b>Date:</b> 4 Feb 2000</p> +<h3><a name="211"></a>211. operator>>(istream&, string&) doesn't set failbit</h3> +<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#TC">TC</a> + <b>Submitter:</b> Scott Snyder <b>Date:</b> 2000-02-04</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The description of the stream extraction operator for std::string (section 21.3.7.9 [lib.string.io]) does not contain a requirement that failbit be set in the case that the operator fails to extract any characters from the input @@ -5967,34 +8293,59 @@ while (is >> str) ... ;</pre> </blockquote> <p>(which tests failbit) is not required to terminate at EOF.</p> <p>Furthermore, this is inconsistent with other extraction operators, -which do include this requirement. (See sections 27.6.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted"> [lib.istream.formatted]</a> and 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>), where this +which do include this requirement. (See sections 27.6.1.2 [istream.formatted] and 27.6.1.3 [istream.unformatted]), where this requirement is present, either explicitly or implicitly, for the extraction operators. It is also present explicitly in the description -of getline (istream&, string&, charT) in section 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> paragraph 8.)</p> +of getline (istream&, string&, charT) in section 21.3.8.9 [string.io] paragraph 8.)</p> + + <p><b>Proposed resolution:</b></p> -<p>Insert new paragraph after paragraph 2 in section 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a>:</p> +<p>Insert new paragraph after paragraph 2 in section 21.3.8.9 [string.io]:</p> <blockquote> <p>If the function extracts no characters, it calls is.setstate(ios::failbit) which may throw ios_base::failure (27.4.4.3).</p> </blockquote> + + + + <hr> -<a name="212"><h3>212. Empty range behavior unclear for several algorithms</h3></a><p><b>Section:</b> 25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Nico Josuttis <b>Date:</b> 26 Feb 2000</p> +<h3><a name="212"></a>212. Empty range behavior unclear for several algorithms</h3> +<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#TC">TC</a> + <b>Submitter:</b> Nico Josuttis <b>Date:</b> 2000-02-26</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The standard doesn't specify what min_element() and max_element() shall return if the range is empty (first equals last). The usual implementations return last. This problem seems also apply to partition(), stable_partition(), next_permutation(), and prev_permutation().</p> + + <p><b>Proposed resolution:</b></p> -<p>In 25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a> - Minimum and maximum, paragraphs 7 and +<p>In 25.3.7 [alg.min.max] - Minimum and maximum, paragraphs 7 and 9, append: Returns last if first==last.</p> + + <p><b>Rationale:</b></p> <p>The LWG looked in some detail at all of the above mentioned algorithms, but believes that except for min_element() and max_element() it is already clear that last is returned if first == last.</p> + + + + <hr> -<a name="214"><h3>214. set::find() missing const overload</h3></a><p><b>Section:</b> 23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a>, 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 28 Feb 2000</p> +<h3><a name="214"></a>214. set::find() missing const overload</h3> +<p><b>Section:</b> 23.3.3 [set], 23.3.4 [multiset] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-02-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#450">450</a></p> +<p><b>Discussion:</b></p> <p>The specification for the associative container requirements in Table 69 state that the find member function should "return iterator; const_iterator for constant a". The map and multimap @@ -6003,9 +8354,11 @@ and multiset do not, all they have is:</p> <blockquote> <pre>iterator find(const key_type & x) const;</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> <p>Change the prototypes for find(), lower_bound(), upper_bound(), and -equal_range() in section 23.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.set"> [lib.set]</a> and section 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a> to each have two overloads:</p> +equal_range() in section 23.3.3 [set] and section 23.3.4 [multiset] to each have two overloads:</p> <blockquote> <pre>iterator find(const key_type & x); const_iterator find(const key_type & x) const;</pre> @@ -6020,8 +8373,19 @@ pair<const_iterator, const_iterator> equal_range(const key_type & x) c <p><i>[Tokyo: At the request of the LWG, Judy Ward provided wording extending the proposed resolution to lower_bound, upper_bound, and equal_range.]</i></p> + + + + + + <hr> -<a name="217"><h3>217. Facets example (Classifying Japanese characters) contains errors</h3></a><p><b>Section:</b> 22.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facets.examples"> [lib.facets.examples]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 29 Feb 2000</p> +<h3><a name="217"></a>217. Facets example (Classifying Japanese characters) contains errors</h3> +<p><b>Section:</b> 22.2.8 [facets.examples] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-02-29</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facets.examples">issues</a> in [facets.examples].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The example in 22.2.8, paragraph 11 contains the following errors:</p> <p>1) The member function `My::JCtype::is_kanji()' is non-const; the function must be const in order for it to be callable on a const object (a reference to @@ -6031,6 +8395,8 @@ name of the namespace `My'.</p> <p>3) In the definition of `loc' and subsequently in the call to use_facet<>() in main(), the name of the facet is misspelled: it should read `My::JCtype' rather than `My::JCType'.</p> + + <p><b>Proposed resolution:</b></p> <p>Replace the "Classifying Japanese characters" example in 22.2.8, paragraph 11 with the following:</p> @@ -6063,8 +8429,16 @@ declared above.</pre> cout << "no it isn't!" << endl; return 0; }</pre> + + + + <hr> -<a name="220"><h3>220. ~ios_base() usage valid?</h3></a><p><b>Section:</b> 27.4.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios.base.cons"> [lib.ios.base.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Jonathan Schilling, Howard Hinnant <b>Date:</b> 13 Mar 2000</p> +<h3><a name="220"></a>220. ~ios_base() usage valid?</h3> +<p><b>Section:</b> 27.4.2.7 [ios.base.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Jonathan Schilling, Howard Hinnant <b>Date:</b> 2000-03-13</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>The pre-conditions for the ios_base destructor are described in 27.4.2.7 paragraph 2:</p> <blockquote> @@ -6092,6 +8466,8 @@ behavior of the destructor undefined?</p> <p>By comparison, the basic_ios class description in 27.4.4.1 paragraph 2 makes it explicit that destruction before initialization results in undefined behavior.</p> + + <p><b>Proposed resolution:</b></p> <p>Modify 27.4.2.7 paragraph 1 from</p> <blockquote> @@ -6105,8 +8481,18 @@ value after construction. These members must be initialized by calling basic_ios::init. If an ios_base object is destroyed before these initializations have taken place, the behavior is undefined.</p> </blockquote> + + + + <hr> -<a name="221"><h3>221. num_get<>::do_get stage 2 processing broken</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 14 Mar 2000</p> +<h3><a name="221"></a>221. num_get<>::do_get stage 2 processing broken</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-03-14</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Stage 2 processing of numeric conversion is broken.</p> <p>Table 55 in 22.2.2.1.2 says that when basefield is 0 the integral @@ -6123,6 +8509,8 @@ translation table that was created by widening the string literal "0123456789abcdefABCDEF+-". The character "x" is not found in that table, so it can't be recognized by stage 2 processing.</p> + + <p><b>Proposed resolution:</b></p> <p>In 22.2.2.1.2 paragraph 8, replace the line:</p> <blockquote> @@ -6132,14 +8520,27 @@ processing.</p> <blockquote> <pre>static const char src[] = "0123456789abcdefxABCDEFX+-";</pre> </blockquote> + + <p><b>Rationale:</b></p> <p>If we're using the technique of widening a string literal, the string literal must contain every character we wish to recognize. This technique has the consequence that alternate representations of digits will not be recognized. This design decision was made deliberately, with full knowledge of that limitation.</p> + + + + + <hr> -<a name="222"><h3>222. Are throw clauses necessary if a throw is already implied by the effects clause?</h3></a><p><b>Section:</b> 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 17 Mar 2000</p> +<h3><a name="222"></a>222. Are throw clauses necessary if a throw is already implied by the effects clause?</h3> +<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#TC">TC</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-03-17</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#structure.specifications">active issues</a> in [structure.specifications].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Section 21.3.6.8 describes the basic_string::compare function this way:</p> <blockquote> <pre>21.3.6.8 - basic_string::compare [lib.string::compare] @@ -6155,7 +8556,7 @@ int compare(size_type pos1, size_type n1, </blockquote> <p>and the constructor that's implicitly called by the above is defined to throw an out-of-range exception if pos > str.size(). See -section 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a> paragraph 4.</p> +section 21.3.1 [string.require] paragraph 4.</p> <p>On the other hand, the compare function descriptions themselves don't have "Throws: " clauses and according to 17.3.1.3, paragraph 3, elements @@ -6163,8 +8564,10 @@ that do not apply to a function are omitted.</p> <p>So it seems there is an inconsistency in the standard -- are the "Effects" clauses correct, or are the "Throws" clauses missing?</p> + + <p><b>Proposed resolution:</b></p> -<p>In 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> paragraph 3, the footnote 148 attached to +<p>In 17.3.1.3 [structure.specifications] paragraph 3, the footnote 148 attached to the sentence "Descriptions of function semantics contain the following elements (as appropriate):", insert the word "further" so that the foot note reads:</p> @@ -6173,42 +8576,76 @@ following elements (as appropriate):", insert the word omitted. For example, if a function does not specify any further preconditions, there will be no "Requires" paragraph.</p> </blockquote> + + <p><b>Rationale:</b></p> <p>The standard is somewhat inconsistent, but a failure to note a throw condition in a throws clause does not grant permission not to throw. The inconsistent wording is in a footnote, and thus non-normative. The proposed resolution from the LWG clarifies the footnote.</p> + + + + <hr> -<a name="223"><h3>223. reverse algorithm should use iter_swap rather than swap</h3></a><p><b>Section:</b> 25.2.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.reverse"> [lib.alg.reverse]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 21 Mar 2000</p> +<h3><a name="223"></a>223. reverse algorithm should use iter_swap rather than swap</h3> +<p><b>Section:</b> 25.2.10 [alg.reverse] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-03-21</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>Shouldn't the effects say "applies iter_swap to all pairs..."?</p> + + <p><b>Proposed resolution:</b></p> -<p>In 25.2.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.reverse"> [lib.alg.reverse]</a>, replace:</p> - <blockquote> +<p>In 25.2.10 [alg.reverse], replace:</p> + <blockquote><p> Effects: For each non-negative integer i <= (last - first)/2, applies swap to all pairs of iterators first + i, (last - i) - 1. - </blockquote> + </p></blockquote> <p>with:</p> - <blockquote> + <blockquote><p> Effects: For each non-negative integer i <= (last - first)/2, applies iter_swap to all pairs of iterators first + i, (last - i) - 1. - </blockquote> + </p></blockquote> + + + + <hr> -<a name="224"><h3>224. clear() complexity for associative containers refers to undefined N</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Ed Brey <b>Date:</b> 23 Mar 2000</p> +<h3><a name="224"></a>224. clear() complexity for associative containers refers to undefined N</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Ed Brey <b>Date:</b> 2000-03-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>In the associative container requirements table in 23.1.2 paragraph 7, a.clear() has complexity "log(size()) + N". However, the meaning of N is not defined.</p> + + <p><b>Proposed resolution:</b></p> <p>In the associative container requirements table in 23.1.2 paragraph 7, the complexity of a.clear(), change "log(size()) + N" to "linear in <tt>size()</tt>".</p> + + <p><b>Rationale:</b></p> <p>It's the "log(size())", not the "N", that is in error: there's no difference between <i>O(N)</i> and <i>O(N + log(N))</i>. The text in the standard is probably an incorrect cut-and-paste from the range version of <tt>erase</tt>.</p> + + + + <hr> -<a name="225"><h3>225. std:: algorithms use of other unqualified algorithms</h3></a><p><b>Section:</b> 17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 01 Apr 2000</p> +<h3><a name="225"></a>225. std:: algorithms use of other unqualified algorithms</h3> +<p><b>Section:</b> 17.4.4.3 [global.functions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-04-01</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#global.functions">issues</a> in [global.functions].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Are algorithms in std:: allowed to use other algorithms without qualification, so functions in user namespaces might be found through Koenig lookup?</p> <p>For example, a popular standard library implementation includes this @@ -6267,14 +8704,16 @@ however, seem to disagree with this notion.</p> the core working group indicates that "std::" is sufficient; leading "::" qualification is not required because any namespace qualification is sufficient to suppress Koenig lookup.]</i></p> + + <p><b>Proposed resolution:</b></p> <p>Add a paragraph and a note at the end of -17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a>:</p> +17.4.4.3 [global.functions]:</p> <blockquote> <p>Unless otherwise specified, no global or non-member function in the standard library shall use a function from another namespace which is -found through <i>argument-dependent name lookup</i> (3.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.lookup.koenig"> [basic.lookup.koenig]</a>).</p> +found through <i>argument-dependent name lookup</i> (3.4.2 [basic.lookup.argdep]).</p> <p>[Note: the phrase "unless otherwise specified" is intended to allow Koenig lookup in cases like that of ostream_iterators:<br> @@ -6297,6 +8736,7 @@ and has opened issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-de issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> should be coordinated with the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#229">229</a>.]</i></p> + <p><i>[Toronto: The LWG is not sure if this is a defect in the standard. Most LWG members believe that an implementation of <tt>std::unique</tt> like the one quoted in this issue is already @@ -6305,6 +8745,7 @@ those specified in the standard. The standard's description of <tt>unique</tt> does not say that overloading <tt>adjacent_find</tt> should have any effect.]</i></p> + <p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues 225, 226, and 229. Their conclusion was that the issues should be separated into an LWG portion (Howard's paper, N1387=02-0045), and a @@ -6312,6 +8753,9 @@ EWG portion (Dave will write a proposal). The LWG and EWG had (separate) discussions of this plan the next day. The proposed resolution for this issue is in accordance with Howard's paper.]</i></p> + + + <p><b>Rationale:</b></p> <p>It could be argued that this proposed isn't strictly necessary, that the Standard doesn't grant implementors license to write a @@ -6322,8 +8766,18 @@ resolution for this issue is in accordance with Howard's paper.]</i></p> user-defined names should have no effect unless otherwise specified. Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#226">226</a> deals with the question of when it is appropriate for the standard to explicitly specify otherwise.</p> + + + + + <hr> -<a name="226"><h3>226. User supplied specializations or overloads of namespace std function templates</h3></a><p><b>Section:</b> 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 01 Apr 2000</p> +<h3><a name="226"></a>226. User supplied specializations or overloads of namespace std function templates</h3> +<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-04-01</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The issues are: </p> <p>1. How can a 3rd party library implementor (lib1) write a version of a standard algorithm which is specialized to work with his own class template? </p> @@ -6406,6 +8860,8 @@ functionality and std, or whether it's that the standard library does not provide an operator<< for std::pair<>. </p> + + <p><b>Proposed resolution:</b></p> <p>Adopt the wording proposed in Howard Hinnant's paper @@ -6421,11 +8877,13 @@ submissions regarding this issue have been received from several sources, but too late to be integrated into the issues list. ]</i></p> + <p><i>[Post-Tokyo: A paper with several proposed resolutions, J16/00-0029==WG21/N1252, "Shades of namespace std functions " by Alan Griffiths, is in the Post-Tokyo mailing. It should be considered a part of this issue.]</i></p> + <p><i>[Toronto: Dave Abrahams and Peter Dimov have proposed a resolution that involves core changes: it would add partial specialization of function template. The Core Working Group is @@ -6444,6 +8902,7 @@ work (we don't have partial specialization of function templates), and users aren't permitted to add overloads within namespace std. ]</i></p> + <p><i>[Copenhagen: Discussed at length, with no consensus. Relevant papers in the pre-Copenhagen mailing: N1289, N1295, N1296. Discussion focused on four options. (1) Relax restrictions on overloads within @@ -6455,6 +8914,7 @@ option had both support and opposition. Straw poll (first number is support, second is strongly opposed): (1) 6, 4; (2) 6, 7; (3) 3, 8; (4) 4, 4.]</i></p> + <p><i>[Redmond: Discussed, again no consensus. Herb presented an argument that a user who is defining a type <tt>T</tt> with an associated <tt>swap</tt> should not be expected to put that @@ -6467,6 +8927,7 @@ unqualified call of <tt>swap</tt>. (And which other functions? Any?) A small group (Nathan, Howard, Jeremy, Dave, Matt, Walter, Marc) will try to put together a proposal before the next meeting.]</i></p> + <p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues 225, 226, and 229. Their conclusion was that the issues should be separated into an LWG portion (Howard's paper, N1387=02-0045), and a @@ -6474,25 +8935,40 @@ EWG portion (Dave will write a proposal). The LWG and EWG had (separate) discussions of this plan the next day. The proposed resolution is the one proposed by Howard.]</i></p> + <p><i>[Santa Cruz: the LWG agreed with the general direction of Howard's paper, N1387. (Roughly: Koenig lookup is disabled unless we say otherwise; this issue is about when we do say otherwise.) However, there were concerns about wording. Howard will provide new wording. Bill and Jeremy will review it.]</i></p> + <p><i>[Kona: Howard proposed the new wording. The LWG accepted his proposed resolution.]</i></p> + + + <p><b>Rationale:</b></p> <p>Informally: introduce a Swappable concept, and specify that the value types of the iterators passed to certain standard algorithms (such as iter_swap, swap_ranges, reverse, rotate, and sort) conform to that concept. The Swappable concept will make it clear that these algorithms use unqualified lookup for the calls - to <tt>swap</tt>. Also, in <font color="red">26.3.3.3</font> paragraph 1, + to <tt>swap</tt>. Also, in 26.5.3.3 [valarray.transcend] paragraph 1, state that the valarray transcendentals use unqualified lookup.</p> + + + + + <hr> -<a name="227"><h3>227. std::swap() should require CopyConstructible or DefaultConstructible arguments</h3></a><p><b>Section:</b> 25.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.swap"> [lib.alg.swap]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 09 Apr 2000</p> +<h3><a name="227"></a>227. std::swap() should require CopyConstructible or DefaultConstructible arguments</h3> +<p><b>Section:</b> 25.2.3 [alg.swap] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TC">TC</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-04-09</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.swap">issues</a> in [alg.swap].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TC">TC</a> status.</p> +<p><b>Discussion:</b></p> <p>25.2.2 reads:</p> <blockquote> <p><tt> template<class T> void swap(T& a, T& b);</tt><br> @@ -6523,6 +8999,8 @@ resolution is the one proposed by Howard.]</i></p> b = tmp; }</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> <p>Change 25.2.2 paragraph 1 from:</p> <blockquote> @@ -6532,10 +9010,25 @@ resolution is the one proposed by Howard.]</i></p> <blockquote> <p> Requires: Type T is CopyConstructible (20.1.3) and Assignable (23.1)</p> </blockquote> + + + + + <hr> -<a name="228"><h3>228. Incorrect specification of "..._byname" facets</h3></a><p><b>Section:</b> 22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 20 Apr 2000</p> -<p>The sections 22.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.byname"> [lib.locale.ctype.byname]</a>, 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a>, -<font color="red">22.2.1.6</font>, 22.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct.byname"> [lib.locale.numpunct.byname]</a>, 22.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.collate.byname"> [lib.locale.collate.byname]</a>, 22.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.put.byname"> [lib.locale.time.put.byname]</a>, 22.2.6.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.byname"> [lib.locale.moneypunct.byname]</a>, and 22.2.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.messages.byname"> [lib.locale.messages.byname]</a> overspecify the +<h3><a name="228"></a>228. Incorrect specification of "..._byname" facets</h3> +<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#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-20</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>The sections 22.2.1.2 [locale.ctype.byname], 22.2.1.5 +[locale.codecvt.byname], +sref ref="22.2.1.6", 22.2.3.2 [locale.numpunct.byname], 22.2.4.2 +[locale.collate.byname], 22.2.5.4 [locale.time.put.byname], 22.2.6.4 +[locale.moneypunct.byname], and 22.2.7.2 [locale.messages.byname] +overspecify the definitions of the "..._byname" classes by listing a bunch of virtual functions. At the same time, no semantics of these functions are defined. Real implementations do not define these @@ -6545,7 +9038,7 @@ the "..._byname" version just provides suitable date used by these implementations. For example, the 'numpunct' methods just return values from a struct. The base class uses a statically initialized struct while the derived version reads the contents of this struct -from a table. However, no virtual function is defined in +from a table. However, no virtual function is defined in 'numpunct_byname'.</p> <p>For most classes this does not impose a problem but specifically @@ -6558,6 +9051,8 @@ Thus, a class derived from 'ctype_byname<char>' can tell whether this class is specialized or not under the current specification: Without the specialization, 'do_is()' is virtual while with specialization it is not virtual.</p> + + <p><b>Proposed resolution:</b></p> <p> Change section 22.2.1.2 (lib.locale.ctype.byname) to become:</p> <pre> namespace std { @@ -6654,18 +9149,29 @@ specialization it is not virtual.</p> ~messages_byname(); // virtual }; }</pre> -<p>Remove section 22.2.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt"> [lib.locale.codecvt]</a> completely (because in +<p>Remove section 22.2.1.4 [locale.codecvt] completely (because in this case only those members are defined to be virtual which are defined to be virtual in 'ctype<cT>'.)</p> <p><i>[Post-Tokyo: Dietmar Kühl submitted this issue at the request of the LWG to solve the underlying problems raised by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#138">138</a>.]</i></p> + <p><i>[Copenhagen: proposed resolution was revised slightly, to remove three last virtual functions from <tt>messages_byname</tt>.]</i></p> + + + + + + <hr> -<a name="229"><h3>229. Unqualified references of other library entities</h3></a><p><b>Section:</b> 17.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.contents"> [lib.contents]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 19 Apr 2000</p> +<h3><a name="229"></a>229. Unqualified references of other library entities</h3> +<p><b>Section:</b> 17.4.1.1 [contents] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 2000-04-19</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Throughout the library chapters, the descriptions of library entities refer to other library entities without necessarily qualifying the names.</p> @@ -6682,6 +9188,8 @@ adjusted to make that change in a Technical Corrigendum.</p> <p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#182">182</a>, which addresses qualification of <tt>size_t</tt>, is a special case of this. </p> + + <p><b>Proposed resolution:</b></p> <p>To section 17.4.1.1 "Library contents" Add the following paragraph:</p> <blockquote> @@ -6696,6 +9204,7 @@ the LWG to solve a problem in the standard itself similar to the problem within implementations of library identified by issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a>. Any resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#225">225</a> should be coordinated with the resolution of this issue.]</i></p> + <p><i>[post-Toronto: Howard is undecided about whether it is appropriate for all standard library function names referred to in other standard library functions to be explicitly qualified by @@ -6707,6 +9216,7 @@ concerned that valarray appears to require argument-dependent lookup, but that the wording may not be clear enough to fall under "unless explicitly described otherwise".]</i></p> + <p><i>[Curaçao: An LWG-subgroup spent an afternoon working on issues 225, 226, and 229. Their conclusion was that the issues should be separated into an LWG portion (Howard's paper, N1387=02-0045), and a @@ -6715,8 +9225,19 @@ EWG portion (Dave will write a proposal). The LWG and EWG had issues 225 and 226. In light of that resolution, the proposed resolution for the current issue makes sense.]</i></p> + + + + + + <hr> -<a name="230"><h3>230. Assignable specified without also specifying CopyConstructible</h3></a><p><b>Section:</b> 17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 26 Apr 2000</p> +<h3><a name="230"></a>230. Assignable specified without also specifying CopyConstructible</h3> +<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2000-04-26</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#227">227</a> identified an instance (std::swap) where Assignable was specified without also specifying CopyConstructible. The LWG asked that the standard be searched to @@ -6725,19 +9246,21 @@ determine if the same defect existed elsewhere.</p> <p>There are a number of places (see proposed resolution below) where Assignable is specified without also specifying CopyConstructible. There are also several cases where both are -specified. For example, 26.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.req"> [lib.rand.req]</a>.</p> +specified. For example, 26.4.1 [rand.req].</p> + + <p><b>Proposed resolution:</b></p> -<p>In 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> table 65 for value_type: +<p>In 23.1 [container.requirements] table 65 for value_type: change "T is Assignable" to "T is CopyConstructible and Assignable" </p> -<p>In 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> table 69 X::key_type; change +<p>In 23.1.2 [associative.reqmts] table 69 X::key_type; change "Key is Assignable" to "Key is CopyConstructible and Assignable"<br> </p> -<p>In 24.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.output.iterators"> [lib.output.iterators]</a> paragraph 1, change: +<p>In 24.1.2 [output.iterators] paragraph 1, change: </p> <blockquote> <p> A class or a built-in type X satisfies the requirements of an @@ -6756,13 +9279,17 @@ Table 73: </blockquote> <p><i>[Post-Tokyo: Beman Dawes submitted this issue at the request of -the LWG. He asks that the 25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a> and 25.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.fill"> [lib.alg.fill]</a> changes be studied carefully, as it is not clear that +the LWG. He asks that the 25.2.5 [alg.replace] and 25.2.6 [alg.fill] changes be studied carefully, as it is not clear that CopyConstructible is really a requirement and may be overspecification.]</i></p> + <p><i>[Portions of the resolution for issue 230 have been superceded by the resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#276">276</a>.]</i></p> + + + <p><b>Rationale:</b></p> <p>The original proposed resolution also included changes to input iterator, fill, and replace. The LWG believes that those changes are @@ -6770,8 +9297,17 @@ not necessary. The LWG considered some blanket statement, where an Assignable type was also required to be Copy Constructible, but decided against this because fill and replace really don't require the Copy Constructible property.</p> + + + + <hr> -<a name="231"><h3>231. Precision in iostream?</h3></a><p><b>Section:</b> 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> James Kanze, Stephen Clamage <b>Date:</b> 25 Apr 2000</p> +<h3><a name="231"></a>231. Precision in iostream?</h3> +<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#WP">WP</a> + <b>Submitter:</b> James Kanze, Stephen Clamage <b>Date:</b> 2000-04-25</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>What is the following program supposed to output?</p> <pre>#include <iostream> @@ -6810,16 +9346,20 @@ will be used, for fixed point, if precision < -1, 1 will be used, etc. Plus, of course, if precision == 0 and flags & floatfield == 0, 1 should be = used. But it probably isn't necessary to emulate all of the anomalies of printf:-).</p> + + <p><b>Proposed resolution:</b></p> <p> -Replace 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, paragraph 11, with the following +Replace 22.2.2.2.2 [facet.num.put.virtuals], paragraph 11, with the following sentence: </p> -<blockquote> +<blockquote><p> For conversion from a floating-point type, <tt><i>str</i>.precision()</tt> is specified in the conversion specification. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>The floatfield determines whether numbers are formatted as if with %f, %e, or %g. If the <tt>fixed</tt> bit is set, it's %f, @@ -6838,8 +9378,19 @@ case.</p> <p><i>[Post-Curaçao: Howard provided improved wording covering the case where precision is 0 and mode is %g.]</i></p> + + + + + + <hr> -<a name="232"><h3>232. "depends" poorly defined in 17.4.3.1</h3></a><p><b>Section:</b> 17.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.reserved.names"> [lib.reserved.names]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Peter Dimov <b>Date:</b> 18 Apr 2000</p> +<h3><a name="232"></a>232. "depends" poorly defined in 17.4.3.1</h3> +<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2000-04-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>17.4.3.1/1 uses the term "depends" to limit the set of allowed specializations of standard templates to those that "depend on a user-defined name of external linkage."</p> @@ -6859,9 +9410,13 @@ construct a specialization that is, I believe, technically legal according to template<> void swap(::X<int>::type& i, ::X<int>::type& j); }</pre> </blockquote> + + <p><b>Proposed resolution:</b></p> <p>Change "user-defined name" to "user-defined type".</p> + + <p><b>Rationale:</b></p> <p>This terminology is used in section 2.5.2 and 4.1.1 of <i>The C++ Programming Language</i>. It disallows the example in the issue, @@ -6873,22 +9428,197 @@ implementor?</p> <p><i>[Toronto: this may be related to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#120">120</a>.]</i></p> + <p><i>[post-Toronto: Judy provided the above proposed resolution and rationale.]</i></p> + + + + + + <hr> -<a name="234"><h3>234. Typos in allocator definition</h3></a><p><b>Section:</b> 20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 24 Apr 2000</p> +<h3><a name="233"></a>233. Insertion hints in associative containers</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andrew Koenig <b>Date:</b> 2000-04-30</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#192">192</a>, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#246">246</a></p> +<p><b>Discussion:</b></p> +<p> +If <tt>mm</tt> is a multimap and <tt>p</tt> is an iterator +into the multimap, then <tt>mm.insert(p, x)</tt> inserts +<tt>x</tt> into <tt>mm</tt> with <tt>p</tt> as a hint as +to where it should go. Table 69 claims that the execution time is +amortized constant if the insert winds up taking place adjacent to +<tt>p</tt>, but does not say when, if ever, this is guaranteed to +happen. All it says it that <tt>p</tt> is a hint as to where to +insert. +</p> +<p> +The question is whether there is any guarantee about the relationship +between <tt>p</tt> and the insertion point, and, if so, what it +is. +</p> +<p> +I believe the present state is that there is no guarantee: The user +can supply <tt>p</tt>, and the implementation is allowed to +disregard it entirely. +</p> + +<p><b>Additional comments from Nathan:</b><br> + +The vote [in Redmond] was on whether to elaborately specify the use of +the hint, or to require behavior only if the value could be inserted +adjacent to the hint. I would like to ensure that we have a chance to +vote for a deterministic treatment: "before, if possible, otherwise +after, otherwise anywhere appropriate", as an alternative to the +proposed "before or after, if possible, otherwise [...]". +</p> + +<p><i>[Toronto: there was general agreement that this is a real defect: +when inserting an element x into a multiset that already contains +several copies of x, there is no way to know whether the hint will be +used. The proposed resolution was that the new element should always +be inserted as close to the hint as possible. So, for example, if +there is a subsequence of equivalent values, then providing a.begin() +as the hint means that the new element should be inserted before the +subsequence even if a.begin() is far away. JC van Winkel supplied +precise wording for this proposed resolution, and also for an +alternative resolution in which hints are only used when they are +adjacent to the insertion point.]</i></p> + + +<p><i>[Copenhagen: the LWG agreed to the original proposed resolution, +in which an insertion hint would be used even when it is far from the +insertion point. This was contingent on seeing a reference +implementation showing that it is possible to implement this +requirement without loss of efficiency. John Potter provided such a +reference implementation.]</i></p> + + +<p><i>[Redmond: The LWG was reluctant to adopt the proposal that +emerged from Copenhagen: it seemed excessively complicated, and went +beyond fixing the defect that we identified in Toronto. PJP provided +the new wording described in this issue. Nathan agrees that we +shouldn't adopt the more detailed semantics, and notes: "we know that +you can do it efficiently enough with a red-black tree, but there are +other (perhaps better) balanced tree techniques that might differ +enough to make the detailed semantics hard to satisfy."]</i></p> + + +<p><i>[Curaçao: Nathan should give us the alternative wording he +suggests so the LWG can decide between the two options.]</i></p> + + +<p><i>[Lillehammer: The LWG previously rejected the more detailed + semantics, because it seemed more loike a new feature than like + defect fixing. We're now more sympathetic to it, but we (especially + Bill) are still worried about performance. N1780 describes a naive + algorithm, but it's not clear whether there is a non-naive + implementation. Is it possible to implement this as efficently as + the current version of insert?]</i></p> + + +<p><i>[Post Lillehammer: +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">N1780</a> +updated in post meeting mailing with +feedback from Lillehammer with more information regarding performance. +]</i></p> + + +<p><i>[ +Batavia: +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">1780</a> +accepted with minor wording changes in the proposed wording (reflected in the +proposed resolution below). Concerns about the performance of the algorithm +were satisfactorily met by +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">1780</a>. +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#371">371</a> already handles the stability of equal ranges +and so that part of the resolution from +<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1780.html">1780</a> +is no longer needed (or reflected in the proposed wording below). +]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + +<p> +Change the indicated rows of the "Associative container requirements" Table in +23.1.2 [associative.reqmts] to: +</p> + +<p></p><center> +<table border="1"> +<caption>Associative container requirements</caption> +<tbody><tr><th>expression</th> <th>return type</th> +<th>assertion/note<br>pre/post-condition</th> +<th>complexity</th></tr> +<tr><td><tt>a_eq.insert(t)</tt></td> +<td><tt>iterator</tt></td> +<td> +inserts <tt>t</tt> and returns the iterator pointing to the newly inserted +element. <ins>If a range containing elements equivalent to <tt>t</tt> exists in +<tt>a_eq</tt>, <tt>t</tt> is inserted at the end of that range.</ins> +</td> +<td> +logarithmic +</td></tr> +<tr><td><tt>a.insert(p,t)</tt></td> +<td><tt>iterator</tt></td> +<td> +inserts <tt>t</tt> if and only if there is no element with key equivalent to the +key of <tt>t</tt> in containers with unique keys; always inserts <tt>t</tt> in containers +with equivalent keys. always returns the iterator pointing to the element with key +equivalent to the key of <tt>t</tt>. <del>iterator <tt>p</tt> is a hint pointing to where +the insert should start to search.</del> <ins><tt>t</tt> is inserted as close as possible +to the position just prior to <tt>p</tt>.</ins> +</td> +<td> +logarithmic in general, but amortized constant if <tt>t</tt> is inserted right <del>after</del> + <ins>before</ins> <tt>p</tt>. +</td></tr> +</tbody></table> +</center> + + + + + + +<hr> +<h3><a name="234"></a>234. Typos in allocator definition</h3> +<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>In paragraphs 12 and 13 the effects of <tt>construct()</tt> and <tt>destruct()</tt> are described as returns but the functions actually return <tt>void</tt>.</p> + + <p><b>Proposed resolution:</b></p> <p>Substitute "Returns" by "Effect".</p> + + + + <hr> -<a name="235"><h3>235. No specification of default ctor for reverse_iterator</h3></a><p><b>Section:</b> 24.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iterator"> [lib.reverse.iterator]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 24 Apr 2000</p> +<h3><a name="235"></a>235. No specification of default ctor for reverse_iterator</h3> +<p><b>Section:</b> 24.4.1.1 [reverse.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The declaration of <tt>reverse_iterator</tt> lists a default constructor. However, no specification is given what this constructor should do.</p> + + <p><b>Proposed resolution:</b></p> - <p>In section 24.4.1.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.cons"> [lib.reverse.iter.cons]</a> add the following + <p>In section 24.4.1.3.1 [reverse.iter.cons] add the following paragraph:</p> <blockquote> <p><tt>reverse_iterator()</tt></p> @@ -6900,19 +9630,40 @@ should do.</p> </blockquote> <p><i>[pre-Copenhagen: Dietmar provide wording for proposed resolution.]</i></p> + + + + + + <hr> -<a name="237"><h3>237. Undefined expression in complexity specification</h3></a><p><b>Section:</b> 23.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.cons"> [lib.deque.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 24 Apr 2000</p> +<h3><a name="237"></a>237. Undefined expression in complexity specification</h3> +<p><b>Section:</b> 23.2.2.1 [deque.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-04-24</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#deque.cons">issues</a> in [deque.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The complexity specification in paragraph 6 says that the complexity is linear in <tt>first - last</tt>. Even if <tt>operator-()</tt> is defined on iterators this term is in general undefined because it would have to be <tt>last - first</tt>.</p> + + <p><b>Proposed resolution:</b></p> <p>Change paragraph 6 from</p> - <blockquote>Linear in <i>first - last</i>.</blockquote> + <blockquote><p>Linear in <i>first - last</i>.</p></blockquote> <p>to become</p> - <blockquote>Linear in <i>distance(first, last)</i>.</blockquote> + <blockquote><p>Linear in <i>distance(first, last)</i>.</p></blockquote> + + + + <hr> -<a name="238"><h3>238. Contradictory results of stringbuf initialization.</h3></a><p><b>Section:</b> 27.7.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.cons"> [lib.stringbuf.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 11 May 2000</p> +<h3><a name="238"></a>238. Contradictory results of stringbuf initialization.</h3> +<p><b>Section:</b> 27.7.1.1 [stringbuf.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dietmar Kühl <b>Date:</b> 2000-05-11</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>In 27.7.1.1 paragraph 4 the results of calling the constructor of 'basic_stringbuf' are said to be <tt>str() == str</tt>. This is fine that far but consider this code:</p> @@ -6930,28 +9681,41 @@ defined to be <tt>basic_string<cT>()</tt>.</p> <p>However, probably only test cases in some testsuites will detect this "problem"...</p> + + <p><b>Proposed resolution:</b></p> <p>Remove 27.7.1.1 paragraph 4.</p> + + <p><b>Rationale:</b></p> <p>We could fix 27.7.1.1 paragraph 4, but there would be no point. If we fixed it, it would say just the same thing as text that's already in the standard.</p> + + + + <hr> -<a name="239"><h3>239. Complexity of unique() and/or unique_copy incorrect</h3></a><p><b>Section:</b> 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> May 15 2000</p> +<h3><a name="239"></a>239. Complexity of unique() and/or unique_copy incorrect</h3> +<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#WP">WP</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The complexity of unique and unique_copy are inconsistent with each other and inconsistent with the implementations. The standard specifies:</p> <p>for unique():</p> -<blockquote>-3- Complexity: If the range (last - first) is not empty, exactly +<blockquote><p>-3- Complexity: If the range (last - first) is not empty, exactly (last - first) - 1 applications of the corresponding predicate, otherwise -no applications of the predicate.</blockquote> +no applications of the predicate.</p></blockquote> <p>for unique_copy():</p> -<blockquote>-7- Complexity: Exactly last - first applications of the corresponding -predicate.</blockquote> +<blockquote><p>-7- Complexity: Exactly last - first applications of the corresponding +predicate.</p></blockquote> <p> The implementations do it the other way round: unique() applies the @@ -6963,14 +9727,25 @@ sequence elements I don't see a justification for unique_copy() applying the predicate last-first times, especially since it is not specified to which pair in the sequence the predicate is applied twice.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change both complexity sections in 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> to:</p> +<p>Change both complexity sections in 25.2.9 [alg.unique] to:</p> + +<blockquote><p>Complexity: For nonempty ranges, exactly last - first - 1 +applications of the corresponding predicate.</p></blockquote> + + + + -<blockquote>Complexity: For nonempty ranges, exactly last - first - 1 -applications of the corresponding predicate.</blockquote> <hr> -<a name="240"><h3>240. Complexity of adjacent_find() is meaningless</h3></a><p><b>Section:</b> 25.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.adjacent.find"> [lib.alg.adjacent.find]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> May 15 2000</p> +<h3><a name="240"></a>240. Complexity of adjacent_find() is meaningless</h3> +<p><b>Section:</b> 25.1.5 [alg.adjacent.find] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The complexity section of adjacent_find is defective:</p> <blockquote> @@ -7004,20 +9779,33 @@ objects that have the function call operator declared const, which is not required of predicates because they can have non-const data members. For this reason, a specification using a binder could only be an "as-if" specification.</p> + + <p><b>Proposed resolution:</b></p> -<p>Change the complexity section in 25.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.adjacent.find"> [lib.alg.adjacent.find]</a> to:</p> -<blockquote> +<p>Change the complexity section in 25.1.5 [alg.adjacent.find] to:</p> +<blockquote><p> For a nonempty range, exactly <tt>min((<i>i</i> - <i>first</i>) + 1, (<i>last</i> - <i>first</i>) - 1)</tt> applications of the corresponding predicate, where <i>i</i> is <tt>adjacent_find</tt>'s return value. -</blockquote> +</p></blockquote> <p><i>[Copenhagen: the original resolution specified an upper bound. The LWG preferred an exact count.]</i></p> + + + + + + <hr> -<a name="241"><h3>241. Does unique_copy() require CopyConstructible and Assignable?</h3></a><p><b>Section:</b> 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> May 15 2000</p> +<h3><a name="241"></a>241. Does unique_copy() require CopyConstructible and Assignable?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Some popular implementations of unique_copy() create temporary copies of values in the input sequence, at least if the input iterator @@ -7028,20 +9816,22 @@ the value type is CopyConstructible and Assignable.</p> specify any additional requirements that they impose on any of the types used by the algorithm. An example of an algorithm that creates temporary copies and correctly specifies the additional requirements -is accumulate(), 26.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand.req"> [lib.rand.req]</a>.</p> +is accumulate(), 26.4.1 [rand.req].</p> <p>Since the specifications of unique() and unique_copy() do not require CopyConstructible and Assignable of the InputIterator's value type the above mentioned implementations are not standard-compliant. I cannot judge whether this is a defect in the standard or a defect in the implementations.</p> + + <p><b>Proposed resolution:</b></p> <p>In 25.2.8 change:</p> -<blockquote> +<blockquote><p> -4- Requires: The ranges [first, last) and [result, result+(last-first)) shall not overlap. -</blockquote> +</p></blockquote> <p>to:</p> @@ -7063,6 +9853,7 @@ it might be possible to implement <tt>unique_copy</tt> without requiring assignability, although current implementations do impose that requirement. Howard provided new wording.]</i></p> + <p><i>[ Curaçao: The LWG changed the PR editorially to specify "neither...nor...meet..." as clearer than @@ -7070,17 +9861,29 @@ Curaçao: The LWG changed the PR editorially to specify minor as not to require re-review. ]</i></p> + + + + + + + <hr> -<a name="242"><h3>242. Side effects of function objects</h3></a><p><b>Section:</b> 25.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.transform"> [lib.alg.transform]</a>, 26.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.rand"> [lib.rand]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Angelika Langer <b>Date:</b> May 15 2000</p> +<h3><a name="242"></a>242. Side effects of function objects</h3> +<p><b>Section:</b> 25.2.4 [alg.transform], 26.4 [rand] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Angelika Langer <b>Date:</b> 2000-05-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The algorithms transform(), accumulate(), inner_product(), partial_sum(), and adjacent_difference() require that the function object supplied to them shall not have any side effects.</p> -<p>The standard defines a side effect in 1.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.execution"> [intro.execution]</a> as:</p> -<blockquote>-7- Accessing an object designated by a volatile lvalue (basic.lval), +<p>The standard defines a side effect in 1.9 [intro.execution] as:</p> +<blockquote><p>-7- Accessing an object designated by a volatile lvalue (basic.lval), modifying an object, calling a library I/O function, or calling a function that does any of those operations are all side effects, which are changes -in the state of the execution environment.</blockquote> +in the state of the execution environment.</p></blockquote> <p>As a consequence, the function call operator of a function object supplied to any of the algorithms listed above cannot modify data members, cannot @@ -7099,11 +9902,11 @@ efficient implementation of these algorithms.</p> <p>The requirement of side-effect-free function objects could be replaced by a more relaxed basic requirement (which would hold for all function objects supplied to any algorithm in the standard library):</p> -<blockquote>A function objects supplied to an algorithm shall not invalidate +<blockquote><p>A function objects supplied to an algorithm shall not invalidate any iterator or sequence that is used by the algorithm. Invalidation of the sequence includes destruction of the sorting order if the algorithm relies on the sorting order (see section 25.3 - Sorting and related operations -[lib.alg.sorting]).</blockquote> +[lib.alg.sorting]).</p></blockquote> <p>I can't judge whether it is intended that the function objects supplied to transform(), accumulate(), inner_product(), partial_sum(), or adjacent_difference() @@ -7113,6 +9916,8 @@ shall not modify sequence elements through dereferenced iterators.</p> Since the consequences for user-supplied function objects are drastic and limit the usefulness of the algorithms significantly I would consider it a defect.</p> + + <p><b>Proposed resolution:</b></p> <p><i>Things to notice about these changes:</i></p> @@ -7120,136 +9925,145 @@ a defect.</p> <ol> <li> <i>The fully-closed ("[]" as opposed to half-closed "[)" ranges are intentional. we want to prevent side-effects from - invalidating the end iterators.</i> -</li> + invalidating the end iterators.</i></li> <li> <i>That has the unintentional side-effect of prohibiting modification of the end element as a side-effect. This could - conceivably be significant in some cases.</i> -</li> + conceivably be significant in some cases.</i></li> <li> <i>The wording also prevents side-effects from modifying elements of the output sequence. I can't imagine why anyone would want to do this, but it is arguably a restriction that implementors - don't need to place on users.</i> -</li> + don't need to place on users.</i></li> <li> <i>Lifting the restrictions imposed in #2 and #3 above is possible - and simple, but would require more verbiage.</i> -</li> + and simple, but would require more verbiage.</i></li> </ol> <p>Change 25.2.3/2 from:</p> -<blockquote> +<blockquote><p> -2- Requires: op and binary_op shall not have any side effects. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -2- Requires: in the ranges [first1, last1], [first2, first2 + (last1 - first1)] and [result, result + (last1- first1)], op and binary_op shall neither modify elements nor invalidate iterators or subranges. [Footnote: The use of fully closed ranges is intentional --end footnote] -</blockquote> +</p></blockquote> <p>Change 25.2.3/2 from:</p> -<blockquote> +<blockquote><p> -2- Requires: op and binary_op shall not have any side effects. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -2- Requires: op and binary_op shall not invalidate iterators or subranges, or modify elements in the ranges [first1, last1], [first2, first2 + (last1 - first1)], and [result, result + (last1 - first1)]. [Footnote: The use of fully closed ranges is intentional --end footnote] -</blockquote> +</p></blockquote> <p>Change 26.4.1/2 from:</p> -<blockquote> +<blockquote><p> -2- Requires: T must meet the requirements of CopyConstructible (lib.copyconstructible) and Assignable (lib.container.requirements) types. binary_op shall not cause side effects. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -2- Requires: T must meet the requirements of CopyConstructible (lib.copyconstructible) and Assignable (lib.container.requirements) types. In the range [first, last], binary_op shall neither modify elements nor invalidate iterators or subranges. [Footnote: The use of a fully closed range is intentional --end footnote] -</blockquote> +</p></blockquote> <p>Change 26.4.2/2 from:</p> -<blockquote> +<blockquote><p> -2- Requires: T must meet the requirements of CopyConstructible (lib.copyconstructible) and Assignable (lib.container.requirements) types. binary_op1 and binary_op2 shall not cause side effects. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -2- Requires: T must meet the requirements of CopyConstructible (lib.copyconstructible) and Assignable (lib.container.requirements) types. In the ranges [first, last] and [first2, first2 + (last - first)], binary_op1 and binary_op2 shall neither modify elements nor invalidate iterators or subranges. [Footnote: The use of fully closed ranges is intentional --end footnote] -</blockquote> +</p></blockquote> <p>Change 26.4.3/4 from:</p> -<blockquote> +<blockquote><p> -4- Requires: binary_op is expected not to have any side effects. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -4- Requires: In the ranges [first, last] and [result, result + (last - first)], binary_op shall neither modify elements nor invalidate iterators or subranges. [Footnote: The use of fully closed ranges is intentional --end footnote] -</blockquote> +</p></blockquote> <p>Change 26.4.4/2 from:</p> -<blockquote> +<blockquote><p> -2- Requires: binary_op shall not have any side effects. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -2- Requires: In the ranges [first, last] and [result, result + (last - first)], binary_op shall neither modify elements nor invalidate iterators or subranges. [Footnote: The use of fully closed ranges is intentional --end footnote] -</blockquote> +</p></blockquote> <p><i>[Toronto: Dave Abrahams supplied wording.]</i></p> + <p><i>[Copenhagen: Proposed resolution was modified slightly. Matt added footnotes pointing out that the use of closed ranges was intentional.]</i></p> + + + + + + <hr> -<a name="243"><h3>243. <tt>get</tt> and <tt>getline</tt> when sentry reports failure</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> May 15 2000</p> +<h3><a name="243"></a>243. <tt>get</tt> and <tt>getline</tt> when sentry reports failure</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-05-15</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>basic_istream<>::get(), and basic_istream<>::getline(), are unclear with respect to the behavior and side-effects of the named functions in case of an error.</p> @@ -7267,18 +10081,20 @@ extracted that gcount() returns supposed to be?</p> charT()) into the next successive location of the array." Is not clear whether this sentence applies if either of the conditions above holds (i.e., when sentry fails).</p> + + <p><b>Proposed resolution:</b></p> <p>Add to 27.6.1.3, p1 after the sentence</p> -<blockquote> +<blockquote><p> "... If the sentry object returns true, when converted to a value of type bool, the function endeavors to obtain the requested input." -</blockquote> +</p></blockquote> <p>the following</p> -<blockquote> +<blockquote><p> "Otherwise, if the sentry constructor exits by throwing an exception or if the sentry object returns false, when converted to a value of type bool, the function returns without attempting to obtain any input. In @@ -7286,7 +10102,9 @@ either case the number of extracted characters is set to 0; unformatted input functions taking a character array of non-zero size as an argument shall also store a null character (using charT()) in the first location of the array." -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>Although the general philosophy of the input functions is that the argument should not be modified upon failure, <tt>getline</tt> @@ -7295,19 +10113,28 @@ implementations still do that. Earlier versions of the draft standard had language that made this an unambiguous requirement; those words were moved to a place where their context made them less clear. See Jerry Schwarz's message c++std-lib-7618.</p> + + + + <hr> -<a name="247"><h3>247. <tt>vector</tt>, <tt>deque::insert</tt> complexity</h3></a><p><b>Section:</b> 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Lisa Lippincott <b>Date:</b> 06 June 2000</p> -<p>Paragraph 2 of 23.2.4.3 [lib.vector.modifiers] describes the complexity +<h3><a name="247"></a>247. <tt>vector</tt>, <tt>deque::insert</tt> complexity</h3> +<p><b>Section:</b> 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Lisa Lippincott <b>Date:</b> 2000-06-06</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.modifiers">issues</a> in [vector.modifiers].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>Paragraph 2 of 23.2.5.4 [vector.modifiers] describes the complexity of <tt>vector::insert</tt>:</p> - <blockquote> + <blockquote><p> Complexity: If first and last are forward iterators, bidirectional iterators, or random access iterators, the complexity is linear in the number of elements in the range [first, last) plus the distance to the end of the vector. If they are input iterators, the complexity is proportional to the number of elements in the range [first, last) times the distance to the end of the vector. - </blockquote> + </p></blockquote> <p>First, this fails to address the non-iterator forms of <tt>insert</tt>.</p> @@ -7318,10 +10145,10 @@ the end of a <tt>vector</tt> in constant time.</p> <p>I looked to see if <tt>deque</tt> had a similar problem, and was surprised to find that <tt>deque</tt> places no requirement on the -complexity of inserting multiple elements (23.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array.size"> [lib.array.size]</a>, +complexity of inserting multiple elements (23.2.2.3 [deque.modifiers], paragraph 3):</p> - <blockquote> + <blockquote><p> Complexity: In the worst case, inserting a single element into a deque takes time linear in the minimum of the distance from the insertion point to the beginning of the deque and the distance @@ -7329,28 +10156,33 @@ paragraph 3):</p> single element either at the beginning or end of a deque always takes constant time and causes a single call to the copy constructor of T. - </blockquote> + </p></blockquote> + + <p><b>Proposed resolution:</b></p> -<p>Change Paragraph 2 of 23.2.4.3 [lib.vector.modifiers] to</p> - <blockquote> +<p>Change Paragraph 2 of 23.2.5.4 [vector.modifiers] to</p> + <blockquote><p> Complexity: The complexity is linear in the number of elements inserted plus the distance to the end of the vector. - </blockquote> + </p></blockquote> <p><i>[For input iterators, one may achieve this complexity by first inserting at the end of the <tt>vector</tt>, and then using <tt>rotate</tt>.]</i></p> -<p>Change 23.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.array.size"> [lib.array.size]</a>, paragraph 3, to:</p> - <blockquote> +<p>Change 23.2.2.3 [deque.modifiers], paragraph 3, to:</p> + + <blockquote><p> Complexity: The complexity is linear in the number of elements inserted plus the shorter of the distances to the beginning and end of the deque. Inserting a single element at either the beginning or the end of a deque causes a single call to the copy constructor of T. - </blockquote> + </p></blockquote> + + <p><b>Rationale:</b></p> <p>This is a real defect, and proposed resolution fixes it: some @@ -7358,28 +10190,50 @@ paragraph 3):</p> resolution does constrain deque implementations (it rules out the most naive possible implementations), but the LWG doesn't see a reason to permit that implementation.</p> + + + + + <hr> -<a name="248"><h3>248. time_get fails to set eofbit</h3></a><p><b>Section:</b> 22.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.time"> [lib.category.time]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 22 June 2000</p> +<h3><a name="248"></a>248. time_get fails to set eofbit</h3> +<p><b>Section:</b> 22.2.5 [category.time] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-06-22</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>There is no requirement that any of time_get member functions set ios::eofbit when they reach the end iterator while parsing their input. Since members of both the num_get and money_get facets are required to do so (22.2.2.1.2, and 22.2.6.1.2, respectively), time_get members should follow the same requirement for consistency.</p> + + <p><b>Proposed resolution:</b></p> <p>Add paragraph 2 to section 22.2.5.1 with the following text:</p> -<blockquote> +<blockquote><p> If the end iterator is reached during parsing by any of the get() member functions, the member sets ios_base::eofbit in err. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>Two alternative resolutions were proposed. The LWG chose this one because it was more consistent with the way eof is described for other input facets.</p> + + + + <hr> -<a name="250"><h3>250. splicing invalidates iterators</h3></a><p><b>Section:</b> 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Brian Parker <b>Date:</b> 14 Jul 2000</p> +<h3><a name="250"></a>250. splicing invalidates iterators</h3> +<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Brian Parker <b>Date:</b> 2000-07-14</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Section 23.2.2.4 [lib.list.ops] states that +Section 23.2.3.4 [list.ops] states that </p> <pre> void splice(iterator position, list<T, Allocator>& x); </pre> @@ -7392,67 +10246,91 @@ This is unnecessary and defeats an important feature of splice. In fact, the SGI STL guarantees that iterators to <tt>x</tt> remain valid after <tt>splice</tt>. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add a footnote to 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, paragraph 1:</p> -<blockquote> -[<i>Footnote:</i> As specified in 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, paragraphs +<p>Add a footnote to 23.2.3.4 [list.ops], paragraph 1:</p> +<blockquote><p> +[<i>Footnote:</i> As specified in [default.con.req], paragraphs 4-5, the semantics described in this clause applies only to the case where allocators compare equal. --end footnote] -</blockquote> +</p></blockquote> -<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraph 4 with:</p> -<blockquote> +<p>In 23.2.3.4 [list.ops], replace paragraph 4 with:</p> +<blockquote><p> Effects: Inserts the contents of x before position and x becomes empty. Pointers and references to the moved elements of x now refer to those same elements but as members of *this. Iterators referring to the moved elements will continue to refer to their elements, but they now behave as iterators into *this, not into x. -</blockquote> +</p></blockquote> -<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraph 7 with:</p> -<blockquote> +<p>In 23.2.3.4 [list.ops], replace paragraph 7 with:</p> +<blockquote><p> Effects: Inserts an element pointed to by i from list x before position and removes the element from x. The result is unchanged if position == i or position == ++i. Pointers and references to *i continue to refer to this same element but as a member of *this. Iterators to *i (including i itself) continue to refer to the same element, but now behave as iterators into *this, not into x. -</blockquote> +</p></blockquote> -<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraph 12 with:</p> -<blockquote> +<p>In 23.2.3.4 [list.ops], replace paragraph 12 with:</p> +<blockquote><p> Requires: [first, last) is a valid range in x. The result is undefined if position is an iterator in the range [first, last). Pointers and references to the moved elements of x now refer to those same elements but as members of *this. Iterators referring to the moved elements will continue to refer to their elements, but they now behave as iterators into *this, not into x. -</blockquote> +</p></blockquote> <p><i>[pre-Copenhagen: Howard provided wording.]</i></p> + + + <p><b>Rationale:</b></p> <p>The original proposed resolution said that iterators and references would remain "valid". The new proposed resolution clarifies what that means. Note that this only applies to the case of equal allocators. -From 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> paragraph 4, the behavior of list when +From [default.con.req] paragraph 4, the behavior of list when allocators compare nonequal is outside the scope of the standard.</p> + + + + <hr> -<a name="251"><h3>251. basic_stringbuf missing allocator_type</h3></a><p><b>Section:</b> 27.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf"> [lib.stringbuf]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jul 2000</p> +<h3><a name="251"></a>251. basic_stringbuf missing allocator_type</h3> +<p><b>Section:</b> 27.7.1 [stringbuf] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-07-28</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The synopsis for the template class <tt>basic_stringbuf</tt> doesn't list a typedef for the template parameter <tt>Allocator</tt>. This makes it impossible to determine the type of the allocator at compile time. It's also inconsistent with all other template classes in the library that do provide a typedef for the <tt>Allocator</tt> parameter.</p> + + <p><b>Proposed resolution:</b></p> <p>Add to the synopses of the class templates basic_stringbuf (27.7.1), basic_istringstream (27.7.2), basic_ostringstream (27.7.3), and basic_stringstream (27.7.4) the typedef:</p> <pre> typedef Allocator allocator_type; </pre> + + + + <hr> -<a name="252"><h3>252. missing casts/C-style casts used in iostreams</h3></a><p><b>Section:</b> 27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jul 2000</p> +<h3><a name="252"></a>252. missing casts/C-style casts used in iostreams</h3> +<p><b>Section:</b> 27.7 [string.streams] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-07-28</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string.streams">issues</a> in [string.streams].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>27.7.2.2, p1 uses a C-style cast rather than the more appropriate const_cast<> in the Returns clause for basic_istringstream<>::rdbuf(). The same C-style cast is being used in 27.7.3.2, p1, D.7.2.2, p1, and @@ -7461,6 +10339,8 @@ the cast altogether.</p> <p>C-style casts have not been deprecated, so the first part of this issue is stylistic rather than a matter of correctness.</p> + + <p><b>Proposed resolution:</b></p> <p>In 27.7.2.2, p1 replace </p> <pre> -1- Returns: (basic_stringbuf<charT,traits,Allocator>*)&sb.</pre> @@ -7486,8 +10366,18 @@ issue is stylistic rather than a matter of correctness.</p> <p>with</p> <pre> -2- Returns: const_cast<strstreambuf*>(&sb).</pre> + + + + <hr> -<a name="253"><h3>253. valarray helper functions are almost entirely useless</h3></a><p><b>Section:</b> 26.5.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.cons"> [lib.valarray.cons]</a>, 26.5.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.valarray.assign"> [lib.valarray.assign]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Robert Klarer <b>Date:</b> 31 Jul 2000</p> +<h3><a name="253"></a>253. valarray helper functions are almost entirely useless</h3> +<p><b>Section:</b> 26.5.2.1 [valarray.cons], 26.5.2.2 [valarray.assign] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Robert Klarer <b>Date:</b> 2000-07-31</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#valarray.cons">active issues</a> in [valarray.cons].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#valarray.cons">issues</a> in [valarray.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>This discussion is adapted from message c++std-lib-7056 posted November 11, 1999. I don't think that anyone can reasonably claim that the problem described below is NAD.</p> @@ -7558,74 +10448,66 @@ same reasoning applies to the three other constructors and the four assignment operators that are listed at the beginning of this post. Furthermore, since these functions cannot be called, the valarray helper classes are almost entirely useless.</p> + + <p><b>Proposed resolution:</b></p> <p>slice_array:</p> <ul> <li> Make the copy constructor and copy-assignment operator declarations - public in the slice_array class template definition in 26.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.slice.array"> [lib.template.slice.array]</a> </li> -<li> remove paragraph 3 of 26.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.slice.array"> [lib.template.slice.array]</a> -</li> -<li> remove the copy constructor declaration from 26.5.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cons.slice.arr"> [lib.cons.slice.arr]</a> -</li> -<li> change paragraph 1 of 26.5.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.cons.slice.arr"> [lib.cons.slice.arr]</a> to read "This constructor is declared + public in the slice_array class template definition in 26.5.5 [template.slice.array] </li> +<li> remove paragraph 3 of 26.5.5 [template.slice.array]</li> +<li> remove the copy constructor declaration from 26.5.5.1 [cons.slice.arr]</li> +<li> change paragraph 1 of 26.5.5.1 [cons.slice.arr] to read "This constructor is declared to be private. This constructor need not be defined."</li> -<li> remove the first sentence of paragraph 1 of 26.5.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.assign"> [lib.slice.arr.assign]</a> -</li> +<li> remove the first sentence of paragraph 1 of 26.5.5.2 [slice.arr.assign]</li> <li> Change the first three words of the second sentence of paragraph 1 of - 26.5.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.slice.arr.assign"> [lib.slice.arr.assign]</a> to "These assignment operators have"</li> + 26.5.5.2 [slice.arr.assign] to "These assignment operators have"</li> </ul> <p>gslice_array:</p> <ul> <li> Make the copy constructor and copy-assignment operator declarations - public in the gslice_array class template definition in 26.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.gslice.array"> [lib.template.gslice.array]</a> </li> -<li> remove the note in paragraph 3 of 26.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.gslice.array"> [lib.template.gslice.array]</a> -</li> -<li> remove the copy constructor declaration from 26.5.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.cons"> [lib.gslice.array.cons]</a> -</li> -<li> change paragraph 1 of 26.5.7.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.cons"> [lib.gslice.array.cons]</a> to read "This constructor is declared + public in the gslice_array class template definition in 26.5.7 [template.gslice.array] </li> +<li> remove the note in paragraph 3 of 26.5.7 [template.gslice.array]</li> +<li> remove the copy constructor declaration from 26.5.7.1 [gslice.array.cons]</li> +<li> change paragraph 1 of 26.5.7.1 [gslice.array.cons] to read "This constructor is declared to be private. This constructor need not be defined."</li> -<li> remove the first sentence of paragraph 1 of 26.5.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.assign"> [lib.gslice.array.assign]</a> -</li> +<li> remove the first sentence of paragraph 1 of 26.5.7.2 [gslice.array.assign]</li> <li> Change the first three words of the second sentence of paragraph 1 of - 26.5.7.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.gslice.array.assign"> [lib.gslice.array.assign]</a> to "These assignment operators have"</li> + 26.5.7.2 [gslice.array.assign] to "These assignment operators have"</li> </ul> <p>mask_array:</p> <ul> <li> Make the copy constructor and copy-assignment operator declarations - public in the mask_array class template definition in 26.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.mask.array"> [lib.template.mask.array]</a> </li> -<li> remove the note in paragraph 2 of 26.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.mask.array"> [lib.template.mask.array]</a> -</li> -<li> remove the copy constructor declaration from 26.5.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.cons"> [lib.mask.array.cons]</a> -</li> -<li> change paragraph 1 of 26.5.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.cons"> [lib.mask.array.cons]</a> to read "This constructor is declared + public in the mask_array class template definition in 26.5.8 [template.mask.array] </li> +<li> remove the note in paragraph 2 of 26.5.8 [template.mask.array]</li> +<li> remove the copy constructor declaration from 26.5.8.1 [mask.array.cons]</li> +<li> change paragraph 1 of 26.5.8.1 [mask.array.cons] to read "This constructor is declared to be private. This constructor need not be defined."</li> -<li> remove the first sentence of paragraph 1 of 26.5.8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.assign"> [lib.mask.array.assign]</a> -</li> +<li> remove the first sentence of paragraph 1 of 26.5.8.2 [mask.array.assign]</li> <li> Change the first three words of the second sentence of paragraph 1 of - 26.5.8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.mask.array.assign"> [lib.mask.array.assign]</a> to "These assignment operators have"</li> + 26.5.8.2 [mask.array.assign] to "These assignment operators have"</li> </ul> <p>indirect_array:</p> <ul> <li>Make the copy constructor and copy-assignment operator declarations - public in the indirect_array class definition in 26.5.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.indirect.array"> [lib.template.indirect.array]</a> -</li> -<li> remove the note in paragraph 2 of 26.5.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.template.indirect.array"> [lib.template.indirect.array]</a> -</li> -<li> remove the copy constructor declaration from 26.5.9.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.cons"> [lib.indirect.array.cons]</a> -</li> -<li> change the descriptive text in 26.5.9.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.cons"> [lib.indirect.array.cons]</a> to read "This constructor is + public in the indirect_array class definition in 26.5.9 [template.indirect.array]</li> +<li> remove the note in paragraph 2 of 26.5.9 [template.indirect.array]</li> +<li> remove the copy constructor declaration from 26.5.9.1 [indirect.array.cons]</li> +<li> change the descriptive text in 26.5.9.1 [indirect.array.cons] to read "This constructor is declared to be private. This constructor need not be defined."</li> -<li> remove the first sentence of paragraph 1 of 26.5.9.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.assign"> [lib.indirect.array.assign]</a> -</li> +<li> remove the first sentence of paragraph 1 of 26.5.9.2 [indirect.array.assign]</li> <li> Change the first three words of the second sentence of paragraph 1 of - 26.5.9.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.indirect.array.assign"> [lib.indirect.array.assign]</a> to "These assignment operators have"</li> + 26.5.9.2 [indirect.array.assign] to "These assignment operators have"</li> </ul> <p><i>[Proposed resolution was modified in Santa Cruz: explicitly make copy constructor and copy assignment operators public, instead of removing them.]</i></p> + + + <p><b>Rationale:</b></p> <p>Keeping the valarray constructors private is untenable. Merely making valarray a friend of the helper classes isn't good enough, @@ -7637,27 +10519,598 @@ solve this problem. A majority of the LWG <i>(straw poll: 13-4)</i> believed we should make the assignment operators public, in addition to the copy constructors, for reasons of symmetry and user expectation.</p> + + + + + <hr> -<a name="256"><h3>256. typo in 27.4.4.2, p17: copy_event does not exist</h3></a><p><b>Section:</b> 27.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.members"> [lib.basic.ios.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 21 Aug 2000</p> +<h3><a name="254"></a>254. Exception types in clause 19 are constructed from <tt>std::string</tt></h3> +<p><b>Section:</b> 19.1 [std.exceptions], 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2000-08-01</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -27.4.4.2, p17 says +Many of the standard exception types which implementations are +required to throw are constructed with a const std::string& +parameter. For example: +</p> + +<pre> 19.1.5 Class out_of_range [lib.out.of.range] + namespace std { + class out_of_range : public logic_error { + public: + explicit out_of_range(const string& what_arg); + }; + } + + 1 The class out_of_range defines the type of objects thrown as excep- + tions to report an argument value not in its expected range. + + out_of_range(const string& what_arg); + + Effects: + Constructs an object of class out_of_range. + Postcondition: + strcmp(what(), what_arg.c_str()) == 0. +</pre> + +<p> +There are at least two problems with this: </p> +<ol> +<li>A program which is low on memory may end up throwing +std::bad_alloc instead of out_of_range because memory runs out while +constructing the exception object.</li> +<li>An obvious implementation which stores a std::string data member +may end up invoking terminate() during exception unwinding because the +exception object allocates memory (or rather fails to) as it is being +copied.</li> +</ol> +<p> +There may be no cure for (1) other than changing the interface to +out_of_range, though one could reasonably argue that (1) is not a +defect. Personally I don't care that much if out-of-memory is reported +when I only have 20 bytes left, in the case when out_of_range would +have been reported. People who use exception-specifications might care +a lot, though. +</p> + +<p> +There is a cure for (2), but it isn't completely obvious. I think a +note for implementors should be made in the standard. Avoiding +possible termination in this case shouldn't be left up to chance. The +cure is to use a reference-counted "string" implementation +in the exception object. I am not necessarily referring to a +std::string here; any simple reference-counting scheme for a NTBS +would do. +</p> + +<p><b>Further discussion, in email:</b></p> + +<p> +...I'm not so concerned about (1). After all, a library implementation +can add const char* constructors as an extension, and users don't +<i>need</i> to avail themselves of the standard exceptions, though this is +a lame position to be forced into. FWIW, std::exception and +std::bad_alloc don't require a temporary basic_string. +</p> + +<p> +...I don't think the fixed-size buffer is a solution to the problem, +strictly speaking, because you can't satisfy the postcondition +<br> + <tt> strcmp(what(), what_arg.c_str()) == 0</tt> +<br> +For all values of what_arg (i.e. very long values). That means that +the only truly conforming solution requires a dynamic allocation. +</p> + +<p><b>Further discussion, from Redmond:</b></p> + +<p>The most important progress we made at the Redmond meeting was +realizing that there are two separable issues here: the const +string& constructor, and the copy constructor. If a user writes +something like <tt>throw std::out_of_range("foo")</tt>, the const +string& constructor is invoked before anything gets thrown. The +copy constructor is potentially invoked during stack unwinding.</p> + +<p>The copy constructor is a more serious problem, becuase failure +during stack unwinding invokes <tt>terminate</tt>. The copy +constructor must be nothrow. <i>Curaçao: Howard thinks this +requirement may already be present.</i></p> + +<p>The fundamental problem is that it's difficult to get the nothrow +requirement to work well with the requirement that the exception +objects store a string of unbounded size, particularly if you also try +to make the const string& constructor nothrow. Options discussed +include:</p> + +<ul> +<li>Limit the size of a string that exception objects are required to +throw: change the postconditions of 19.1.2 [domain.error] paragraph 3 +and 19.1.6 [runtime.error] paragraph 3 to something like this: +"strncmp(what(), what_arg._str(), N) == 0, where N is an +implementation defined constant no smaller than 256".</li> +<li>Allow the const string& constructor to throw, but not the +copy constructor. It's the implementor's responsibility to get it +right. (An implementor might use a simple refcount class.)</li> +<li>Compromise between the two: an implementation is not allowed to +throw if the string's length is less than some N, but, if it doesn't +throw, the string must compare equal to the argument.</li> +<li>Add a new constructor that takes a const char*</li> +</ul> + +<p>(Not all of these options are mutually exclusive.)</p> + + + +<p><b>Proposed resolution:</b></p> + +<p> +Change 19.1.1 [logic.error] +</p> + +<blockquote> +<pre>namespace std { + class logic_error : public exception { + public: + explicit logic_error(const string& <i>what_arg</i>); + <ins>explicit logic_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>logic_error(const char* <i>what_arg</i>);</tt></ins> +</p> <blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>logic_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.2 [domain.error] +</p> + +<blockquote> +<pre>namespace std { + class domain_error : public logic_error { + public: + explicit domain_error(const string& <i>what_arg</i>); + <ins>explicit domain_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>domain_error(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>domain_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> + +</blockquote> +</blockquote> + +<p> +Change 19.1.3 [invalid.argument] +</p> + +<blockquote> +<pre>namespace std { + class invalid_argument : public logic_error { + public: + explicit invalid_argument(const string& <i>what_arg</i>); + <ins>explicit invalid_argument(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>invalid_argument(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>invalid_argument</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.4 [length.error] +</p> + +<blockquote> +<pre>namespace std { + class length_error : public logic_error { + public: + explicit length_error(const string& <i>what_arg</i>); + <ins>explicit length_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>length_error(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>length_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.5 [out.of.range] +</p> + +<blockquote> +<pre>namespace std { + class out_of_range : public logic_error { + public: + explicit out_of_range(const string& <i>what_arg</i>); + <ins>explicit out_of_range(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>out_of_range(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>out_of_range</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.6 [runtime.error] +</p> + +<blockquote> +<pre>namespace std { + class runtime_error : public exception { + public: + explicit runtime_error(const string& <i>what_arg</i>); + <ins>explicit runtime_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>runtime_error(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>runtime_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.7 [range.error] +</p> + +<blockquote> +<pre>namespace std { + class range_error : public runtime_error { + public: + explicit range_error(const string& <i>what_arg</i>); + <ins>explicit range_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>range_error(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>range_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.8 [overflow.error] +</p> + +<blockquote> +<pre>namespace std { + class overflow_error : public runtime_error { + public: + explicit overflow_error(const string& <i>what_arg</i>); + <ins>explicit overflow_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>overflow_error(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>overflow_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 19.1.9 [underflow.error] +</p> + +<blockquote> +<pre>namespace std { + class underflow_error : public runtime_error { + public: + explicit underflow_error(const string& <i>what_arg</i>); + <ins>explicit underflow_error(const char* <i>what_arg</i>);</ins> + }; +} +</pre> +<p>...</p> +<p> +<ins><tt>underflow_error(const char* <i>what_arg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>underflow_error</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>what_arg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + +<p> +Change 27.4.2.1.1 [ios::failure] +</p> + +<blockquote> +<pre>namespace std { + class ios_base::failure : public exception { + public: + explicit failure(const string& <i>msg</i>); + <ins>explicit failure(const char* <i>msg</i>);</ins> + virtual const char* what() const throw(); +}; +} +</pre> +<p>...</p> +<p> +<ins><tt>failure(const char* <i>msg</i>);</tt></ins> +</p> +<blockquote> +<p><ins> +-4- <i>Effects:</i> Constructs an object of class <tt>failure</tt>. +</ins></p> +<p><ins> +-5- <i>Postcondition:</i> <tt>strcmp(what(), <i>msg</i>) == 0</tt>. +</ins></p> +</blockquote> + +</blockquote> + + + +<p><b>Rationale:</b></p> + +<p>Throwing a bad_alloc while trying to construct a message for another +exception-derived class is not necessarily a bad thing. And the +bad_alloc constructor already has a no throw spec on it (18.4.2.1).</p> + +<p><b>Future:</b></p> + +<p>All involved would like to see const char* constructors added, but +this should probably be done for C++0X as opposed to a DR.</p> + +<p>I believe the no throw specs currently decorating these functions +could be improved by some kind of static no throw spec checking +mechanism (in a future C++ language). As they stand, the copy +constructors might fail via a call to unexpected. I think what is +intended here is that the copy constructors can't fail.</p> + +<p><i>[Pre-Sydney: reopened at the request of Howard Hinnant. + Post-Redmond: James Kanze noticed that the copy constructors of + exception-derived classes do not have nothrow clauses. Those + classes have no copy constructors declared, meaning the + compiler-generated implicit copy constructors are used, and those + compiler-generated constructors might in principle throw anything.]</i></p> + + +<p><i>[ +Batavia: Merged copy constructor and assignment operator spec into <tt>exception</tt> +and added <tt>ios::failure</tt> into the proposed resolution. +]</i></p> + + +<p><i>[ +Oxford: The proposed resolution simply addresses the issue of constructing +the exception objects with <tt>const char*</tt> and string literals without +the need to explicit include or construct a <tt>std::string</tt>. +]</i></p> + + + + + + + +<hr> +<h3><a name="256"></a>256. typo in 27.4.4.2, p17: copy_event does not exist</h3> +<p><b>Section:</b> 27.4.4.2 [basic.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.members">issues</a> in [basic.ios.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +27.4.4.2, p17 says +</p> + +<blockquote><p> -17- Before copying any parts of rhs, calls each registered callback pair (fn,index) as (*fn)(erase_event,*this,index). After all parts but exceptions() have been replaced, calls each callback pair that was copied from rhs as (*fn)(copy_event,*this,index). -</blockquote> +</p></blockquote> <p> The name copy_event isn't defined anywhere. The intended name was copyfmt_event. </p> + + <p><b>Proposed resolution:</b></p> <p>Replace copy_event with copyfmt_event in the named paragraph.</p> + + + + <hr> -<a name="259"><h3>259. <tt>basic_string::operator[]</tt> and const correctness</h3></a><p><b>Section:</b> 21.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.access"> [lib.string.access]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Chris Newton <b>Date:</b> 27 Aug 2000</p> +<h3><a name="258"></a>258. Missing allocator requirement</h3> +<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#WP">Pending WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-08-22</p> +<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> +<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> +<p><b>Discussion:</b></p> +<p> +From lib-7752: +</p> + +<p> +I've been assuming (and probably everyone else has been assuming) that +allocator instances have a particular property, and I don't think that +property can be deduced from anything in Table 32. +</p> + +<p> +I think we have to assume that allocator type conversion is a +homomorphism. That is, if x1 and x2 are of type X, where +X::value_type is T, and if type Y is X::template +rebind<U>::other, then Y(x1) == Y(x2) if and only if x1 == x2. +</p> + +<p> +Further discussion: Howard Hinnant writes, in lib-7757: +</p> + +<p> +I think I can prove that this is not provable by Table 32. And I agree +it needs to be true except for the "and only if". If x1 != x2, I see no +reason why it can't be true that Y(x1) == Y(x2). Admittedly I can't +think of a practical instance where this would happen, or be valuable. +But I also don't see a need to add that extra restriction. I think we +only need: +</p> + +<blockquote><p> + if (x1 == x2) then Y(x1) == Y(x2) +</p></blockquote> + +<p> +If we decide that == on allocators is transitive, then I think I can +prove the above. But I don't think == is necessarily transitive on +allocators. That is: +</p> + +<p> +Given x1 == x2 and x2 == x3, this does not mean x1 == x3. +</p> + +<p>Example:</p> + +<blockquote> +<p> +x1 can deallocate pointers from: x1, x2, x3 <br> +x2 can deallocate pointers from: x1, x2, x4 <br> +x3 can deallocate pointers from: x1, x3 <br> +x4 can deallocate pointers from: x2, x4 +</p> + +<p> +x1 == x2, and x2 == x4, but x1 != x4 +</p> +</blockquote> +<p><i>[Toronto: LWG members offered multiple opinions. One +opinion is that it should not be required that <tt>x1 == x2</tt> +implies <tt>Y(x1) == Y(x2)</tt>, and that it should not even be +required that <tt>X(x1) == x1</tt>. Another opinion is that +the second line from the bottom in table 32 already implies the +desired property. This issue should be considered in light of +other issues related to allocator instances.]</i></p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Add row to Table 35: Allocator requirements, right after the row defining <tt>operator!=</tt>: +</p> + +<blockquote> +<p> +If <tt>a1 == a2</tt> then <tt>Y(a1) == Y(a2)</tt> +</p> +</blockquote> + + + +<p><i>[Lillehammer: Same conclusion as before: this should be + considered as part of an allocator redesign, not solved on its own.]</i></p> + + +<p><i>[ +Batavia: An allocator redesign is not forthcoming and thus we fixed this one issue. +]</i></p> + + + + + +<hr> +<h3><a name="259"></a>259. <tt>basic_string::operator[]</tt> and const correctness</h3> +<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#WP">WP</a> + <b>Submitter:</b> Chris Newton <b>Date:</b> 2000-08-27</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> <i>Paraphrased from a message that Chris Newton posted to comp.std.c++:</i> </p> @@ -7673,20 +11126,32 @@ returns <tt>data()[pos]</tt>." The types don't work. The return value of <tt>data()</tt> is <tt>const charT*</tt>, but <tt>operator[]</tt> has a non-const version whose return type is <tt>reference</tt>. </p> + + <p><b>Proposed resolution:</b></p> <p> In section 21.3.4, paragraph 1, change "<tt>data()[<i>pos</i>]</tt>" to "<tt>*(begin() + <i>pos</i>)</tt>". </p> + + + + <hr> -<a name="260"><h3>260. Inconsistent return type of <tt>istream_iterator::operator++(int)</tt> -</h3></a><p><b>Section:</b> 24.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istream.iterator.ops"> [lib.istream.iterator.ops]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 27 Aug 2000</p> +<h3><a name="260"></a>260. Inconsistent return type of <tt>istream_iterator::operator++(int)</tt></h3> +<p><b>Section:</b> 24.5.1.2 [istream.iterator.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-27</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.iterator.ops">issues</a> in [istream.iterator.ops].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The synopsis of istream_iterator::operator++(int) in 24.5.1 shows it as returning the iterator by value. 24.5.1.2, p5 shows the same operator as returning the iterator by reference. That's incorrect given the Effects clause below (since a temporary is returned). The `&' is probably just a typo.</p> + + <p><b>Proposed resolution:</b></p> <p>Change the declaration in 24.5.1.2, p5 from</p> <pre> istream_iterator<T,charT,traits,Distance>& operator++(int); @@ -7695,9 +11160,17 @@ given the Effects clause below (since a temporary is returned). The <pre> istream_iterator<T,charT,traits,Distance> operator++(int); </pre> <p>(that is, remove the `&').</p> + + + + <hr> -<a name="261"><h3>261. Missing description of <tt>istream_iterator::operator!=</tt> -</h3></a><p><b>Section:</b> 24.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istream.iterator.ops"> [lib.istream.iterator.ops]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 27 Aug 2000</p> +<h3><a name="261"></a>261. Missing description of <tt>istream_iterator::operator!=</tt></h3> +<p><b>Section:</b> 24.5.1.2 [istream.iterator.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-08-27</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.iterator.ops">issues</a> in [istream.iterator.ops].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> 24.5.1, p3 lists the synopsis for </p> @@ -7711,6 +11184,8 @@ given the Effects clause below (since a temporary is returned). The but there is no description of what the operator does (i.e., no Effects or Returns clause) in 24.5.1.2. </p> + + <p><b>Proposed resolution:</b></p> <p> Add paragraph 7 to the end of section 24.5.1.2 with the following text: @@ -7722,11 +11197,21 @@ Add paragraph 7 to the end of section 24.5.1.2 with the following text: </pre> <p>-7- Returns: !(x == y).</p> + + + + <hr> -<a name="262"><h3>262. Bitmask operator ~ specified incorrectly</h3></a><p><b>Section:</b> 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 03 Sep 2000</p> +<h3><a name="262"></a>262. Bitmask operator ~ specified incorrectly</h3> +<p><b>Section:</b> 17.3.2.1.2 [bitmask.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2000-09-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The ~ operation should be applied after the cast to int_type. </p> + + <p><b>Proposed resolution:</b></p> <p> Change 17.3.2.1.2 [lib.bitmask.types] operator~ from: @@ -7743,8 +11228,17 @@ to: <pre> bitmask operator~ ( bitmask X ) { return static_cast< bitmask>(~static_cast<int_type>(X)); } </pre> + + + + <hr> -<a name="263"><h3>263. Severe restriction on <tt>basic_string</tt> reference counting</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Kevlin Henney <b>Date:</b> 04 Sep 2000</p> +<h3><a name="263"></a>263. Severe restriction on <tt>basic_string</tt> reference counting</h3> +<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#WP">WP</a> + <b>Submitter:</b> Kevlin Henney <b>Date:</b> 2000-09-04</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The note in paragraph 6 suggests that the invalidation rules for references, pointers, and iterators in paragraph 5 permit a reference- @@ -7794,27 +11288,39 @@ wording does not permit such invalidation because it does not take into account the first call since construction, only the first call since various member and non-member function calls. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the following sentence in 21.3 paragraph 5 from </p> -<blockquote> +<blockquote><p> Subsequent to any of the above uses except the forms of insert() and erase() which return iterators, the first call to non-const member functions operator[](), at(), begin(), rbegin(), end(), or rend(). -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> Following construction or any of the above uses, except the forms of insert() and erase() that return iterators, the first call to non- const member functions operator[](), at(), begin(), rbegin(), end(), or rend(). -</blockquote> +</p></blockquote> + + + + <hr> -<a name="264"></a><h3><a name="264">264. Associative container <tt>insert(i, j)</tt> complexity requirements are not feasible.</a></h3><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> John Potter <b>Date:</b> 07 Sep 2000</p> +<h3><a name="264"></a>264. Associative container <tt>insert(i, j)</tt> complexity requirements are not feasible.</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> John Potter <b>Date:</b> 2000-09-07</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#102">102</a></p> +<p><b>Discussion:</b></p> <p> Table 69 requires linear time if [i, j) is sorted. Sorted is necessary but not sufficient. Consider inserting a sorted range of even integers into a set<int> containing the odd @@ -7822,6 +11328,8 @@ integers in the same range. </p> <p><i>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#102">102</a></i></p> + + <p><b>Proposed resolution:</b></p> <p> In Table 69, in section 23.1.2, change the complexity clause for @@ -7834,6 +11342,9 @@ from i to j". <p><i>[Copenhagen: Minor fix in proposed resolution: fixed unbalanced parens in the revised wording.]</i></p> + + + <p><b>Rationale:</b></p> <p> Testing for valid insertions could be less efficient than simply @@ -7852,8 +11363,17 @@ we can't guarantee linear time complexity whenever the range to be inserted is sorted, it's more trouble than it's worth to say that it's linear in some special cases. </p> + + + + <hr> -<a name="265"><h3>265. std::pair::pair() effects overly restrictive</h3></a><p><b>Section:</b> 20.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.pairs"> [lib.pairs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 11 Sep 2000</p> +<h3><a name="265"></a>265. std::pair::pair() effects overly restrictive</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-09-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> I don't see any requirements on the types of the elements of the std::pair container in 20.2.2. From the descriptions of the member @@ -7867,20 +11387,24 @@ the case of the [in]equality operators also the requirements of 20.1.1 I believe that the the CopyConstructible requirement is unnecessary in the case of 20.2.2, p2. </p> + + <p><b>Proposed resolution:</b></p> <p>Change the Effects clause in 20.2.2, p2 from</p> -<blockquote> +<blockquote><p> -2- <b>Effects</b>: Initializes its members as if implemented: <tt> pair() : first(T1()), second(T2()) {} </tt> -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> -2- <b>Effects</b>: Initializes its members as if implemented: <tt> pair() : first(), second() {} </tt> -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>The existing specification of pair's constructor appears to be a historical artifact: there was concern that pair's members be properly @@ -7889,21 +11413,33 @@ uncertainty about whether they would be zero-initialized if the default constructor was written the obvious way. This has been clarified by core issue 178, and there is no longer any doubt that the straightforward implementation is correct.</p> + + + + <hr> -<a name="266"><h3>266. bad_exception::~bad_exception() missing Effects clause</h3></a><p><b>Section:</b> 18.7.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.bad.exception"> [lib.bad.exception]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 24 Sep 2000</p> +<h3><a name="266"></a>266. bad_exception::~bad_exception() missing Effects clause</h3> +<p><b>Section:</b> 18.7.2.1 [bad.exception] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-09-24</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The synopsis for std::bad_exception lists the function ~bad_exception() but there is no description of what the function does (the Effects clause is missing). </p> + + <p><b>Proposed resolution:</b></p> <p> Remove the destructor from the class synopses of -<tt>bad_alloc</tt> (<font color="red">18.4.2.1</font>), -<tt>bad_cast</tt> (18.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.alloc.errors"> [lib.alloc.errors]</a>), -<tt>bad_typeid</tt> (<font color="red">18.5.3</font>), -and <tt>bad_exception</tt> (18.7.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.bad.exception"> [lib.bad.exception]</a>). +<tt>bad_alloc</tt> (18.5.2.1 [bad.alloc]), +<tt>bad_cast</tt> (18.6.2 [bad.cast]), +<tt>bad_typeid</tt> (18.6.3 [bad.typeid]), +and <tt>bad_exception</tt> (18.7.2.1 [bad.exception]). </p> + + <p><b>Rationale:</b></p> <p> This is a general problem with the exception classes in clause 18. @@ -7912,12 +11448,23 @@ synopses, rather than to document the destructors' behavior, because removing them is more consistent with how exception classes are described in clause 19. </p> + + + + <hr> -<a name="268"><h3>268. Typo in locale synopsis</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 5 Oct 2000</p> +<h3><a name="268"></a>268. Typo in locale synopsis</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-10-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The synopsis of the class std::locale in 22.1.1 contains two typos: the semicolons after the declarations of the default ctor locale::locale() and the copy ctor locale::locale(const locale&) are missing.</p> + + <p><b>Proposed resolution:</b></p> <p>Add the missing semicolons, i.e., change</p> @@ -7932,8 +11479,18 @@ are missing.</p> locale() throw(); locale(const locale& other) throw(); </pre> + + + + <hr> -<a name="270"><h3>270. Binary search requirements overly strict</h3></a><p><b>Section:</b> 25.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.binary.search"> [lib.alg.binary.search]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 18 Oct 2000</p> +<h3><a name="270"></a>270. Binary search requirements overly strict</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-10-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#472">472</a></p> +<p><b>Discussion:</b></p> <p> Each of the four binary search algorithms (lower_bound, upper_bound, equal_range, binary_search) has a form that allows the user to pass a @@ -8011,39 +11568,41 @@ as if we are given a unary predicate and a sequence, such that f(*p) is true for all p below a specific point and false for all p above it. The proposed resolution is based on that alternative formulation.</li> </ul> + + <p><b>Proposed resolution:</b></p> <p>Change 25.3 [lib.alg.sorting] paragraph 3 from:</p> -<blockquote> +<blockquote><p> 3 For all algorithms that take Compare, there is a version that uses operator< instead. That is, comp(*i, *j) != false defaults to *i < *j != false. For the algorithms to work correctly, comp has to induce a strict weak ordering on the values. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> 3 For all algorithms that take Compare, there is a version that uses operator< instead. That is, comp(*i, *j) != false defaults to *i < *j != false. For algorithms other than those described in lib.alg.binary.search (25.3.3) to work correctly, comp has to induce a strict weak ordering on the values. -</blockquote> +</p></blockquote> <p>Add the following paragraph after 25.3 [lib.alg.sorting] paragraph 5:</p> -<blockquote> +<blockquote><p> -6- A sequence [start, finish) is partitioned with respect to an expression f(e) if there exists an integer n such that for all 0 <= i < distance(start, finish), f(*(begin+i)) is true if and only if i < n. -</blockquote> +</p></blockquote> <p>Change 25.3.3 [lib.alg.binary.search] paragraph 1 from:</p> -<blockquote> +<blockquote><p> -1- All of the algorithms in this section are versions of binary search and assume that the sequence being searched is in order according to the implied or explicit comparison function. They work @@ -8053,11 +11612,11 @@ The proposed resolution is based on that alternative formulation.</li> iterators, because these algorithms do a logarithmic number of steps through the data structure. For non-random access iterators they execute a linear number of steps. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -1- All of the algorithms in this section are versions of binary search and assume that the sequence being searched is partitioned with respect to an expression formed by binding the search key to @@ -8068,76 +11627,76 @@ The proposed resolution is based on that alternative formulation.</li> iterators, because these algorithms do a logarithmic number of steps through the data structure. For non-random access iterators they execute a linear number of steps. -</blockquote> +</p></blockquote> <p>Change 25.3.3.1 [lib.lower.bound] paragraph 1 from:</p> -<blockquote> +<blockquote><p> -1- Requires: Type T is LessThanComparable (lib.lessthancomparable). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -1- Requires: The elements e of [first, last) are partitioned with respect to the expression e < value or comp(e, value) -</blockquote> +</p></blockquote> <p>Remove 25.3.3.1 [lib.lower.bound] paragraph 2:</p> -<blockquote> +<blockquote><p> -2- Effects: Finds the first position into which value can be inserted without violating the ordering. -</blockquote> +</p></blockquote> <p>Change 25.3.3.2 [lib.upper.bound] paragraph 1 from:</p> -<blockquote> +<blockquote><p> -1- Requires: Type T is LessThanComparable (lib.lessthancomparable). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -1- Requires: The elements e of [first, last) are partitioned with respect to the expression !(value < e) or !comp(value, e) -</blockquote> +</p></blockquote> <p>Remove 25.3.3.2 [lib.upper.bound] paragraph 2:</p> -<blockquote> +<blockquote><p> -2- Effects: Finds the furthermost position into which value can be inserted without violating the ordering. -</blockquote> +</p></blockquote> <p>Change 25.3.3.3 [lib.equal.range] paragraph 1 from:</p> -<blockquote> +<blockquote><p> -1- Requires: Type T is LessThanComparable (lib.lessthancomparable). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -1- Requires: The elements e of [first, last) are partitioned with respect to the expressions e < value and !(value < e) or comp(e, value) and !comp(value, e). Also, for all elements e of [first, last), e < value implies !(value < e) or comp(e, value) implies !comp(value, e) -</blockquote> +</p></blockquote> <p>Change 25.3.3.3 [lib.equal.range] paragraph 2 from:</p> -<blockquote> +<blockquote><p> -2- Effects: Finds the largest subrange [i, j) such that the value can be inserted at any iterator k in it without violating the ordering. k satisfies the corresponding conditions: !(*k < value) && !(value < *k) or comp(*k, value) == false && comp(value, *k) == false. -</blockquote> +</p></blockquote> <p>to:</p> @@ -8151,27 +11710,31 @@ The proposed resolution is based on that alternative formulation.</li> <p>Change 25.3.3.3 [lib.binary.search] paragraph 1 from:</p> -<blockquote> +<blockquote><p> -1- Requires: Type T is LessThanComparable (lib.lessthancomparable). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -1- Requires: The elements e of [first, last) are partitioned with respect to the expressions e < value and !(value < e) or comp(e, value) and !comp(value, e). Also, for all elements e of [first, last), e < value implies !(value < e) or comp(e, value) implies !comp(value, e) -</blockquote> +</p></blockquote> <p><i>[Copenhagen: Dave Abrahams provided this wording]</i></p> + <p><i>[Redmond: Minor changes in wording. (Removed "non-negative", and changed the "other than those described in" wording.) Also, the LWG decided to accept the "optional" part.]</i></p> + + + <p><b>Rationale:</b></p> <p>The proposed resolution reinterprets binary search. Instead of thinking about searching for a value in a sorted range, we view that @@ -8182,17 +11745,28 @@ for the partition point in a partitioned range.</p> that the upper bound is no earlier than the lower bound, that the pair returned by equal_range is a valid range, and that the first part of that pair is the lower bound.</p> + + + + + <hr> -<a name="271"><h3>271. basic_iostream missing typedefs</h3></a><p><b>Section:</b> 27.6.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreamclass"> [lib.iostreamclass]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 02 Nov 2000</p> +<h3><a name="271"></a>271. basic_iostream missing typedefs</h3> +<p><b>Section:</b> 27.6.1.5 [iostreamclass] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Class template basic_iostream has no typedefs. The typedefs it inherits from its base classes can't be used, since (for example) basic_iostream<T>::traits_type is ambiguous. </p> + + <p><b>Proposed resolution:</b></p> <p>Add the following to basic_iostream's class synopsis in -27.6.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostreamclass"> [lib.iostreamclass]</a>, immediately after <tt>public</tt>:</p> +27.6.1.5 [iostreamclass], immediately after <tt>public</tt>:</p> <pre> // types: typedef charT char_type; @@ -8201,8 +11775,18 @@ basic_iostream<T>::traits_type is ambiguous. typedef typename traits::off_type off_type; typedef traits traits_type; </pre> + + + + <hr> -<a name="272"><h3>272. Missing parentheses around subexpression</h3></a><p><b>Section:</b> 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 02 Nov 2000</p> +<h3><a name="272"></a>272. Missing parentheses around subexpression</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#569">569</a></p> +<p><b>Discussion:</b></p> <p> 27.4.4.3, p4 says about the postcondition of the function: If rdbuf()!=0 then state == rdstate(); otherwise @@ -8214,21 +11798,44 @@ The expression on the right-hand-side of the operator==() needs to be parenthesized in order for the whole expression to ever evaluate to anything but non-zero. </p> + + <p><b>Proposed resolution:</b></p> <p> Add parentheses like so: rdstate()==(state|ios_base::badbit). </p> + + + + <hr> -<a name="273"><h3>273. Missing ios_base qualification on members of a dependent class</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 02 Nov 2000</p> +<h3><a name="273"></a>273. Missing ios_base qualification on members of a dependent class</h3> +<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>27.5.2.4.2, p4, and 27.8.1.6, p2, 27.8.1.7, p3, 27.8.1.9, p2, 27.8.1.10, p3 refer to in and/or out w/o ios_base:: qualification. That's incorrect since the names are members of a dependent base class (14.6.2 [temp.dep]) and thus not visible.</p> + + <p><b>Proposed resolution:</b></p> <p>Qualify the names with the name of the class of which they are members, i.e., ios_base.</p> + + + + <hr> -<a name="274"><h3>274. a missing/impossible allocator requirement</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 02 Nov 2000</p> +<h3><a name="274"></a>274. a missing/impossible allocator requirement</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-11-02</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> I see that table 31 in 20.1.5, p3 allows T in std::allocator<T> to be of any type. But the synopsis in 20.4.1 calls for allocator<>::address() to @@ -8249,21 +11856,26 @@ contexts. So if allocators are to allow const types a partial specialization of std::allocator<const T> would probably have to be provided. </p> + + <p><b>Proposed resolution:</b></p> <p>Change the text in row 1, column 2 of table 32 in 20.1.5, p3 from</p> - <blockquote> + <blockquote><p> any type - </blockquote> + </p></blockquote> <p>to</p> - <blockquote> + <blockquote><p> any non-const, non-reference type - </blockquote> + </p></blockquote> <p><i>[Redmond: previous proposed resolution was "any non-const, non-volatile, non-reference type". Got rid of the "non-volatile".]</i></p> + + + <p><b>Rationale:</b></p> <p> Two resolutions were originally proposed: one that partially @@ -8282,8 +11894,19 @@ also forbids volatile types and reference types. <p><i>[Curaçao: LWG double checked and believes volatile is correctly excluded from the PR.]</i></p> + + + + + + <hr> -<a name="275"><h3>275. Wrong type in num_get::get() overloads</h3></a><p><b>Section:</b> 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 02 Nov 2000</p> +<h3><a name="275"></a>275. Wrong type in num_get::get() overloads</h3> +<p><b>Section:</b> 22.2.2.1.1 [facet.num.get.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2000-11-02</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#facet.num.get.members">issues</a> in [facet.num.get.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> In 22.2.2.1.1, we have a list of overloads for num_get<>::get(). There are eight overloads, all of which are identical except for the @@ -8321,8 +11944,10 @@ These two lists are not identical. They should be, since <tt>get</tt> is supposed to call <tt>do_get</tt> with exactly the arguments it was given. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.members"> [lib.facet.num.get.members]</a>, change</p> +<p>In 22.2.2.1.1 [facet.num.get.members], change</p> <pre> iter_type get(iter_type in, iter_type end, ios_base& str, ios_base::iostate& err, short& val) const; </pre> @@ -8330,11 +11955,21 @@ the arguments it was given. <pre> iter_type get(iter_type in, iter_type end, ios_base& str, ios_base::iostate& err, float& val) const; </pre> + + + + <hr> -<a name="276"></a><h3><a name="276">276. Assignable requirement for container value type overly strict</a></h3><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Peter Dimov <b>Date:</b> 07 Nov 2000</p> +<h3><a name="276"></a>276. Assignable requirement for container value type overly strict</h3> +<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#WP">WP</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2000-11-07</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> 23.1/3 states that the objects stored in a container must be -Assignable. 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, paragraph 2, +Assignable. 23.3.1 [map], paragraph 2, states that map satisfies all requirements for a container, while in the same time defining value_type as pair<const Key, T> - a type that is not Assignable. @@ -8367,33 +12002,35 @@ objects are Assignable. This is related to, but slightly broader than, closed issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#140">140</a>. </p> + + <p><b>Proposed resolution:</b></p> <p>23.1/3: Strike the trailing part of the sentence:</p> - <blockquote> + <blockquote><p> , and the additional requirements of Assignable types from 23.1/3 - </blockquote> + </p></blockquote> <p>so that it reads:</p> - <blockquote> + <blockquote><p> -3- The type of objects stored in these components must meet the requirements of CopyConstructible types (lib.copyconstructible). - </blockquote> + </p></blockquote> <p>23.1/4: Modify to make clear that this requirement is not for all containers. Change to:</p> -<blockquote> +<blockquote><p> -4- Table 64 defines the Assignable requirement. Some containers require this property of the types to be stored in the container. T is the type used to instantiate the container. t is a value of T, and u is a value of (possibly const) T. -</blockquote> +</p></blockquote> <p>23.1, Table 65: in the first row, change "T is Assignable" to "T is CopyConstructible".</p> <p>23.2.1/2: Add sentence for Assignable requirement. Change to:</p> -<blockquote> +<blockquote><p> -2- A deque satisfies all of the requirements of a container and of a reversible container (given in tables in lib.container.requirements) and of a sequence, including the optional sequence requirements @@ -8403,7 +12040,7 @@ must also meet the requirements of Assignable. Descriptions are provided here only for operations on deque that are not described in one of these tables or for operations where there is additional semantic information. -</blockquote> +</p></blockquote> <p>23.2.2/2: Add Assignable requirement to specific methods of list. Change to:</p> @@ -8439,7 +12076,7 @@ additional semantic information.</p> <p>23.2.4/2: Add sentence for Assignable requirement. Change to:</p> -<blockquote> +<blockquote><p> -2- A vector satisfies all of the requirements of a container and of a reversible container (given in two tables in lib.container.requirements) and of a sequence, including most of the optional sequence requirements @@ -8450,7 +12087,9 @@ requirements on the stored object described in requirements of Assignable. Descriptions are provided here only for operations on vector that are not described in one of these tables or for operations where there is additional semantic information. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>list, set, multiset, map, multimap are able to store non-Assignables. However, there is some concern about <tt>list<T></tt>: @@ -8472,10 +12111,19 @@ selective relaxation. Doing so would remove implementors' freedom to implement <tt>vector::push_back</tt> in terms of <tt>vector::insert</tt>.</p> + + + + <hr> -<a name="278"><h3>278. What does iterator validity mean?</h3></a><p><b>Section:</b> 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> P.J. Plauger <b>Date:</b> 27 Nov 2000</p> +<h3><a name="278"></a>278. What does iterator validity mean?</h3> +<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> P.J. Plauger <b>Date:</b> 2000-11-27</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Section 23.2.2.4 [lib.list.ops] states that +Section 23.2.3.4 [list.ops] states that </p> <pre> void splice(iterator position, list<T, Allocator>& x); </pre> @@ -8500,20 +12148,26 @@ iterator, as when a vector or string grows by reallocation. Clearly, such an iterator has a different kind of validity. Perhaps we should introduce separate terms for the two kinds of "validity." </p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following text to the end of section 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>, +<p>Add the following text to the end of section 24.1 [iterator.requirements], after paragraph 5:</p> -<blockquote> +<blockquote><p> An <i>invalid</i> iterator is an iterator that may be singular. [Footnote: This definition applies to pointers, since pointers are iterators. The effect of dereferencing an iterator that has been invalidated is undefined.] -</blockquote> +</p></blockquote> <p><i>[post-Copenhagen: Matt provided wording.]</i></p> + <p><i>[Redmond: General agreement with the intent, some objections to the wording. Dave provided new wording.]</i></p> + + + <p><b>Rationale:</b></p> <p>This resolution simply defines a term that the Standard uses but never defines, "invalid", in terms of a term that is defined, @@ -8526,8 +12180,17 @@ the wording. Dave provided new wording.]</i></p> element into the middle of a vector is correctly said to invalidate all iterators pointing into the vector. That doesn't necessarily mean they all become singular.</p> + + + + + <hr> -<a name="280"><h3>280. Comparison of reverse_iterator to const reverse_iterator</h3></a><p><b>Section:</b> 24.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iterators"> [lib.reverse.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Steve Cleary <b>Date:</b> 27 Nov 2000</p> +<h3><a name="280"></a>280. Comparison of reverse_iterator to const reverse_iterator</h3> +<p><b>Section:</b> 24.4.1 [reverse.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Steve Cleary <b>Date:</b> 2000-11-27</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> This came from an email from Steve Cleary to Fergus in reference to issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179">179</a>. The library working group briefly discussed @@ -8549,9 +12212,11 @@ case they have, you can leave the old global functions in as well -- they won't interfere with the two-template-argument functions. With that, I don't see how <i>any</i> user code could break." </p> + + <p><b>Proposed resolution:</b></p> <p> -<b>Section:</b> 24.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iterator"> [lib.reverse.iterator]</a> +<b>Section:</b> 24.4.1.1 [reverse.iterator] add/change the following declarations:</p> <pre> A) Add a templated assignment operator, after the same manner as the templated copy constructor, i.e.: @@ -8577,7 +12242,7 @@ add/change the following declarations:</p> </pre> <p> Also make the addition/changes for these signatures in -24.4.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.ops"> [lib.reverse.iter.ops]</a>. +24.4.1.3 [reverse.iter.ops]. </p> <p><i>[ @@ -8588,53 +12253,79 @@ make this change without implementation experience. It may be desirable to provide this feature in a different way. ]</i></p> + <p><i>[ Lillehammer: We now have implementation experience, and agree that this solution is safe and correct. ]</i></p> + + + + + + <hr> -<a name="281"><h3>281. std::min() and max() requirements overly restrictive</h3></a><p><b>Section:</b> 25.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.min.max"> [lib.alg.min.max]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 02 Dec 2000</p> +<h3><a name="281"></a>281. std::min() and max() requirements overly restrictive</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#486">486</a></p> +<p><b>Discussion:</b></p> <p>The requirements in 25.3.7, p1 and 4 call for T to satisfy the -requirements of <tt>LessThanComparable</tt> (20.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.lessthancomparable"> [lib.lessthancomparable]</a>) -and <tt>CopyConstructible</tt> (20.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.copyconstructible"> [lib.copyconstructible]</a>). +requirements of <tt>LessThanComparable</tt> ( [lessthancomparable]) +and <tt>CopyConstructible</tt> (20.1.1 [utility.arg.requirements]). Since the functions take and return their arguments and result by const reference, I believe the <tt>CopyConstructible</tt> requirement is unnecessary. </p> + + <p><b>Proposed resolution:</b></p> <p>Remove the <tt>CopyConstructible</tt> requirement. Specifically, replace 25.3.7, p1 with</p> <p><b>-1- Requires:</b> Type T is <tt>LessThanComparable</tt> -(20.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.lessthancomparable"> [lib.lessthancomparable]</a>). +( [lessthancomparable]). </p> <p>and replace 25.3.7, p4 with</p> <p><b>-4- Requires:</b> Type T is <tt>LessThanComparable</tt> -(20.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.lessthancomparable"> [lib.lessthancomparable]</a>). +( [lessthancomparable]). </p> + + + + <hr> -<a name="282"><h3>282. What types does numpunct grouping refer to?</h3></a><p><b>Section:</b> 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 5 Dec 2000</p> +<h3><a name="282"></a>282. What types does numpunct grouping refer to?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2000-12-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Paragraph 16 mistakenly singles out integral types for inserting thousands_sep() characters. This conflicts with the syntax for floating point numbers described under 22.2.3.1/2. </p> + + <p><b>Proposed resolution:</b></p> <p>Change paragraph 16 from:</p> -<blockquote> +<blockquote><p> For integral types, punct.thousands_sep() characters are inserted into the sequence as determined by the value returned by punct.do_grouping() -using the method described in 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>. -</blockquote> +using the method described in 22.2.3.1.2 [facet.numpunct.virtuals]. +</p></blockquote> <p>To:</p> -<blockquote> +<blockquote><p> For arithmetic types, punct.thousands_sep() characters are inserted into the sequence as determined by the value returned by punct.do_grouping() -using the method described in 22.2.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.numpunct.virtuals"> [lib.facet.numpunct.virtuals]</a>. -</blockquote> +using the method described in 22.2.3.1.2 [facet.numpunct.virtuals]. +</p></blockquote> <p><i>[ Copenhagen: Opinions were divided about whether this is actually an @@ -8645,6 +12336,7 @@ when performing floating-point. The standard is also unambiguous that this requirement does not apply to the "C" locale. ]</i></p> + <p><i>[ A survey of existing practice is needed; it is believed that some implementations do insert thousands_sep characters for floating-point @@ -8653,11 +12345,23 @@ floating-point input even though this is unambiguously required by the standard. ]</i></p> + <p><i>[Post-Curaçao: the above proposed resolution is the consensus of Howard, Bill, Pete, Benjamin, Nathan, Dietmar, Boris, and Martin.]</i></p> + + + + + <hr> -<a name="283"><h3>283. std::replace() requirement incorrect/insufficient</h3></a><p><b>Section:</b> 25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Dec 2000</p> +<h3><a name="283"></a>283. std::replace() requirement incorrect/insufficient</h3> +<p><b>Section:</b> 25.2.5 [alg.replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.replace">issues</a> in [alg.replace].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#483">483</a></p> +<p><b>Discussion:</b></p> <p> (revision of the further discussion) There are a number of problems with the requires clauses for the @@ -8703,6 +12407,8 @@ Also, in the requirements for EqualityComparable, the requirement that the operator be defined for const objects is lacking. </p> + + <p><b>Proposed resolution:</b></p> <p>20.1.1 Change p1 from</p> @@ -8790,6 +12496,8 @@ integral type (4.7.12.3).</p> <tt>Assignable</tt> (23.1). </p> + + <p><b>Rationale:</b></p> <p> The general idea of the proposed solution is to remove the faulty @@ -8803,19 +12511,30 @@ these condition expressions must be literally bool, but that would be imposing a greater restriction that what the standard currently says (which is convertible to bool). </p> + + + + + <hr> -<a name="284"><h3>284. unportable example in 20.3.7, p6</h3></a><p><b>Section:</b> 20.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.comparisons"> [lib.comparisons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 26 Dec 2000</p> -<p>The example in 20.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.comparisons"> [lib.comparisons]</a>, p6 shows how to use the C +<h3><a name="284"></a>284. unportable example in 20.3.7, p6</h3> +<p><b>Section:</b> 20.5.7 [comparisons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-26</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>The example in 20.5.7 [comparisons], p6 shows how to use the C library function <tt>strcmp()</tt> with the function pointer adapter <tt>ptr_fun()</tt>. But since it's unspecified whether the C library functions have <tt>extern "C"</tt> or <tt>extern -"C++"</tt> linkage [17.4.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.using.linkage"> [lib.using.linkage]</a>], and since +"C++"</tt> linkage [17.4.2.2 [using.linkage]], and since function pointers with different the language linkage specifications -(7.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/dcl.html#dcl.link"> [dcl.link]</a>) are incompatible, whether this example is +(7.5 [dcl.link]) are incompatible, whether this example is well-formed is unspecified. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 20.5.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.comparisons"> [lib.comparisons]</a> paragraph 6 from:</p> +<p>Change 20.5.7 [comparisons] paragraph 6 from:</p> <blockquote> <p>[<i>Example:</i></p> <pre> replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(strcmp), "C")), "C++"); @@ -8841,15 +12560,25 @@ issue deals in part with C and C++ linkage, it was believed to be too confusing for the strings in the example to be "C" and "C++". ]</i></p> + <p><i>[Redmond: More minor changes. Got rid of the footnote (which seems to make a sweeping normative requirement, even though footnotes aren't normative), and changed the sentence after the footnote so that it corresponds to the new code fragment.]</i></p> + + + + + <hr> -<a name="285"><h3>285. minor editorial errors in fstream ctors</h3></a><p><b>Section:</b> 27.8.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.cons"> [lib.ifstream.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 31 Dec 2000</p> -<p>27.8.1.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.cons"> [lib.ifstream.cons]</a>, p2, 27.8.1.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.cons"> [lib.ofstream.cons]</a>, p2, and -27.8.1.12 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.cons"> [lib.fstream.cons]</a>, p2 say about the effects of each constructor: +<h3><a name="285"></a>285. minor editorial errors in fstream ctors</h3> +<p><b>Section:</b> 27.8.1.7 [ifstream.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2000-12-31</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>27.8.1.7 [ifstream.cons], p2, 27.8.1.11 [ofstream.cons], p2, and +27.8.1.15 [fstream.cons], p2 say about the effects of each constructor: </p> <p>... If that function returns a null pointer, calls @@ -8857,16 +12586,27 @@ it corresponds to the new code fragment.]</i></p> </p> <p>The parenthetical note doesn't apply since the ctors cannot throw an -exception due to the requirement in 27.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.cons"> [lib.basic.ios.cons]</a>, p3 +exception due to the requirement in 27.4.4.1 [basic.ios.cons], p3 that <tt>exceptions()</tt> be initialized to <tt>ios_base::goodbit</tt>. </p> + + <p><b>Proposed resolution:</b></p> <p> Strike the parenthetical note from the Effects clause in each of the paragraphs mentioned above. </p> + + + + <hr> -<a name="286"><h3>286. <cstdlib> requirements missing size_t typedef</h3></a><p><b>Section:</b> 25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 30 Dec 2000</p> +<h3><a name="286"></a>286. <cstdlib> requirements missing size_t typedef</h3> +<p><b>Section:</b> 25.4 [alg.c.library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.c.library">issues</a> in [alg.c.library].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The <cstdlib> header file contains prototypes for bsearch and qsort (C++ Standard section 25.4 paragraphs 3 and 4) and other @@ -8874,15 +12614,28 @@ prototypes (C++ Standard section 21.4 paragraph 1 table 49) that require the typedef size_t. Yet size_t is not listed in the <cstdlib> synopsis table 78 in section 25.4. </p> + + <p><b>Proposed resolution:</b></p> <p> Add the type size_t to Table 78 (section 25.4) and add the type size_t <cstdlib> to Table 97 (section C.2). </p> + + <p><b>Rationale:</b></p> <p>Since size_t is in <stdlib.h>, it must also be in <cstdlib>.</p> + + + + + <hr> -<a name="288"><h3>288. <cerrno> requirements missing macro EILSEQ</h3></a><p><b>Section:</b> 19.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.errno"> [lib.errno]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Judy Ward <b>Date:</b> 30 Dec 2000</p> +<h3><a name="288"></a>288. <cerrno> requirements missing macro EILSEQ</h3> +<p><b>Section:</b> 19.3 [errno] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Judy Ward <b>Date:</b> 2000-12-30</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> ISO/IEC 9899:1990/Amendment1:1994 Section 4.3 States: "The list of macros defined in <errno.h> is adjusted to include a new @@ -8894,13 +12647,25 @@ ISO/IEC 14882:1998(E) section 19.3 does not refer to the above amendment. </p> + + <p><b>Proposed resolution:</b></p> <p> Update Table 26 (section 19.3) "Header <cerrno> synopsis" and Table 95 (section C.2) "Standard Macros" to include EILSEQ. </p> + + + + + <hr> -<a name="291"><h3>291. Underspecification of set algorithms</h3></a><p><b>Section:</b> 25.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.set.operations"> [lib.alg.set.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 03 Jan 2001</p> +<h3><a name="291"></a>291. Underspecification of set algorithms</h3> +<p><b>Section:</b> 25.3.5 [alg.set.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2001-01-03</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.set.operations">issues</a> in [alg.set.operations].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard library contains four algorithms that compute set operations on sorted ranges: <tt>set_union</tt>, <tt>set_intersection</tt>, @@ -8949,45 +12714,47 @@ since, as far as I know, all existing implementations behave the same way. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following to the end of 25.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.union"> [lib.set.union]</a> paragraph 5:</p> -<blockquote> +<p>Add the following to the end of 25.3.5.2 [set.union] paragraph 5:</p> +<blockquote><p> If [first1, last1) contains <i>m</i> elements that are equivalent to each other and [first2, last2) contains <i>n</i> elements that are equivalent to them, then max(<i>m</i>, <i>n</i>) of these elements will be copied to the output range: all <i>m</i> of these elements from [first1, last1), and the last max(<i>n-m</i>, 0) of them from [first2, last2), in that order. -</blockquote> +</p></blockquote> -<p>Add the following to the end of 25.3.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.intersection"> [lib.set.intersection]</a> paragraph 5:</p> -<blockquote> +<p>Add the following to the end of 25.3.5.3 [set.intersection] paragraph 5:</p> +<blockquote><p> If [first1, last1) contains <i>m</i> elements that are equivalent to each other and [first2, last2) contains <i>n</i> elements that are equivalent to them, the first min(<i>m</i>, <i>n</i>) of those elements from [first1, last1) are copied to the output range. -</blockquote> +</p></blockquote> -<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.difference"> [lib.set.difference]</a> +<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.4 [set.difference] paragraph 4:</p> -<blockquote> +<blockquote><p> If [first1, last1) contains <i>m</i> elements that are equivalent to each other and [first2, last2) contains <i>n</i> elements that are equivalent to them, the last max(<i>m-n</i>, 0) elements from [first1, last1) are copied to the output range. -</blockquote> +</p></blockquote> -<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.set.symmetric.difference"> [lib.set.symmetric.difference]</a> +<p>Add a new paragraph, <b>Notes</b>, after 25.3.5.5 [set.symmetric.difference] paragraph 4:</p> -<blockquote> +<blockquote><p> If [first1, last1) contains <i>m</i> elements that are equivalent to each other and [first2, last2) contains <i>n</i> elements that are equivalent to them, then |<i>m - n</i>| of those elements will be copied to the output range: the last <i>m - n</i> of these elements from [first1, last1) if <i>m</i> > <i>n</i>, and the last <i>n - m</i> of these elements from [first2, last2) if <i>m</i> < <i>n</i>. -</blockquote> +</p></blockquote> <p><i>[Santa Cruz: it's believed that this language is clearer than what's in the Standard. However, it's also believed that the @@ -8996,12 +12763,25 @@ m</i> of these elements from [first2, last2) if <i>m</i> < <i>n</i>. that some or all of these changes may be redundant. If so, we may close this issue as NAD.]</i></p> + + + <p><b>Rationale:</b></p> <p>For simple cases, these descriptions are equivalent to what's already in the Standard. For more complicated cases, they describe the behavior of existing implementations.</p> + + + + + <hr> -<a name="292"><h3>292. effects of a.copyfmt (a)</h3></a><p><b>Section:</b> 27.4.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.basic.ios.members"> [lib.basic.ios.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 05 Jan 2001</p> +<h3><a name="292"></a>292. effects of a.copyfmt (a)</h3> +<p><b>Section:</b> 27.4.4.2 [basic.ios.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-05</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#basic.ios.members">issues</a> in [basic.ios.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The Effects clause of the member function <tt>copyfmt()</tt> in 27.4.4.2, p15 doesn't consider the case where the left-hand side argument is identical to the argument on the right-hand side, that is @@ -9013,24 +12793,34 @@ allow the object to fire <tt>erase_event</tt> followed by <tt>copyfmt_event</tt> since the callback handling the latter event may inadvertently attempt to access memory freed by the former. </p> + + <p><b>Proposed resolution:</b></p> <p>Change the Effects clause in 27.4.4.2, p15 from</p> -<blockquote> +<blockquote><p> <b>-15- Effects:</b>Assigns to the member objects of <tt>*this</tt> the corresponding member objects of <tt>rhs</tt>, except that... -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> <b>-15- Effects:</b>If <tt>(this == &rhs)</tt> does nothing. Otherwise assigns to the member objects of <tt>*this</tt> the corresponding member objects of <tt>rhs</tt>, except that... -</blockquote> +</p></blockquote> + + + + <hr> -<a name="294"><h3>294. User defined macros and standard headers</h3></a><p><b>Section:</b> 17.4.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.macro.names"> [lib.macro.names]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> James Kanze <b>Date:</b> 11 Jan 2001</p> -<p>Paragraph 2 of 17.4.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.macro.names"> [lib.macro.names]</a> reads: "A +<h3><a name="294"></a>294. User defined macros and standard headers</h3> +<p><b>Section:</b> 17.4.3.1.1 [macro.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> James Kanze <b>Date:</b> 2001-01-11</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>Paragraph 2 of 17.4.3.1.1 [macro.names] reads: "A translation unit that includes a header shall not contain any macros that define names declared in that header." As I read this, it would mean that the following program is legal:</p> @@ -9046,10 +12836,12 @@ which <sstream> didn't include <string>.</p> <p>I think that this phrase was probably formulated before it was decided that a standard header may freely include other standard headers. The phrase would be perfectly appropriate for C, for -example. In light of 17.4.4.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.headers"> [lib.res.on.headers]</a> paragraph 1, however, +example. In light of 17.4.4.1 [res.on.headers] paragraph 1, however, it isn't stringent enough.</p> + + <p><b>Proposed resolution:</b></p> -<p>For 17.4.3.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.macro.names"> [lib.macro.names]</a>, replace the current wording, which reads:</p> +<p>For 17.4.3.1.1 [macro.names], replace the current wording, which reads:</p> <blockquote> <p>Each name defined as a macro in a header is reserved to the implementation for any use if the translation unit includes @@ -9076,31 +12868,56 @@ it isn't stringent enough.</p> <p><i>[Lillehammer: Beman provided new wording]</i></p> + + + + + <hr> -<a name="295"><h3>295. Is abs defined in <cmath>?</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Jens Maurer <b>Date:</b> 12 Jan 2001</p> +<h3><a name="295"></a>295. Is abs defined in <cmath>?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Jens Maurer <b>Date:</b> 2001-01-12</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Table 80 lists the contents of the <cmath> header. It does not list <tt>abs()</tt>. However, 26.5, paragraph 6, which lists added signatures present in <cmath>, does say that several overloads of <tt>abs()</tt> should be defined in <cmath>. </p> + + <p><b>Proposed resolution:</b></p> <p> Add <tt>abs</tt> to Table 80. Also, remove the parenthetical list -of functions "(abs(), div(), rand(), srand())" from 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>, +of functions "(abs(), div(), rand(), srand())" from 26.5 [numarray], paragraph 1. </p> <p><i>[Copenhagen: Modified proposed resolution so that it also gets rid of that vestigial list of functions in paragraph 1.]</i></p> + + + <p><b>Rationale:</b></p> <p>All this DR does is fix a typo; it's uncontroversial. A separate question is whether we're doing the right thing in putting some overloads in <cmath> that we aren't also putting in <cstdlib>. That's issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#323">323</a>.</p> + + + + + <hr> -<a name="297"><h3>297. const_mem_fun_t<>::argument_type should be const T*</h3></a><p><b>Section:</b> 20.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.logical.operations"> [lib.logical.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 6 Jan 2001</p> +<h3><a name="297"></a>297. const_mem_fun_t<>::argument_type should be const T*</h3> +<p><b>Section:</b> 20.5.8 [logical.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The class templates <tt>const_mem_fun_t</tt> in 20.5.8, p8 and <tt>const_mem_fun1_t</tt> in 20.5.8, p9 derive from <tt>unary_function<T*, S></tt>, and @@ -9142,6 +12959,8 @@ function <br>#3 the address of a constant being passed to a function taking a non-const <tt>X*</tt> </p> + + <p><b>Proposed resolution:</b></p> <p>Replace the top portion of the definition of the class template const_mem_fun_t in 20.5.8, p8 @@ -9166,11 +12985,22 @@ binary_function<T*, A, S> {</tt> <br><tt> : public binary_function<<b>const</b> T*, A, S> {</tt> </p> + + <p><b>Rationale:</b></p> <p>This is simply a contradiction: the <tt>argument_type</tt> typedef, and the argument type itself, are not the same.</p> + + + + + <hr> -<a name="298"><h3>298. ::operator delete[] requirement incorrect/insufficient</h3></a><p><b>Section:</b> 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> John A. Pedretti <b>Date:</b> 10 Jan 2001</p> +<h3><a name="298"></a>298. ::operator delete[] requirement incorrect/insufficient</h3> +<p><b>Section:</b> 18.5.1.2 [new.delete.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> John A. Pedretti <b>Date:</b> 2001-01-10</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The default behavior of <tt>operator delete[]</tt> described in 18.5.1.2, p12 - namely that for non-null value of <i>ptr</i>, the operator reclaims storage @@ -9181,10 +13011,12 @@ replaced, along with <tt>operator delete</tt>, by the user, to implement their own memory management, the specified default behavior of<tt> operator delete[]</tt> must be to call <tt>operator delete</tt>. </p> + + <p><b>Proposed resolution:</b></p> <p>Change 18.5.1.2, p12 from</p> -<blockquote> -<b>-12-</b> <b>Default behavior:</b> +<blockquote><p> +<b>-12-</b> <b>Default behavior:</b></p> <ul> <li> For a null value of <i><tt>ptr</tt></i> , does nothing. @@ -9193,7 +13025,7 @@ For a null value of <i><tt>ptr</tt></i> , does nothing. Any other value of <i><tt>ptr</tt></i> shall be a value returned earlier by a call to the default <tt>operator new[](std::size_t)</tt>. [Footnote: The value must not have been invalidated by an intervening -call to <tt>operator delete[](void*)</tt> (17.4.3.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.arguments"> [lib.res.on.arguments]</a>). +call to <tt>operator delete[](void*)</tt> (17.4.3.7 [res.on.arguments]). --- end footnote] For such a non-null value of <i><tt>ptr</tt></i> , reclaims storage allocated by the earlier call to the default <tt>operator new[]</tt>. @@ -9203,23 +13035,34 @@ allocated by the earlier call to the default <tt>operator new[]</tt>. <p>to</p> -<blockquote> +<blockquote><p> <b>-12-</b> <b>Default behavior: </b>Calls <tt>operator delete(</tt><i>ptr</i>) or <tt>operator delete(<i>ptr</i>, std::nothrow)</tt> respectively. -</blockquote> +</p></blockquote> <p>and expunge paragraph 13.</p> + + + + <hr> -<a name="300"><h3>300. list::merge() specification incomplete</h3></a><p><b>Section:</b> 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> John Pedretti <b>Date:</b> 23 Jan 2001</p> +<h3><a name="300"></a>300. list::merge() specification incomplete</h3> +<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> John Pedretti <b>Date:</b> 2001-01-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -The "Effects" clause for list::merge() (23.2.2.4, p23) +The "Effects" clause for list::merge() (23.2.3.4 [list.ops], p23) appears to be incomplete: it doesn't cover the case where the argument list is identical to *this (i.e., this == &x). The requirement in the note in p24 (below) is that x be empty after the merge which is surely unintended in this case. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, replace paragraps 23-25 with:</p> +<p>In 23.2.3.4 [list.ops], replace paragraps 23-25 with:</p> <blockquote> <p> 23 Effects: if (&x == this) does nothing; otherwise, merges the two @@ -9248,21 +13091,35 @@ effects. </blockquote> <p><i>[Copenhagen: The original proposed resolution did not fix all of -the problems in 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, p22-25. Three different +the problems in 23.2.3.4 [list.ops], p22-25. Three different paragraphs (23, 24, 25) describe the effects of <tt>merge</tt>. Changing p23, without changing the other two, appears to introduce contradictions. Additionally, "merges the argument list into the list" is excessively vague.]</i></p> + <p><i>[Post-Curaçao: Robert Klarer provided new wording.]</i></p> + + + + + + <hr> -<a name="301"><h3>301. basic_string template ctor effects clause omits allocator argument</h3></a><p><b>Section:</b> 21.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.cons"> [lib.string.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 27 Jan 2001</p> +<h3><a name="301"></a>301. basic_string template ctor effects clause omits allocator argument</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-01-27</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The effects clause for the basic_string template ctor in 21.3.1, p15 leaves out the third argument of type Allocator. I believe this to be a mistake. </p> + + <p><b>Proposed resolution:</b></p> <p>Replace</p> @@ -9270,8 +13127,8 @@ a mistake. <p><b>-15- Effects:</b> If <i><tt>InputIterator</tt></i> is an integral type, equivalent to</p> - <blockquote><tt>basic_string(static_cast<size_type>(begin), - static_cast<value_type>(end))</tt></blockquote> + <blockquote><p><tt>basic_string(static_cast<size_type>(begin), + static_cast<value_type>(end))</tt></p></blockquote> </blockquote> <p>with</p> @@ -9280,11 +13137,19 @@ a mistake. <p><b>-15- Effects:</b> If <i><tt>InputIterator</tt></i> is an integral type, equivalent to</p> - <blockquote><tt>basic_string(static_cast<size_type>(begin), - static_cast<value_type>(end), <b>a</b>)</tt></blockquote> + <blockquote><p><tt>basic_string(static_cast<size_type>(begin), + static_cast<value_type>(end), <b>a</b>)</tt></p></blockquote> </blockquote> + + + + <hr> -<a name="303"><h3>303. Bitset input operator underspecified</h3></a><p><b>Section:</b> 23.3.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.operators"> [lib.bitset.operators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 5 Feb 2001</p> +<h3><a name="303"></a>303. Bitset input operator underspecified</h3> +<p><b>Section:</b> 23.3.5.3 [bitset.operators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2001-02-05</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> In 23.3.5.3, we are told that <tt>bitset</tt>'s input operator "Extracts up to <i>N</i> (single-byte) characters from @@ -9365,16 +13230,19 @@ require the use of narrow().</li> that widen() is to be used.</li> </ul> </blockquote> + + + <p><b>Proposed resolution:</b></p> <p>Replace the first two sentences of paragraph 5 with:</p> - <blockquote> + <blockquote><p> Extracts up to <i>N</i> characters from <i>is</i>. Stores these characters in a temporary object <i>str</i> of type <tt>basic_string<charT, traits></tt>, then evaluates the expression <tt><i>x</i> = bitset<N>(<i>str</i>)</tt>. - </blockquote> + </p></blockquote> <p>Replace the third bullet item in paragraph 5 with:</p> <ul><li> @@ -9383,28 +13251,40 @@ that widen() is to be used.</li> is not extracted). </li></ul> + + <p><b>Rationale:</b></p> <p>Input for <tt>bitset</tt> should work the same way as numeric input. Using <tt>widen</tt> does mean that alternative digit representations will not be recognized, but this was a known consequence of the design choice.</p> + + + + + <hr> -<a name="305"><h3>305. Default behavior of codecvt<wchar_t, char, mbstate_t>::length()</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 24 Jan 2001</p> +<h3><a name="305"></a>305. Default behavior of codecvt<wchar_t, char, mbstate_t>::length()</h3> +<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#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-01-24</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>22.2.1.5/3 introduces codecvt in part with:</p> -<blockquote> +<blockquote><p> codecvt<wchar_t,char,mbstate_t> converts between the native character sets for tiny and wide characters. Instantiations on mbstate_t perform conversion between encodings known to the library implementor. -</blockquote> +</p></blockquote> <p>But 22.2.1.5.2/10 describes do_length in part with:</p> -<blockquote> +<blockquote><p> ... codecvt<wchar_t, char, mbstate_t> ... return(s) the lesser of max and (from_end-from). -</blockquote> +</p></blockquote> <p> The semantics of do_in and do_length are linked. What one does must @@ -9438,6 +13318,8 @@ of the characters in the basic execution character set must be converted to a one-byte sequence, but there is no such requirement for characters that are not part of the basic execution character set. </p> + + <p><b>Proposed resolution:</b></p> <p> Change 22.2.1.5.2/5 from: @@ -9460,7 +13342,7 @@ stored. codecvt<char,char,mbstate_t> stores no characters. <p>Change 22.2.1.5.2/10 from:</p> -<blockquote> +<blockquote><p> -10- Returns: (from_next-from) where from_next is the largest value in the range [from,from_end] such that the sequence of values in the range [from,from_next) represents max or fewer valid complete @@ -9468,17 +13350,17 @@ characters of type internT. The instantiations required in Table 51 (21.1.1.1.1), namely codecvt<wchar_t, char, mbstate_t> and codecvt<char, char, mbstate_t>, return the lesser of max and (from_end-from). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> -10- Returns: (from_next-from) where from_next is the largest value in the range [from,from_end] such that the sequence of values in the range [from,from_next) represents max or fewer valid complete characters of type internT. The instantiation codecvt<char, char, mbstate_t> returns the lesser of max and (from_end-from). -</blockquote> +</p></blockquote> <p><i>[Redmond: Nathan suggested an alternative resolution: same as above, but require that, in the default encoding, a character from the @@ -9486,6 +13368,9 @@ basic execution character set would map to a single external character. The straw poll was 8-1 in favor of the proposed resolution.]</i></p> + + + <p><b>Rationale:</b></p> <p>The default encoding should be whatever users of a given platform would expect to be the most natural. This varies from platform to @@ -9500,8 +13385,19 @@ example, and it would rule out a fixed-width encoding of UCS-4.</p> <p><i>[Curaçao: fixed rationale typo at the request of Ichiro Koshida; "shift-JIS" changed to "JIS".]</i></p> + + + + + + <hr> -<a name="306"><h3>306. offsetof macro and non-POD types</h3></a><p><b>Section:</b> 18.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.types"> [lib.support.types]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 21 Feb 2001</p> +<h3><a name="306"></a>306. offsetof macro and non-POD types</h3> +<p><b>Section:</b> 18.1 [support.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 2001-02-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.types">issues</a> in [support.types].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Spliced together from reflector messages c++std-lib-8294 and -8295:</p> <p>18.1, paragraph 5, reads: "The macro <tt>offsetof</tt> @@ -9512,11 +13408,13 @@ that is a static data member or a function member is undefined."</p> <p>For the POD requirement, it doesn't say "no diagnostic -required" or "undefined behavior". I read 1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.compliance"> [intro.compliance]</a>, paragraph 1, to mean that a diagnostic is required. +required" or "undefined behavior". I read 1.4 [intro.compliance], paragraph 1, to mean that a diagnostic is required. It's not clear whether this requirement was intended. While it's possible to provide such a diagnostic, the extra complication doesn't seem to add any value. </p> + + <p><b>Proposed resolution:</b></p> <p>Change 18.1, paragraph 5, to "If <i>type</i> is not a POD structure or a POD union the results are undefined."</p> @@ -9526,22 +13424,31 @@ agreed that requiring a diagnostic was inadvertent, but some LWG members thought that diagnostics should be required whenever possible.]</i></p> + + + + + <hr> -<a name="307"><h3>307. Lack of reference typedefs in container adaptors</h3></a><p><b>Section:</b> 23.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list"> [lib.list]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 13 Mar 2001</p> +<h3><a name="307"></a>307. Lack of reference typedefs in container adaptors</h3> +<p><b>Section:</b> 23.2.3 [list] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-03-13</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>From reflector message c++std-lib-8330. See also lib-8317.</p> <p> -The standard is currently inconsistent in 23.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.capacity"> [lib.list.capacity]</a> -paragraph 1 and 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a> paragraph 1. +The standard is currently inconsistent in 23.2.3.2 [list.capacity] +paragraph 1 and 23.2.3.3 [list.modifiers] paragraph 1. 23.2.3.3/1, for example, says: </p> -<blockquote> +<blockquote><p> -1- Any sequence supporting operations back(), push_back() and pop_back() can be used to instantiate stack. In particular, vector (lib.vector), list (lib.list) and deque (lib.deque) can be used. -</blockquote> +</p></blockquote> <p>But this is false: vector<bool> can not be used, because the container adaptors return a T& rather than using the underlying @@ -9566,6 +13473,8 @@ implement, is already implemented in at least one popular lib, and does not break any code. </p> + + <p><b>Proposed resolution:</b></p> <p>Summary: Add reference and const_reference typedefs to queue, priority_queue and stack. Change return types of "value_type&" to @@ -9787,17 +13696,29 @@ priority_queue and stack. Change return types of "value_type&" to and it was deliberately not adopted. Nevertheless, the LWG believes (straw poll: 10-2) that it is a genuine defect.]</i></p> + + + + + <hr> -<a name="308"><h3>308. Table 82 mentions unrelated headers</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Mar 2001</p> +<h3><a name="308"></a>308. Table 82 mentions unrelated headers</h3> +<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-03-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Table 82 in section 27 mentions the header <cstdlib> for String -streams (27.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.string.streams"> [lib.string.streams]</a>) and the headers <cstdio> and -<cwchar> for File streams (27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>). It's not clear +streams (27.7 [string.streams]) and the headers <cstdio> and +<cwchar> for File streams (27.8 [file.streams]). It's not clear why these headers are mentioned in this context since they do not define any of the library entities described by the -subclauses. According to 17.4.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.contents"> [lib.contents]</a>, only such headers +subclauses. According to 17.4.1.1 [contents], only such headers are to be listed in the summary. </p> + + <p><b>Proposed resolution:</b></p> <p>Remove <cstdlib> and <cwchar> from Table 82.</p> @@ -9805,10 +13726,20 @@ Table 82.</p> <p><i>[Copenhagen: changed the proposed resolution slightly. The original proposed resolution also said to remove <cstdio> from Table 82. However, <cstdio> is mentioned several times within -section 27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.file.streams"> [lib.file.streams]</a>, including 27.8.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.c.files"> [lib.c.files]</a>.]</i></p> +section 27.8 [file.streams], including 27.8.2 [c.files].]</i></p> + + + + + <hr> -<a name="310"><h3>310. Is errno a macro?</h3></a><p><b>Section:</b> 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a>, 19.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-diagnostics.html#lib.errno"> [lib.errno]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 21 Mar 2001</p> +<h3><a name="310"></a>310. Is errno a macro?</h3> +<p><b>Section:</b> 17.4.1.2 [headers], 19.3 [errno] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 2001-03-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#headers">issues</a> in [headers].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Exactly how should errno be declared in a conforming C++ header? </p> @@ -9858,34 +13789,39 @@ section 27.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams. This issue was first raised in 1999, but it slipped through the cracks. ]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change the Note in section 17.4.1.2p5 from</p> - <blockquote> + <blockquote><p> Note: the names defined as macros in C include the following: assert, errno, offsetof, setjmp, va_arg, va_end, and va_start. - </blockquote> + </p></blockquote> <p>to</p> - <blockquote> + <blockquote><p> Note: the names defined as macros in C include the following: assert, offsetof, setjmp, va_arg, va_end, and va_start. - </blockquote> + </p></blockquote> <p>In section 19.3, change paragraph 2 from</p> - <blockquote> + <blockquote><p> The contents are the same as the Standard C library header <errno.h>. - </blockquote> + </p></blockquote> <p>to</p> - <blockquote> + <blockquote><p> The contents are the same as the Standard C library header <errno.h>, except that errno shall be defined as a macro. - </blockquote> + </p></blockquote> + + <p><b>Rationale:</b></p> <p>C++ must not leave it up to the implementation to decide whether or not a name is a macro; it must explicitly specify exactly which names @@ -9894,10 +13830,21 @@ to be a macro.</p> <p><i>[Curaçao: additional rationale added.]</i></p> + + + + + + <hr> -<a name="311"><h3>311. Incorrect wording in basic_ostream class synopsis</h3></a><p><b>Section:</b> 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 21 Mar 2001</p> +<h3><a name="311"></a>311. Incorrect wording in basic_ostream class synopsis</h3> +<p><b>Section:</b> 27.6.2.1 [ostream] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-03-21</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream">issues</a> in [ostream].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> -<p>In 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>, the synopsis of class basic_ostream says:</p> +<p>In 27.6.2.1 [ostream], the synopsis of class basic_ostream says:</p> <pre> // partial specializationss template<class traits> @@ -9911,30 +13858,54 @@ to be a macro.</p> <li>This is an overload, not a partial specialization</li> </ul> + + <p><b>Proposed resolution:</b></p> -<p>In the synopsis in 27.6.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream"> [lib.ostream]</a>, remove the +<p>In the synopsis in 27.6.2.1 [ostream], remove the <i>// partial specializationss</i> comment. Also remove the same comment (correctly spelled, but still incorrect) from the synopsis in -27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a>. +27.6.2.6.4 [ostream.inserters.character]. </p> <p><i>[ -Pre-Redmond: added 27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a> because of Martin's +Pre-Redmond: added 27.6.2.6.4 [ostream.inserters.character] because of Martin's comment in c++std-lib-8939. ]</i></p> + + + + + + <hr> -<a name="312"><h3>312. Table 27 is missing headers</h3></a><p><b>Section:</b> 20 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.utilities"> [lib.utilities]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 29 Mar 2001</p> +<h3><a name="312"></a>312. Table 27 is missing headers</h3> +<p><b>Section:</b> 20 [utilities] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-03-29</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Table 27 in section 20 lists the header <memory> (only) for Memory (lib.memory) but neglects to mention the headers -<cstdlib> and <cstring> that are discussed in 20.4.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.rel"> [lib.meta.rel]</a>.</p> +<cstdlib> and <cstring> that are discussed in 20.4.5 [meta.rel].</p> + + <p><b>Proposed resolution:</b></p> <p>Add <cstdlib> and <cstring> to Table 27, in the same row as <memory>.</p> + + + + + <hr> -<a name="315"><h3>315. Bad "range" in list::unique complexity</h3></a><p><b>Section:</b> 23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 1 May 2001</p> +<h3><a name="315"></a>315. Bad "range" in list::unique complexity</h3> +<p><b>Section:</b> 23.2.3.4 [list.ops] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-05-01</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -23.2.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.special"> [lib.deque.special]</a>, Para 21 describes the complexity of +23.2.3.4 [list.ops], Para 21 describes the complexity of list::unique as: "If the range (last - first) is not empty, exactly (last - first) -1 applications of the corresponding predicate, otherwise no applications of the predicate)". @@ -9943,32 +13914,55 @@ otherwise no applications of the predicate)". <p> "(last - first)" is not a range. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the "range" from (last - first) to [first, last). </p> + + + + <hr> -<a name="316"><h3>316. Vague text in Table 69</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 4 May 2001</p> +<h3><a name="316"></a>316. Vague text in Table 69</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-05-04</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Table 69 says this about a_uniq.insert(t):</p> -<blockquote> +<blockquote><p> inserts t if and only if there is no element in the container with key equivalent to the key of t. The bool component of the returned pair indicates whether the insertion takes place and the iterator component of the pair points to the element with key equivalent to the key of t. -</blockquote> +</p></blockquote> <p>The description should be more specific about exactly how the bool component indicates whether the insertion takes place.</p> + + <p><b>Proposed resolution:</b></p> <p>Change the text in question to</p> -<blockquote> +<blockquote><p> ...The bool component of the returned pair is true if and only if the insertion takes place... -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="317"><h3>317. Instantiation vs. specialization of facets</h3></a><p><b>Section:</b> 22 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.localization"> [lib.localization]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 4 May 2001</p> +<h3><a name="317"></a>317. Instantiation vs. specialization of facets</h3> +<p><b>Section:</b> 22 [localization] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-05-04</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#localization">issues</a> in [localization].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The localization section of the standard refers to specializations of the facet templates as instantiations even though the required facets @@ -9980,6 +13974,8 @@ corrected to make it clear that the standard doesn't mandate explicit instantiation (the term specialization encompasses both explicit instantiations and specializations). </p> + + <p><b>Proposed resolution:</b></p> <p> In the following paragraphs, replace all occurrences of the word @@ -9987,37 +13983,51 @@ instantiation or instantiations with specialization or specializations, respectively: </p> -<blockquote> +<blockquote><p> 22.1.1.1.1, p4, Table 52, 22.2.1.1, p2, 22.2.1.5, p3, 22.2.1.5.1, p5, 22.2.1.5.2, p10, 22.2.2, p2, 22.2.3.1, p1, 22.2.3.1.2, p1, p2 and p3, 22.2.4.1, p1, 22.2.4.1.2, p1, 22,2,5, p1, 22,2,6, p2, 22.2.6.3.2, p7, and Footnote 242. -</blockquote> +</p></blockquote> <p>And change the text in 22.1.1.1.1, p4 from</p> -<blockquote> +<blockquote><p> An implementation is required to provide those instantiations for facet templates identified as members of a category, and for those shown in Table 52: -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> An implementation is required to provide those specializations... -</blockquote> +</p></blockquote> <p><i>[Nathan will review these changes, and will look for places where explicit specialization is necessary.]</i></p> + + + <p><b>Rationale:</b></p> <p>This is a simple matter of outdated language. The language to describe templates was clarified during the standardization process, but the wording in clause 22 was never updated to reflect that change.</p> + + + + + + + <hr> -<a name="318"><h3>318. Misleading comment in definition of numpunct_byname</h3></a><p><b>Section:</b> 22.2.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct.byname"> [lib.locale.numpunct.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 12 May 2001</p> +<h3><a name="318"></a>318. Misleading comment in definition of numpunct_byname</h3> +<p><b>Section:</b> 22.2.3.2 [locale.numpunct.byname] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-05-12</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The definition of the numpunct_byname template contains the following comment:</p> @@ -10031,25 +14041,38 @@ comment:</p> <p>There is no documentation of the specializations and it seems conceivable that an implementation will not explicitly specialize the template at all, but simply provide the primary template.</p> + + <p><b>Proposed resolution:</b></p> <p>Remove the comment from the text in 22.2.3.2 and from the proposed resolution of library issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#228">228</a>.</p> + + + + <hr> -<a name="319"><h3>319. Storage allocation wording confuses "Required behavior", "Requires"</h3></a><p><b>Section:</b> 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a>, 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 15 May 2001</p> -<p>The standard specifies 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> that "Required +<h3><a name="319"></a>319. Storage allocation wording confuses "Required behavior", "Requires"</h3> +<p><b>Section:</b> 18.5.1.1 [new.delete.single], 18.5.1.2 [new.delete.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2001-05-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>The standard specifies 17.3.1.3 [structure.specifications] that "Required behavior" elements describe "the semantics of a function definition provided by either the implementation or a C++ program."</p> -<p>The standard specifies 17.3.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.structure.specifications"> [lib.structure.specifications]</a> that "Requires" +<p>The standard specifies 17.3.1.3 [structure.specifications] that "Requires" elements describe "the preconditions for calling the function."</p> <p>In the sections noted below, the current wording specifies "Required Behavior" for what are actually preconditions, and thus should be specified as "Requires".</p> + + <p><b>Proposed resolution:</b></p> -<p>In 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a> Para 12 Change:</p> +<p>In 18.5.1.1 [new.delete.single] Para 12 Change:</p> <blockquote> <p>Required behavior: accept a value of ptr that is null or that was returned by an earlier call ...</p> @@ -10060,7 +14083,7 @@ should be specified as "Requires".</p> earlier call ...</p> </blockquote> -<p>In 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a> Para 11 Change:</p> +<p>In 18.5.1.2 [new.delete.array] Para 11 Change:</p> <blockquote> <p>Required behavior: accept a value of ptr that is null or that was returned by an earlier call ...</p> @@ -10071,10 +14094,19 @@ should be specified as "Requires".</p> earlier call ...</p> </blockquote> + + + + <hr> -<a name="320"><h3>320. list::assign overspecified</h3></a><p><b>Section:</b> 23.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.deque.cons"> [lib.deque.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 17 May 2001</p> +<h3><a name="320"></a>320. list::assign overspecified</h3> +<p><b>Section:</b> 23.2.3.1 [list.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2001-05-17</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.cons">issues</a> in [list.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Section 23.2.2.1, paragraphs 6-8 specify that list assign (both forms) have +Section 23.2.3.1 [list.cons], paragraphs 6-8 specify that list assign (both forms) have the "effects" of a call to erase followed by a call to insert. </p> @@ -10097,8 +14129,10 @@ standardized. It is a QoI issue. </p> <p>Existing practise: Metrowerks and SGI recycle nodes, Dinkumware and Rogue Wave don't. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 23.2.2.1/7 from:</p> +<p>Change 23.2.3.1 [list.cons]/7 from:</p> <blockquote> <p>Effects:</p> @@ -10114,7 +14148,7 @@ Metrowerks and SGI recycle nodes, Dinkumware and Rogue Wave don't. <p>Effects: Replaces the contents of the list with the range [first, last).</p> </blockquote> -<p>In 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>, in Table 67 (sequence requirements), +<p>In 23.1.1 [sequence.reqmts], in Table 67 (sequence requirements), add two new rows:</p> <pre> a.assign(i,j) void pre: i,j are not iterators into a. Replaces elements in a with a copy @@ -10125,7 +14159,7 @@ add two new rows:</p> of t. </pre> -<p>Change 23.2.2.1/8 from:</p> +<p>Change 23.2.3.1 [list.cons]/8 from:</p> <blockquote> <p>Effects:</p> @@ -10149,28 +14183,57 @@ overspecification; it would effectively mandate that assignment use a temporary. Howard provided wording. ]</i></p> + <p><i>[Curaçao: Made editorial improvement in wording; changed "Replaces elements in a with copies of elements in [i, j)." with "Replaces the elements of a with a copy of [i, j)." Changes not deemed serious enough to requre rereview.]</i></p> + + + + + + <hr> -<a name="321"><h3>321. Typo in num_get</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Kevin Djang <b>Date:</b> 17 May 2001</p> +<h3><a name="321"></a>321. Typo in num_get</h3> +<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#WP">WP</a> + <b>Submitter:</b> Kevin Djang <b>Date:</b> 2001-05-17</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Section 22.2.2.1.2 at p7 states that "A length specifier is added to the conversion function, if needed, as indicated in Table 56." However, Table 56 uses the term "length modifier", not "length specifier". </p> + + <p><b>Proposed resolution:</b></p> <p> In 22.2.2.1.2 at p7, change the text "A length specifier is added ..." to be "A length modifier is added ..." </p> + + <p><b>Rationale:</b></p> <p>C uses the term "length modifier". We should be consistent.</p> + + + + + + <hr> -<a name="322"><h3>322. iterator and const_iterator should have the same value type</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 17 May 2001</p> +<h3><a name="322"></a>322. iterator and const_iterator should have the same value type</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2001-05-17</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> It's widely assumed that, if X is a container, iterator_traits<X::iterator>::value_type and @@ -10183,11 +14246,15 @@ X::value_type". </p> <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#279">279</a>.</p> + + <p><b>Proposed resolution:</b></p> <p>In Table 65 ("Container Requirements"), change the return type for X::iterator to "iterator type whose value type is T". Change the return type for X::const_iterator to "constant iterator type whose value type is T".</p> + + <p><b>Rationale:</b></p> <p> This belongs as a container requirement, rather than an iterator @@ -10201,8 +14268,18 @@ is "int", rather than "const int". This is consistent with the way that const pointers are handled: the standard already requires that iterator_traits<const int*>::value_type is int. </p> + + + + + <hr> -<a name="324"><h3>324. Do output iterators have value types?</h3></a><p><b>Section:</b> 24.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.output.iterators"> [lib.output.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 7 June 2001</p> +<h3><a name="324"></a>324. Do output iterators have value types?</h3> +<p><b>Section:</b> 24.1.2 [output.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2001-06-07</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#output.iterators">issues</a> in [output.iterators].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Table 73 suggests that output iterators have value types. It requires the expression "*a = t". Additionally, although Table 73 @@ -10213,12 +14290,12 @@ contains a note saying that "a = t" and "X(a) = t" have equivalent <p>According to 24.1/9, t is supposed to be "a value of value type T":</p> - <blockquote> + <blockquote><p> In the following sections, a and b denote values of X, n denotes a value of the difference type Distance, u, tmp, and m denote identifiers, r denotes a value of X&, t denotes a value of value type T. - </blockquote> + </p></blockquote> <p>Two other parts of the standard that are relevant to whether output iterators have value types:</p> @@ -10249,6 +14326,8 @@ i is an output iterator, and what should it say about that t is in the expression "*i = t"? Finally, should the standard say anything about output iterators' pointer and reference types?</p> + + <p><b>Proposed resolution:</b></p> <p>24.1 p1, change</p> @@ -10308,6 +14387,9 @@ output iterator. <p><i>[post-Redmond: Jeremy provided wording]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG considered two options: change all of the language that seems to imply that output iterators have value types, thus making it @@ -10319,22 +14401,32 @@ and any language suggesting otherwise is simply a mistake.</p> <p>A future revision of the standard may wish to revisit this design decision.</p> + + + + + <hr> -<a name="325"><h3>325. Misleading text in moneypunct<>::do_grouping</h3></a><p><b>Section:</b> 22.2.6.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.moneypunct.virtuals"> [lib.locale.moneypunct.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 02 Jul 2001</p> +<h3><a name="325"></a>325. Misleading text in moneypunct<>::do_grouping</h3> +<p><b>Section:</b> 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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-02</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.moneypunct.virtuals">issues</a> in [locale.moneypunct.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The Returns clause in 22.2.6.3.2, p3 says about moneypunct<charT>::do_grouping() </p> -<blockquote> +<blockquote><p> Returns: A pattern defined identically as the result of numpunct<charT>::do_grouping().241) -</blockquote> +</p></blockquote> <p>Footnote 241 then reads</p> -<blockquote> +<blockquote><p> This is most commonly the value "\003" (not "3"). -</blockquote> +</p></blockquote> <p> The returns clause seems to imply that the two member functions must @@ -10347,19 +14439,23 @@ most commonly return "\003", which contradicts the C standard which specifies the value of "" for the (most common) C locale. </p> + + <p><b>Proposed resolution:</b></p> <p>Replace the text in Returns clause in 22.2.6.3.2, p3 with the following:</p> -<blockquote> +<blockquote><p> Returns: A pattern defined identically as, but not necessarily equal to, the result of numpunct<charT>::do_grouping().241) -</blockquote> +</p></blockquote> <p>and replace the text in Footnote 241 with the following:</p> -<blockquote> +<blockquote><p> To specify grouping by 3s the value is "\003", not "3". -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p> The fundamental problem is that the description of the locale facet @@ -10371,17 +14467,29 @@ supposed to say what the grouping is in the "C" locale or in any other locale. It is just a reminder that the values are interpreted as small integers, not ASCII characters. </p> + + + + <hr> -<a name="327"><h3>327. Typo in time_get facet in table 52</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Tiki Wan <b>Date:</b> 06 Jul 2001</p> +<h3><a name="327"></a>327. Typo in time_get facet in table 52</h3> +<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#WP">WP</a> + <b>Submitter:</b> Tiki Wan <b>Date:</b> 2001-07-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#447">447</a></p> +<p><b>Discussion:</b></p> <p>The <tt>wchar_t</tt> versions of <tt>time_get</tt> and <tt>time_get_byname</tt> are listed incorrectly in table 52, required instantiations. In both cases the second template parameter is given as OutputIterator. It should instead be InputIterator, since these are input facets.</p> + + <p><b>Proposed resolution:</b></p> <p> In table 52, required instantiations, in -22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, change</p> +22.1.1.1.1 [locale.category], change</p> <pre> time_get<wchar_t, OutputIterator> time_get_byname<wchar_t, OutputIterator> </pre> @@ -10393,8 +14501,17 @@ In table 52, required instantiations, in <p><i>[Redmond: Very minor change in proposed resolution. Original had a typo, wchart instead of wchar_t.]</i></p> + + + + + <hr> -<a name="328"><h3>328. Bad sprintf format modifier in money_put<>::do_put()</h3></a><p><b>Section:</b> 22.2.6.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.money.put.virtuals"> [lib.locale.money.put.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 07 Jul 2001</p> +<h3><a name="328"></a>328. Bad sprintf format modifier in money_put<>::do_put()</h3> +<p><b>Section:</b> 22.2.6.2.2 [locale.money.put.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-07-07</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The sprintf format string , "%.01f" (that's the digit one), in the description of the do_put() member functions of the money_put facet in 22.2.6.2.2, p1 is incorrect. First, the f format specifier is wrong @@ -10402,26 +14519,38 @@ for values of type long double, and second, the precision of 01 doesn't seem to make sense. What was most likely intended was "%.0Lf"., that is a precision of zero followed by the L length modifier.</p> + + <p><b>Proposed resolution:</b></p> <p>Change the format string to "%.0Lf".</p> -<p><b>Rationale:</b></p> -<p>Fixes an obvious typo</p> + + +<p><b>Rationale:</b></p><p>Fixes an obvious typo</p> + + + + <hr> -<a name="329"><h3>329. vector capacity, reserve and reallocation</h3></a><p><b>Section:</b> 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a>, 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Anthony Williams <b>Date:</b> 13 Jul 2001</p> +<h3><a name="329"></a>329. vector capacity, reserve and reallocation</h3> +<p><b>Section:</b> 23.2.5.2 [vector.capacity], 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Anthony Williams <b>Date:</b> 2001-07-13</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.capacity">issues</a> in [vector.capacity].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> There is an apparent contradiction about which circumstances can cause -a reallocation of a vector in Section 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> and -section 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a>. +a reallocation of a vector in Section 23.2.5.2 [vector.capacity] and +section 23.2.5.4 [vector.modifiers]. </p> -<p>23.2.4.2p5 says:</p> -<blockquote> +<p>23.2.5.2 [vector.capacity],p5 says:</p> +<blockquote><p> Notes: Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence. It is guaranteed that no reallocation takes place during insertions that happen after a call to reserve() until the time when an insertion would make the size of the vector greater than the size specified in the most recent call to reserve(). -</blockquote> +</p></blockquote> <p>Which implies if I do</p> @@ -10434,7 +14563,7 @@ greater than the size specified in the most recent call to reserve(). <p>then the implementation may reallocate the vector for the insert, as the size specified in the previous call to reserve was zero.</p> -<p>However, the previous paragraphs (23.2.4.2, p1-2) state:</p> +<p>However, the previous paragraphs (23.2.5.2 [vector.capacity], p1-2) state:</p> <blockquote> <p> (capacity) Returns: The total number of elements the vector @@ -10450,28 +14579,30 @@ of capacity() otherwise... <p> This implies that vec.capacity() is still 23, and so the insert() should not require a reallocation, as vec.size() is 0. This is backed -up by 23.2.4.3p1: +up by 23.2.5.4 [vector.modifiers], p1: </p> -<blockquote> +<blockquote><p> (insert) Notes: Causes reallocation if the new size is greater than the old capacity. -</blockquote> +</p></blockquote> <p> Though this doesn't rule out reallocation if the new size is less than the old capacity, I think the intent is clear. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change the wording of 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> paragraph 5 to:</p> +<p>Change the wording of 23.2.5.2 [vector.capacity] paragraph 5 to:</p> -<blockquote> +<blockquote><p> Notes: Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence. It is guaranteed that no reallocation takes place during insertions that happen after a call to reserve() until the time when an insertion would make the size of the vector greater than the value of capacity(). -</blockquote> +</p></blockquote> <p><i>[Redmond: original proposed resolution was modified slightly. In the original, the guarantee was that there would be no reallocation @@ -10480,16 +14611,29 @@ most recent call to reserve(). The LWG did not believe that the "after the most recent call to reserve()" added any useful information.]</i></p> + + + <p><b>Rationale:</b></p> <p>There was general agreement that, when reserve() is called twice in succession and the argument to the second invocation is smaller than the argument to the first, the intent was for the second invocation to have no effect. Wording implying that such cases have an effect on reallocation guarantees was inadvertant.</p> + + + + + <hr> -<a name="331"><h3>331. bad declaration of destructor for ios_base::failure</h3></a><p><b>Section:</b> 27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 23 Aug 2001</p> +<h3><a name="331"></a>331. bad declaration of destructor for ios_base::failure</h3> +<p><b>Section:</b> 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios::failure">issues</a> in [ios::failure].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -With the change in 17.4.4.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.res.on.exception.handling"> [lib.res.on.exception.handling]</a> to state +With the change in 17.4.4.8 [res.on.exception.handling] to state "An implementation may strengthen the exception-specification for a non-virtual function by removing listed exceptions." (issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#119">119</a>) @@ -10504,7 +14648,7 @@ and the following declaration of ~failure() in ios_base::failure }; } </pre> -<p>the class failure cannot be implemented since in 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> the destructor of class exception has an empty +<p>the class failure cannot be implemented since in 18.6.1 [type.info] the destructor of class exception has an empty exception specification:</p> <pre> namespace std { class exception { @@ -10515,20 +14659,35 @@ exception specification:</p> }; } </pre> + + <p><b>Proposed resolution:</b></p> <p>Remove the declaration of ~failure().</p> + + <p><b>Rationale:</b></p> <p>The proposed resolution is consistent with the way that destructors of other classes derived from <tt>exception</tt> are handled.</p> + + + + + + + <hr> -<a name="333"><h3>333. does endl imply synchronization with the device?</h3></a><p><b>Section:</b> 27.6.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.manip"> [lib.ostream.manip]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 27 Aug 2001</p> -<p>A footnote in 27.6.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.manip"> [lib.ostream.manip]</a> states:</p> -<blockquote> +<h3><a name="333"></a>333. does endl imply synchronization with the device?</h3> +<p><b>Section:</b> 27.6.2.8 [ostream.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> PremAnand M. Rao <b>Date:</b> 2001-08-27</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>A footnote in 27.6.2.8 [ostream.manip] states:</p> +<blockquote><p> [Footnote: The effect of executing cout << endl is to insert a newline character in the output sequence controlled by cout, then synchronize it with any external file with which it might be associated. --- end foonote] -</blockquote> +</p></blockquote> <p> Does the term "file" here refer to the external device? @@ -10546,16 +14705,31 @@ errors under special circumstances. I could not find any other statement that explicitly defined the behavior one way or the other. </p> + + <p><b>Proposed resolution:</b></p> -<p>Remove footnote 300 from section 27.6.2.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.manip"> [lib.ostream.manip]</a>.</p> +<p>Remove footnote 300 from section 27.6.2.8 [ostream.manip].</p> + + <p><b>Rationale:</b></p> <p>We already have normative text saying what <tt>endl</tt> does: it inserts a newline character and calls <tt>flush</tt>. This footnote is at best redundant, at worst (as this issue says) misleading, because it appears to make promises about what <tt>flush</tt> does.</p> + + + + + + + <hr> -<a name="334"><h3>334. map::operator[] specification forces inefficient implementation</h3></a><p><b>Section:</b> 23.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map.access"> [lib.map.access]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andrea Griffini <b>Date:</b> 02 Sep 2001</p> +<h3><a name="334"></a>334. map::operator[] specification forces inefficient implementation</h3> +<p><b>Section:</b> 23.3.1.2 [map.access] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andrea Griffini <b>Date:</b> 2001-09-02</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The current standard describes map::operator[] using a code example. That code example is however quite @@ -10629,10 +14803,12 @@ that the current wording of the standard rules that as non-conforming. </p> + + <p><b>Proposed resolution:</b></p> <p> -Replace 23.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map.access"> [lib.map.access]</a> paragraph 1 with +Replace 23.3.1.2 [map.access] paragraph 1 with </p> <blockquote> <p> @@ -10653,6 +14829,9 @@ clause 17 saying that we do not intend the semantics of sample code fragments to be interpreted as specifing exactly how many copies are made. See issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#98">98</a> for a similar problem.]</i></p> + + + <p><b>Rationale:</b></p> <p> This is the second solution described above; as noted, it is @@ -10662,10 +14841,19 @@ consistent with existing practice. <p>Note that we now need to specify the complexity explicitly, because we are no longer defining <tt>operator[]</tt> in terms of <tt>insert</tt>.</p> + + + + + <hr> -<a name="335"><h3>335. minor issue with char_traits, table 37</h3></a><p><b>Section:</b> 21.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.require"> [lib.char.traits.require]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 06 Sep 2001</p> +<h3><a name="335"></a>335. minor issue with char_traits, table 37</h3> +<p><b>Section:</b> 21.1.1 [char.traits.require] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-09-06</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Table 37, in 21.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.require"> [lib.char.traits.require]</a>, descibes char_traits::assign +Table 37, in 21.1.1 [char.traits.require], descibes char_traits::assign as: </p> <pre> X::assign(c,d) assigns c = d. @@ -10673,9 +14861,9 @@ as: <p>And para 1 says:</p> -<blockquote> +<blockquote><p> [...] c and d denote values of type CharT [...] -</blockquote> +</p></blockquote> <p> Naturally, if c and d are <i>values</i>, then the assignment is @@ -10692,69 +14880,106 @@ lying around, and sure enough they all have signatures:</p> (Not to mention the synopses of char_traits<char> in 21.1.3.1 and char_traits<wchar_t> in 21.1.3.2...) </p> + + <p><b>Proposed resolution:</b></p> <p>Add the following to 21.1.1 para 1:</p> -<blockquote> +<blockquote><p> r denotes an lvalue of CharT -</blockquote> +</p></blockquote> <p>and change the description of assign in the table to:</p> <pre> X::assign(r,d) assigns r = d </pre> + + + + + <hr> -<a name="336"><h3>336. Clause 17 lack of references to deprecated headers</h3></a><p><b>Section:</b> 17 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.library"> [lib.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 05 Sep 2001</p> +<h3><a name="336"></a>336. Clause 17 lack of references to deprecated headers</h3> +<p><b>Section:</b> 17 [library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-09-05</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>From c++std-edit-873:</p> -<p>17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a>, Table 11. In this table, the header +<p>17.4.1.2 [headers], Table 11. In this table, the header <strstream> is missing.</p> <p>This shows a general problem: The whole clause 17 refers quite often to clauses 18 through 27, but D.7 is also a part of the standard library (though a deprecated one).</p> + + <p><b>Proposed resolution:</b></p> -<p>To 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> Table 11, C++ Library Headers, add +<p>To 17.4.1.2 [headers] Table 11, C++ Library Headers, add "<strstream>".</p> <p>In the following places, change "clauses 17 through 27" to "clauses 17 through 27 and Annex D":</p> <ul> -<li>1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.refs"> [intro.refs]</a> Normative references/1/footnote 1</li> -<li>1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/intro.html#intro.defs"> [intro.defs]</a> Definitions/1</li> -<li>7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/dcl.html#dcl.dcl"> [dcl.dcl]</a> Library introduction/9</li> -<li>17.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.description"> [lib.description]</a> Method of description (Informative)/1</li> -<li>17.3.2.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.character.seq"> [lib.character.seq]</a> Character sequences/1/bullet 2</li> -<li>17.3.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.functions.within.classes"> [lib.functions.within.classes]</a> Functions within classes/1</li> -<li>17.3.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.objects.within.classes"> [lib.objects.within.classes]</a> Private members/1/(2 places)</li> -<li>17.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.requirements"> [lib.requirements]</a> Library-wide requirements/1</li> -<li>17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> Headers/4</li> -<li>17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> Replacement functions/1</li> -<li>17.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.global.functions"> [lib.global.functions]</a> Global or non-member functions/2</li> -<li>17.4.4.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.protection.within.classes"> [lib.protection.within.classes]</a> Protection within classes/1</li> +<li>1.2 [intro.refs] Normative references/1/footnote 1</li> +<li>1.3 [intro.defs] Definitions/1</li> +<li>7 [dcl.dcl] Library introduction/9</li> +<li>17.3 [description] Method of description (Informative)/1</li> +<li>17.3.2.1.3 [character.seq] Character sequences/1/bullet 2</li> +<li>17.3.2.2 [functions.within.classes] Functions within classes/1</li> +<li>17.3.2.3 [objects.within.classes] Private members/1/(2 places)</li> +<li>17.4 [requirements] Library-wide requirements/1</li> +<li>17.4.1.2 [headers] Headers/4</li> +<li>17.4.3.4 [replacement.functions] Replacement functions/1</li> +<li>17.4.4.3 [global.functions] Global or non-member functions/2</li> +<li>17.4.4.6 [protection.within.classes] Protection within classes/1</li> </ul> + + + + + <hr> -<a name="337"><h3>337. replace_copy_if's template parameter should be InputIterator</h3></a><p><b>Section:</b> 25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 07 Sep 2001</p> +<h3><a name="337"></a>337. replace_copy_if's template parameter should be InputIterator</h3> +<p><b>Section:</b> 25.2.5 [alg.replace] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Detlef Vollmann <b>Date:</b> 2001-09-07</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.replace">issues</a> in [alg.replace].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>From c++std-edit-876:</p> <p> -In section 25.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.replace"> [lib.alg.replace]</a> before p4: The name of the first +In section 25.2.5 [alg.replace] before p4: The name of the first parameter of template replace_copy_if should be "InputIterator" -instead of "Iterator". According to 17.3.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.type.descriptions"> [lib.type.descriptions]</a> p1 the +instead of "Iterator". According to 17.3.2.1 [type.descriptions] p1 the parameter name conveys real normative meaning. </p> + + <p><b>Proposed resolution:</b></p> <p>Change <tt>Iterator</tt> to <tt>InputIterator</tt>.</p> + + + + + <hr> -<a name="338"><h3>338. is whitespace allowed between `-' and a digit?</h3></a><p><b>Section:</b> 22.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.categories"> [lib.locale.categories]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 17 Sep 2001</p> +<h3><a name="338"></a>338. is whitespace allowed between `-' and a digit?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-09-17</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -From Stage 2 processing in 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>, p8 and 9 (the +From Stage 2 processing in 22.2.2.1.2 [facet.num.get.virtuals], p8 and 9 (the original text or the text corrected by the proposed resolution of issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#221">221</a>) it seems clear that no whitespace is allowed -within a number, but 22.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct"> [lib.locale.numpunct]</a>, p2, which gives the +within a number, but 22.2.3.1 [locale.numpunct], p2, which gives the format for integer and floating point values, says that whitespace is optional between a plusminus and a sign. </p> @@ -10764,10 +14989,14 @@ The text needs to be clarified to either consistently allow or disallow whitespace between a plusminus and a sign. It might be worthwhile to consider the fact that the C library stdio facility does not permit whitespace embedded in numbers and neither does the C or -C++ core language (the syntax of integer-literals is given in 2.13.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lex.html#lex.icon"> [lex.icon]</a>, that of floating-point-literals in 2.13.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lex.html#lex.fcon"> [lex.fcon]</a> of the C++ standard). +C++ core language (the syntax of integer-literals is given in 2.13.1 +[lex.icon], that of floating-point-literals in 2.13.3 [lex.fcon] of the +C++ standard). </p> + + <p><b>Proposed resolution:</b></p> -<p>Change the first part of 22.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct"> [lib.locale.numpunct]</a> paragraph 2 from:</p> +<p>Change the first part of 22.2.3.1 [locale.numpunct] paragraph 2 from:</p> <blockquote> <p> The syntax for number formats is as follows, where <tt>digit</tt> @@ -10801,33 +15030,48 @@ Integer values have the format: digits ::= digit [digits] </pre> </blockquote> + + <p><b>Rationale:</b></p> -<p>It's not clear whether the format described in 22.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.numpunct"> [lib.locale.numpunct]</a> paragraph 2 has any normative weight: nothing in the +<p>It's not clear whether the format described in 22.2.3.1 [locale.numpunct] paragraph 2 has any normative weight: nothing in the standard says how, or whether, it's used. However, there's no reason for it to differ gratuitously from the very specific description of -numeric processing in 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a>. The proposed +numeric processing in 22.2.2.1.2 [facet.num.get.virtuals]. The proposed resolution removes all mention of "whitespace" from that format.</p> + + + + + <hr> -<a name="339"><h3>339. definition of bitmask type restricted to clause 27</h3></a><p><b>Section:</b> 22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a>, 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 17 September 2001</p> -<p> -The ctype_category::mask type is declared to be an enum in 22.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.category.ctype"> [lib.category.ctype]</a> with p1 then stating that it is a bitmask type, most -likely referring to the definition of bitmask type in 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a>, p1. However, the said definition only applies to +<h3><a name="339"></a>339. definition of bitmask type restricted to clause 27</h3> +<p><b>Section:</b> 22.2.1 [category.ctype], 17.3.2.1.2 [bitmask.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-09-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>The ctype_category::mask type is declared to be an enum in 22.2.1 +[category.ctype] with p1 then stating that it is a bitmask type, most +likely referring to the definition of bitmask type in 17.3.2.1.2 +[bitmask.types], p1. However, the said definition only applies to clause 27, making the reference in 22.2.1 somewhat dubious. </p> + + <p><b>Proposed resolution:</b></p> <p>Clarify 17.3.2.1.2, p1 by changing the current text from</p> - <blockquote> + <blockquote><p> Several types defined in clause 27 are bitmask types. Each bitmask type can be implemented as an enumerated type that overloads certain operators, - as an integer type, or as a bitset (23.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.template.bitset"> [lib.template.bitset]</a>). - </blockquote> + as an integer type, or as a bitset (23.3.5 [template.bitset]). + </p></blockquote> <p>to read</p> - <blockquote> + <blockquote><p> Several types defined in clauses lib.language.support through lib.input.output and Annex D are bitmask types. Each bitmask type can be implemented as an enumerated type that overloads certain operators, as an integer type, or as a bitset (lib.template.bitset). - </blockquote> + </p></blockquote> <p> Additionally, change the definition in 22.2.1 to adopt the same @@ -10859,28 +15103,40 @@ following (note, in particluar, the cross-reference to 17.3.2.1.2 in } </pre> -<p>The type <tt>mask</tt> is a bitmask type (17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a>).</p> +<p>The type <tt>mask</tt> is a bitmask type (17.3.2.1.2 [bitmask.types]).</p> </blockquote> <p><i>[Curaçao: The LWG notes that T above should be bold-italics to be consistent with the rest of the standard.]</i></p> + + + + + + + + <hr> -<a name="340"><h3>340. interpretation of <tt>has_facet<Facet>(loc)</tt> -</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2001</p> +<h3><a name="340"></a>340. interpretation of <tt>has_facet<Facet>(loc)</tt></h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-09-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> It's unclear whether 22.1.1.1.1, p3 says that <tt>has_facet<Facet>(loc)</tt> returns true for any <tt>Facet</tt> from Table 51 or whether it includes Table 52 as well: </p> -<blockquote> +<blockquote><p> For any locale <tt>loc</tt> either constructed, or returned by locale::classic(), and any facet <tt>Facet</tt> that is a member of a standard category, <tt>has_facet<Facet>(loc)</tt> is true. Each locale member function which takes a <tt>locale::category</tt> argument operates on the corresponding set of facets. -</blockquote> +</p></blockquote> <p> It seems that it comes down to which facets are considered to be members of a @@ -10913,9 +15169,13 @@ to hold only for specializations of <tt>Facet</tt> from Table 52 on {i,o}<tt>streambuf_iterator</tt><{<tt>char</tt>,<tt>wchar_t</tt>}<tt>></tt> }. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a>, paragraph 3, change +<p>In 22.1.1.1.1 [locale.category], paragraph 3, change "that is a member of a standard category" to "shown in Table 51".</p> + + <p><b>Rationale:</b></p> <p>The facets in Table 52 are an unbounded set. Locales should not be required to contain an infinite number of facets.</p> @@ -10923,8 +15183,19 @@ required to contain an infinite number of facets.</p> <p>It's not necessary to talk about which values of InputIterator and OutputIterator must be supported. Table 51 already contains a complete list of the ones we need.</p> + + + + + + <hr> -<a name="341"><h3>341. Vector reallocation and swap</h3></a><p><b>Section:</b> 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Anthony Williams <b>Date:</b> 27 Sep 2001</p> +<h3><a name="341"></a>341. Vector reallocation and swap</h3> +<p><b>Section:</b> 23.2.5.2 [vector.capacity] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Anthony Williams <b>Date:</b> 2001-09-27</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.capacity">issues</a> in [vector.capacity].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>It is a common idiom to reduce the capacity of a vector by swapping it with an empty one:</p> <pre> std::vector<SomeType> vec; @@ -10933,7 +15204,7 @@ an empty one:</p> // vec is now empty, with minimal capacity </pre> -<p>However, the wording of 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a>paragraph 5 prevents +<p>However, the wording of 23.2.5.2 [vector.capacity]paragraph 5 prevents the capacity of a vector being reduced, following a call to reserve(). This invalidates the idiom, as swap() is thus prevented from reducing the capacity. The proposed wording for issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#329">329</a> does not affect this. Consequently, the example above @@ -10942,7 +15213,7 @@ vec, and the contents be copied across. This is a linear-time operation.</p> <p>However, the container requirements state that swap must have constant -complexity (23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> note to table 65).</p> +complexity (23.1 [container.requirements] note to table 65).</p> <p>This is an important issue, as reallocation affects the validity of references and iterators.</p> @@ -10963,8 +15234,10 @@ possibilities with regard to iterators and references:</p> pointing to the same element. Consequently iterators and references that referred to one vector now refer to the other, and vice-versa.</li> </ol> + + <p><b>Proposed resolution:</b></p> -<p>Add a new paragraph after 23.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.priority.queue"> [lib.priority.queue]</a> paragraph 5:</p> +<p>Add a new paragraph after 23.2.5.2 [vector.capacity] paragraph 5:</p> <blockquote> <pre> void swap(vector<T,Allocator>& x); </pre> @@ -10977,23 +15250,49 @@ with that of <tt>x</tt>.</p> have a problem with a circular definition of swap() for other containers.]</i></p> + + + <p><b>Rationale:</b></p> <p> swap should be constant time. The clear intent is that it should just do pointer twiddling, and that it should exchange all properties of the two vectors, including their reallocation guarantees. </p> + + + + + <hr> -<a name="345"><h3>345. type tm in <cwchar></h3></a><p><b>Section:</b> 21.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.c.strings"> [lib.c.strings]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Clark Nelson <b>Date:</b> 19 Oct 2001</p> -<p> -C99, and presumably amendment 1 to C90, specify that <wchar.h> -declares struct tm as an incomplete type. However, table 48 in 21.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.c.strings"> [lib.c.strings]</a> does not mention the type tm as being declared in +<h3><a name="345"></a>345. type tm in <cwchar></h3> +<p><b>Section:</b> 21.4 [c.strings] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Clark Nelson <b>Date:</b> 2001-10-19</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>C99, and presumably amendment 1 to C90, specify that <wchar.h> +declares struct tm as an incomplete type. However, table 48 in 21.4 +[c.strings] does not mention the type tm as being declared in <cwchar>. Is this omission intentional or accidental? </p> + + <p><b>Proposed resolution:</b></p> -<p>In section 21.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.c.strings"> [lib.c.strings]</a>, add "tm" to table 48.</p> +<p>In section 21.4 [c.strings], add "tm" to table 48.</p> + + + + + <hr> -<a name="346"></a><h3><a name="346">346. Some iterator member functions should be const</a></h3><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Jeremy Siek <b>Date:</b> 20 Oct 2001</p> +<h3><a name="346"></a>346. Some iterator member functions should be const</h3> +<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#WP">WP</a> + <b>Submitter:</b> Jeremy Siek <b>Date:</b> 2001-10-20</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Iterator member functions and operators that do not change the state of the iterator should be defined as const member functions or as functions that take iterators either by const reference or by @@ -11004,8 +15303,10 @@ are suggested to make this explicit.</p> <p>The tables almost indicate constness properly through naming: r for non-const and a,b for const iterators. The following changes make this more explicit and also fix a couple problems.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> Change the first section of p9 from +<p>In 24.1 [iterator.requirements] Change the first section of p9 from "In the following sections, a and b denote values of X..." to "In the following sections, a and b denote values of type const X...".</p> @@ -11032,12 +15333,23 @@ make this more explicit and also fix a couple problems.</p> <p><i>[Redmond: The container requirements should be reviewed to see if the same problem appears there.]</i></p> + + + + + + <hr> -<a name="347"><h3>347. locale::category and bitmask requirements</h3></a><p><b>Section:</b> 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> P.J. Plauger, Nathan Myers <b>Date:</b> 23 Oct 2001</p> +<h3><a name="347"></a>347. locale::category and bitmask requirements</h3> +<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#WP">WP</a> + <b>Submitter:</b> P.J. Plauger, Nathan Myers <b>Date:</b> 2001-10-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In 22.1.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.category"> [lib.locale.category]</a> paragraph 1, the category members +In 22.1.1.1.1 [locale.category] paragraph 1, the category members are described as bitmask elements. In fact, the bitmask requirements -in 17.3.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.bitmask.types"> [lib.bitmask.types]</a> don't seem quite right: <tt>none</tt> +in 17.3.2.1.2 [bitmask.types] don't seem quite right: <tt>none</tt> and <tt>all</tt> are bitmask constants, not bitmask elements.</p> <p>In particular, the requirements for <tt>none</tt> interact poorly @@ -11055,8 +15367,10 @@ value such as 0x1000 instead of 0.</p> re-expresses the status quo more clearly, without introducing any changes beyond resolving the DR.</p> + + <p><b>Proposed resolution:</b></p> -<p>Replace the first two paragraphs of 22.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.types"> [lib.locale.types]</a> with:</p> +<p>Replace the first two paragraphs of 22.1.1.1 [locale.types] with:</p> <blockquote> <pre> typedef int category; </pre> @@ -11088,6 +15402,9 @@ shown in Table 51: </blockquote> <p><i>[Curaçao: need input from locale experts.]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG considered, and rejected, an alternate proposal (described @@ -11100,7 +15417,7 @@ shown in Table 51: <blockquote> <p><b>Option 2:</b> <br> -Replace the first paragraph of 22.1.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.types"> [lib.locale.types]</a> with:</p> +Replace the first paragraph of 22.1.1.1 [locale.types] with:</p> <blockquote> <p> Valid category values include the enumerated values. In addition, the @@ -11120,8 +15437,17 @@ of the other enumerated values; implementations may add extra categories.] </p> </blockquote> </blockquote> + + + + + <hr> -<a name="349"><h3>349. Minor typographical error in ostream_iterator</h3></a><p><b>Section:</b> 24.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostream.iterator"> [lib.ostream.iterator]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andy Sawyer <b>Date:</b> 24 Oct 2001</p> +<h3><a name="349"></a>349. Minor typographical error in ostream_iterator</h3> +<p><b>Section:</b> 24.5.2 [ostream.iterator] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andy Sawyer <b>Date:</b> 2001-10-24</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>24.5.2 [lib.ostream.iterator] states:</p> <pre> [...] @@ -11132,13 +15458,24 @@ of the other enumerated values; implementations may add extra categories.] <p>Whilst it's clearly marked "exposition only", I suspect 'delim' should be of type 'const charT*'.</p> + + <p><b>Proposed resolution:</b></p> <p> -In 24.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.ostream.iterator"> [lib.ostream.iterator]</a>, replace <tt>const char* delim</tt> with +In 24.5.2 [ostream.iterator], replace <tt>const char* delim</tt> with <tt>const charT* delim</tt>. </p> + + + + + <hr> -<a name="352"><h3>352. missing fpos requirements</h3></a><p><b>Section:</b> 21.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.typedefs"> [lib.char.traits.typedefs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 2 Dec 2001</p> +<h3><a name="352"></a>352. missing fpos requirements</h3> +<p><b>Section:</b> 21.1.2 [char.traits.typedefs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2001-12-02</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> <i>(1)</i> There are no requirements on the <tt>stateT</tt> template parameter of @@ -11158,6 +15495,8 @@ Additionally, the <tt>stateT</tt> template argument has no corresponding typedef in fpos which might make it difficult to use in generic code. </p> + + <p><b>Proposed resolution:</b></p> <p> Modify 21.1.2, p4 from @@ -11172,6 +15511,8 @@ Modify 21.1.2, p4 from DefaultConstructible (20.1.4) types. </p> + + <p><b>Rationale:</b></p> <p>The LWG feels this is two issues, as indicated above. The first is a defect---std::basic_fstream is unimplementable without these @@ -11180,8 +15521,18 @@ second is questionable; who would use that typedef? The class template fpos is used only in a very few places, all of which know the state type already. Unless motivation is provided, the second should be considered NAD.</p> + + + + + <hr> -<a name="354"><h3>354. Associative container lower/upper bound requirements</h3></a><p><b>Section:</b> 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Hans Aberg <b>Date:</b> 17 Dec 2001</p> +<h3><a name="354"></a>354. Associative container lower/upper bound requirements</h3> +<p><b>Section:</b> 23.1.2 [associative.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Hans Aberg <b>Date:</b> 2001-12-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Discussions in the thread "Associative container lower/upper bound requirements" on comp.std.c++ suggests that there is a defect in the @@ -11213,9 +15564,11 @@ insert a new element into the container and return an iterator to that in case the sought iterator does not exist, which does not seem to be the intention (and not possible with the "const" versions). </p> + + <p><b>Proposed resolution:</b></p> -<p>Change Table 69 of section 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> indicated entries +<p>Change Table 69 of section 23.1.2 [associative.reqmts] indicated entries to:</p> <blockquote> @@ -11232,8 +15585,20 @@ key greater than k, or a.end() if such an element is not found. <p><i>[Curaçao: LWG reviewed PR.]</i></p> + + + + + + + <hr> -<a name="355"><h3>355. Operational semantics for a.back()</h3></a><p><b>Section:</b> 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Yaroslav Mironov <b>Date:</b> 23 Jan 2002</p> +<h3><a name="355"></a>355. Operational semantics for a.back()</h3> +<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Yaroslav Mironov <b>Date:</b> 2002-01-23</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Table 68 "Optional Sequence Operations" in 23.1.1/12 specifies operational semantics for "a.back()" as @@ -11247,38 +15612,37 @@ successfully compile and run as intended, but after changing the type of the container or the mode of compilation it may produce compile-time error. </p> + + <p><b>Proposed resolution:</b></p> <p>Change the specification in table 68 "Optional Sequence Operations" in 23.1.1/12 for "a.back()" from</p> -<blockquote> -*--a.end() -</blockquote> +<blockquote><pre>*--a.end() +</pre></blockquote> <p>to</p> -<blockquote> - { iterator tmp = a.end(); --tmp; return *tmp; } -</blockquote> +<blockquote><pre> { iterator tmp = a.end(); --tmp; return *tmp; } +</pre></blockquote> <p>and the specification for "a.pop_back()" from</p> -<blockquote> -a.erase(--a.end()) -</blockquote> +<blockquote><pre>a.erase(--a.end()) +</pre></blockquote> <p>to</p> -<blockquote> - { iterator tmp = a.end(); --tmp; a.erase(tmp); } -</blockquote> +<blockquote><pre> { iterator tmp = a.end(); --tmp; a.erase(tmp); } +</pre></blockquote> <p><i>[Curaçao: LWG changed PR from "{ X::iterator tmp = a.end(); return *--tmp; }" to "*a.rbegin()", and from "{ X::iterator tmp = a.end(); a.erase(--tmp); }" to "a.erase(rbegin())".]</i></p> + <p><i>[There is a second possible defect; table 68 "Optional Sequence Operations" in the "Operational Semantics" column uses operations present only in the "Reversible @@ -11286,6 +15650,7 @@ Container" requirements, yet there is no stated dependency between these separate requirements tables. Ask in Santa Cruz if the LWG would like a new issue opened.]</i></p> + <p><i>[Santa Cruz: the proposed resolution is even worse than what's in the current standard: erase is undefined for reverse iterator. If we're going to make the change, we need to define a temporary and @@ -11294,16 +15659,29 @@ LWG would like a new issue opened.]</i></p> volunteered to review the standard and see if this problem occurs elsewhere.]</i></p> + <p><i>[Oxford: Matt provided new wording to address the concerns raised in Santa Cruz. It does not appear that this problem appears anywhere else in clauses 23 or 24.]</i></p> + <p><i>[Kona: In definition of operational semantics of back(), change "*tmp" to "return *tmp;"]</i></p> + + + + + + <hr> -<a name="358"><h3>358. interpreting <tt>thousands_sep</tt> after a <tt>decimal_point</tt> -</h3></a><p><b>Section:</b> 22.2.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.get.virtuals"> [lib.facet.num.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 12 Mar 2002</p> +<h3><a name="358"></a>358. interpreting <tt>thousands_sep</tt> after a <tt>decimal_point</tt></h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> I don't think <tt>thousands_sep</tt> is being treated correctly after decimal_point has been seen. Since grouping applies only to the @@ -11317,28 +15695,32 @@ interpreted in the fractional part of a number.) The easiest change I can think of that resolves this issue would be something like below. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the first sentence of 22.2.2.1.2, p9 from </p> -<blockquote> +<blockquote><p> If discard is true then the position of the character is remembered, but the character is otherwise ignored. If it is not discarded, then a check is made to determine if c is allowed as the next character of an input field of the conversion specifier returned by stage 1. If so it is accumulated. -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> If <tt>discard</tt> is true, then if <tt>'.'</tt> has not yet been accumulated, then the position of the character is remembered, but the character is otherwise ignored. Otherwise, if <tt>'.'</tt> has already been accumulated, the character is discarded and Stage 2 terminates. ... -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>We believe this reflects the intent of the Standard. Thousands sep @@ -11348,8 +15730,17 @@ Change the first sentence of 22.2.2.1.2, p9 from instead of reusing the thousand sep character. If we want to add support for such conventions, we need to do so explicitly.</p> + + + + + <hr> -<a name="359"><h3>359. num_put<>::do_put (..., bool) undocumented</h3></a><p><b>Section:</b> 22.2.2.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.members"> [lib.facet.num.put.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 12 Mar 2002</p> +<h3><a name="359"></a>359. num_put<>::do_put (..., bool) undocumented</h3> +<p><b>Section:</b> 22.2.2.2.1 [facet.num.put.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>22.2.2.2.1, p1:</p> <pre> iter_type put (iter_type out, ios_base& str, char_type fill, @@ -11368,14 +15759,14 @@ however, 22.2.2.2.2, p23:</p> </pre> - Effects: If (str.flags() & ios_base::boolalpha) == 0 then do + <p>Effects: If (str.flags() & ios_base::boolalpha) == 0 then do out = do_put(out, str, fill, (int)val) - Otherwise do + Otherwise do</p> <pre> string_type s = val ? use_facet<ctype<charT> >(loc).truename() : use_facet<ctype<charT> >(loc).falsename(); </pre> - and then insert the characters of s into out. <i>out</i>. + <p>and then insert the characters of s into out. <i>out</i>.</p> </blockquote> <p> @@ -11394,47 +15785,59 @@ of <i>"out."</i> in the text. I think the least invasive change to fix it would be something like the following: </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, just above paragraph 1, remove +<p>In 22.2.2.2.2 [facet.num.put.virtuals], just above paragraph 1, remove the <tt>bool</tt> overload.</p> <p> -In 22.2.2.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.facet.num.put.virtuals"> [lib.facet.num.put.virtuals]</a>, p23, make the following changes +In 22.2.2.2.2 [facet.num.put.virtuals], p23, make the following changes </p> -<blockquote> +<blockquote><p> Replace <tt>put()</tt> with <tt>do_put()</tt> in the declaration of the member function. -</blockquote> +</p></blockquote> -<blockquote> +<blockquote><p> Change the <b>Effects</b> clause to a <b>Returns</b> clause (to avoid the requirement to call <tt>do_put(..., int)</tt> from <tt> do_put (..., bool))</tt> like so: -</blockquote> +</p></blockquote> -<blockquote> +<blockquote><p> 23 <b>Returns</b>: If <tt>(str.flags() & ios_base::boolalpha) == 0</tt> then <tt>do_put (out, str, fill, (long)val)</tt> - Otherwise the function obtains a string <tt>s</tt> as if by + Otherwise the function obtains a string <tt>s</tt> as if by</p> <pre> string_type s = val ? use_facet<ctype<charT> >(loc).truename() : use_facet<ctype<charT> >(loc).falsename(); </pre> - and then inserts each character <tt>c</tt> of s into out via + <p>and then inserts each character <tt>c</tt> of s into out via <tt>*out++ = c</tt> - and returns <tt>out</tt>. + and returns <tt>out</tt>.</p> </blockquote> -<p><b>Rationale:</b></p> -<p> + + +<p><b>Rationale:</b></p><p> This fixes a couple of obvious typos, and also fixes what appears to be a requirement of gratuitous inefficiency. </p> + + + + <hr> -<a name="360"><h3>360. locale mandates inefficient implementation</h3></a><p><b>Section:</b> 22.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale"> [lib.locale]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 12 Mar 2002</p> +<h3><a name="360"></a>360. locale mandates inefficient implementation</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-03-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> 22.1.1, p7 (copied below) allows iostream formatters and extractors to make assumptions about the values returned from facet members. @@ -11446,9 +15849,11 @@ calls to the same iostream functions with no interevening calls to from other member functions of other facets). This restriction prevents locale from being implemented efficiently. </p> + + <p><b>Proposed resolution:</b></p> <p>Change the first sentence in 22.1.1, p7 from</p> -<blockquote> +<blockquote><p> In successive calls to a locale facet member function during a call to an iostream inserter or extractor or a streambuf member function, the returned result shall be identical. [Note: This @@ -11456,23 +15861,35 @@ prevents locale from being implemented efficiently. the locale facet member function again, and that member functions of iostream classes cannot safely call <tt>imbue()</tt> themselves, except as specified elsewhere. --end note] -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> In successive calls to a locale facet member function on a facet object installed in the same locale, the returned result shall be identical. ... -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>This change is reasonable becuase it clarifies the intent of this part of the standard.</p> + + + + + <hr> -<a name="362"><h3>362. bind1st/bind2nd type safety</h3></a><p><b>Section:</b> D.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/future.html#depr.lib.binders"> [depr.lib.binders]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Andrew Demkin <b>Date:</b> 26 Apr 2002</p> +<h3><a name="362"></a>362. bind1st/bind2nd type safety</h3> +<p><b>Section:</b> D.8 [depr.lib.binders] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Andrew Demkin <b>Date:</b> 2002-04-26</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#depr.lib.binders">issues</a> in [depr.lib.binders].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -The definition of bind1st() (<font color="red">20.5.6.2</font>) can result in +The definition of bind1st() (D.8 [depr.lib.binders]) can result in the construction of an unsafe binding between incompatible pointer types. For example, given a function whose first parameter type is 'pointer to T', it's possible without error to bind an argument of @@ -11499,43 +15916,75 @@ map its argument to the expected argument type of the bound function <pre> typename Operation::first_argument_type(x) </pre> -<p> -A functional-style conversion (5.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/expr.html#expr.type.conv"> [expr.type.conv]</a>) is defined to be -semantically equivalent to an explicit cast expression (5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/expr.html#expr.cast"> [expr.cast]</a>), which may (according to 5.4, paragraph 5) be interpreted +<p>A functional-style conversion (D.8 [depr.lib.binders]) is defined to +be +semantically equivalent to an explicit cast expression (D.8 +[depr.lib.binders]), which may (according to 5.4, paragraph 5) be +interpreted as a reinterpret_cast, thus masking the error. </p> -<p>The problem and proposed change also apply to <font color="red">20.5.6.4</font>.</p> +<p>The problem and proposed change also apply to D.8 [depr.lib.binders].</p> + + <p><b>Proposed resolution:</b></p> -<p>Add this sentence to the end of 20.5.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.arithmetic.operations"> [lib.arithmetic.operations]</a>/1: +<p>Add this sentence to the end of D.8 [depr.lib.binders]/1: "Binders <tt>bind1st</tt> and <tt>bind2nd</tt> are deprecated in favor of <tt>std::tr1::bind</tt>."</p> <p>(Notes to editor: (1) when and if tr1::bind is incorporated into the standard, "std::tr1::bind" should be changed to "std::bind". (2) 20.5.6 should probably be moved to Annex D.</p> + + <p><b>Rationale:</b></p> <p>There is no point in fixing bind1st and bind2nd. tr1::bind is a superior solution. It solves this problem and others.</p> + + + + + <hr> -<a name="363"><h3>363. Missing exception specification in 27.4.2.1.1</h3></a><p><b>Section:</b> 27.4.2.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios::failure"> [lib.ios::failure]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Walter Brown and Marc Paterno <b>Date:</b> 20 May 2002</p> +<h3><a name="363"></a>363. Missing exception specification in 27.4.2.1.1</h3> +<p><b>Section:</b> 27.4.2.1.1 [ios::failure] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Walter Brown and Marc Paterno <b>Date:</b> 2002-05-20</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ios::failure">issues</a> in [ios::failure].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The destructor of ios_base::failure should have an empty throw specification, because the destructor of its base class, exception, is declared in this way. </p> + + <p><b>Proposed resolution:</b></p> <p>Change the destructor to</p> <pre> virtual ~failure() throw(); </pre> + + <p><b>Rationale:</b></p> <p>Fixes an obvious glitch. This is almost editorial.</p> + + + + + <hr> -<a name="364"><h3>364. Inconsistent wording in 27.5.2.4.2</h3></a><p><b>Section:</b> 27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 10 May 2002</p> +<h3><a name="364"></a>364. Inconsistent wording in 27.5.2.4.2</h3> +<p><b>Section:</b> 27.5.2.4.2 [streambuf.virt.buffer] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#streambuf.virt.buffer">issues</a> in [streambuf.virt.buffer].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -27.5.2.4.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.streambuf.virt.buffer"> [lib.streambuf.virt.buffer]</a> paragraph 1 is inconsistent with the Effects +27.5.2.4.2 [streambuf.virt.buffer] paragraph 1 is inconsistent with the Effects clause for seekoff. </p> + + <p><b>Proposed resolution:</b></p> <p> Make this paragraph, the Effects clause for setbuf, consistent in wording @@ -11545,25 +15994,37 @@ to indicate the purpose of setbuf: <p>Original text:</p> -<blockquote> +<blockquote><p> 1 Effects: Performs an operation that is defined separately for each class derived from basic_streambuf in this clause (27.7.1.3, 27.8.1.4). -</blockquote> +</p></blockquote> <p>Proposed text:</p> -<blockquote> +<blockquote><p> 1 Effects: Influences stream buffering in a way that is defined separately for each class derived from basic_streambuf in this clause (27.7.1.3, 27.8.1.4). -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>The LWG doesn't believe there is any normative difference between the existing wording and what's in the proposed resolution, but the change may make the intent clearer.</p> + + + + + <hr> -<a name="365"><h3>365. Lack of const-qualification in clause 27</h3></a><p><b>Section:</b> 27 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.input.output"> [lib.input.output]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 10 May 2002</p> +<h3><a name="365"></a>365. Lack of const-qualification in clause 27</h3> +<p><b>Section:</b> 27 [input.output] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Walter Brown, Marc Paterno <b>Date:</b> 2002-05-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Some stream and streambuf member functions are declared non-const, even thought they appear only to report information rather than to @@ -11576,6 +16037,8 @@ document N1360 for details and rationale. <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#73">73</a></p> + + <p><b>Proposed resolution:</b></p> <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> <p>Replace</p> @@ -11584,6 +16047,8 @@ document N1360 for details and rationale. <p>with</p> <pre> bool is_open() const; </pre> + + <p><b>Rationale:</b></p> <p>Of the changes proposed in N1360, the only one that is safe is changing the filestreams' is_open to const. The LWG believed that @@ -11601,8 +16066,18 @@ state exposed by the public interface is unchanged.</p> <p>Note that implementers can make this change in a binary compatible way by providing both overloads; this would be a conforming extension.</p> + + + + + <hr> -<a name="369"><h3>369. io stream objects and static ctors</h3></a><p><b>Section:</b> 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Ruslan Abdikeev <b>Date:</b> 8 Jul 2002</p> +<h3><a name="369"></a>369. io stream objects and static ctors</h3> +<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Ruslan Abdikeev <b>Date:</b> 2002-07-08</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Is it safe to use standard iostream objects from constructors of static objects? Are standard iostream objects constructed and are @@ -11630,13 +16105,13 @@ iostream objects from constructors of static objects. <p>Core text refers to some magic object ios_base::Init, which will be discussed below:</p> -<blockquote> +<blockquote><p> "The [standard iostream] objects are constructed, and their associations are established at some time prior to or during first time an object of class basic_ios<charT,traits>::Init is constructed, and in any case before the body of main begins execution." (27.3/2 [lib.iostream.objects]) -</blockquote> +</p></blockquote> <p> The first <i>non-normative</i> footnote encourages implementations @@ -11646,11 +16121,11 @@ to initialize standard iostream objects earlier than required. <p>However, the second <i>non-normative</i> footnote makes an explicit and unsupported claim:</p> -<blockquote> +<blockquote><p> "Constructors and destructors for static objects can access these [standard iostream] objects to read input from stdin or write output to stdout or stderr." (27.3/2 footnote 265 [lib.iostream.objects]) -</blockquote> +</p></blockquote> <p> The only bit of magic is related to that ios_base::Init class. AFAIK, @@ -11666,22 +16141,28 @@ However, while Standard explicitly describes ios_base::Init as an appropriate class for doing the trick, I failed to found a mention of an _instance_ of ios_base::Init in Standard. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add to 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a>, p2, immediately before the last sentence +<p>Add to 27.3 [iostream.objects], p2, immediately before the last sentence of the paragraph, the following two sentences:</p> -<blockquote> +<blockquote><p> If a translation unit includes <iostream>, or explicitly constructs an ios_base::Init object, these stream objects shall be constructed before dynamic initialization of non-local objects defined later in that translation unit, and these stream objects shall be destroyed after the destruction of dynamically initialized non-local objects defined later in that translation unit. -</blockquote> +</p></blockquote> <p><i>[Lillehammer: Matt provided wording.]</i></p> + <p><i>[Mont Tremblant: Matt provided revised wording.]</i></p> + + + <p><b>Rationale:</b></p> <p> The original proposed resolution unconditionally required @@ -11697,9 +16178,22 @@ object.</p> <p> The new proposed resolution gives users guidance on what they need to do to ensure that stream objects are constructed during startup.</p> + + + + + <hr> -<a name="370"><h3>370. Minor error in basic_istream::get</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 15 Jul 2002</p> -<p>Defect report for description of basic_istream::get (section 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a>), paragraph 15. The description for the get function +<h3><a name="370"></a>370. Minor error in basic_istream::get</h3> +<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#WP">WP</a> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-07-15</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p>Defect report for description of basic_istream::get (section +27.6.1.3 [istream.unformatted]), paragraph 15. The description for the +get function with the following signature:</p> <pre> basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>& @@ -11708,28 +16202,42 @@ with the following signature:</p> <p>is incorrect. It reads</p> -<blockquote> +<blockquote><p> Effects: Calls get(s,n,widen('\n')) -</blockquote> +</p></blockquote> <p>which I believe should be:</p> -<blockquote> +<blockquote><p> Effects: Calls get(sb,widen('\n')) -</blockquote> +</p></blockquote> + + <p><b>Proposed resolution:</b></p> <p>Change the <b>Effects</b> paragraph to:</p> -<blockquote> +<blockquote><p> Effects: Calls get(sb,this->widen('\n')) -</blockquote> +</p></blockquote> <p><i>[Pre-Oxford: Minor correction from Howard: replaced 'widen' with 'this->widen'.]</i></p> -<p><b>Rationale:</b></p> -<p>Fixes an obvious typo.</p> + + + +<p><b>Rationale:</b></p><p>Fixes an obvious typo.</p> + + + + <hr> -<a name="371"><h3>371. Stability of multiset and multimap member functions</h3></a><p><b>Section:</b> 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Frank Compagner <b>Date:</b> 20 Jul 2002</p> +<h3><a name="371"></a>371. Stability of multiset and multimap member functions</h3> +<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#WP">WP</a> + <b>Submitter:</b> Frank Compagner <b>Date:</b> 2002-07-20</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The requirements for multiset and multimap containers (23.1 [lib.containers.requirements], 23.1.2 [lib.associative.reqmnts], @@ -11783,20 +16291,27 @@ erase_if() member function that much greater. <p>This issue is somewhat related to LWG issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#130">130</a>.</p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following to the end of 23.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.associative.reqmts"> [lib.associative.reqmts]</a> paragraph 4: +<p>Add the following to the end of 23.1.2 [associative.reqmts] paragraph 4: "For <tt>multiset</tt> and <tt>multimap</tt>, <tt>insert</tt>and <tt>erase</tt> are <i>stable</i>: they preserve the relative ordering of equivalent elements.</p> <p><i>[Lillehammer: Matt provided wording]</i></p> + <p><i>[Joe Gottman points out that the provided wording does not address multimap and multiset. N1780 also addresses this issue and suggests wording.]</i></p> + <p><i>[Mont Tremblant: Changed set and map to multiset and multimap.]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG agrees that this guarantee is necessary for common user idioms to work, and that all existing implementations provide this @@ -11804,41 +16319,79 @@ wording.]</i></p> multimap and multiset, not for all associative containers in general.</p> + + + + + <hr> -<a name="373"><h3>373. Are basic_istream and basic_ostream to use (exceptions()&badbit) != 0 ?</h3></a><p><b>Section:</b> 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a>, 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Keith Baker <b>Date:</b> 23 Jul 2002</p> +<h3><a name="373"></a>373. Are basic_istream and basic_ostream to use (exceptions()&badbit) != 0 ?</h3> +<p><b>Section:</b> 27.6.1.2.1 [istream.formatted.reqmts], 27.6.2.6.1 [ostream.formatted.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Keith Baker <b>Date:</b> 2002-07-23</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#istream.formatted.reqmts">issues</a> in [istream.formatted.reqmts].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a> and 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a> +In 27.6.1.2.1 [istream.formatted.reqmts] and 27.6.2.6.1 [ostream.formatted.reqmts] (exception()&badbit) != 0 is used in testing for rethrow, yet -exception() is the constructor to class std::exception in 18.6.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.type.info"> [lib.type.info]</a> that has no return type. Should member function -exceptions() found in 27.4.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ios"> [lib.ios]</a> be used instead? +exception() is the constructor to class std::exception in 18.6.1 [type.info] that has no return type. Should member function +exceptions() found in 27.4.4 [ios] be used instead? </p> + + <p><b>Proposed resolution:</b></p> <p> -In 27.6.1.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.formatted.reqmts"> [lib.istream.formatted.reqmts]</a> and 27.6.2.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.formatted.reqmts"> [lib.ostream.formatted.reqmts]</a>, change +In 27.6.1.2.1 [istream.formatted.reqmts] and 27.6.2.6.1 [ostream.formatted.reqmts], change "(exception()&badbit) != 0" to "(exceptions()&badbit) != 0". </p> + + <p><b>Rationale:</b></p> <p>Fixes an obvious typo.</p> + + + + + <hr> -<a name="375"><h3>375. basic_ios should be ios_base in 27.7.1.3</h3></a><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 14 Aug 2002</p> +<h3><a name="375"></a>375. basic_ios should be ios_base in 27.7.1.3</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-14</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In Section 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>: Table 90, Table 91, and paragraph +In Section 27.7.1.4 [stringbuf.virtuals]: Table 90, Table 91, and paragraph 14 all contain references to "basic_ios::" which should be "ios_base::". </p> + + <p><b>Proposed resolution:</b></p> <p> Change all references to "basic_ios" in Table 90, Table 91, and paragraph 14 to "ios_base". </p> -<p><b>Rationale:</b></p> -<p>Fixes an obvious typo.</p> + + +<p><b>Rationale:</b></p><p>Fixes an obvious typo.</p> + + + + <hr> -<a name="376"><h3>376. basic_streambuf semantics</h3></a><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 14 Aug 2002</p> +<h3><a name="376"></a>376. basic_streambuf semantics</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2002-08-14</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In Section 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a>, Table 90, the implication is that +In Section 27.7.1.4 [stringbuf.virtuals], Table 90, the implication is that the four conditions should be mutually exclusive, but they are not. The first two cases, as written, are subcases of the third.</p> @@ -11847,6 +16400,8 @@ As written, it is unclear what should be the result if cases 1 and 2 are both true, but case 3 is false. </p> + + <p><b>Proposed resolution:</b></p> <p>Rewrite these conditions as:</p> @@ -11868,11 +16423,23 @@ are both true, but case 3 is false. <p>Otherwise</p> </blockquote> + + <p><b>Rationale:</b></p> <p>It's clear what we wanted to say, we just failed to say it. This fixes it.</p> + + + + + <hr> -<a name="379"><h3>379. nonsensical ctype::do_widen() requirement</h3></a><p><b>Section:</b> 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 6 Sep 2002</p> +<h3><a name="379"></a>379. nonsensical ctype::do_widen() requirement</h3> +<p><b>Section:</b> 22.2.1.1.2 [locale.ctype.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#locale.ctype.virtuals">issues</a> in [locale.ctype.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The last sentence in 22.2.1.1.2, p11 below doesn't seem to make sense. </p> @@ -11898,9 +16465,11 @@ I.e., if the narrow character c is not a member of a class of characters then neither is the widened form of c. (To paraphrase footnote 224.) </p> + + <p><b>Proposed resolution:</b></p> <p> -Replace the last sentence of 22.2.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.ctype.virtuals"> [lib.locale.ctype.virtuals]</a>, p11 with the +Replace the last sentence of 22.2.1.1.2 [locale.ctype.virtuals], p11 with the following text: </p> <pre> For any named ctype category with a ctype<char> facet ctc @@ -11910,12 +16479,25 @@ following text: <p><i>[Kona: Minor edit. Added a comma after the <i>M</i> for clarity.]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG believes this is just a typo, and that this is the correct fix.</p> + + + + + <hr> -<a name="380"><h3>380. typos in codecvt tables 53 and 54</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 6 Sep 2002</p> +<h3><a name="380"></a>380. typos in codecvt tables 53 and 54</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Tables 53 and 54 in 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> are both titled "convert +Tables 53 and 54 in 22.2.1.5 [locale.codecvt.byname] are both titled "convert result values," when surely "do_in/do_out result values" must have been intended for Table 53 and "do_unshift result values" for Table 54. @@ -11929,6 +16511,8 @@ sequence). So partial means that space for more than (to_limit - to) destination elements was needed to terminate a sequence given the value of state. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the title of Table 53 to "do_in/do_out result values" and @@ -11939,8 +16523,17 @@ Change the text in Table 54, row 3 (the <b>partial</b> row), under the heading Meaning, to "space for more than (to_limit - to) destination elements was needed to terminate a sequence given the value of state." </p> + + + + <hr> -<a name="381"><h3>381. detection of invalid mbstate_t in codecvt</h3></a><p><b>Section:</b> 22.2.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.codecvt.byname"> [lib.locale.codecvt.byname]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 6 Sep 2002</p> +<h3><a name="381"></a>381. detection of invalid mbstate_t in codecvt</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2002-09-06</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> All but one codecvt member functions that take a state_type argument list as one of their preconditions that the state_type argument have @@ -11956,6 +16549,8 @@ changed. Since the detection of invalid state_type values may be difficult in general or computationally expensive in some specific cases, I propose the following: </p> + + <p><b>Proposed resolution:</b></p> <p> Add a new paragraph before 22.2.1.5.2, p5, and after the function @@ -11982,6 +16577,8 @@ to </p> <pre> an unspecified error has occurred </pre> + + <p><b>Rationale:</b></p> <p>The intent is that implementations should not be required to detect invalid state values; such a requirement appears nowhere else. An @@ -11989,8 +16586,18 @@ invalid state value is a precondition violation, <i>i.e.</i> undefined behavior. Implementations that do choose to detect invalid state values, or that choose to detect any other kind of error, may return <b>error</b> as an indication.</p> + + + + + <hr> -<a name="383"><h3>383. Bidirectional iterator assertion typo</h3></a><p><b>Section:</b> 24.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.bidirectional.iterators"> [lib.bidirectional.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> ysapir (submitted via comp.std.c++) <b>Date:</b> 17 Oct 2002</p> +<h3><a name="383"></a>383. Bidirectional iterator assertion typo</h3> +<p><b>Section:</b> 24.1.4 [bidirectional.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> ysapir (submitted via comp.std.c++) <b>Date:</b> 2002-10-17</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bidirectional.iterators">issues</a> in [bidirectional.iterators].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Following a discussion on the boost list regarding end iterators and the possibility of performing operator--() on them, it seems to me @@ -12040,16 +16647,28 @@ assertions, and basing only on precondition and postconditions, we could not otherwise know this. So it is also interesting information. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the guarantee to "postcondition: r is dereferenceable." </p> -<p><b>Rationale:</b></p> -<p>Fixes an obvious typo</p> + + +<p><b>Rationale:</b></p><p>Fixes an obvious typo</p> + + + + <hr> -<a name="384"><h3>384. equal_range has unimplementable runtime complexity</h3></a><p><b>Section:</b> 25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Hans Bos <b>Date:</b> 18 Oct 2002</p> +<h3><a name="384"></a>384. equal_range has unimplementable runtime complexity</h3> +<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#WP">WP</a> + <b>Submitter:</b> Hans Bos <b>Date:</b> 2002-10-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Section 25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a> +Section 25.3.3.3 [equal.range] states that at most 2 * log(last - first) + 1 comparisons are allowed for equal_range. </p> @@ -12085,28 +16704,41 @@ have log(distance) characteristics when at most match is found in the range but 2log(distance) + 4 for the worst case). </p> + + <p><b>Proposed resolution:</b></p> -<p>In 25.3.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.lower.bound"> [lib.lower.bound]</a>/4, change <tt>log(last - first) + 1</tt> +<p>In 25.3.3.1 [lower.bound]/4, change <tt>log(last - first) + 1</tt> to <tt>log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p> -<p>In 25.3.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.upper.bound"> [lib.upper.bound]</a>/4, change <tt>log(last - first) + 1</tt> +<p>In 25.3.3.2 [upper.bound]/4, change <tt>log(last - first) + 1</tt> to <tt>log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p> -<p>In 25.3.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.equal.range"> [lib.equal.range]</a>/4, change <tt>2*log(last - first) + 1</tt> +<p>In 25.3.3.3 [equal.range]/4, change <tt>2*log(last - first) + 1</tt> to <tt>2*log<sub>2</sub>(last - first) + <i>O</i>(1)</tt>.</p> <p><i>[Matt provided wording]</i></p> + + + <p><b>Rationale:</b></p> <p>The LWG considered just saying <i>O</i>(log n) for all three, but -Ê decided that threw away too much valuable information.Ê The fact -Ê that lower_bound is twice as fast as equal_range is important. -Ê However, it's better to allow an arbitrary additive constant than to -Ê specify an exact count.Ê An exact count would have to -Ê involve <tt>floor</tt> or <tt>ceil</tt>.Ê It would be too easy to -Ê get this wrong, and don't provide any substantial value for users.</p> -<hr> -<a name="386"><h3>386. Reverse iterator's operator[] has impossible return type</h3></a><p><b>Section:</b> 24.4.1.3.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op-="> [lib.reverse.iter.op-=]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 23 Oct 2002</p> -<p>In 24.4.1.3.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.op-="> [lib.reverse.iter.op-=]</a>, <tt>reverse_iterator<>::operator[]</tt> + decided that threw away too much valuable information. The fact + that lower_bound is twice as fast as equal_range is important. + However, it's better to allow an arbitrary additive constant than to + specify an exact count. An exact count would have to + involve <tt>floor</tt> or <tt>ceil</tt>. It would be too easy to + get this wrong, and don't provide any substantial value for users.</p> + + + + +<hr> +<h3><a name="386"></a>386. Reverse iterator's operator[] has impossible return type</h3> +<p><b>Section:</b> 24.4.1.3.11 [reverse.iter.op-=] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2002-10-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> +<p>In 24.4.1.3.11 [reverse.iter.op-=], <tt>reverse_iterator<>::operator[]</tt> is specified as having a return type of <tt>reverse_iterator::reference</tt>, which is the same as <tt>iterator_traits<Iterator>::reference</tt>. (Where <tt>Iterator</tt> is the underlying iterator type.)</p> @@ -12128,9 +16760,11 @@ which is the same as <tt>iterator_traits<Iterator>::reference</tt>. <tt>reverse_iterator</tt> meet this requirement to just mandate it and leave the return type of <tt>operator[]</tt> unspecified.</p> + + <p><b>Proposed resolution:</b></p> -<p>In 24.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.reverse.iter.requirements"> [lib.reverse.iter.requirements]</a> change:</p> +<p>In 24.4.1.2 [reverse.iter.requirements] change:</p> <blockquote> <pre>reference operator[](difference_type n) const; @@ -12140,7 +16774,7 @@ which is the same as <tt>iterator_traits<Iterator>::reference</tt>. <p>to:</p> <blockquote> -<pre><b><i>unspecified</i></b> operator[](difference_type n) const; // see <font color="red">lib.random.access.iterators</font> +<pre><b><i>unspecified</i></b> operator[](difference_type n) const; // see 24.1.5 [random.access.iterators] </pre> </blockquote> @@ -12155,8 +16789,20 @@ Comments from Dave Abrahams: IMO we should resolve 386 by just saying resolution (and I think we should), the return type will be readable and writable, which is about as good as we can do. ]</i></p> + + + + + + <hr> -<a name="389"><h3>389. Const overload of valarray::operator[] returns by value</h3></a><p><b>Section:</b> 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 8 Nov 2002</p> +<h3><a name="389"></a>389. Const overload of valarray::operator[] returns by value</h3> +<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#WP">WP</a> + <b>Submitter:</b> Gabriel Dos Reis <b>Date:</b> 2002-11-08</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#77">77</a></p> +<p><b>Discussion:</b></p> <p>Consider the following program:</p> <pre> #include <iostream> #include <ostream> @@ -12195,9 +16841,11 @@ does hinder existing software (written either in C or Fortran) integration within programs written in C++. There is no reason why subscripting an expression of type valarray<T> that is const-qualified should not return a const T&.</p> + + <p><b>Proposed resolution:</b></p> -<p>In the class synopsis in 26.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.complex"> [lib.complex]</a>, and in -<font color="red">26.3.2.3</font> just above paragraph 1, change</p> +<p>In the class synopsis in 26.5.2 [template.valarray], and in +26.5.2.3 [valarray.access] just above paragraph 1, change</p> <pre> T operator[](size_t const); </pre> <p>to</p> @@ -12207,35 +16855,60 @@ should not return a const T&.</p> <p><i>[Kona: fixed a minor typo: put semicolon at the end of the line wehre it belongs.]</i></p> + + + <p><b>Rationale:</b></p> <p>Return by value seems to serve no purpose. Valaray was explicitly designed to have a specified layout so that it could easily be integrated with libraries in other languages, and return by value defeats that purpose. It is believed that this change will have no impact on allowable optimizations.</p> + + + + + <hr> -<a name="391"><h3>391. non-member functions specified as const</h3></a><p><b>Section:</b> 22.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.conversions"> [lib.conversions]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> James Kanze <b>Date:</b> 10 Dec 2002</p> +<h3><a name="391"></a>391. non-member functions specified as const</h3> +<p><b>Section:</b> 22.1.3.2 [conversions] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> James Kanze <b>Date:</b> 2002-12-10</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The specifications of toupper and tolower both specify the functions as const, althought they are not member functions, and are not specified as -const in the header file synopsis in section 22.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locales"> [lib.locales]</a>. +const in the header file synopsis in section 22.1 [locales]. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 22.1.3.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.conversions"> [lib.conversions]</a>, remove <tt>const</tt> from the function +<p>In 22.1.3.2 [conversions], remove <tt>const</tt> from the function declarations of std::toupper and std::tolower</p> -<p><b>Rationale:</b></p> -<p>Fixes an obvious typo</p> + + +<p><b>Rationale:</b></p><p>Fixes an obvious typo</p> + + + + <hr> -<a name="395"><h3>395. inconsistencies in the definitions of rand() and random_shuffle()</h3></a><p><b>Section:</b> 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> James Kanze <b>Date:</b> 3 Jan 2003</p> +<h3><a name="395"></a>395. inconsistencies in the definitions of rand() and random_shuffle()</h3> +<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#WP">WP</a> + <b>Submitter:</b> James Kanze <b>Date:</b> 2003-01-03</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#c.math">active issues</a> in [c.math].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In 26.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-numerics.html#lib.numarray"> [lib.numarray]</a>, the C++ standard refers to the C standard for the +In 26.7 [c.math], the C++ standard refers to the C standard for the definition of rand(); in the C standard, it is written that "The implementation shall behave as if no library function calls the rand function." </p> <p> -In 25.2.11 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.random.shuffle"> [lib.alg.random.shuffle]</a>, there is no specification as to +In 25.2.12 [alg.random.shuffle], there is no specification as to how the two parameter version of the function generates its random value. I believe that all current implementations in fact call rand() (in contradiction with the requirement avove); if an implementation does @@ -12243,6 +16916,8 @@ not call rand(), there is the question of how whatever random generator it does use is seeded. Something is missing. </p> + + <p><b>Proposed resolution:</b></p> <p> In [lib.c.math], add a paragraph specifying that the C definition of @@ -12257,6 +16932,8 @@ the two argument form of the function, the underlying source of random numbers is implementation defined. [Note: in particular, an implementation is permitted to use <tt>rand</tt>.] </p> + + <p><b>Rationale:</b></p> <p>The original proposed resolution proposed requiring the two-argument from of <tt>random_shuffle</tt> to @@ -12265,10 +16942,20 @@ implementation is permitted to use <tt>rand</tt>.] uses <tt>lrand48</tt>, for example. Using <tt>rand</tt> presents a problem if the number of elements in the sequence is greater than RAND_MAX.</p> + + + + + <hr> -<a name="400"><h3>400. redundant type cast in lib.allocator.members</h3></a><p><b>Section:</b> 20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Markus Mauhart <b>Date:</b> 27 Feb 2003</p> +<h3><a name="400"></a>400. redundant type cast in lib.allocator.members</h3> +<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Markus Mauhart <b>Date:</b> 2003-02-27</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> allocator members, contains +20.6.1.1 [allocator.members] allocator members, contains the following 3 lines: </p> @@ -12281,23 +16968,36 @@ the following 3 lines: The type cast "(T*) p" in the last line is redundant cause we know that std::allocator<T>::pointer is a typedef for T*. </p> + + <p><b>Proposed resolution:</b></p> <p> Replace "((T*) p)" with "p". </p> -<p><b>Rationale:</b></p> -<p>Just a typo, this is really editorial.</p> + + +<p><b>Rationale:</b></p><p>Just a typo, this is really editorial.</p> + + + + <hr> -<a name="402"><h3>402. wrong new expression in [some_]allocator::construct</h3></a><p><b>Section:</b> 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>, 20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a>, <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Markus Mauhart <b>Date:</b> 27 Feb 2003</p> +<h3><a name="402"></a>402. wrong new expression in [some_]allocator::construct</h3> +<p><b>Section:</b> 20.1.2 [allocator.requirements], 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Markus Mauhart <b>Date:</b> 2003-02-27</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> This applies to the new expression that is contained in both par12 of -20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> and in par2 (table 32) of 20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a>. +20.6.1.1 [allocator.members] and in par2 (table 32) of [default.con.req]. I think this new expression is wrong, involving unintended side effects. </p> -<p>20.6.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.allocator.members"> [lib.allocator.members]</a> contains the following 3 lines:</p> +<p>20.6.1.1 [allocator.members] contains the following 3 lines:</p> <pre> 11 Returns: the largest value N for which the call allocate(N,0) might succeed. void construct(pointer p, const_reference val); @@ -12305,7 +17005,7 @@ effects. </pre> -<p>20.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.default.con.req"> [lib.default.con.req]</a> in table 32 has the following line:</p> +<p> [default.con.req] in table 32 has the following line:</p> <pre> a.construct(p,t) Effect: new((void*)p) T(t) </pre> @@ -12335,39 +17035,53 @@ I dont like to speculate about it, but whoever implements any_container<T,any_alloc> and wants to use construct(..) probably must think about it. </p> + + <p><b>Proposed resolution:</b></p> <p> Replace "new" with "::new" in both cases. </p> + + + + + + + <hr> -<a name="403"><h3>403. basic_string::swap should not throw exceptions</h3></a><p><b>Section:</b> 21.3.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::swap"> [lib.string::swap]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 25 Mar 2003</p> +<h3><a name="403"></a>403. basic_string::swap should not throw exceptions</h3> +<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#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2003-03-25</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -std::basic_string, 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> paragraph 2 says that +std::basic_string, 21.3 [basic.string] paragraph 2 says that basic_string "conforms to the requirements of a Sequence, as specified in (23.1.1)." The sequence requirements specified in (23.1.1) to not include any prohibition on swap members throwing exceptions. </p> <p> -Section 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10 does limit conditions under +Section 23.1 [container.requirements] paragraph 10 does limit conditions under which exceptions may be thrown, but applies only to "all container types defined in this clause" and so excludes basic_string::swap because it is defined elsewhere. </p> <p> -Eric Niebler points out that 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> paragraph 5 explicitly +Eric Niebler points out that 21.3 [basic.string] paragraph 5 explicitly permits basic_string::swap to invalidates iterators, which is -disallowed by 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10. Thus the standard would +disallowed by 23.1 [container.requirements] paragraph 10. Thus the standard would be contradictory if it were read or extended to read as having -basic_string meet 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10 requirements. +basic_string meet 23.1 [container.requirements] paragraph 10 requirements. </p> <p> Yet several LWG members have expressed the belief that the original intent was that basic_string::swap should not throw exceptions as -specified by 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10, and that the standard is +specified by 23.1 [container.requirements] paragraph 10, and that the standard is unclear on this issue. The complexity of basic_string::swap is specified as "constant time", indicating the intent was to avoid copying (which could cause a bad_alloc or other exception). An @@ -12377,7 +17091,7 @@ exception-safe code. <p> Note: There remains long standing concern over whether or not it is -possible to reasonably meet the 23.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.requirements"> [lib.container.requirements]</a> paragraph 10 swap +possible to reasonably meet the 23.1 [container.requirements] paragraph 10 swap requirements when allocators are unequal. The specification of basic_string::swap exception requirements is in no way intended to address, prejudice, or otherwise impact that concern. @@ -12387,16 +17101,27 @@ address, prejudice, or otherwise impact that concern. + + <p><b>Proposed resolution:</b></p> <p> -In 21.3.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::swap"> [lib.string::swap]</a>, add a throws clause: +In 21.3.6.8 [string::swap], add a throws clause: </p> <p> Throws: Shall not throw exceptions. </p> + + + + + <hr> -<a name="404"><h3>404. May a replacement allocation function be declared inline?</h3></a><p><b>Section:</b> 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a>, 18.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete"> [lib.new.delete]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 24 Apr 2003</p> +<h3><a name="404"></a>404. May a replacement allocation function be declared inline?</h3> +<p><b>Section:</b> 17.4.3.4 [replacement.functions], 18.5.1 [new.delete] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-04-24</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The eight basic dynamic memory allocation functions (single-object and array versions of ::operator new and ::operator delete, in the @@ -12407,29 +17132,34 @@ in preference to the implementation's definition. <p> Three different parts of the standard mention requirements on -replacement functions: 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a>, 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a> -and 18.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.array"> [lib.new.delete.array]</a>, and 3.7.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.stc.dynamic"> [basic.stc.dynamic]</a>. +replacement functions: 17.4.3.4 [replacement.functions], 18.5.1.1 [new.delete.single] +and 18.5.1.2 [new.delete.array], and 3.7.2 [basic.stc.auto]. </p> <p>None of these three places say whether a replacement function may - be declared inline. 18.5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.new.delete.single"> [lib.new.delete.single]</a> paragraph 2 specifies a + be declared inline. 18.5.1.1 [new.delete.single] paragraph 2 specifies a signature for the replacement function, but that's not enough: the <tt>inline</tt> specifier is not part of a function's signature. - One might also reason from 7.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/dcl.html#dcl.fct.spec"> [dcl.fct.spec]</a> paragraph 2, which + One might also reason from 7.1.2 [dcl.fct.spec] paragraph 2, which requires that "an inline function shall be defined in every translation unit in which it is used," but this may not be quite specific enough either. We should either explicitly allow or explicitly forbid inline replacement memory allocation functions.</p> + + <p><b>Proposed resolution:</b></p> <p> -Add a new sentence to the end of 17.4.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.replacement.functions"> [lib.replacement.functions]</a> paragraph 3: +Add a new sentence to the end of 17.4.3.4 [replacement.functions] paragraph 3: "The program's definitions shall not be specified as <tt>inline</tt>. No diagnostic is required." </p> <p><i>[Kona: added "no diagnostic is required"]</i></p> + + + <p><b>Rationale:</b></p> <p> The fact that <tt>inline</tt> isn't mentioned appears to have been @@ -12438,17 +17168,29 @@ permit inline functions as replacement memory allocation functions. Providing this functionality would be difficult in some cases, and is believed to be of limited value. </p> + + + + + <hr> -<a name="405"><h3>405. qsort and POD</h3></a><p><b>Section:</b> 25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Ray Lischner <b>Date:</b> 08 Apr 2003</p> +<h3><a name="405"></a>405. qsort and POD</h3> +<p><b>Section:</b> 25.4 [alg.c.library] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Ray Lischner <b>Date:</b> 2003-04-08</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.c.library">issues</a> in [alg.c.library].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Section 25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a> describes bsearch and qsort, from the C +Section 25.4 [alg.c.library] describes bsearch and qsort, from the C standard library. Paragraph 4 does not list any restrictions on qsort, but it should limit the base parameter to point to POD. Presumably, qsort sorts the array by copying bytes, which requires POD. </p> + + <p><b>Proposed resolution:</b></p> <p> -In 25.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.c.library"> [lib.alg.c.library]</a> paragraph 4, just after the declarations and +In 25.4 [alg.c.library] paragraph 4, just after the declarations and before the nonnormative note, add these words: "both of which have the same behavior as the original declaration. The behavior is undefined unless the objects in the array pointed to by <i>base</i> are of POD @@ -12457,8 +17199,19 @@ type." <p><i>[Something along these lines is clearly necessary. Matt provided wording.]</i></p> + + + + + + <hr> -<a name="406"><h3>406. vector::insert(s) exception safety</h3></a><p><b>Section:</b> 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 27 Apr 2003</p> +<h3><a name="406"></a>406. vector::insert(s) exception safety</h3> +<p><b>Section:</b> 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2003-04-27</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.modifiers">issues</a> in [vector.modifiers].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> There is a possible defect in the standard: the standard text was never intended to prevent arbitrary ForwardIterators, whose operations @@ -12468,38 +17221,64 @@ passed (and I think most implementations don't use one). As is, the standard appears to impose requirements that aren't met by any existing implementation. </p> + + <p><b>Proposed resolution:</b></p> -<p>Replace 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> paragraph 1 with:</p> -<blockquote> +<p>Replace 23.2.5.4 [vector.modifiers] paragraph 1 with:</p> +<blockquote><p> 1- Notes: Causes reallocation if the new size is greater than the old capacity. If no reallocation happens, all the iterators and references before the insertion point remain valid. If an exception is thrown other than by the copy constructor or assignment operator of T or by any InputIterator operation there are no effects. -</blockquote> +</p></blockquote> <p><i>[We probably need to say something similar for deque.]</i></p> + + + + + + <hr> -<a name="407"><h3>407. Can singular iterators be destroyed?</h3></a><p><b>Section:</b> 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 3 June 2003</p> +<h3><a name="407"></a>407. Can singular iterators be destroyed?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 2003-06-03</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Clause 24.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.requirements"> [lib.iterator.requirements]</a>, paragraph 5, says that the only expression +Clause 24.1 [iterator.requirements], paragraph 5, says that the only expression that is defined for a singular iterator is "an assignment of a non-singular value to an iterator that holds a singular value". This means that destroying a singular iterator (e.g. letting an automatic variable go out of scope) is technically undefined behavior. This seems overly strict, and probably unintentional. </p> + + <p><b>Proposed resolution:</b></p> <p> Change the sentence in question to "... the only exceptions are destroying an iterator that holds a singular value, or the assignment of a non-singular value to an iterator that holds a singular value." </p> + + + + + <hr> -<a name="409"><h3>409. Closing an fstream should clear error state</h3></a><p><b>Section:</b> 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a>, 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Nathan Myers <b>Date:</b> 3 June 2003</p> +<h3><a name="409"></a>409. Closing an fstream should clear error state</h3> +<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#DR">DR</a> + <b>Submitter:</b> Nathan Myers <b>Date:</b> 2003-06-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> -A strict reading of 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> shows that opening or +A strict reading of 27.8.1 [fstreams] shows that opening or closing a basic_[io]fstream does not affect the error bits. This means, for example, that if you read through a file up to EOF, and then close the stream and reopen it at the beginning of the file, @@ -12514,50 +17293,52 @@ unambiguous and consistent, and that we should not make architectural changes in a TC. Now that we're working on a new revision of the language, those considerations no longer apply. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a>, para. 3 from:</p> +<p>Change 27.8.1.9 [ifstream.members], para. 3 from:</p> -<blockquote> +<blockquote><p> Calls rdbuf()->open(s,mode|in). If that function returns a null pointer, calls setstate(failbit) (which may throw ios_base::failure [Footnote: (lib.iostate.flags)]. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote>Calls rdbuf()->open(s,mode|in). If that function returns -a null pointer, calls setstate(failbit) (which may throw +<blockquote><p>Calls rdbuf()->open(s,mode|in). If that function +returns a null pointer, calls setstate(failbit) (which may throw ios_base::failure [Footnote: (lib.iostate.flags)), else calls clear(). -</blockquote> +</p></blockquote> -<p>Change 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a>, para. 3 from:</p> +<p>Change 27.8.1.13 [ofstream.members], para. 3 from:</p> -<blockquote>Calls rdbuf()->open(s,mode|out). If that function +<blockquote><p>Calls rdbuf()->open(s,mode|out). If that function returns a null pointer, calls setstate(failbit) (which may throw ios_base::failure [Footnote: (lib.iostate.flags)). -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote>Calls rdbuf()->open(s,mode|out). If that function +<blockquote><p>Calls rdbuf()->open(s,mode|out). If that function returns a null pointer, calls setstate(failbit) (which may throw ios_base::failure [Footnote: (lib.iostate.flags)), else calls clear(). -</blockquote> +</p></blockquote> -<p>Change 27.8.1.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.members"> [lib.fstream.members]</a>, para. 3 from:</p> +<p>Change 27.8.1.17 [fstream.members], para. 3 from:</p> -<blockquote>Calls rdbuf()->open(s,mode), If that function returns a -null pointer, calls setstate(failbit), (which may throw +<blockquote><p>Calls rdbuf()->open(s,mode), If that function returns +a null pointer, calls setstate(failbit), (which may throw ios_base::failure). (lib.iostate.flags) ) -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote>Calls rdbuf()->open(s,mode), If that function returns a -null pointer, calls setstate(failbit), (which may throw +<blockquote><p>Calls rdbuf()->open(s,mode), If that function returns +a null pointer, calls setstate(failbit), (which may throw ios_base::failure). (lib.iostate.flags) ), else calls clear(). -</blockquote> +</p></blockquote> @@ -12565,23 +17346,38 @@ ios_base::failure). (lib.iostate.flags) ), else calls clear(). provided wording. He suggests having open, not close, clear the error flags.]</i></p> + <p><i>[Post-Sydney: Howard provided a new proposed resolution. The old one didn't make sense because it proposed to fix this at the level of basic_filebuf, which doesn't have access to the stream's error state. Howard's proposed resolution fixes this at the level of the three fstream class template instead.]</i></p> + + + + + + + <hr> -<a name="410"><h3>410. Missing semantics for stack and queue comparison operators</h3></a><p><b>Section:</b> 23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a>, 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Hans Bos <b>Date:</b> 7 Jun 2003</p> +<h3><a name="410"></a>410. Missing semantics for stack and queue comparison operators</h3> +<p><b>Section:</b> 23.2.3.1 [list.cons], 23.2.3.3 [list.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Hans Bos <b>Date:</b> 2003-06-07</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#list.cons">issues</a> in [list.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -Sections 23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a> and 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a> list +Sections 23.2.3.1 [list.cons] and 23.2.3.3 [list.modifiers] list comparison operators (==, !=, <, <=, >, =>) for queue and -stack. Only the semantics for queue::operator== (23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a> par2) and queue::operator< (23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a> +stack. Only the semantics for queue::operator== (23.2.3.1 [list.cons] par2) and queue::operator< (23.2.3.1 [list.cons] par3) are defined. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following new paragraphs after 23.2.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.cons"> [lib.list.cons]</a> +<p>Add the following new paragraphs after 23.2.3.1 [list.cons] paragraph 3:</p> <blockquote> @@ -12604,7 +17400,7 @@ par3) are defined. </blockquote> -<p>Add the following paragraphs at the end of 23.2.3.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.list.modifiers"> [lib.list.modifiers]</a>:</p> +<p>Add the following paragraphs at the end of 23.2.3.3 [list.modifiers]:</p> <blockquote> @@ -12637,13 +17433,26 @@ par3) are defined. <p><i>[Kona: Matt provided wording.]</i></p> + + + <p><b>Rationale:</b></p> -There isn't any real doubt about what these operators are -supposed to do, but we ought to spell it out. +<p>There isn't any real doubt about what these operators are +supposed to do, but we ought to spell it out.</p> + + + + + <hr> -<a name="411"><h3>411. Wrong names of set member functions</h3></a><p><b>Section:</b> 25.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.set.operations"> [lib.alg.set.operations]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Daniel Frey <b>Date:</b> 9 Jul 2003</p> +<h3><a name="411"></a>411. Wrong names of set member functions</h3> +<p><b>Section:</b> 25.3.5 [alg.set.operations] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Daniel Frey <b>Date:</b> 2003-07-09</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.set.operations">issues</a> in [alg.set.operations].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -25.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.set.operations"> [lib.alg.set.operations]</a> paragraph 1 reads: +25.3.5 [alg.set.operations] paragraph 1 reads: "The semantics of the set operations are generalized to multisets in a standard way by defining union() to contain the maximum number of occurrences of every element, intersection() to contain the minimum, and @@ -12654,20 +17463,35 @@ so on." This is wrong. The name of the functions are set_union() and set_intersection(), not union() and intersection(). </p> + + <p><b>Proposed resolution:</b></p> <p>Change that sentence to use the correct names.</p> + + + + + <hr> -<a name="412"><h3>412. Typo in 27.4.4.3</h3></a><p><b>Section:</b> 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 10 Jul 2003</p> +<h3><a name="412"></a>412. Typo in 27.4.4.3</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-07-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#429">429</a></p> +<p><b>Discussion:</b></p> <p> -The Effects clause in 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> paragraph 5 says that the +The Effects clause in 27.4.4.3 [iostate.flags] paragraph 5 says that the function only throws if the respective bits are already set prior to the function call. That's obviously not the intent. The typo ought to be corrected and the text reworded as: "If (<i>state</i> & exceptions()) == 0, returns. ..." </p> + + <p><b>Proposed resolution:</b></p> <p> -In 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> paragraph 5, replace "If (rdstate() & +In 27.4.4.3 [iostate.flags] paragraph 5, replace "If (rdstate() & exceptions()) == 0" with "If ((state | (rdbuf() ? goodbit : badbit)) & exceptions()) == 0". </p> @@ -12678,8 +17502,19 @@ exceptions()) == 0" with "If ((state | (rdbuf() ? goodbit : badbit)) setting the new state, or rdsate() after setting it. We intend the latter, of course. Post-Kona: Martin provided wording.]</i></p> + + + + + + <hr> -<a name="413"><h3>413. Proposed resolution to LDR#64 still wrong</h3></a><p><b>Section:</b> 27.6.1.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream::extractors"> [lib.istream::extractors]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Bo Persson <b>Date:</b> 13 Jul 2003</p> +<h3><a name="413"></a>413. Proposed resolution to LDR#64 still wrong</h3> +<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#DR">DR</a> + <b>Submitter:</b> Bo Persson <b>Date:</b> 2003-07-13</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> The second sentence of the proposed resolution says: </p> @@ -12707,24 +17542,37 @@ this member function must be consistent with that of other extractors.) PJP will provide wording. ]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change the sentence from:</p> -<blockquote> +<blockquote><p> If it inserted no characters because it caught an exception thrown while extracting characters from sb and failbit is on in exceptions(), then the caught exception is rethrown. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> If it inserted no characters because it caught an exception thrown while extracting characters from *this and failbit is on in exceptions(), then the caught exception is rethrown. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="414"><h3>414. Which iterators are invalidated by v.erase()?</h3></a><p><b>Section:</b> 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 19 Aug 2003</p> +<h3><a name="414"></a>414. Which iterators are invalidated by v.erase()?</h3> +<p><b>Section:</b> 23.2.5.4 [vector.modifiers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2003-08-19</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#vector.modifiers">issues</a> in [vector.modifiers].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Consider the following code fragment: </p> @@ -12771,21 +17619,34 @@ from typical implementation techniques. Strict debugging modes, which some programmers find useful, do not use typical implementation techniques.) </p> + + <p><b>Proposed resolution:</b></p> <p> -In 23.2.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.stack"> [lib.stack]</a> paragraph 3, change "Invalidates all the +In 23.2.5.4 [vector.modifiers] paragraph 3, change "Invalidates all the iterators and references after the point of the erase" to "Invalidates iterators and references at or after the point of the erase". </p> + + <p><b>Rationale:</b></p> <p>I believe this was essentially a typographical error, and that it was taken for granted that erasing an element invalidates iterators that point to it. The effects clause in question treats iterators and references in parallel, and it would seem counterintuitive to say that a reference to an erased value remains valid.</p> + + + + + <hr> -<a name="415"><h3>415. behavior of std::ws</h3></a><p><b>Section:</b> 27.6.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.manip"> [lib.istream.manip]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="415"></a>415. behavior of std::ws</h3> +<p><b>Section:</b> 27.6.1.4 [istream.manip] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> According to 27.6.1.4, the ws() manipulator is not required to construct the sentry object. The manipulator is also not a member function so the @@ -12796,24 +17657,106 @@ not cause a tied stream to be flushed before extraction, it doesn't check the stream's exceptions or catch exceptions thrown during input, and it doesn't affect the stream's gcount). </p> + + <p><b>Proposed resolution:</b></p> <p> -Add to 27.6.1.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.manip"> [lib.istream.manip]</a>, immediately before the first sentence +Add to 27.6.1.4 [istream.manip], immediately before the first sentence of paragraph 1, the following text: </p> - <blockquote> + <blockquote><p> Behaves as an unformatted input function (as described in 27.6.1.3, paragraph 1), except that it does not count the number of characters extracted and does not affect the value returned by subsequent calls to is.gcount(). After constructing a sentry object... - </blockquote> + </p></blockquote> <p><i>[Post-Kona: Martin provided wording]</i></p> + + + + + +<hr> +<h3><a name="416"></a>416. definitions of XXX_MIN and XXX_MAX macros in climits</h3> +<p><b>Section:</b> 18.2.2 [c.limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +Given two overloads of the function foo(), one taking an argument of type +int and the other taking a long, which one will the call foo(LONG_MAX) +resolve to? The expected answer should be foo(long), but whether that +is true depends on the #defintion of the LONG_MAX macro, specifically +its type. This issue is about the fact that the type of these macros +is not actually required to be the same as the the type each respective +limit. +<br> + +Section 18.2.2 of the C++ Standard does not specify the exact types of +the XXX_MIN and XXX_MAX macros #defined in the <climits> and <limits.h> +headers such as INT_MAX and LONG_MAX and instead defers to the C standard. +<br> + +Section 5.2.4.2.1, p1 of the C standard specifies that "The values [of +these constants] shall be replaced by constant expressions suitable for use +in #if preprocessing directives. Moreover, except for CHAR_BIT and MB_LEN_MAX, +the following shall be replaced by expressions that have the same type as +would an expression that is an object of the corresponding type converted +according to the integer promotions." +<br> + +The "corresponding type converted according to the integer promotions" for +LONG_MAX is, according to 6.4.4.1, p5 of the C standard, the type of long +converted to the first of the following set of types that can represent it: +int, long int, long long int. So on an implementation where (sizeof(long) +== sizeof(int)) this type is actually int, while on an implementation where +(sizeof(long) > sizeof(int)) holds this type will be long. +<br> + +This is not an issue in C since the type of the macro cannot be detected +by any conforming C program, but it presents a portability problem in C++ +where the actual type is easily detectable by overload resolution. + + </p> +<p><i>[Kona: the LWG does not believe this is a defect. The C macro + definitions are what they are; we've got a better + mechanism, <tt>std::numeric_limits</tt>, that is specified more + precisely than the C limit macros. At most we should add a + nonnormative note recommending that users who care about the exact + types of limit quantities should use <limits> instead of + <climits>.]</i></p> + + + + +<p><b>Proposed resolution:</b></p> + +<p> +Change 18.2.2 [c.limits], paragraph 2: +</p> + +<blockquote><p> +-2- The contents are the same as the Standard C library header <tt><limits.h></tt>. +<ins>[<i>Note:</i> The types of the macros in <tt><climits></tt> are not guaranteed +to match the type to which they refer.<i>--end note</i>]</ins> +</p></blockquote> + + + + + <hr> -<a name="420"><h3>420. is std::FILE a complete type?</h3></a><p><b>Section:</b> 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="420"></a>420. is std::FILE a complete type?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> 7.19.1, p2, of C99 requires that the FILE type only be declared in <stdio.h>. None of the (implementation-defined) members of the @@ -12825,15 +17768,96 @@ C++ says in 27.8.1, p2 that FILE is a type that's defined in <cstdio>. Is it really the intent that FILE be a complete type or is an implementation allowed to just declare it without providing a full definition? </p> + + <p><b>Proposed resolution:</b></p> -<p>In the first sentence of 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> paragraph 2, change +<p>In the first sentence of 27.8.1 [fstreams] paragraph 2, change "defined" to "declared".</p> + + <p><b>Rationale:</b></p> <p>We don't want to impose any restrictions beyond what the C standard already says. We don't want to make anything implementation defined, because that imposes new requirements in implementations.</p> + + + + + +<hr> +<h3><a name="422"></a>422. explicit specializations of member functions of class templates</h3> +<p><b>Section:</b> 17.4.3.1 [reserved.names] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#reserved.names">issues</a> in [reserved.names].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +It has been suggested that 17.4.3.1, p1 may or may not allow programs to +explicitly specialize members of standard templates on user-defined types. +The answer to the question might have an impact where library requirements +are given using the "as if" rule. I.e., if programs are allowed to specialize +member functions they will be able to detect an implementation's strict +conformance to Effects clauses that describe the behavior of the function +in terms of the other member function (the one explicitly specialized by +the program) by relying on the "as if" rule. +</p> + + +<p><b>Proposed resolution:</b></p> + +<p> + Add the following sentence to 17.4.3.1 [reserved.names], p1: +</p> + +<blockquote><p> +It is undefined for a C++ program to add declarations or definitions to +namespace std or namespaces within namespace <tt>std</tt> unless otherwise specified. A +program may add template specializations for any standard library template to +namespace <tt>std</tt>. Such a specialization (complete or partial) of a standard library +template results in undefined behavior unless the declaration depends on a +user-defined type of external linkage and unless the specialization meets the +standard library requirements for the original template.<sup>168)</sup> +<ins>A program has undefined behavior if it declares</ins> +</p> +<ul> +<li><ins>an explicit specialization of any member function of a standard + library class template, or</ins></li> +<li><ins>an explicit specialization of any member function template of a + standard library class or class template, or</ins></li> +<li><ins>an explicit or partial specialization of any member class + template of a standard library class or class template.</ins></li> +</ul> +<p> +A program may explicitly instantiate any templates in the standard library only +if the declaration depends on the name of a user-defined type of external +linkage and the instantiation meets the standard library requirements for the +original template. +</p></blockquote> + +<p><i>[Kona: straw poll was 6-1 that user programs should not be + allowed to specialize individual member functions of standard + library class templates, and that doing so invokes undefined + behavior. Post-Kona: Martin provided wording.]</i></p> + + +<p><i>[Sydney: The LWG agrees that the standard shouldn't permit users +to specialize individual member functions unless they specialize the +whole class, but we're not sure these words say what we want them to; +they could be read as prohibiting the specialization of any standard +library class templates. We need to consult with CWG to make sure we +use the right wording.]</i></p> + + + + + + <hr> -<a name="425"><h3>425. return value of std::get_temporary_buffer</h3></a><p><b>Section:</b> 20.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.help"> [lib.meta.help]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="425"></a>425. return value of std::get_temporary_buffer</h3> +<p><b>Section:</b> 20.6.3 [temporary.buffer] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard is not clear about the requirements on the value returned from a call to get_temporary_buffer(0). In particular, it fails to specify whether @@ -12842,13 +17866,24 @@ operator new), or whether the value is unspecified (as if returned by malloc). The standard also fails to mention what the required behavior is when the argument is less than 0. </p> + + <p><b>Proposed resolution:</b></p> -<p>Change 20.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-utilities.html#lib.meta.help"> [lib.meta.help]</a> paragraph 2 from "...or a pair of 0 +<p>Change 20.4.3 [meta.help] paragraph 2 from "...or a pair of 0 values if no storage can be obtained" to "...or a pair of 0 values if no storage can be obtained or if <i>n</i> <= 0."</p> <p><i>[Kona: Matt provided wording]</i></p> + + + + + <hr> -<a name="426"><h3>426. search_n(), fill_n(), and generate_n() with negative n</h3></a><p><b>Section:</b> 25.1.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.search"> [lib.alg.search]</a>, 25.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.fill"> [lib.alg.fill]</a>, 25.2.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.generate"> [lib.alg.generate]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="426"></a>426. search_n(), fill_n(), and generate_n() with negative n</h3> +<p><b>Section:</b> 25.1.9 [alg.search], 25.2.6 [alg.fill], 25.2.7 [alg.generate] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The complexity requirements for these function templates are incorrect (or don't even make sense) for negative n:</p> @@ -12861,7 +17896,6 @@ of the corresponding predicate.</p> <p>25.2.5, p3 (fill_n): <br> Complexity: Exactly last - first (or n) assignments.</p> -<br> <p>25.2.6, p3 (generate_n): <br> @@ -12871,51 +17905,65 @@ Complexity: Exactly last - first (or n) assignments.</p> In addition, the Requirements or the Effects clauses for the latter two templates don't say anything about the behavior when n is negative. </p> + + <p><b>Proposed resolution:</b></p> <p>Change 25.1.9, p7 to</p> -<blockquote> +<blockquote><p> Complexity: At most (last1 - first1) * count applications of the corresponding predicate if count is positive, or 0 otherwise. -</blockquote> +</p></blockquote> <p>Change 25.2.5, p2 to</p> -<blockquote> +<blockquote><p> Effects: Assigns value through all the iterators in the range [first, last), or [first, first + n) if n is positive, none otherwise. -</blockquote> +</p></blockquote> <p>Change 25.2.5, p3 to:</p> -<blockquote> +<blockquote><p> Complexity: Exactly last - first (or n if n is positive, or 0 otherwise) assignments. -</blockquote> +</p></blockquote> <p> Change 25.2.6, p1 to (notice the correction for the misspelled "through"): </p> -<blockquote> +<blockquote><p> Effects: Invokes the function object genand assigns the return value of gen through all the iterators in the range [first, last), or [first, first + n) if n is positive, or [first, first) otherwise. -</blockquote> +</p></blockquote> <p>Change 25.2.6, p3 to:</p> -<blockquote> +<blockquote><p> Complexity: Exactly last - first (or n if n is positive, or 0 otherwise) assignments. -</blockquote> +</p></blockquote> + + <p><b>Rationale:</b></p> <p>Informally, we want to say that whenever we see a negative number we treat it the same as if it were zero. We believe the above changes do that (although they may not be the minimal way of saying so). The LWG considered and rejected the alternative of saying that negative numbers are undefined behavior.</p> + + + + + <hr> -<a name="428"><h3>428. string::erase(iterator) validity</h3></a><p><b>Section:</b> 21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 18 Sep 2003</p> +<h3><a name="428"></a>428. string::erase(iterator) validity</h3> +<p><b>Section:</b> 21.3.6.5 [string::erase] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-09-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#string::erase">issues</a> in [string::erase].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> 23.1.1, p3 along with Table 67 specify as a prerequisite for a.erase(q) that q must be a valid dereferenceable iterator into the sequence a. @@ -12930,18 +17978,33 @@ p be a valid iterator. This may be interepreted as a relaxation of the general requirement, which is most likely not the intent. </p> + + <p><b>Proposed resolution:</b></p> -<p>Remove 21.3.5.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::erase"> [lib.string::erase]</a> paragraph 5.</p> +<p>Remove 21.3.6.5 [string::erase] paragraph 5.</p> + + <p><b>Rationale:</b></p> <p>The LWG considered two options: changing the string requirements to match the general container requirements, or just removing the erroneous string requirements altogether. The LWG chose the latter option, on the grounds that duplicating text always risks the possibility that it might be duplicated incorrectly.</p> + + + + + <hr> -<a name="432"><h3>432. stringbuf::overflow() makes only one write position available</h3></a><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Christian W Brock <b>Date:</b> 24 Sep 2003</p> +<h3><a name="432"></a>432. stringbuf::overflow() makes only one write position available</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Christian W Brock <b>Date:</b> 2003-09-24</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>27.7.1.3 par 8 says:</p> -<blockquote> +<blockquote><p> Notes: The function can make a write position available only if ( mode & ios_base::out) != 0. To make a write position available, the function reallocates (or initially allocates) an @@ -12950,7 +18013,7 @@ Notes: The function can make a write position available only if If ( mode & ios_base::in) != 0, the function alters the read end pointer egptr() to point just past the new write position (as does the write end pointer epptr()). -</blockquote> +</p></blockquote> <p> The sentences "plus one additional write position." and especially @@ -12958,9 +18021,9 @@ The sentences "plus one additional write position." and especially (and is interpreted by at least my library vendor) as: </p> -<blockquote> +<blockquote><p> post-condition: epptr() == pptr()+1 -</blockquote> +</p></blockquote> <p> This WOULD force sputc() to call the virtual overflow() each time. @@ -12968,20 +18031,22 @@ This WOULD force sputc() to call the virtual overflow() each time. <p>The proposed change also affects Defect Report 169.</p> + + <p><b>Proposed resolution:</b></p> <p>27.7.1.1/2 Change:</p> -<blockquote> +<blockquote><p> 2- Notes: The function allocates no array object. -</blockquote> +</p></blockquote> <p> to: </p> -<blockquote> +<blockquote><p> 2- Postcondition: str() == "". -</blockquote> +</p></blockquote> <p> 27.7.1.1/3 Change: @@ -13154,7 +18219,7 @@ newoff + off to the next pointer xnext . <blockquote> <p> -12- _ If (newoff + off) < 0, or if (newoff + off) refers to an -uninitialized character (as defined in 27.7.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.members"> [lib.stringbuf.members]</a> +uninitialized character (as defined in 27.7.1.3 [stringbuf.members] paragraph 1), the positioning operation fails. Otherwise, the function assigns xbeg + newoff + off to the next pointer xnext . </p> @@ -13165,6 +18230,9 @@ assigns xbeg + newoff + off to the next pointer xnext . proposed resolution didn't say enough about the effect of various member functions on the underlying character sequences.]</i></p> + + + <p><b>Rationale:</b></p> <p>The current basic_stringbuf description is over-constrained in such a way as to prohibit vendors from making this the high-performance @@ -13209,14 +18277,27 @@ trailing parenthetical comment concerning epptr().</p> longer allowable since [pbase(), epptr()) may now contain uninitialized characters. Positioning is only allowable over the initialized range.</p> + + + + + <hr> -<a name="434"><h3>434. bitset::to_string() hard to use</h3></a><p><b>Section:</b> 23.3.5.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.members"> [lib.bitset.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Oct 2003</p> +<h3><a name="434"></a>434. bitset::to_string() hard to use</h3> +<p><b>Section:</b> 23.3.5.2 [bitset.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-10-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.members">issues</a> in [bitset.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> It has been pointed out a number of times that the bitset to_string() member function template is tedious to use since callers must explicitly specify the entire template argument list (3 arguments). At least two implementations provide a number of overloads of this template to make it easier to use. </p> + + + <p><b>Proposed resolution:</b></p> <p>In order to allow callers to specify no template arguments at all, just the first one (charT), or the first 2 (charT and traits), in addition to all @@ -13249,8 +18330,20 @@ to_string() member function template:</p> right choice. ]</i></p> + + + + + + + <hr> -<a name="435"><h3>435. bug in DR 25</h3></a><p><b>Section:</b> 21.3.7.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string.io"> [lib.string.io]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Oct 2003</p> +<h3><a name="435"></a>435. bug in DR 25</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-10-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> It has been pointed out that the proposed resolution in DR 25 may not be @@ -13273,22 +18366,25 @@ to less than the length of the string doesn't truncate it on output. This is also the behavior of most implementations (except for SGI's standard iostreams where the operator does truncate). </p> + + + <p><b>Proposed resolution:</b></p> <p>Change the text in 21.3.7.9, p4 from</p> - <blockquote> + <blockquote><p> If bool(k) is true, inserts characters as if by calling os.rdbuf()->sputn(str.data(), n), padding as described in stage 3 of lib.facet.num.put.virtuals, where n is the larger of os.width() and str.size(); - </blockquote> + </p></blockquote> <p>to</p> - <blockquote> + <blockquote><p> If bool(k) is true, determines padding as described in lib.facet.num.put.virtuals, and then inserts the resulting sequence of characters <tt>seq</tt> as if by calling <tt>os.rdbuf()->sputn(seq, n)</tt>, where <tt>n</tt> is the larger of <tt>os.width()</tt> and <tt>str.size()</tt>; - </blockquote> + </p></blockquote> <p><i>[Kona: it appears that neither the original wording, DR25, nor the proposed resolution, is quite what we want. We want to say that @@ -13299,8 +18395,18 @@ iostreams where the operator does truncate). the character sequence is, and then defer to clause 22. Post-Kona: Benjamin provided wording.]</i></p> + + + + + + <hr> -<a name="436"><h3>436. are cv-qualified facet types valid facets?</h3></a><p><b>Section:</b> 22.1.1.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.facet"> [lib.locale.facet]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Oct 2003</p> +<h3><a name="436"></a>436. are cv-qualified facet types valid facets?</h3> +<p><b>Section:</b> 22.1.1.1.2 [locale.facet] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2003-10-15</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Is "const std::ctype<char>" a valid template argument to has_facet, use_facet, and the locale template ctor? And if so, does it designate the same Facet as @@ -13308,6 +18414,8 @@ the non-const "std::ctype<char>?" What about "volatile std::ctype<char& Different implementations behave differently: some fail to compile, others accept such types but behave inconsistently. </p> + + <p><b>Proposed resolution:</b></p> <p>Change 22.1.1.1.2, p1 to read:</p> @@ -13322,10 +18430,20 @@ template parameter.</p> <p><i>[Kona: changed the last sentence from a footnote to normative text.]</i></p> + + + + + <hr> -<a name="438"><h3>438. Ambiguity in the "do the right thing" clause</h3></a><p><b>Section:</b> 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 20 Oct 2003</p> +<h3><a name="438"></a>438. Ambiguity in the "do the right thing" clause</h3> +<p><b>Section:</b> 23.1.1 [sequence.reqmts] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2003-10-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> -<p>Section 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a>, paragraphs 9-11, fixed up the problem +<p>Section 23.1.1 [sequence.reqmts], paragraphs 9-11, fixed up the problem noticed with statements like:</p> <pre>vector<int> v(10, 1); </pre> @@ -13347,10 +18465,10 @@ member template constructor will have the same effect as:</p> <p>(and similarly for the other member template functions of sequences).</p> <p>There is also a note that describes one implementation technique:</p> -<blockquote> +<blockquote><p> One way that sequence implementors can satisfy this requirement is to specialize the member template for every integral type. -</blockquote> +</p></blockquote> <p>This might look something like:</p> <blockquote> @@ -13387,9 +18505,9 @@ vector<int>::vector(unsigned, unsigned) { ... } <p>Label this solution 'A'.</p> <p>The standard also says:</p> -<blockquote> +<blockquote><p> Less cumbersome implementation techniques also exist. -</blockquote> +</p></blockquote> <p> A popular technique is to not specialize as above, but instead catch every call with the member template, detect the type of InputIterator, @@ -13519,9 +18637,11 @@ T implicit_cast(const U& u) </pre> </blockquote> + + <p><b>Proposed resolution:</b></p> -Replace 23.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.sequence.reqmts"> [lib.sequence.reqmts]</a> paragraphs 9 - 11 with: +<p>Replace 23.1.1 [sequence.reqmts] paragraphs 9 - 11 with:</p> <p>For every sequence defined in this clause and in clause lib.strings:</p> @@ -13588,6 +18708,7 @@ straw poll (1-6-1), we chose to require a compile time error. Post-Kona: Howard provided wording. ]</i></p> + <p><i>[ Sydney: The LWG agreed with this general direction, but there was some discomfort with the wording in the original proposed resolution. @@ -13595,11 +18716,15 @@ Howard submitted new wording, and we will review this again in Redmond. ]</i></p> + <p><i>[Redmond: one very small change in wording: the first argument is cast to size_t. This fixes the problem of something like <tt>vector<vector<int> >(5, 5)</tt>, where int is not implicitly convertible to the value type.]</i></p> + + + <p><b>Rationale:</b></p> <p>The proposed resolution fixes:</p> @@ -13645,47 +18770,98 @@ in the above example if the B(A) constructor is qualified explicit, then the implementation must reject the constructor as A is no longer implicitly convertible to B. </p> + + + + + <hr> -<a name="441"><h3>441. Is fpos::state const?</h3></a><p><b>Section:</b> 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Vincent Leloup <b>Date:</b> 17 Nov 2003</p> +<h3><a name="441"></a>441. Is fpos::state const?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In section 27.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.members"> [lib.fpos.members]</a> fpos<stateT>::state() is declared -non const, but in section 27.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos"> [lib.fpos]</a> it is declared const. +In section 27.4.3.1 [fpos.members] fpos<stateT>::state() is declared +non const, but in section 27.4.3 [fpos] it is declared const. </p> + + <p><b>Proposed resolution:</b></p> <p> -In section 27.4.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fpos.members"> [lib.fpos.members]</a>, change the declaration of +In section 27.4.3.1 [fpos.members], change the declaration of <tt>fpos<stateT>::state()</tt> to const. </p> + + + + + <hr> -<a name="442"><h3>442. sentry::operator bool() inconsistent signature</h3></a><p><b>Section:</b> 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Vincent Leloup <b>Date:</b> 18 Nov 2003</p> +<h3><a name="442"></a>442. sentry::operator bool() inconsistent signature</h3> +<p><b>Section:</b> 27.6.2.4 [ostream::sentry] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-18</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#ostream::sentry">active issues</a> in [ostream::sentry].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream::sentry">issues</a> in [ostream::sentry].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In section 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> paragraph 4, in description part +In section 27.6.2.4 [ostream::sentry] paragraph 4, in description part basic_ostream<charT, traits>::sentry::operator bool() is declared as non const, but in section 27.6.2.3, in synopsis it is declared const. </p> + + <p><b>Proposed resolution:</b></p> <p> -In section 27.6.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream::sentry"> [lib.ostream::sentry]</a> paragraph 4, change the declaration +In section 27.6.2.4 [ostream::sentry] paragraph 4, change the declaration of <tt>sentry::operator bool()</tt> to const. </p> + + + + + <hr> -<a name="443"><h3>443. filebuf::close() inconsistent use of EOF</h3></a><p><b>Section:</b> 27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Vincent Leloup <b>Date:</b> 20 Nov 2003</p> +<h3><a name="443"></a>443. filebuf::close() inconsistent use of EOF</h3> +<p><b>Section:</b> 27.8.1.4 [filebuf.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-20</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#filebuf.members">active issues</a> in [filebuf.members].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#filebuf.members">issues</a> in [filebuf.members].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In section 27.8.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.filebuf.members"> [lib.filebuf.members]</a> par6, in effects description of +In section 27.8.1.4 [filebuf.members] par6, in effects description of basic_filebuf<charT, traits>::close(), overflow(EOF) is used twice; should be overflow(traits::eof()). </p> + + <p><b>Proposed resolution:</b></p> <p> Change overflow(EOF) to overflow(traits::eof()). </p> + + + + + <hr> -<a name="444"><h3>444. Bad use of casts in fstream</h3></a><p><b>Section:</b> 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Vincent Leloup <b>Date:</b> 20 Nov 2003</p> -<p> -27.8.1.7 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ifstream.members"> [lib.ifstream.members]</a> p1, 27.8.1.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ofstream.members"> [lib.ofstream.members]</a> p1, 27.8.1.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.members"> [lib.fstream.members]</a> p1 seems have same problem as exposed in LWG issue +<h3><a name="444"></a>444. Bad use of casts in fstream</h3> +<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#DR">DR</a> + <b>Submitter:</b> Vincent Leloup <b>Date:</b> 2003-11-20</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> +<p>27.8.1.9 [ifstream.members] p1, 27.8.1.13 [ofstream.members] p1, +27.8.1.17 [fstream.members] p1 seems have same problem as exposed in +LWG issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#252">252</a>. </p> + + <p><b>Proposed resolution:</b></p> <p><i>[Sydney: Genuine defect. 27.8.1.13 needs a cast to cast away @@ -13693,40 +18869,50 @@ Change overflow(EOF) to overflow(traits::eof()). C-style casts to const_cast. Post-Sydney: Howard provided wording. ]</i></p> + <p>Change 27.8.1.7/1 from:</p> -<blockquote> +<blockquote><p> Returns: (basic_filebuf<charT,traits>*)&sb. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> Returns: const_cast<basic_filebuf<charT,traits>*>(&sb). -</blockquote> +</p></blockquote> <p>Change 27.8.1.10/1 from:</p> -<blockquote> +<blockquote><p> Returns: (basic_filebuf<charT,traits>*)&sb. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> Returns: const_cast<basic_filebuf<charT,traits>*>(&sb). -</blockquote> +</p></blockquote> <p>Change 27.8.1.13/1 from:</p> -<blockquote> +<blockquote><p> Returns: &sb. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> Returns: const_cast<basic_filebuf<charT,traits>*>(&sb). -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="445"><h3>445. iterator_traits::reference unspecified for some iterator categories</h3></a><p><b>Section:</b> 24.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.traits"> [lib.iterator.traits]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 9 Dec 2003</p> +<h3><a name="445"></a>445. iterator_traits::reference unspecified for some iterator categories</h3> +<p><b>Section:</b> 24.3.1 [iterator.traits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2003-12-09</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> The standard places no restrictions at all on the reference type of input, output, or forward iterators (for forward iterators it @@ -13760,9 +18946,8 @@ and V is its value_type </ul> <p>A mutable forward iterator ought to satisfy, for x of type V:</p> - <li> - { R r = *a; r = x; } is equivalent to *a = x; - </li> + <pre> { R r = *a; r = x; } is equivalent to *a = x; + </pre> <p> I think these requirements capture existing container iterators @@ -13817,49 +19002,51 @@ so I've changed the wording to say that those types may be <tt>void</tt>. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 24.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.traits"> [lib.iterator.traits]</a>, after:</p> +<p>In 24.3.1 [iterator.traits], after:</p> -<blockquote> +<blockquote><p> be defined as the iterator's difference type, value type and iterator category, respectively. -</blockquote> +</p></blockquote> <p>add</p> -<blockquote> -In addition, the types +<blockquote><p> +In addition, the types</p> <pre>iterator_traits<Iterator>::reference iterator_traits<Iterator>::pointer </pre> -must be defined as the iterator's reference and pointer types, that +<p>must be defined as the iterator's reference and pointer types, that is, the same type as the type of <tt>*a</tt> and <tt>a-></tt>, -respectively. +respectively.</p> </blockquote> -<p>In 24.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.iterator.traits"> [lib.iterator.traits]</a>, change:</p> +<p>In 24.3.1 [iterator.traits], change:</p> -<blockquote> -In the case of an output iterator, the types +<blockquote><p> +In the case of an output iterator, the types</p> <pre>iterator_traits<Iterator>::difference_type iterator_traits<Iterator>::value_type </pre> -are both defined as <tt>void</tt>. +<p>are both defined as <tt>void</tt>.</p> </blockquote> <p>to:</p> -<blockquote> -In the case of an output iterator, the types +<blockquote><p> +In the case of an output iterator, the types</p> <pre>iterator_traits<Iterator>::difference_type iterator_traits<Iterator>::value_type iterator_traits<Iterator>::reference iterator_traits<Iterator>::pointer </pre> -may be defined as <tt>void</tt>. +<p>may be defined as <tt>void</tt>.</p> </blockquote> -<p>In 24.5.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.istreambuf.iterator"> [lib.istreambuf.iterator]</a>, change:</p> +<p>In 24.5.3 [istreambuf.iterator], change:</p> <blockquote> <pre>typename traits::off_type, charT*, charT&> </pre> @@ -13877,50 +19064,88 @@ reviewed iterators in the standard and confirmed that nothing else needed to be changed. ]</i></p> + + + + + + + + <hr> -<a name="448"><h3>448. Random Access Iterators over abstract classes</h3></a><p><b>Section:</b> 24.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.random.access.iterators"> [lib.random.access.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 7 Jan 2004</p> +<h3><a name="448"></a>448. Random Access Iterators over abstract classes</h3> +<p><b>Section:</b> 24.1.5 [random.access.iterators] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-01-07</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#random.access.iterators">issues</a> in [random.access.iterators].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Table 76, the random access iterator requirement table, says that the return type of a[n] must be "convertible to T". When an iterator's value_type T is an abstract class, nothing is convertible to T. Surely this isn't an intended restriction? </p> + + <p><b>Proposed resolution:</b></p> <p> Change the return type to "convertible to T const&". </p> + + + + + <hr> -<a name="449"><h3>449. Library Issue 306 Goes Too Far</h3></a><p><b>Section:</b> 18.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.support.types"> [lib.support.types]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Pete Becker <b>Date:</b> 15 Jan 2004</p> +<h3><a name="449"></a>449. Library Issue 306 Goes Too Far</h3> +<p><b>Section:</b> 18.1 [support.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Pete Becker <b>Date:</b> 2004-01-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#support.types">issues</a> in [support.types].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Original text:</p> -<blockquote> +<blockquote><p> The macro offsetof accepts a restricted set of type arguments in this International Standard. type shall be a POD structure or a POD union (clause 9). The result of applying the offsetof macro to a field that is a static data member or a function member is undefined." -</blockquote> +</p></blockquote> <p>Revised text:</p> -<blockquote> +<blockquote><p> "If type is not a POD structure or a POD union the results are undefined." -</blockquote> +</p></blockquote> <p> Looks to me like the revised text should have replaced only the second sentence. It doesn't make sense standing alone. </p> + + <p><b>Proposed resolution:</b></p> <p>Change 18.1, paragraph 5, to:</p> -<blockquote> +<blockquote><p> The macro offsetof accepts a restricted set of type arguments in this International Standard. If type is not a POD structure or a POD union the results are undefined. The result of applying the offsetof macro to a field that is a static data member or a function member is undefined." -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="453"></a><h3><a name="453">453. basic_stringbuf::seekoff need not always fail for an empty stream</a></h3><p><b>Section:</b> 27.7.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.stringbuf.virtuals"> [lib.stringbuf.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> +<h3><a name="453"></a>453. basic_stringbuf::seekoff need not always fail for an empty stream</h3> +<p><b>Section:</b> 27.7.1.4 [stringbuf.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#stringbuf.virtuals">active issues</a> in [stringbuf.virtuals].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#stringbuf.virtuals">issues</a> in [stringbuf.virtuals].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <pre> pos_type basic_stringbuf::seekoff(off_type, ios_base::seekdir, ios_base::openmode); </pre> @@ -13934,23 +19159,36 @@ an effective offset of zero.</p> legal. Bill will provide wording. ]</i></p> + + + <p><b>Proposed resolution:</b></p> <p>Change the sentence from:</p> -<blockquote> +<blockquote><p> For a sequence to be positioned, if its next pointer (either gptr() or pptr()) is a null pointer, the positioning operation fails. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> For a sequence to be positioned, if its next pointer (either gptr() or pptr()) is a null pointer and the new offset newoff is nonzero, the positioning operation fails. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="455"><h3>455. cerr::tie() and wcerr::tie() are overspecified</h3></a><p><b>Section:</b> 27.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostream.objects"> [lib.iostream.objects]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 30 Jan 2004</p> +<h3><a name="455"></a>455. cerr::tie() and wcerr::tie() are overspecified</h3> +<p><b>Section:</b> 27.3 [iostream.objects] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#iostream.objects">issues</a> in [iostream.objects].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> Both cerr::tie() and wcerr::tie() are obliged to be null at program startup. This is overspecification and overkill. It is both traditional @@ -13958,28 +19196,181 @@ and useful to tie cerr to cout, to ensure that standard output is drained whenever an error message is written. This behavior should at least be permitted if not required. Same for wcerr::tie(). </p> + + <p><b>Proposed resolution:</b></p> <p>Add to the description of cerr:</p> -<blockquote> +<blockquote><p> After the object cerr is initialized, cerr.tie() returns &cout. Its state is otherwise the same as required for basic_ios<char>::init (lib.basic.ios.cons). -</blockquote> +</p></blockquote> <p>Add to the description of wcerr:</p> -<blockquote> +<blockquote><p> After the object wcerr is initialized, wcerr.tie() returns &wcout. Its state is otherwise the same as required for basic_ios<wchar_t>::init (lib.basic.ios.cons). -</blockquote> +</p></blockquote> <p><i>[Sydney: straw poll (3-1): we should <i>require</i>, not just permit, cout and cerr to be tied on startup. Pre-Redmond: Bill will provide wording.]</i></p> + + + + + + +<hr> +<h3><a name="456"></a>456. Traditional C header files are overspecified</h3> +<p><b>Section:</b> 17.4.1.2 [headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-01-30</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#headers">issues</a> in [headers].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> + +<p>The C++ Standard effectively requires that the traditional C headers +(of the form <xxx.h>) be defined in terms of the newer C++ +headers (of the form <cxxx>). Clauses 17.4.1.2/4 and D.5 combine +to require that:</p> + +<ul> + <li>Including the header <cxxx> declares a C name in namespace std.</li> + + <li> Including the header <xxx.h> declares a C name in namespace std + (effectively by including <cxxx>), then imports it into the global + namespace with an individual using declaration.</li> +</ul> + +<p> +The rules were left in this form despited repeated and heated objections +from several compiler vendors. The C headers are often beyond the direct +control of C++ implementors. In some organizations, it's all they can do +to get a few #ifdef __cplusplus tests added. Third-party library vendors +can perhaps wrap the C headers. But neither of these approaches supports +the drastic restructuring required by the C++ Standard. As a result, it is +still widespread practice to ignore this conformance requirement, nearly +seven years after the committee last debated this topic. Instead, what is +often implemented is: +</p> + +<ul> + <li> Including the header <xxx.h> declares a C name in the + global namespace.</li> + + <li> Including the header <cxxx> declares a C name in the + global namespace (effectively by including <xxx.h>), then + imports it into namespace std with an individual using declaration.</li> +</ul> + +<p> +The practical benefit for implementors with the second approach is that +they can use existing C library headers, as they are pretty much obliged +to do. The practical cost for programmers facing a mix of implementations +is that they have to assume weaker rules:</p> + +<ul> + <li> If you want to assuredly declare a C name in the global + namespace, include <xxx.h>. You may or may not also get the + declaration in namespace std.</li> + + <li> If you want to assuredly declare a C name in namespace std, + include <cxxx>. You may or may not also get the declaration in + the global namespace.</li> +</ul> + +<p> +There also exists the <i>possibility</i> of subtle differences due to +Koenig lookup, but there are so few non-builtin types defined in the C +headers that I've yet to see an example of any real problems in this +area. +</p> + +<p> +It is worth observing that the rate at which programmers fall afoul of +these differences has remained small, at least as measured by newsgroup +postings and our own bug reports. (By an overwhelming margin, the +commonest problem is still that programmers include <string> and can't +understand why the typename string isn't defined -- this a decade after +the committee invented namespace std, nominally for the benefit of all +programmers.) +</p> + +<p> +We should accept the fact that we made a serious mistake and rectify it, +however belatedly, by explicitly allowing either of the two schemes for +declaring C names in headers. +</p> + +<p><i>[Sydney: This issue has been debated many times, and will + certainly have to be discussed in full committee before any action + can be taken. However, the preliminary sentiment of the LWG was in + favor of the change. (6 yes, 0 no, 2 abstain) Robert Klarer + suggests that we might also want to undeprecate the + C-style <tt>.h</tt> headers.]</i></p> + + + + +<p><b>Proposed resolution:</b></p> +<p> +Add to 17.4.1.2 [headers], para. 4: +</p> + +<blockquote><p> +Except as noted in clauses 18 through 27 and Annex D, the contents of each +header <i>cname</i> shall be the same as that of the corresponding header +<i>name.h</i>, as specified in ISO/IEC 9899:1990 Programming Languages C (Clause +7), or ISO/IEC:1990 Programming Languages-C AMENDMENT 1: C Integrity, (Clause +7), as appropriate, as if by inclusion. In the C++ Standard Library, however, +the declarations <del>and definitions</del> (except for names which are defined +as macros in C) are within namespace scope (3.3.5) of the namespace std. +<ins>It is unspecified whether these names are first declared within the global +namespace scope and are then injected into namespace std by explicit +using-declarations (7.3.3 [namespace.udecl]).</ins> +</p></blockquote> + +<p> +Change D.5 [depr.c.headers], para. 2-3: +</p> + +<blockquote> +<p> +-2- Every C header, each of which has a name of the form <i>name.h</i>, behaves +as if each name placed in the Standard library namespace by the corresponding +<i>cname</i> header is <del>also</del> placed within the <ins>global</ins> +namespace scope<ins>.</ins> <del>of the namespace <tt>std</tt> and is followed +by an explicit <i>using-declaration</i> (7.3.3 [namespace.udecl]).</del> +<ins>It is unspecified whether these names are first declared or defined within +namespace scope (3.3.5 [basic.scope.namespace]) of the namespace +<tt>std</tt> and are then injected into the global namespace scope by explicit +using-declarations (7.3.3 [namespace.udecl]).</ins> +</p> +<p> +-3- [<i>Example:</i> The header <tt><cstdlib></tt> <ins>assuredly</ins> +provides its declarations and definitions within the namespace <tt>std</tt>. +<ins>It may also provide these names within the global namespace.</ins> The +header <tt><stdlib.h></tt> <del>makes these available also in</del> +<ins>assuredly provides the same declarations and definitions within</ins> the +global namespace, much as in the C Standard. <ins>It may also provide these +names within the namespace <tt>std</tt>.</ins> <i>-- end example</i>] +</p> +</blockquote> + + + + + <hr> -<a name="457"><h3>457. bitset constructor: incorrect number of initialized bits</h3></a><p><b>Section:</b> 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Dag Henriksson <b>Date:</b> 30 Jan 2004</p> +<h3><a name="457"></a>457. bitset constructor: incorrect number of initialized bits</h3> +<p><b>Section:</b> 23.3.5.1 [bitset.cons] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Dag Henriksson <b>Date:</b> 2004-01-30</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#bitset.cons">issues</a> in [bitset.cons].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> The constructor from unsigned long says it initializes "the first M bit positions to the corresponding bit values in val. M is the smaller @@ -13992,15 +19383,27 @@ sizeof (unsigned long) does not give us the number of bits an unsigned long uses to hold the value. Thus, the first M bit position above is not guaranteed to have any corresponding bit values in val. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 23.3.5.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.bitset.cons"> [lib.bitset.cons]</a> paragraph 2, change "M is the smaller of +<p>In 23.3.5.1 [bitset.cons] paragraph 2, change "M is the smaller of N and the value CHAR_BIT * sizeof (unsigned long). (249)" to "<tt>M</tt> is the smaller of <tt>N</tt> and the number of bits in - the value representation (section 3.9 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/basic.html#basic.types"> [basic.types]</a>) of <tt>unsigned + the value representation (section 3.9 [basic.types]) of <tt>unsigned long</tt>." </p> + + + + + <hr> -<a name="460"><h3>460. Default modes missing from basic_fstream member specifications</h3></a><p><b>Section:</b> 27.8.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstreams"> [lib.fstreams]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Ben Hutchings <b>Date:</b> 1 Apr 2004</p> +<h3><a name="460"></a>460. Default modes missing from basic_fstream member specifications</h3> +<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#DR">DR</a> + <b>Submitter:</b> Ben Hutchings <b>Date:</b> 2004-04-01</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> The second parameters of the non-default constructor and of the open member function for basic_fstream, named "mode", are optional @@ -14010,22 +19413,34 @@ specifications of these members in 27.8.1.12 [lib.fstream.cons] and constructor declaration has the "explicit" function-specifier implying that it is intended to be callable with one argument. </p> + + <p><b>Proposed resolution:</b></p> -<p>In 27.8.1.12 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.cons"> [lib.fstream.cons]</a>, change</p> +<p>In 27.8.1.15 [fstream.cons], change</p> <pre> explicit basic_fstream(const char* s, ios_base::openmode mode); </pre> <p>to</p> <pre> explicit basic_fstream(const char* s, ios_base::openmode mode = ios_base::in|ios_base::out); </pre> -<p>In 27.8.1.13 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.fstream.members"> [lib.fstream.members]</a>, change</p> +<p>In 27.8.1.17 [fstream.members], change</p> <pre> void open(const char*s, ios_base::openmode mode); </pre> <p>to</p> - void open(const char*s, +<pre> void open(const char*s, ios_base::openmode mode = ios_base::in|ios_base::out); +</pre> + + + + + <hr> -<a name="461"><h3>461. time_get hard or impossible to implement</h3></a><p><b>Section:</b> 22.2.5.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.locale.time.get.virtuals"> [lib.locale.time.get.virtuals]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Bill Plauger <b>Date:</b> 23 Mar 2004</p> +<h3><a name="461"></a>461. time_get hard or impossible to implement</h3> +<p><b>Section:</b> 22.2.5.1.2 [locale.time.get.virtuals] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Bill Plauger <b>Date:</b> 2004-03-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Template time_get currently contains difficult, if not impossible, requirements for do_date_order, do_get_time, and do_get_date. All require @@ -14045,12 +19460,12 @@ Note that this is the <i>opposite</i> effect from the intent stated in the footnote earlier in this subclause: </p> -<blockquote> +<blockquote><p> "In other words, user confirmation is required for reliable parsing of user-entered dates and times, but machine-generated formats can be parsed reliably. This allows parsers to be aggressive about interpreting user variations on standard formats." -</blockquote> +</p></blockquote> <p> We should give both implementers and users an easier and more reliable @@ -14059,6 +19474,8 @@ what the default date order is for no_order. For backward compatibility, and maximum latitude, we can permit an implementation to parse whatever %x or %X generates, but we shouldn't require it. </p> + + <p><b>Proposed resolution:</b></p> <p><b>In the description:</b></p> @@ -14089,32 +19506,47 @@ encounters an error. </pre> <p>to</p> -iter_type do_get_date(iter_type s, iter_type end, ios_base& str, +<pre>iter_type do_get_date(iter_type s, iter_type end, ios_base& str, ios_base::iostate& err, tm* t) const; +</pre> +<p> 4 Effects: Reads characters starting at s until it has extracted those struct tm members, and remaining format characters, used by time_put<>::put to produce one of the following formats, or until it encounters an error. The format depends on the value returned by date_order() as follows: +</p> - date_order() format +<pre> date_order() format no_order "%m/%d/%y" dmy "%d/%m/%y" mdy "%m/%d/%y" ymd "%y/%m/%d" ydm "%y/%d/%m" - +</pre> +<p> An implementation may also accept additional implementation-defined formats. -<pre></pre> +</p> <p><i>[Redmond: agreed that this is a real problem. The solution is probably to match C99's parsing rules. Bill provided wording. ]</i></p> + + + + + + <hr> -<a name="464"><h3>464. Suggestion for new member functions in standard containers</h3></a><p><b>Section:</b> 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Thorsten Ottosen <b>Date:</b> 12 May 2004</p> +<h3><a name="464"></a>464. Suggestion for new member functions in standard containers</h3> +<p><b>Section:</b> 23.2.5 [vector], 23.3.1 [map] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Thorsten Ottosen <b>Date:</b> 2004-05-12</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>To add slightly more convenience to vector<T> and map<Key,T> we should consider to add</p> <ol> @@ -14137,15 +19569,17 @@ at() (which will then throw if the vector is empty). </li> <li>when it should be considered an error if a key is not in the map</li> </ul> + + <p><b>Proposed resolution:</b></p> -<p>In 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>, add the following to the <tt>vector</tt> +<p>In 23.2.5 [vector], add the following to the <tt>vector</tt> synopsis after "element access" and before "modifiers":</p> <pre> // <i>[lib.vector.data] data access</i> pointer data(); const_pointer data() const; </pre> -<p>Add a new subsection of 23.2.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.container.adaptors"> [lib.container.adaptors]</a>:</p> +<p>Add a new subsection of 23.2.5 [vector]:</p> <blockquote> <p>23.2.4.x <tt>vector</tt> data access</p> <pre> pointer data(); @@ -14157,13 +19591,13 @@ at() (which will then throw if the vector is empty). </li> <p><b>Throws:</b> Nothing.</p> </blockquote> -<p>In 23.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map"> [lib.map]</a>, add the following to the <tt>map</tt> +<p>In 23.3.1 [map], add the following to the <tt>map</tt> synopsis immediately after the line for operator[]:</p> <pre> T& at(const key_type& x); const T& at(const key_type& x) const; </pre> -<p>Add the following to 23.3.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.map.access"> [lib.map.access]</a>:</p> +<p>Add the following to 23.3.1.2 [map.access]:</p> <blockquote> <pre> T& at(const key_type& x); const T& at(const key_type& x) const; @@ -14175,17 +19609,29 @@ synopsis immediately after the line for operator[]:</p> </blockquote> + + <p><b>Rationale:</b></p> <p>Neither of these additions provides any new functionality but the LWG agreed that they are convenient, especially for novices. The exception type chosen for <tt>at</tt>, <tt>std::out_of_range</tt>, was chosen to match <tt>vector::at</tt>.</p> + + + + + <hr> -<a name="465"><h3>465. Contents of <ciso646></h3></a><p><b>Section:</b> 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Steve Clamage <b>Date:</b> 3 Jun 2004</p> +<h3><a name="465"></a>465. Contents of <ciso646></h3> +<p><b>Section:</b> 17.4.1.2 [headers] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Steve Clamage <b>Date:</b> 2004-06-03</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#headers">issues</a> in [headers].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>C header <iso646.h> defines macros for some operators, such as not_eq for !=.</p> -<p>Section 17.4.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.headers"> [lib.headers]</a> "Headers" says that except as noted in +<p>Section 17.4.1.2 [headers] "Headers" says that except as noted in clauses 18 through 27, the <cname> C++ header contents are the same as the C header <name.h>. In particular, table 12 lists <ciso646> as a C++ header.</p> @@ -14201,6 +19647,8 @@ of <iso646.h>.</p> <p>I don't find any normative text to support C.2.2.2.</p> + + <p><b>Proposed resolution:</b></p> <p>Add to section 17.4.1.2 Headers [lib.headers] a new paragraph after paragraph 6 (the one about functions must be functions):</p> @@ -14214,8 +19662,18 @@ or <ciso646> has no effect. </p> <p><i>[post-Redmond: Steve provided wording.]</i></p> + + + + + + <hr> -<a name="467"><h3>467. char_traits::lt(), compare(), and memcmp()</h3></a><p><b>Section:</b> 21.1.3.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.char.traits.specializations.char"> [lib.char.traits.specializations.char]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jun 2004</p> +<h3><a name="467"></a>467. char_traits::lt(), compare(), and memcmp()</h3> +<p><b>Section:</b> 21.1.3.1 [char.traits.specializations.char] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Table 37 describes the requirements on Traits::compare() in terms of @@ -14234,28 +19692,40 @@ imposed by Table 37 on compare() when char is signed. <p>Read email thread starting with c++std-lib-13499 for more. </p> + + <p><b>Proposed resolution:</b></p> <p>Change 21.1.3.1, p6 from</p> -<blockquote> +<blockquote><p> The two-argument members assign, eq, and lt are defined identically to the built-in operators =, ==, and < respectively. -</blockquote> +</p></blockquote> <p>to</p> -<blockquote> +<blockquote><p> The two-argument member assign is defined identically to the built-in operator =. The two argument members eq and lt are defined identically to the built-in operators == and < for type unsigned char. -</blockquote> +</p></blockquote> <p><i>[Redmond: The LWG agreed with this general direction, but we also need to change <tt>eq</tt> to be consistent with this change. Post-Redmond: Martin provided wording.]</i></p> + + + + + <hr> -<a name="468"><h3>468. unexpected consequences of ios_base::operator void*()</h3></a><p><b>Section:</b> 27.4.4.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.iostate.flags"> [lib.iostate.flags]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jun 2004</p> +<h3><a name="468"></a>468. unexpected consequences of ios_base::operator void*()</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>The program below is required to compile but when run it typically produces unexpected results due to the user-defined conversion from @@ -14272,6 +19742,7 @@ std::cout or any object derived from basic_ios to void*. } </pre> + <p><b>Proposed resolution:</b></p> <p> @@ -14309,11 +19780,24 @@ the value need not be valid. </pre> <p><i>[Redmond: 5-4 straw poll in favor of doing this.]</i></p> + <p><i>[Lillehammer: Doug provided revised wording for - "unspecified-bool-type".]</i></p> + "unspecified-bool-type".]</i></p> + + + + + + + <hr> -<a name="469"><h3>469. vector<bool> ill-formed relational operators</h3></a><p><b>Section:</b> 23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 28 Jun 2004</p> +<h3><a name="469"></a>469. vector<bool> ill-formed relational operators</h3> +<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-06-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> The overloads of relational operators for vector<bool> specified @@ -14323,13 +19807,24 @@ diagnosed as ill-formed (refer to Daveed Vandevoorde's explanation in c++std-lib-13647). </p> + + <p><b>Proposed resolution:</b></p> <p> Remove all overloads of overloads of relational operators for vector<bool> from [lib.vector.bool]. </p> + + + + <hr> -<a name="474"><h3>474. confusing Footnote 297</h3></a><p><b>Section:</b> 27.6.2.5.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.ostream.inserters.character"> [lib.ostream.inserters.character]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 1 Jul 2004</p> +<h3><a name="474"></a>474. confusing Footnote 297</h3> +<p><b>Section:</b> 27.6.2.6.4 [ostream.inserters.character] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2004-07-01</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#ostream.inserters.character">issues</a> in [ostream.inserters.character].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> I think Footnote 297 is confused. The paragraph it applies to seems @@ -14337,12 +19832,23 @@ quite clear in that widen() is only called if the object is not a char stream (i.e., not basic_ostream<char>), so it's irrelevant what the value of widen(c) is otherwise. </p> + + <p><b>Proposed resolution:</b></p> <p> I propose to strike the Footnote. </p> + + + + <hr> -<a name="475"><h3>475. May the function object passed to for_each modify the elements of the iterated sequence?</h3></a><p><b>Section:</b> 25.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.foreach"> [lib.alg.foreach]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Stephan T. Lavavej, Jaakko Jarvi <b>Date:</b> 9 Jul 2004</p> +<h3><a name="475"></a>475. May the function object passed to for_each modify the elements of the iterated sequence?</h3> +<p><b>Section:</b> 25.1.1 [alg.foreach] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Stephan T. Lavavej, Jaakko Jarvi <b>Date:</b> 2004-07-09</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.foreach">issues</a> in [alg.foreach].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> It is not clear whether the function object passed to for_each is allowed to modify the elements of the sequence being iterated over. @@ -14364,10 +19870,10 @@ requirements of a mutable iterator (24.1)." <p>for_each's Effects section does not mention whether arguments can be modified:</p> -<blockquote> +<blockquote><p> "Effects: Applies f to the result of dereferencing every iterator in the range [first, last), starting from first and proceeding to last - 1." -</blockquote> +</p></blockquote> <p> Every other algorithm in [lib.alg.nonmodifying] is "really" non-modifying in @@ -14400,20 +19906,35 @@ which its function object is called). We suggest that the standard be clarified to explicitly allow the function object passed to for_each modify its argument.</p> + + <p><b>Proposed resolution:</b></p> -<p>Add a nonnormative note to the Effects in 25.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.foreach"> [lib.alg.foreach]</a>: If +<p>Add a nonnormative note to the Effects in 25.1.1 [alg.foreach]: If the type of 'first' satisfies the requirements of a mutable iterator, 'f' may apply nonconstant functions through the dereferenced iterators passed to it. </p> + + <p><b>Rationale:</b></p> <p>The LWG believes that nothing in the standard prohibits function objects that modify the sequence elements. The problem is that for_each is in a secion entitled "nonmutating algorithms", and the title may be confusing. A nonnormative note should clarify that.</p> + + + + + <hr> -<a name="478"><h3>478. Should forward iterator requirements table have a line for r->m?</h3></a><p><b>Section:</b> 24.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iterators.html#lib.forward.iterators"> [lib.forward.iterators]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Dave Abrahams <b>Date:</b> 11 Jul 2004</p> +<h3><a name="478"></a>478. Should forward iterator requirements table have a line for r->m?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Dave Abrahams <b>Date:</b> 2004-07-11</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#477">477</a></p> +<p><b>Discussion:</b></p> <p> The Forward Iterator requirements table contains the following: </p> @@ -14430,13 +19951,13 @@ The Forward Iterator requirements table contains the following: [lib.iterator.requirements] says: </p> -<blockquote> +<blockquote><p> In the following sections, a and b denote values of type const X, n denotes a value of the difference type Distance, u, tmp, and m denote identifiers, r denotes a value of X&, t denotes a value of value type T, o denotes a value of some type that is writable to the output iterator. -</blockquote> +</p></blockquote> <p> Because operators can be overloaded on an iterator's const-ness, the @@ -14445,29 +19966,43 @@ specified using the identifiers a and b invalid for non-const iterators.</p> <p>Related issue: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#477">477</a></p> + + <p><b>Proposed resolution:</b></p> <p>Remove the "r->m" line from the Forward Iterator requirements table. Change</p> -<blockquote> +<blockquote><p> "const X" -</blockquote> +</p></blockquote> <p> to </p> -<blockquote> +<blockquote><p> "X or const X" -</blockquote> +</p></blockquote> <p>in paragraph 11 of [lib.iterator.requirements].</p> + + <p><b>Rationale:</b></p> <p> This is a defect because it constrains an lvalue to returning a modifiable lvalue. </p> + + + + + <hr> -<a name="495"><h3>495. Clause 22 template parameter requirements</h3></a><p><b>Section:</b> 22 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-locales.html#lib.localization"> [lib.localization]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 10 Jan 2005</p> +<h3><a name="495"></a>495. Clause 22 template parameter requirements</h3> +<p><b>Section:</b> 22 [localization] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2005-01-10</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#localization">issues</a> in [localization].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>It appears that there are no requirements specified for many of the template parameters in clause 22. It looks like this issue has never come up, except perhaps for Facet.</p> @@ -14500,49 +20035,74 @@ rename "Intl" to "International". The name is important because other text identifies the requirements for the name International but not for Intl.</li> </ul> + <p><b>Proposed resolution:</b></p> -<p>Change 17.3.2.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-intro.html#lib.type.descriptions"> [lib.type.descriptions]</a>, paragraph 1, from:</p> -<blockquote> +<p>Change 17.3.2.1 [type.descriptions], paragraph 1, from:</p> +<blockquote><p> The Requirements subclauses may describe names that are used to specify constraints on template arguments.153) These names are used in clauses 20, 23, 25, and 26 to describe the types that may be supplied as arguments by a C++ program when instantiating template components from the library. -</blockquote> +</p></blockquote> <p>to:</p> -<blockquote> +<blockquote><p> The Requirements subclauses may describe names that are used to specify constraints on template arguments.153) These names are used in library clauses to describe the types that may be supplied as arguments by a C++ program when instantiating template components from the library. -</blockquote> +</p></blockquote> <p>In the front matter of class 22, locales, add:</p> -<blockquote> +<blockquote><p> Template parameter types internT and externT shall meet the -requirements of charT (described in 21 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.strings"> [lib.strings]</a>). -</blockquote> +requirements of charT (described in 21 [strings]). +</p></blockquote> + + <p><b>Rationale:</b></p> <p> Again, a blanket clause isn't blanket enough. Also, we've got a couple of names that we don't have blanket requirement statements for. The only issue is what to do about stateT. This wording is thin, but probably adequate.</p> + + + + + <hr> -<a name="496"><h3>496. Illegal use of "T" in vector<bool></h3></a><p><b>Section:</b> 23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> richard@ex-parrot.com <b>Date:</b> 10 Feb 2005</p> +<h3><a name="496"></a>496. Illegal use of "T" in vector<bool></h3> +<p><b>Section:</b> 23.2.5 [vector] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> richard@ex-parrot.com <b>Date:</b> 2005-02-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> -In the synopsis of the std::vector<bool> specialisation in 23.2.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.vector"> [lib.vector]</a>, +In the synopsis of the std::vector<bool> specialisation in 23.2.5 [vector], the non-template assign() function has the signature</p> <pre> void assign( size_type n, const T& t ); </pre> <p>The type, T, is not defined in this context.</p> + + <p><b>Proposed resolution:</b></p> <p>Replace "T" with "value_type".</p> + + + + + <hr> -<a name="497"><h3>497. meaning of numeric_limits::traps for floating point types</h3></a><p><b>Section:</b> 18.2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-support.html#lib.numeric.limits.members"> [lib.numeric.limits.members]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 2 Mar 2005</p> +<h3><a name="497"></a>497. meaning of numeric_limits::traps for floating point types</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-03-02</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>18.2.1.2, p59 says this much about the traps member of numeric_limits:</p> @@ -14579,10 +20139,14 @@ implemented on several platforms. It is also the only way to implement traps on platforms that allow programs to enable and disable trapping at runtime. </p> + + <p><b>Proposed resolution:</b></p> <p>Change p59 to read:</p> -<blockquote>True if, at program startup, there exists a value of the type that - would cause an arithmetic operation using that value to trap.</blockquote> +<blockquote><p>True if, at program startup, there exists a value of the type that + would cause an arithmetic operation using that value to trap.</p></blockquote> + + <p><b>Rationale:</b></p> <p> Real issue, since trapping can be turned on and off. Unclear what a @@ -14590,8 +20154,18 @@ at runtime. give users is to use cfenv for these sorts of queries. But this new proposed resolution is at least consistent and slightly better than nothing.</p> + + + + + <hr> -<a name="505"><h3>505. Result_type in random distribution requirements</h3></a><p><b>Section:</b> TR1 5.1.1 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.req"> [tr.rand.req]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="505"></a>505. Result_type in random distribution requirements</h3> +<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#WP">WP</a> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Table 17: Random distribution requirements </p> @@ -14604,6 +20178,8 @@ Inspection of all distributions in [tr.rand.dist] reveals that each distribution provides a second typedef ("result_type") that denotes the type of the values the distribution produces when called. </p> + + <p><b>Proposed resolution:</b></p> <p> It seems to me that this is also a requirement @@ -14611,20 +20187,26 @@ for all distributions and should therefore be indicated as such via a new secon row to this table 17: </p> <table border="1" cellpadding="5"> -<tbody><tr> -<td>X::result_type</td> -<td>T</td> -<td>---</td> -<td>compile-time</td> -</tr> +<tbody><tr><td>X::result_type</td><td>T</td><td>---</td><td>compile-time</td></tr> </tbody></table> <p><i>[ Berlin: Voted to WP. N1932 adopts the proposed resolution: see Table 5 row 1. ]</i></p> + + + + + + <hr> -<a name="507"><h3>507. Missing requirement for variate_generator::operator()</h3></a><p><b>Section:</b> TR1 5.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.var"> [tr.rand.var]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="507"></a>507. Missing requirement for variate_generator::operator()</h3> +<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#WP">WP</a> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Paragraph 11 of [tr.rand.var] equires that the member template </p> @@ -14645,15 +20227,27 @@ variate_generator has been eliminated. Then in full committee we voted to give this issue WP status (mistakenly). ]</i></p> + + + <p><b>Proposed resolution:</b></p> <p> We therefore recommend that we insert the following precondition before paragraph 11: </p> -<blockquote> +<blockquote><p> Precondition: <tt>distribution().operator()(e,value)</tt> is well-formed. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="508"><h3>508. Bad parameters for ranlux64_base_01</h3></a><p><b>Section:</b> TR1 5.1.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.rand.predef"> [tr.rand.predef]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Walter Brown <b>Date:</b> 3 Jul 2005</p> +<h3><a name="508"></a>508. Bad parameters for ranlux64_base_01</h3> +<p><b>Section:</b> 26.4.5 [rand.predef], TR1 5.1.5 [tr.rand.predef] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2005-07-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> The fifth of these engines with predefined parameters, ranlux64_base_01, appears to have an unintentional error for which there is a simple correction. @@ -14693,12 +20287,14 @@ The ranlux64_base_01 engine as presented in [tr.rand.predef] uses w=48, r=24, s= For these numbers, the combination 2**(w*r)-2**(w*s)+1 is non-prime (though explicit factorization would be a challenge). In consequence, while it is certainly possible for some seeding states that this engine would have a very -long period, it is not at all Òwell-knownÓ that this is the case. The intent +long period, it is not at all "well-known" that this is the case. The intent in the N1398 proposal involved the base of the ranlux64 engine, which finds heavy use in the physics community. This is isomorphic to the predefined ranlux_base_01, but exploits the ability of double variables to hold (at least) 48 bits of mantissa, to deliver 48 random bits at a time rather than 24. </p> + + <p><b>Proposed resolution:</b></p> <p> To achieve this intended behavior, the correct template parameteriztion would be: @@ -14723,11 +20319,25 @@ Berlin: Voted to WP. N1932 adopts the proposed resolution in 26.3.5, just above paragraph 5. ]</i></p> + + + + + + <hr> -<a name="519"><h3>519. Data() undocumented</h3></a><p><b>Section:</b> TR1 6.2.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.array.array"> [tr.array.array]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Pete Becker <b>Date:</b> 3 Jul 2005</p> +<h3><a name="519"></a>519. Data() undocumented</h3> +<p><b>Section:</b> 23.2.1 [array], TR1 6.2.2 [tr.array.array] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Pete Becker <b>Date:</b> 2005-07-03</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#array">active issues</a> in [array].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#array">issues</a> in [array].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> <tt>array<>::data()</tt> is present in the class synopsis, but not documented. </p> + + <p><b>Proposed resolution:</b></p> <p> Add a new section, after 6.2.2.3: @@ -14741,12 +20351,21 @@ const T* data() const; <p> Change 6.2.2.4/2 to: </p> -<blockquote> +<blockquote><p> In the case where <tt>N == 0</tt>, <tt>begin() == end()</tt>. The return value of <tt>data()</tt> is unspecified. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="520"><h3>520. Result_of and pointers to data members</h3></a><p><b>Section:</b> TR1 3.6 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.func.bind"> [tr.func.bind]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Pete Becker <b>Date:</b> 3 Jul 2005</p> +<h3><a name="520"></a>520. Result_of and pointers to data members</h3> +<p><b>Section:</b> 20.5.10.1 [func.bind], TR1 3.6 [tr.func.bind] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Pete Becker <b>Date:</b> 2005-07-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> In the original proposal for binders, the return type of bind() when called with a pointer to member data as it's callable object was @@ -14757,11 +20376,14 @@ Unfortunately, we left pointer to member data out of result_of, so bind doesn't have any specified behavior when called with a pointer to member data. </p> + + <p><b>Proposed resolution:</b></p> <p><i>[ Pete and Peter will provide wording. ]</i></p> + <p> In 20.5.4 [lib.func.ret] ([tr.func.ret]) p3 add the following bullet after bullet 2: </p> @@ -14774,32 +20396,45 @@ shall be <tt><i>cv</i> R&</tt> when <tt>T1</tt> is <tt><i>cv</i> U1&</tt <p><i>[ Peter provided wording. ]</i></p> + + + + + + + <hr> -<a name="521"><h3>521. Garbled requirements for argument_type in reference_wrapper</h3></a><p><b>Section:</b> TR1 2.1.2 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.refwrp.refwrp"> [tr.util.refwrp.refwrp]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Pete Becker <b>Date:</b> 3 Jul 2005</p> +<h3><a name="521"></a>521. Garbled requirements for argument_type in reference_wrapper</h3> +<p><b>Section:</b> 20.5.5 [refwrap], TR1 2.1.2 [tr.util.refwrp.refwrp] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Pete Becker <b>Date:</b> 2005-07-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> 2.1.2/3, second bullet item currently says that reference_wrapper<T> is derived from unary_function<T, R> if T is: </p> -<blockquote> +<blockquote><p> a pointer to member function type with cv-qualifier cv and no arguments; the type T1 is cv T* and R is the return type of the pointer to member function; -</blockquote> +</p></blockquote> <p> The type of T1 can't be cv T*, 'cause that's a pointer to a pointer to member function. It should be a pointer to the class that T is a pointer to member of. Like this: </p> -<blockquote> +<blockquote><p> a pointer to a member function R T0::f() cv (where cv represents the member function's cv-qualifiers); the type T1 is cv T0* -</blockquote> +</p></blockquote> <p> Similarly, bullet item 2 in 2.1.2/4 should be: </p> -<blockquote> +<blockquote><p> a pointer to a member function R T0::f(T2) cv (where cv represents the member function's cv-qualifiers); the type T1 is cv T0* -</blockquote> +</p></blockquote> + + <p><b>Proposed resolution:</b></p> <p> @@ -14834,57 +20469,236 @@ function's cv-qualifiers); the type <tt>T1</tt> is <tt><i>cv</i> T0*</tt></ins> </ul> </blockquote> + + + + + <hr> -<a name="530"><h3>530. Must elements of a string be contiguous?</h3></a><p><b>Section:</b> 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Matt Austern <b>Date:</b> 15 Nov 2005</p> +<h3><a name="530"></a>530. Must elements of a string be contiguous?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2005-11-15</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p>Issue <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69">69</a>, which was incorporated into C++03, mandated - that the elements of a vector must be stored in contiguous memory. - Should the same also apply to <tt>basic_string</tt>?</p> + that the elements of a vector must be stored in contiguous memory. + Should the same also apply to <tt>basic_string</tt>?</p> -<p>We almost require contiguity already. Clause 23.3.4 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-containers.html#lib.multiset"> [lib.multiset]</a> - defines <tt>operator[]</tt> as <tt>data()[pos]</tt>. What's missing - is a similar guarantee if we access the string's elements via the - iterator interface.</p> +<p>We almost require contiguity already. Clause 23.3.4 [multiset] + defines <tt>operator[]</tt> as <tt>data()[pos]</tt>. What's missing + is a similar guarantee if we access the string's elements via the + iterator interface.</p> <p>Given the existence of <tt>data()</tt>, and the definition of - <tt>operator[]</tt> and <tt>at</tt> in terms of <tt>data</tt>, - I don't believe it's possible to write a useful and standard- - conforming <tt>basic_string</tt> that isn't contiguous. I'm not - aware of any non-contiguous implementation. We should just require - it. + <tt>operator[]</tt> and <tt>at</tt> in terms of <tt>data</tt>, + I don't believe it's possible to write a useful and standard- + conforming <tt>basic_string</tt> that isn't contiguous. I'm not + aware of any non-contiguous implementation. We should just require + it. </p> + + <p><b>Proposed resolution:</b></p> -<p>Add the following text to the end of 21.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.basic.string"> [lib.basic.string]</a>, +<p>Add the following text to the end of 21.3 [basic.string], paragraph 2. </p> <blockquote> - <p>The characters in a string are stored contiguously, meaning that if - <tt>s</tt> is a <tt>basic_string<charT, Allocator></tt>, then - it obeys the identity - <tt>&*(s.begin() + n) == &*s.begin() + n</tt> - for all <tt>0 <= n < s.size()</tt>. + <p>The characters in a string are stored contiguously, meaning that if + <tt>s</tt> is a <tt>basic_string<charT, Allocator></tt>, then + it obeys the identity + <tt>&*(s.begin() + n) == &*s.begin() + n</tt> + for all <tt>0 <= n < s.size()</tt>. </p> </blockquote> + + +<p><b>Rationale:</b></p> +<p> +Not standardizing this existing practice does not give implementors more +freedom. We thought it might a decade ago. But the vendors have spoken +both with their implementations, and with their voice at the LWG +meetings. The implementations are going to be contiguous no matter what +the standard says. So the standard might as well give string clients +more design choices. +</p> + + + + + <hr> -<a name="533"><h3>533. typo in 2.2.3.10/1</h3></a><p><b>Section:</b> TR1 2.2.3.10 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.getdeleter"> [tr.util.smartptr.getdeleter]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 9 Nov 2005</p> +<h3><a name="533"></a>533. typo in 2.2.3.10/1</h3> +<p><b>Section:</b> 20.6.6.2.10 [util.smartptr.getdeleter], TR1 2.2.3.10 [tr.util.smartptr.getdeleter] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#DR">DR</a> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2005-11-09</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#DR">DR</a> status.</p> +<p><b>Discussion:</b></p> <p> I'm seeing something that looks like a typo. The Return of <tt>get_deleter</tt> says: </p> -<blockquote> +<blockquote><p> If <tt>*this</tt> <i>owns</i> a deleter <tt>d</tt>... -</blockquote> +</p></blockquote> <p> but <tt>get_deleter</tt> is a free function! </p> + + <p><b>Proposed resolution:</b></p> <p> Therefore, I think should be: </p> -<blockquote> +<blockquote><p> If <tt><del>*this</del> <ins>p</ins></tt> <i>owns</i> a deleter <tt>d</tt>... +</p></blockquote> + + + + + +<hr> +<h3><a name="534"></a>534. Missing basic_string members</h3> +<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#WP">WP</a> + <b>Submitter:</b> Alisdair Meredith <b>Date:</b> 2005-11-16</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +OK, we all know std::basic_string is bloated and already has way too +many members. However, I propose it is missing 3 useful members that +are often expected by users believing it is a close approximation of the +container concept. All 3 are listed in table 71 as 'optional' +</p> + +<p> +i/ pop_back. +</p> + +<p> +This is the one I feel most strongly about, as I only just discovered it +was missing as we are switching to a more conforming standard library +<g> +</p> + +<p> +I find it particularly inconsistent to support push_back, but not +pop_back. +</p> + +<p> +ii/ back. +</p> + +<p> +There are certainly cases where I want to examine the last character of +a string before deciding to append, or to trim trailing path separators +from directory names etc. *rbegin() somehow feels inelegant. +</p> + +<p> +iii/ front +</p> + +<p> +This one I don't feel strongly about, but if I can get the first two, +this one feels that it should be added as a 'me too' for consistency. +</p> + +<p> +I believe this would be similarly useful to the data() member recently +added to vector, or at() member added to the maps. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add the following members to definition of class template basic_string, 21.3p7 +</p> +<blockquote><pre>void pop_back () + +const charT & front() const +charT & front() + +const charT & back() const +charT & back() +</pre></blockquote> +<p> +Add the following paragraphs to basic_string description +</p> + +<p> +21.3.4p5 +</p> +<blockquote> +<pre>const charT & front() const +charT & front() +</pre> +<p> +<i>Precondition:</i> <tt>!empty()</tt> +</p> +<p> +<i>Effects:</i> Equivalent to <tt>operator[](0)</tt>. +</p> +</blockquote> + +<p> +21.3.4p6 +</p> +<blockquote> +<pre>const charT & back() const +charT & back() +</pre> +<p> +<i>Precondition:</i> <tt>!empty()</tt> +</p> +<p> +<i>Effects:</i> Equivalent to <tt>operator[]( size() - 1)</tt>. +</p> +</blockquote> + +<p> +21.3.5.5p10 +</p> +<blockquote> +<pre>void pop_back () +</pre> +<p> +<i>Precondition:</i> <tt>!empty()</tt> +</p> +<p> +<i>Effects:</i> Equivalent to <tt>erase( size() - 1, 1 )</tt>. +</p> </blockquote> + +<p> +Update Table 71: (optional sequence operations) +Add basic_string to the list of containers for the following operations. +</p> +<blockquote><pre>a.front() +a.back() +a.push_back() +a.pop_back() +a[n] +</pre></blockquote> + +<p><i>[ +Berlin: Has support. Alisdair provided wording. +]</i></p> + + + + + + <hr> -<a name="535"><h3>535. std::string::swap specification poorly worded</h3></a><p><b>Section:</b> 21.3.5.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-strings.html#lib.string::swap"> [lib.string::swap]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Beman Dawes <b>Date:</b> 14 Dec 2005</p> +<h3><a name="535"></a>535. std::string::swap specification poorly worded</h3> +<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#WP">WP</a> + <b>Submitter:</b> Beman Dawes <b>Date:</b> 2005-12-14</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> std::string::swap currently says for effects and postcondition: </p> @@ -14905,6 +20719,8 @@ Specifying both Effects and Postcondition seems redundant, and the postcondition needs to be made stronger. Users would be unhappy if the characters were not in the same order after the swap. </p> + + <p><b>Proposed resolution:</b></p> <blockquote> <p> @@ -14918,8 +20734,19 @@ characters that <del>were</del> <ins>was</ins> in <tt><i>s</i></tt>, <del>were</del> <ins>was</ins> in <tt>*this</tt>. </p> </blockquote> + + + + + <hr> -<a name="537"><h3>537. Typos in the signatures in 27.6.1.3/42-43 and 27.6.2.4</h3></a><p><b>Section:</b> 27.6.1.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-iostreams.html#lib.istream.unformatted"> [lib.istream.unformatted]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Paolo Carlini <b>Date:</b> 12 Feb 2006</p> +<h3><a name="537"></a>537. Typos in the signatures in 27.6.1.3/42-43 and 27.6.2.4</h3> +<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#WP">WP</a> + <b>Submitter:</b> Paolo Carlini <b>Date:</b> 2006-02-12</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#istream.unformatted">active issues</a> in [istream.unformatted].</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> In the most recent working draft, I'm still seeing: </p> @@ -14939,6 +20766,8 @@ seekp(off_type& off, ios_base::seekdir dir) <p> that is, by reference off and pos arguments. </p> + + <p><b>Proposed resolution:</b></p> <p> After 27.6.1.3p42 change: @@ -14960,8 +20789,18 @@ After 27.6.2.4p3 change: <blockquote><pre>basic_ostream<charT,traits>& seekp(off_type<del>&</del> <i>off</i>, ios_base::seekdir <i>dir</i>); </pre></blockquote> + + + + + <hr> -<a name="538"></a><h3><a name="538">538. 241 again: Does unique_copy() require CopyConstructible and Assignable?</a></h3><p><b>Section:</b> 25.2.8 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lib-algorithms.html#lib.alg.unique"> [lib.alg.unique]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Howard Hinnant <b>Date:</b> 9 Feb 2006</p> +<h3><a name="538"></a>538. 241 again: Does unique_copy() require CopyConstructible and Assignable?</h3> +<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#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2006-02-09</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> I believe I botched the resolution of <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241"> @@ -14973,14 +20812,14 @@ has WP status. This talks about <tt>unique_copy</tt> requirements and currently reads: </p> -<blockquote> +<blockquote><p> -5- <i>Requires:</i> The ranges <tt>[<i>first</i>, <i>last</i>)</tt> and <tt>[<i>result</i>, <i>result</i>+(<i>last</i>-<i>first</i>))</tt> shall not overlap. The expression <tt>*<i>result</i> = *<i>first</i></tt> shall be valid. If neither <tt>InputIterator</tt> nor <tt>OutputIterator</tt> meets the requirements of forward iterator then the value type of <tt>InputIterator</tt> must be CopyConstructible (20.1.3). Otherwise CopyConstructible is not required. -</blockquote> +</p></blockquote> <p> The problem (which Paolo discovered) is that when the iterators are at their @@ -14994,8 +20833,10 @@ This latter requirement does not necessarily imply that you can: <blockquote><pre>*<i>first</i> = *<i>first</i>; </pre></blockquote> + + <p><b>Proposed resolution:</b></p> -<blockquote> +<blockquote><p> -5- <i>Requires:</i> The ranges <tt>[<i>first</i>, <i>last</i>)</tt> and <tt>[<i>result</i>, <i>result</i>+(<i>last</i>-<i>first</i>))</tt> shall not overlap. The expression <tt>*<i>result</i> = *<i>first</i></tt> @@ -15005,30 +20846,40 @@ requirements of forward iterator then the <del>value type</del> <ins><tt>value_type</tt></ins> of <tt>InputIterator</tt> must be CopyConstructible (20.1.3) <ins>and Assignable</ins>. Otherwise CopyConstructible is not required. -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="540"><h3>540. shared_ptr<void>::operator*()</h3></a><p><b>Section:</b> TR1 2.2.3.5 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared.obs"> [tr.util.smartptr.shared.obs]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 15 Oct 2005</p> +<h3><a name="540"></a>540. shared_ptr<void>::operator*()</h3> +<p><b>Section:</b> 20.6.6.2.5 [util.smartptr.shared.obs], TR1 2.2.3.5 [tr.util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-10-15</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared.obs">issues</a> in [util.smartptr.shared.obs].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> I'm trying to reconcile the note in tr.util.smartptr.shared.obs, p6 that talks about the operator*() member function of shared_ptr: </p> -<blockquote> +<blockquote><p> Notes: When T is void, attempting to instantiate this member function renders the program ill-formed. [Note: Instantiating shared_ptr<void> does not necessarily result in instantiating this member function. --end note] -</blockquote> +</p></blockquote> <p> with the requirement in temp.inst, p1: </p> -<blockquote> +<blockquote><p> The implicit instantiation of a class template specialization causes the implicit instantiation of the declarations, but not of the definitions... -</blockquote> +</p></blockquote> <p> I assume that what the note is really trying to say is that @@ -15037,12 +20888,14 @@ this member function." That is, that this function must not be declared a member of shared_ptr<void>. Is my interpretation correct? </p> + + <p><b>Proposed resolution:</b></p> <p> Change 2.2.3.5p6 </p> -<blockquote> +<blockquote><p> -6- <del><i>Notes:</i></del> When <tt>T</tt> is <tt>void</tt>, <del>attempting to instantiate this member function renders the program ill-formed. [<i>Note:</i> Instantiating <tt>shared_ptr<void></tt> does not necessarily result in @@ -15050,10 +20903,20 @@ instantiating this member function. <i>--end note</i>]</del> <ins>it is unspecified whether this member function is declared or not, and if so, what its return type is, except that the declaration (although not necessarily the definition) of the function shall be well-formed.</ins> -</blockquote> +</p></blockquote> + + + + + <hr> -<a name="541"><h3>541. shared_ptr template assignment and void</h3></a><p><b>Section:</b> TR1 2.2.3 <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/tr1.html#tr.util.smartptr.shared"> [tr.util.smartptr.shared]</a> <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> <b>Submitter:</b> Martin Sebor <b>Date:</b> 16 Oct 2005</p> +<h3><a name="541"></a>541. shared_ptr template assignment and void</h3> +<p><b>Section:</b> 20.6.6.2 [util.smartptr.shared], TR1 2.2.3 [tr.util.smartptr.shared] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-10-16</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared">issues</a> in [util.smartptr.shared].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> <p> Is the void specialization of the template assignment operator taking a shared_ptr<void> as an argument supposed be well-formed? @@ -15101,6 +20964,8 @@ int main () b.operator=<void>(b); } </pre></blockquote> + + <p><b>Proposed resolution:</b></p> <p> In [lib.memory] change: @@ -15116,9 +20981,705 @@ In [lib.auto.ptr]/2 add the following before the last closing brace: <blockquote><pre>template<> class auto_ptr<void> { public: - typedef void element_type; + typedef void element_type; }; </pre></blockquote> -<p>----- End of document -----</p> -</body></html>
\ No newline at end of file + + + + + +<hr> +<h3><a name="542"></a>542. shared_ptr observers</h3> +<p><b>Section:</b> 20.6.6.2.5 [util.smartptr.shared.obs], TR1 2.2.3.5 [tr.util.smartptr.shared.obs] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2005-10-18</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#util.smartptr.shared.obs">issues</a> in [util.smartptr.shared.obs].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Peter Dimov wrote: +To: C++ libraries mailing list +Message c++std-lib-15614 +[...] +The intent is for both use_count() and unique() to work in a threaded environment. +They are intrinsically prone to race conditions, but they never return garbage. +</p> + +<p> +This is a crucial piece of information that I really wish were +captured in the text. Having this in a non-normative note would +have made everything crystal clear to me and probably stopped +me from ever starting this discussion :) Instead, the sentence +in p12 "use only for debugging and testing purposes, not for +production code" very strongly suggests that implementations +can and even are encouraged to return garbage (when threads +are involved) for performance reasons. +</p> +<p> +How about adding an informative note along these lines: +</p> +<blockquote><p> + Note: Implementations are encouraged to provide well-defined + behavior for use_count() and unique() even in the presence of + multiple threads. +</p></blockquote> +<p> +I don't necessarily insist on the exact wording, just that we +capture the intent. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 20.6.6.2.5 [util.smartptr.shared.obs] p12: +</p> +<blockquote><p> +[<i>Note:</i> <tt>use_count()</tt> is not necessarily efficient. <del>Use only for +debugging and testing purposes, not for production code.</del> --<i>end note</i>] +</p></blockquote> + +<p> +Change 20.6.6.3.5 [util.smartptr.weak.obs] p3: +</p> +<blockquote><p> +[<i>Note:</i> <tt>use_count()</tt> is not necessarily efficient. <del>Use only for +debugging and testing purposes, not for production code.</del> --<i>end note</i>] +</p></blockquote> + + + + + +<hr> +<h3><a name="543"></a>543. valarray slice default constructor</h3> +<p><b>Section:</b> 26.5.4 [class.slice] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Howard Hinnant <b>Date:</b> 2005-11-03</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +If one explicitly constructs a slice or glice with the default +constructor, does the standard require this slice to have any usable +state? It says "creates a slice which specifies no elements", which +could be interpreted two ways: +</p> +<ol> +<li>There are no elements to which the slice refers (i.e. undefined).</li> +<li>The slice specifies an array with no elements in it (i.e. defined).</li> +</ol> +<p> +Here is a bit of code to illustrate: +</p> +<blockquote><pre>#include <iostream> +#include <valarray> + +int main() +{ + std::valarray<int> v(10); + std::valarray<int> v2 = v[std::slice()]; + std::cout << "v[slice()].size() = " << v2.size() << '\n'; +} +</pre></blockquote> + +<p> +Is the behavior undefined? Or should the output be: +</p> + +<blockquote><pre>v[slice()].size() = 0 +</pre></blockquote> + +<p> +There is a similar question and wording for gslice at 26.3.6.1p1. +</p> + + +<p><b>Proposed resolution:</b></p> + +<p><i>[Martin suggests removing the second sentence in 26.5.4.1 [cons.slice] as well.]</i></p> + + +<p> +Change 26.5.4.1 [cons.slice]: +</p> + +<blockquote><p> +1 - <del>The default constructor for <tt>slice</tt> creates a <tt>slice</tt> +which specifies no elements.</del> <ins>The default constructor is equivalent to +<tt>slice(0, 0, 0)</tt>.</ins> A default constructor is provided only to permit +the declaration of arrays of slices. The constructor with arguments for a slice +takes a start, length, and stride parameter. +</p></blockquote> + +<p> +Change 26.5.6.1 [gslice.cons]: +</p> + +<blockquote><p> +1 - <del>The default constructor creates a <tt>gslice</tt> which specifies no +elements.</del> <ins>The default constructor is equivalent to <tt>gslice(0, +valarray<size_t>(), valarray<size_t>())</tt>.</ins> The constructor +with arguments builds a <tt>gslice</tt> based on a specification of start, +lengths, and strides, as explained in the previous section. +</p></blockquote> + + + + + + +<hr> +<h3><a name="545"></a>545. When is a deleter deleted?</h3> +<p><b>Section:</b> 20.6.6.2.10 [util.smartptr.getdeleter], TR1 2.2.3.2 [tr.util.smartptr.shared.dest] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Matt Austern <b>Date:</b> 2006-01-10</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +The description of ~shared_ptr doesn't say when the shared_ptr's deleter, if +any, is destroyed. In principle there are two possibilities: it is destroyed +unconditionally whenever ~shared_ptr is executed (which, from an implementation +standpoint, means that the deleter is copied whenever the shared_ptr is copied), +or it is destroyed immediately after the owned pointer is destroyed (which, from +an implementation standpoint, means that the deleter object is shared between +instances). We should say which it is. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Add after the first sentence of 20.6.6.2.10 [util.smartptr.getdeleter]/1: +</p> +<blockquote> +<p> +The returned pointer remains valid as long as there exists a <tt>shared_ptr</tt> instance +that owns <tt><i>d</i></tt>. +</p> +<p> +[<i>Note:</i> it is unspecified whether the pointer remains valid longer than that. +This can happen if the implementation doesn't destroy the deleter until all +<tt>weak_ptr</tt> instances in the ownership group are destroyed. <i>-- end note</i>] +</p> +</blockquote> + + + + + +<hr> +<h3><a name="559"></a>559. numeric_limits<const T></h3> +<p><b>Section:</b> 18.2.1 [limits] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-02-19</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#limits">issues</a> in [limits].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +18.2.1 [limits], p2 requires implementations to provide specializations of the +<code>numeric_limits</code> template for each scalar type. While this +could be interepreted to include cv-qualified forms of such types such +an interepretation is not reflected in the synopsis of the +<code><limits></code> header. + + </p> + <p> + +The absence of specializations of the template on cv-qualified forms +of fundamental types makes <code>numeric_limits</code> difficult to +use in generic code where the constness (or volatility) of a type is +not always immediately apparent. In such contexts, the primary +template ends up being instantiated instead of the provided +specialization, typically yielding unexpected behavior. + + </p> + <p> + +Require that specializations of <code>numeric_limits</code> on +cv-qualified fundamental types have the same semantics as those on the +unqualifed forms of the same types. + + </p> + + +<p><b>Proposed resolution:</b></p> + <p> + +Add to the synopsis of the <code><limits></code> header, +immediately below the declaration of the primary template, the +following: +</p> + +<pre> +template <class T> class numeric_limits<const T>; +template <class T> class numeric_limits<volatile T>; +template <class T> class numeric_limits<const volatile T>; + +</pre> + + <p> + +Add a new paragraph to the end of 18.2.1.1 [numeric.limits], with the following +text: + + </p> + <p> + +-new-para- The value of each member of a <code>numeric_limits</code> +specialization on a cv-qualified T is equal to the value of the same +member of <code>numeric_limits<T></code>. + + </p> + +<p><i>[ +Portland: Martin will clarify that user-defined types get cv-specializations +automatically. +]</i></p> + + + + + + + +<hr> +<h3><a name="575"></a>575. the specification of ~shared_ptr is MT-unfriendly, makes implementation assumptions</h3> +<p><b>Section:</b> 20.6.6.2.2 [util.smartptr.shared.dest], TR1 2.2.3.2 [tr.util.smartptr.shared.dest] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2006-04-23</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +[tr.util.smartptr.shared.dest] says in its second bullet: +</p> + +<p> +"If *this shares ownership with another shared_ptr instance (use_count() > 1), +decrements that instance's use count." +</p> + +<p> +The problem with this formulation is that it presupposes the existence of an +"use count" variable that can be decremented and that is part of the state of a +shared_ptr instance (because of the "that instance's use count".) +</p> + +<p> +This is contrary to the spirit of the rest of the specification that carefully +avoids to require an use count variable. Instead, use_count() is specified to +return a value, a number of instances. +</p> + +<p> +In multithreaded code, the usual implicit assumption is that a shared variable +should not be accessed by more than one thread without explicit synchronization, +and by introducing the concept of an "use count" variable, the current wording +implies that two shared_ptr instances that share ownership cannot be destroyed +simultaneously. +</p> + +<p> +In addition, if we allow the interpretation that an use count variable is part +of shared_ptr's state, this would lead to other undesirable consequences WRT +multiple threads. For example, +</p> + +<blockquote><pre>p1 = p2; +</pre></blockquote> + +<p> +would now visibly modify the state of p2, a "write" operation, requiring a lock. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change the first two bullets of [lib.util.smartptr.shared.dest]/1 to: +</p> + +<blockquote> +<ul> +<li>If <tt>*this</tt> is <i>empty</i> <ins>or shares ownership with another +<tt>shared_ptr</tt> instance (<tt>use_count() > 1</tt>)</ins>, there are no side effects.</li> +<li><del>If <tt>*this</tt> <i>shares ownership</i> with another <tt>shared_ptr</tt> instance +(<tt>use_count() > 1</tt>), decrements that instance's use count.</del></li> +</ul> +</blockquote> + +<p> +Add the following paragraph after [lib.util.smartptr.shared.dest]/1: +</p> + +<blockquote><p> +[<i>Note:</i> since the destruction of <tt>*this</tt> decreases the number of instances in +<tt>*this</tt>'s ownership group by one, all <tt>shared_ptr</tt> instances that share ownership +with <tt>*this</tt> will report an <tt>use_count()</tt> that is one lower than its previous value +after <tt>*this</tt> is destroyed. <i>--end note</i>] +</p></blockquote> + + + + + +<hr> +<h3><a name="576"></a>576. find_first_of is overconstrained</h3> +<p><b>Section:</b> 25.1.4 [alg.find.first.of] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Doug Gregor <b>Date:</b> 2006-04-25</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#alg.find.first.of">issues</a> in [alg.find.first.of].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +In 25.1.4 Find First [lib.alg.find.first], the two iterator type parameters to +find_first_of are specified to require Forward Iterators, as follows: +</p> + +<blockquote><pre>template<class ForwardIterator1, class ForwardIterator2> + ForwardIterator1 + find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, + ForwardIterator2 first2, ForwardIterator2 last2); +template<class ForwardIterator1, class ForwardIterator2, + class BinaryPredicate> +ForwardIterator1 + find_first_of(ForwardIterator1 first1, ForwardIterator1 last1, + ForwardIterator2 first2, ForwardIterator2 last2, + BinaryPredicate pred); +</pre></blockquote> + +<p> +However, ForwardIterator1 need not actually be a Forward Iterator; an Input +Iterator suffices, because we do not need the multi-pass property of the Forward +Iterator or a true reference. +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change the declarations of <tt>find_first_of</tt> to: +</p> + +<blockquote><pre>template<class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2> + <del>ForwardIterator1</del><ins>InputIterator1</ins> + find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1, + ForwardIterator2 first2, ForwardIterator2 last2); +template<class <del>ForwardIterator1</del><ins>InputIterator1</ins>, class ForwardIterator2, + class BinaryPredicate> +<del>ForwardIterator1</del><ins>InputIterator1</ins> + find_first_of(<del>ForwardIterator1</del><ins>InputIterator1</ins> first1, <del>ForwardIterator1</del><ins>InputIterator1</ins> last1, + ForwardIterator2 first2, ForwardIterator2 last2, + BinaryPredicate pred); +</pre></blockquote> + + + + + + +<hr> +<h3><a name="578"></a>578. purpose of hint to allocator::allocate()</h3> +<p><b>Section:</b> 20.6.1.1 [allocator.members] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-05-17</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +The description of the allocator member function +<code>allocate()</code> requires that the <i>hint</i> argument be +either 0 or a value previously returned from <code>allocate()</code>. +Footnote 227 further suggests that containers may pass the address of +an adjacent element as this argument. + + </p> + <p> + +I believe that either the footnote is wrong or the normative +requirement that the argument be a value previously returned from a +call to <code>allocate()</code> is wrong. The latter is supported by +the resolution to issue 20-004 proposed in c++std-lib-3736 by Nathan +Myers. In addition, the <i>hint</i> is an ordinary void* and not the +<code>pointer</code> type returned by <code>allocate()</code>, with +the two types potentially being incompatible and the requirement +impossible to satisfy. + + </p> + <p> + +See also c++std-lib-14323 for some more context on where this came up +(again). + + </p> + + + <p><b>Proposed resolution:</b></p> + <p> + +Remove the requirement in 20.6.1.1, p4 that the hint be a value +previously returned from <code>allocate()</code>. Specifically, change +the paragraph as follows: + + </p> +<p> +<del><i>Requires</i>: <i>hint</i> either 0 or previously obtained from member +<code>allocate</code> and not yet passed to member <code>deallocate</code>. +The value hint may be used by an implementation to help improve performance +<sup>223)</sup>.</del> <ins>[<i>Note:</i> The value <i>hint</i> may be used by an +implementation to help improve performance. -- <i>end note</i>]</ins> +</p> +<blockquote><p> +<del>[Footnote: <sup>223)</sup>In a container member function, the address of an +adjacent element is often a good choice to pass for this argument.</del> +</p></blockquote> + + + + +<hr> +<h3><a name="586"></a>586. string inserter not a formatted function</h3> +<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#WP">WP</a> + <b>Submitter:</b> Martin Sebor <b>Date:</b> 2006-06-22</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> + <p> + +Section and paragraph numbers in this paper are relative to the +working draft document number N2009 from 4/21/2006. + + </p> + + <p> + +The <code>basic_string</code> extractor in 21.3.7.9, p1 is clearly +required to behave as a formatted input function, as is the +<code>std::getline()</code> overload for string described in p7. + + </p> + <p> + +However, the <code>basic_string</code> inserter described in p5 of the +same section has no such requirement. This has implications on how the +operator responds to exceptions thrown from <code>xsputn()</code> +(formatted output functions are required to set <code>badbit</code> +and swallow the exception unless <code>badbit</code> is also set in +<code>exceptions()</code>; the string inserter doesn't have any such +requirement). + + </p> + <p> + +I don't see anything in the spec for the string inserter that would +justify requiring it to treat exceptions differently from all other +similar operators. (If it did, I think it should be made this explicit +by saying that the operator "does not behave as a formatted output +function" as has been made customary by the adoption of the resolution +of issue 60). + + </p> + + + <p><b>Proposed resolution:</b></p> + <p> + +I propose to change the Effects clause in 21.3.7.9, p5, as follows: + + </p> + <blockquote> + <p> + +<i>Effects</i>: <del>Begins by constructing a sentry object k as if k +were constructed by typename <code>basic_ostream<charT, +traits>::sentry k (os)</code>. If <code>bool(k)</code> is +<code>true</code>, </del><ins>Behaves as a formatted output function +(27.6.2.5.1). After constructing a <code>sentry</code> object, if +this object returns <code>true</code> when converted to a value of +type <code>bool</code>, determines padding as described in +22.2.2.2.2</ins>, then inserts the resulting sequence of characters +<code><i>seq</i></code> as if by calling <code>os.rdbuf()->sputn(seq , +n)</code>, where <code><i>n</i></code> is the larger of +<code>os.width()</code> and <code>str.size()</code>; then calls +<code>os.width(0)</code>. <del>If the call to sputn fails, calls +<code>os.setstate(ios_base::failbit)</code>.</del> + + </p> + </blockquote> + <p> + +This proposed resilution assumes the resolution of issue 394 (i.e., +that all formatted output functions are required to set +<code>ios_base::badbit</code> in response to any kind of streambuf +failure), and implicitly assumes that a return value of +<code>sputn(seq, <i>n</i>)</code> other than <code><i>n</i></code> +indicates a failure. + + </p> + + + + +<hr> +<h3><a name="589"></a>589. Requirements on iterators of member template functions of containers</h3> +<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#WP">WP</a> + <b>Submitter:</b> Peter Dimov <b>Date:</b> 2006-08-02</p> +<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> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Duplicate of:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#536">536</a></p> +<p><b>Discussion:</b></p> +<p> +There appears to be no requirements on the InputIterators used in sequences in 23.1.1 in +terms of their value_type, and the requirements in 23.1.2 appear to be overly strict +(requires InputIterator::value_type be the same type as the container's value_type). +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +Change 23.1.1 p3: +</p> + +<blockquote><p> +In Tables 82 and 83, <tt>X</tt> denotes a sequence class, <tt>a</tt> denotes a +value of <tt>X</tt>, <tt>i</tt> and <tt>j</tt> denote iterators satisfying input +iterator requirements <ins>and refer to elements <ins>implicitly +convertible to</ins> <tt>value_type</tt></ins>, <tt>[i, j)</tt> denotes a valid +range, <tt>n</tt> denotes a value of <tt>X::size_type</tt>, <tt>p</tt> denotes a +valid iterator to <tt>a</tt>, <tt>q</tt> denotes a valid dereferenceable +iterator to <tt>a</tt>, <tt>[q1, q2)</tt> denotes a valid range in <tt>a</tt>, +and <tt>t</tt> denotes a value of <tt>X::value_type</tt>. +</p></blockquote> + +<p> +Change 23.1.2 p7: +</p> + +<blockquote><p> +In Table 84, <tt>X</tt> is an associative container class, <tt>a</tt> is a value +of <tt>X</tt>, <tt>a_uniq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports +unique keys, and <tt>a_eq</tt> is a value of <tt>X</tt> when <tt>X</tt> supports +multiple keys, <tt>i</tt> and <tt>j</tt> satisfy input iterator requirements and +refer to elements <del>of</del> <ins>implicitly convertible to</ins> +<tt>value_type</tt>, <tt>[i, j)</tt> is a valid range, <tt>p</tt> is a valid +iterator to <tt>a</tt>, <tt>q</tt> is a valid dereferenceable iterator to +<tt>a</tt>, <tt>[q1, q2)</tt> is a valid range in <tt>a</tt>, <tt>t</tt> is a +value of <tt>X::value_type</tt>, <tt>k</tt> is a value of <tt>X::key_type</tt> +and <tt>c</tt> is a value of type <tt>X::key_compare</tt>. +</p></blockquote> + + + +<p><b>Rationale:</b></p> +<p> +Concepts will probably come in and rewrite this section anyway. But just in case it is +easy to fix this up as a safety net and as a clear statement of intent. +</p> + + + + + +<hr> +<h3><a name="593"></a>593. __STDC_CONSTANT_MACROS</h3> +<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#WP">WP</a> + <b>Submitter:</b> Walter Brown <b>Date:</b> 2006-08-28</p> +<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> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#WP">WP</a> status.</p> +<p><b>Discussion:</b></p> +<p> +Clause 18.3 of the current Working Paper (N2009) deals with the new C++ headers +<cstdint> and <stdint.h>. These are of course based on the C99 header +<stdint.h>, and were part of TR1. +</p> + +<p> +Per 18.3.1/1, these headers define a number of macros and function macros. +While the WP does not mention __STDC_CONSTANT_MACROS in this context, C99 +footnotes do mention __STDC_CONSTANT_MACROS. Further, 18.3.1/2 states that "The +header defines all ... macros the same as C99 subclause 7.18." +</p> + +<p> +Therefore, if I wish to have the above-referenced macros and function macros +defined, must I #define __STDC_CONSTANT_MACROS before I #include <cstdint>, or +does the C++ header define these macros/function macros unconditionally? +</p> + + +<p><b>Proposed resolution:</b></p> +<p> +To put this issue to rest for C++0X, I propose the following addition to +18.3.1/2 of the Working Paper N2009: +</p> + +<blockquote><p> +[Note: The macros defined by <cstdint> are provided unconditionally: in +particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS +(mentioned in C99 footnotes 219, 220, and 222) play no role in C++. --end note] +</p></blockquote> + + + + + +<hr> +<h3><a name="598"></a>598. Decimal: Conversion to integral should truncate, not round.</h3> +<p><b>Section:</b> TRDecimal 3.2 [trdec.types.types] <b>Status:</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#TRDec">TRDec</a> + <b>Submitter:</b> Daniel Krugler <b>Date:</b> 2006-05-28</p> +<p><b>View other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index-open.html#trdec.types.types">active issues</a> in [trdec.types.types].</p> +<p><b>View all other</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-index.html#trdec.types.types">issues</a> in [trdec.types.types].</p> +<p><b>View all issues with</b> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-status.html#TRDec">TRDec</a> status.</p> +<p><b>Discussion:</b></p> + +<p> +In a private email, Daniel writes: +</p> +<blockquote> +<p> +I would like to +ask, what where the reason for the decision to +define the semantics of the integral conversion of the decimal types, namely +</p> +<pre>"operator long long() const; + + Returns: Returns the result of the +conversion of *this to the type long long, as if +performed by the expression llrounddXX(*this)." +</pre> +<p> +where XX stands for either 32, 64, or 128, +corresponding to the proper decimal type. The +exact meaning of llrounddXX is not given in that +paper, so I compared it to the corresponding +definition given in C99, 2nd edition (ISO 9899), which says in 7.12.9.7 p. 2: +</p> +<p> +"The lround and llround functions round their +argument to the nearest integer value, +rounding halfway cases away from zero, regardless +of the current rounding direction. [..]" +</p> +<p> +Now considering the fact that integral conversion +of the usual floating-point types ("4.9 +Floating-integral conversions") has truncation +semantic I wonder why this conversion behaviour +has not been transferred for the decimal types. +</p> +</blockquote> +<p> +Robert comments: +</p> +<p> +Also, there is a further error in the <b>Returns:</b> clause for converting <code>decimal::decimal128</code> to <code>long long</code>. It currently calls <code>llroundd64</code>, not <code>llroundd128</code>. +</p> + + + +<p><b>Proposed resolution:</b></p> +<p> +Change the <b>Returns:</b> clause in 3.2.2.4 to: +</p> +<blockquote><p> +<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd32(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code> is in effect</ins>. +</p></blockquote> +<p> +Change the <b>Returns:</b> clause in 3.2.3.4 to: +</p> +<blockquote><p> +<b>Returns:</b> Returns the result of the conversion of <code>*this</code> to the type <code>long long</code>, as if performed by the expression <code>llroundd64(*this)</code> <ins>while the decimal rounding direction mode [3.5.2] <code>FE_DEC_TOWARD_ZERO</code></ins></p></blockquote></body></html>
\ No newline at end of file |