diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fd553a136d0..557d26043a1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2004-11-15 Paolo Carlini + + * docs/html/ext/lwg-active.html, lwg-defects.html: Import Revision 33. + 2004-11-14 Paolo Carlini * include/bits/streambuf_iterator.h (istreambuf_iterator::_M_get): diff --git a/libstdc++-v3/docs/html/ext/lwg-active.html b/libstdc++-v3/docs/html/ext/lwg-active.html index 148e32f9baf..4bc5b896563 100644 --- a/libstdc++-v3/docs/html/ext/lwg-active.html +++ b/libstdc++-v3/docs/html/ext/lwg-active.html @@ -1,15 +1,15 @@ - -C++ Standard Library Active Issues List +C++ Standard Library Active Issues List + - + - + - + @@ -19,32 +19,32 @@ -
Doc. no.N1657=04-0097N1708=04-0148
Date:16 Jul 20045 Nov 2004
Project:Reply to: Matt Austern <austern@apple.com>
-

C++ Standard Library Active Issues List (Revision 31)

+ +

C++ Standard Library Active Issues List (Revision 33)

Reference ISO/IEC IS 14882:1998(E)

Also see:

The purpose of this document is to record the status of issues which have come before the Library Working Group (LWG) of the ANSI (J16) and ISO (WG21) C++ Standards Committee. Issues represent potential defects in the ISO/IEC IS 14882:1998(E) document. Issues - are not to be used to request new features or other extensions.

+ are not to be used to request new features.

This document contains only library issues which are actively being considered by the Library Working Group. That is, issues which have a - status of New, Open, - Ready, and Review. See - Library Defect Reports List for issues considered defects and - Library Closed Issues List for issues considered closed.

+ status of New, Open, + Ready, and Review. See + Library Defect Reports List for issues considered defects and + Library Closed Issues List for issues considered closed.

The issues in these lists are not necessarily formal ISO Defect Reports (DR's). While some issues will eventually be elevated to @@ -69,7 +69,7 @@ presented in subsequent discussions.

For the most current official version of this document see - http://www.dkuug.dk/jtc1/sc22/wg21. + http://www.open-std.org/jtc1/sc22/wg21/. Requests for further information about this document should include the document number above, reference ISO/IEC 14882:1998(E), and be submitted to Information Technology Industry Council (ITI), 1250 Eye @@ -78,7 +78,7 @@

Public information as to how to obtain a copy of the C++ Standard, join the standards committee, submit an issue, or comment on an issue can be found in the comp.std.c++ FAQ. - Public discussion of C++ Standard related issues occurs on news:comp.std.c++. + Public discussion of C++ Standard related issues occurs on news:comp.std.c++.

For committee members, files available on the committee's private @@ -88,25 +88,33 @@ directory as the issues list files.

Revision History

@@ -358,24 +366,24 @@ format, 64 title. (17 Sep 98) status, the LWG believes that this issue should be revisited at the next revision of the standard. It is usually paired with NAD.

-

Issues are always given the status of New when +

Issues are always given the status of New when they first appear on the issues list. They may progress to - Open or Review while the LWG + Open or Review 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 - Dup, NAD, or Ready as appropriate. Once the full J16 committee votes to + Dup, NAD, or Ready as appropriate. Once the full J16 committee votes to forward Ready issues to the Project Editor, they are given the - status of Defect Report ( DR). These in turn may - become the basis for Technical Corrigenda (TC), + status of Defect Report ( DR). These in turn may + become the basis for Technical Corrigenda (TC), or are closed without action other than a Record of Response - (RR ). The intent of this LWG process is that + (RR ). The intent of this LWG process is that only issues which are truly defects in the Standard move to the formal ISO DR status.

Active Issues


-

23. Num_get overflow result

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: Open  Submitter: Nathan Myers  Date: 6 Aug 1998

+

23. Num_get overflow result

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: Open  Submitter: Nathan Myers  Date: 6 Aug 1998

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 @@ -400,7 +408,7 @@ and hard to trace, so I will describe it briefly:


-

46. Minor Annex D errors

Section: D.7 [depr.str.strstreams]  Status: TC  Submitter: Brendan Kehoe  Date:  1 Jun 1998

+

46. Minor Annex D errors

Section: D.7 [depr.str.strstreams]  Status: TC  Submitter: Brendan Kehoe  Date:  1 Jun 1998

See lib-6522 and edit-814.

Proposed resolution:

-

Change D.7.1 [depr.strstreambuf] (since streambuf is a typedef of +

Change D.7.1 [depr.strstreambuf] (since streambuf is a typedef of basic_streambuf<char>) from:

         virtual streambuf<char>* setbuf(char* s, streamsize n);
@@ -1563,7 +1571,7 @@ basic_streambuf<char>) from:

         virtual streambuf* setbuf(char* s, streamsize n);
-

In D.7.4 [depr.strstream] insert the semicolon now missing after +

In D.7.4 [depr.strstream] insert the semicolon now missing after int_type:

     namespace std {
@@ -1575,27 +1583,27 @@ int_type:

typedef typename char_traits<char>::int_type int_type typedef typename char_traits<char>::pos_type pos_type;

-

47. Imbue() and getloc() Returns clauses swapped

Section: 27.4.2.3 [lib.ios.base.locales]  Status: TC  Submitter: Matt Austern  Date: 21 Jun 1998

+

47. Imbue() and getloc() Returns clauses swapped

Section: 27.4.2.3 [lib.ios.base.locales]  Status: TC  Submitter: Matt Austern  Date: 21 Jun 1998

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?

Proposed resolution:

-

In 27.4.2.3 [lib.ios.base.locales] swap paragraphs 2 and 4.

+

In 27.4.2.3 [lib.ios.base.locales] swap paragraphs 2 and 4.


-

48. Use of non-existent exception constructor

Section: 27.4.2.1.1 [lib.ios::failure]  Status: TC  Submitter: Matt Austern  Date: 21 Jun 1998

+

48. Use of non-existent exception constructor

Section: 27.4.2.1.1 [lib.ios::failure]  Status: TC  Submitter: Matt Austern  Date: 21 Jun 1998

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.

Proposed resolution:

-

Replace 27.4.2.1.1 [lib.ios::failure], paragraph 2, with

+

Replace 27.4.2.1.1 [lib.ios::failure], paragraph 2, with

EFFECTS: Constructs an object of class failure.


-

49. Underspecification of ios_base::sync_with_stdio

Section: 27.4.2.4 [lib.ios.members.static]  Status: WP  Submitter: Matt Austern  Date: 21 Jun 1998

+

49. Underspecification of ios_base::sync_with_stdio

Section: 27.4.2.4 [lib.ios.members.static]  Status: WP  Submitter: Matt Austern  Date: 21 Jun 1998

Two problems

(1) 27.4.2.4 doesn't say what ios_base::sync_with_stdio(f) @@ -1608,7 +1616,7 @@ 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.)

Proposed resolution:

-

Change the following sentence in 27.4.2.4 [lib.ios.members.static] +

Change the following sentence in 27.4.2.4 [lib.ios.members.static] returns clause from:

@@ -1624,41 +1632,35 @@ returns clause from:

false.

-

Add the following immediately after 27.4.2.4 [lib.ios.members.static], +

Add the following immediately after 27.4.2.4 [lib.ios.members.static], paragraph 2:

When a standard iostream object str is synchronized with a standard stdio stream f, the effect of inserting a character c by

-
-  fputc(f, c);
+
  fputc(f, c);
 

is the same as the effect of

-
-  str.rdbuf()->sputc(c);
+
  str.rdbuf()->sputc(c);
 

for any sequence of characters; the effect of extracting a character c by

-
-  c = fgetc(f);
+
  c = fgetc(f);
 

is the same as the effect of:

-
-  c = str.rdbuf()->sbumpc(c);
+
  c = str.rdbuf()->sbumpc(c);
 

for any sequences of characters; and the effect of pushing back a character c by

-
-  ungetc(c, f);
+
  ungetc(c, f);
 

is the same as the effect of

-
-  str.rdbuf()->sputbackc(c);
+
  str.rdbuf()->sputbackc(c);
 

for any sequence of characters. [Footnote: This implies @@ -1675,7 +1677,7 @@ of "synchronization"]

text was added in the non-normative footnote to say that operations on the two streams can be mixed arbitrarily.]


-

50. Copy constructor and assignment operator of ios_base

Section: 27.4.2 [lib.ios.base]  Status: TC  Submitter: Matt Austern  Date: 21 Jun 1998

+

50. Copy constructor and assignment operator of ios_base

Section: 27.4.2 [lib.ios.base]  Status: TC  Submitter: Matt Austern  Date: 21 Jun 1998

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 @@ -1695,13 +1697,13 @@ that intention would have required a explicit description of the semantics (e.g. what happens to the iarray and parray stuff).

Proposed resolution:

-

In 27.4.2 [lib.ios.base], class ios_base, specify the copy +

In 27.4.2 [lib.ios.base], class ios_base, specify the copy constructor and operator= members as being private.

Rationale:

The LWG believes the difficulty of specifying correct semantics outweighs any benefit of allowing ios_base objects to be copyable.


-

51. Requirement to not invalidate iterators missing

Section: 23.1 [lib.container.requirements]  Status: TC  Submitter: David Vandevoorde  Date: 23 Jun 1998

+

51. Requirement to not invalidate iterators missing

Section: 23.1 [lib.container.requirements]  Status: TC  Submitter: David Vandevoorde  Date: 23 Jun 1998

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 @@ -1747,15 +1749,15 @@ proposed resolution below is somewhat updated from CD2-23-011, particularly the addition of the phrase "or change the values of"


-

52. Small I/O problems

Section: 27.4.3.2 [lib.fpos.operations]  Status: TC  Submitter: Matt Austern  Date: 23 Jun 1998

-

First, 27.4.4.1 [lib.basic.ios.cons], table 89. This is pretty obvious: +

52. Small I/O problems

Section: 27.4.3.2 [lib.fpos.operations]  Status: TC  Submitter: Matt Austern  Date: 23 Jun 1998

+

First, 27.4.4.1 [lib.basic.ios.cons], table 89. This is pretty obvious: it should be titled "basic_ios<>() effects", not "ios_base() effects".

-

[The second item is a duplicate; see issue 6 for +

[The second item is a duplicate; see issue 6 for resolution.]

-

Second, 27.4.3.2 [lib.fpos.operations] table 88 . There are a couple +

Second, 27.4.3.2 [lib.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 @@ -1770,16 +1772,16 @@ streampos arithmetic, but that it wasn't actually supposed to do anything meaningful except on platforms, like Unix, where genuine arithmetic is possible.)

Proposed resolution:

-

Change 27.4.4.1 [lib.basic.ios.cons] table 89 title from +

Change 27.4.4.1 [lib.basic.ios.cons] table 89 title from "ios_base() effects" to "basic_ios<>() effects".


-

53. Basic_ios destructor unspecified

Section: 27.4.4.1 [lib.basic.ios.cons]  Status: TC  Submitter: Matt Austern  Date: 23 Jun 1998

+

53. Basic_ios destructor unspecified

Section: 27.4.4.1 [lib.basic.ios.cons]  Status: TC  Submitter: Matt Austern  Date: 23 Jun 1998

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().

Proposed resolution:

-

Add after 27.4.4.1 [lib.basic.ios.cons] paragraph 2:

+

Add after 27.4.4.1 [lib.basic.ios.cons] paragraph 2:

virtual ~basic_ios();

@@ -1788,25 +1790,25 @@ rdbuf().

Rationale:

The LWG reviewed the additional question of whether or not rdbuf(0) may set badbit. The answer is -clearly yes; it may be set via clear(). See 27.4.4.2 [lib.basic.ios.members], paragraph 6. This issue was reviewed at length +clearly yes; it may be set via clear(). See 27.4.4.2 [lib.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 "rdbuf(0) does not set badbit".


-

54. Basic_streambuf's destructor

Section: 27.5.2.1 [lib.streambuf.cons]  Status: TC  Submitter: Matt Austern  Date: 25 Jun 1998

+

54. Basic_streambuf's destructor

Section: 27.5.2.1 [lib.streambuf.cons]  Status: TC  Submitter: Matt Austern  Date: 25 Jun 1998

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.

Proposed resolution:

-

Add after 27.5.2.1 [lib.streambuf.cons] paragraph 2:

+

Add after 27.5.2.1 [lib.streambuf.cons] paragraph 2:

virtual  ~basic_streambuf();

Effects: None.


-

55. Invalid stream position is undefined

Section: 27 [lib.input.output]  Status: TC  Submitter: Matt Austern  Date: 26 Jun 1998

+

55. Invalid stream position is undefined

Section: 27 [lib.input.output]  Status: TC  Submitter: Matt Austern  Date: 26 Jun 1998

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, @@ -1827,52 +1829,52 @@ should not be changed. Here are the three places where "invalid stream position" should not be changed:

-

27.7.1.3 [lib.stringbuf.virtuals], paragraph 14
- 27.8.1.4 [lib.filebuf.virtuals], paragraph 14
- D.7.1.3 [depr.strstreambuf.virtuals], paragraph 17 +

27.7.1.3 [lib.stringbuf.virtuals], paragraph 14
+ 27.8.1.4 [lib.filebuf.virtuals], paragraph 14
+ D.7.1.3 [depr.strstreambuf.virtuals], paragraph 17

Proposed resolution:

-

In 27.5.2.4.2 [lib.streambuf.virt.buffer], paragraph 4, change "Returns an +

In 27.5.2.4.2 [lib.streambuf.virt.buffer], paragraph 4, change "Returns an object of class pos_type that stores an invalid stream position (_lib.iostreams.definitions_)" to "Returns pos_type(off_type(-1))".

-

In 27.5.2.4.2 [lib.streambuf.virt.buffer], paragraph 6, change "Returns +

In 27.5.2.4.2 [lib.streambuf.virt.buffer], paragraph 6, change "Returns an object of class pos_type that stores an invalid stream position" to "Returns pos_type(off_type(-1))".

-

In 27.7.1.3 [lib.stringbuf.virtuals], paragraph 13, change "the object +

In 27.7.1.3 [lib.stringbuf.virtuals], paragraph 13, change "the object stores an invalid stream position" to "the return value is pos_type(off_type(-1))".

-

In 27.8.1.4 [lib.filebuf.virtuals], paragraph 13, change "returns an +

In 27.8.1.4 [lib.filebuf.virtuals], paragraph 13, change "returns an invalid stream position (27.4.3)" to "returns pos_type(off_type(-1))"

-

In 27.8.1.4 [lib.filebuf.virtuals], paragraph 15, change "Otherwise +

In 27.8.1.4 [lib.filebuf.virtuals], paragraph 15, change "Otherwise returns an invalid stream position (_lib.iostreams.definitions_)" to "Otherwise returns pos_type(off_type(-1))"

-

In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 15, change "the object +

In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 15, change "the object stores an invalid stream position" to "the return value is pos_type(off_type(-1))"

-

In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 18, change "the object +

In D.7.1.3 [depr.strstreambuf.virtuals], paragraph 18, change "the object stores an invalid stream position" to "the return value is pos_type(off_type(-1))"


-

56. Showmanyc's return type

Section: 27.5.2 [lib.streambuf]  Status: TC  Submitter: Matt Austern  Date: 29 Jun 1998

+

56. Showmanyc's return type

Section: 27.5.2 [lib.streambuf]  Status: TC  Submitter: Matt Austern  Date: 29 Jun 1998

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.

Proposed resolution:

Change showmanyc's return type in the -27.5.2 [lib.streambuf] class summary to streamsize.

+27.5.2 [lib.streambuf] class summary to streamsize.


-

57. Mistake in char_traits

Section: 21.1.3.2 [lib.char.traits.specializations.wchar.t]  Status: TC  Submitter: Matt Austern  Date: 1 Jul 1998

+

57. Mistake in char_traits

Section: 21.1.3.2 [lib.char.traits.specializations.wchar.t]  Status: TC  Submitter: Matt Austern  Date: 1 Jul 1998

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 @@ -1886,11 +1888,11 @@ 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.

Proposed resolution:

-

Remove the sentence in 21.1.3.2 [lib.char.traits.specializations.wchar.t] paragraph 3 which +

Remove the sentence in 21.1.3.2 [lib.char.traits.specializations.wchar.t] paragraph 3 which begins "The types streampos and wstreampos may be different..." .


-

59. Ambiguity in specification of gbump

Section: 27.5.2.3.1 [lib.streambuf.get.area]  Status: TC  Submitter: Matt Austern  Date: 28 Jul 1998

+

59. Ambiguity in specification of gbump

Section: 27.5.2.3.1 [lib.streambuf.get.area]  Status: TC  Submitter: Matt Austern  Date: 28 Jul 1998

27.5.2.3.1 says that basic_streambuf::gbump() "Advances the next pointer for the input sequence by n."

@@ -1903,7 +1905,7 @@ pbump.

(The "classic" AT&T implementation used the former interpretation.)

Proposed resolution:

-

Change 27.5.2.3.1 [lib.streambuf.get.area] paragraph 4 gbump effects from:

+

Change 27.5.2.3.1 [lib.streambuf.get.area] paragraph 4 gbump effects from:

Effects: Advances the next pointer for the input sequence by n.

@@ -1915,10 +1917,10 @@ former interpretation.)

Effects: Adds n to the next pointer for the input sequence.

-

Make the same change to 27.5.2.3.2 [lib.streambuf.put.area] paragraph 4 pbump +

Make the same change to 27.5.2.3.2 [lib.streambuf.put.area] paragraph 4 pbump effects.


-

60. What is a formatted input function?

Section: 27.6.1.2.1 [lib.istream.formatted.reqmts]  Status: TC  Submitter: Matt Austern  Date: 3 Aug 1998

+

60. What is a formatted input function?

Section: 27.6.1.2.1 [lib.istream.formatted.reqmts]  Status: TC  Submitter: Matt Austern  Date: 3 Aug 1998

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 @@ -1949,17 +1951,17 @@ that the "Common requirements" listed in section 27.6.1.2.1 (for basic_istream) and section 27.6.2.5.1 (for basic_ostream) do not apply to them.

-

Additional comments from Dietmar Kühl: It appears to be somewhat -nonsensical to consider the functions defined in 27.6.1.2.3 [lib.istream::extractors] paragraphs 1 to 5 to be "Formatted input +

Additional comments from Dietmar Kühl: It appears to be somewhat +nonsensical to consider the functions defined in 27.6.1.2.3 [lib.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 [lib.istream.formatted.reqmts]: If this is the case, all manipulators, not +have to conform to the "common requirements" from 27.6.1.2.1 [lib.istream.formatted.reqmts]: If this is the case, all manipulators, not just ws, would skip whitespace unless noskipws is set (... but setting noskipws using the manipulator syntax would also skip whitespace :-)

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 [lib.istream.unformatted] are unformatted input +that all functions in 27.6.1.3 [lib.istream.unformatted] are unformatted input functions. However, it does not really make much sense to construct a sentry object for gcount(), sync(), ... Also it is unclear what happens to the gcount() if @@ -2214,7 +2216,7 @@ unformatted output function (as described in 27.6.2.6, paragraph 1)." by Judy Ward and Matt Austern. This proposed resolution is section VI of that paper.


-

61. Ambiguity in iostreams exception policy

Section: 27.6.1.3 [lib.istream.unformatted]  Status: TC  Submitter: Matt Austern  Date: 6 Aug 1998

+

61. Ambiguity in iostreams exception policy

Section: 27.6.1.3 [lib.istream.unformatted]  Status: TC  Submitter: Matt Austern  Date: 6 Aug 1998

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 @@ -2249,7 +2251,7 @@ parenthetical comment: "(Exceptions thrown from

The LWG looked to two alternative wordings, and choose the proposed resolution as better standardese.


-

62. Sync's return value

Section: 27.6.1.3 [lib.istream.unformatted]  Status: TC  Submitter: Matt Austern  Date: 6 Aug 1998

+

62. Sync's return value

Section: 27.6.1.3 [lib.istream.unformatted]  Status: TC  Submitter: Matt Austern  Date: 6 Aug 1998

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()."

@@ -2257,11 +2259,11 @@ resolution as better standardese.

That looks suspicious, because traits::eof() is of type traits::int_type while the return type of sync() is int.

Proposed resolution:

-

In 27.6.1.3 [lib.istream.unformatted], paragraph 36, change "returns +

In 27.6.1.3 [lib.istream.unformatted], paragraph 36, change "returns traits::eof()" to "returns -1".


-

63. Exception-handling policy for unformatted output

Section: 27.6.2.6 [lib.ostream.unformatted]  Status: TC  Submitter: Matt Austern  Date: 11 Aug 1998

+

63. Exception-handling policy for unformatted output

Section: 27.6.2.6 [lib.ostream.unformatted]  Status: TC  Submitter: Matt Austern  Date: 11 Aug 1998

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 @@ -2291,12 +2293,12 @@ input, unformatted input, and formatted output.


64. Exception handling in basic_istream::operator>>(basic_streambuf*) -

Section: 27.6.1.2.3 [lib.istream::extractors]  Status: TC  Submitter: Matt Austern  Date: 11 Aug 1998

+

Section: 27.6.1.2.3 [lib.istream::extractors]  Status: TC  Submitter: Matt Austern  Date: 11 Aug 1998

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.

Proposed resolution:

-

Replace 27.6.1.2.3 [lib.istream::extractors], paragraph 13, which begins +

Replace 27.6.1.2.3 [lib.istream::extractors], paragraph 13, which begins "If the function inserts no characters ..." with:

@@ -2308,14 +2310,14 @@ elaboration of the first.

(27.4.4.3), then the caught exception is rethrown.


-

66. Strstreambuf::setbuf

Section: D.7.1.3 [depr.strstreambuf.virtuals]  Status: TC  Submitter: Matt Austern  Date: 18 Aug 1998

+

66. Strstreambuf::setbuf

Section: D.7.1.3 [depr.strstreambuf.virtuals]  Status: TC  Submitter: Matt Austern  Date: 18 Aug 1998

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.

Proposed resolution:

-

D.7.1.3 [depr.strstreambuf.virtuals], paragraph 19, replace the setbuf effects +

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:

@@ -2325,7 +2327,7 @@ with:

setbuf(0,0) has no effect.


-

68. Extractors for char* should store null at end

Section: 27.6.1.2.3 [lib.istream::extractors]  Status: TC  Submitter: Angelika Langer  Date: 14 Jul 1998

+

68. Extractors for char* should store null at end

Section: 27.6.1.2.3 [lib.istream::extractors]  Status: TC  Submitter: Angelika Langer  Date: 14 Jul 1998

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?

@@ -2335,7 +2337,7 @@ 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.

Proposed resolution:

-

27.6.1.2.3 [lib.istream::extractors], paragraph 7, change the last list +

27.6.1.2.3 [lib.istream::extractors], paragraph 7, change the last list item from:

@@ -2351,7 +2353,7 @@ item from:

extracted.

-

69. Must elements of a vector be contiguous?

Section: 23.2.4 [lib.vector]  Status: TC  Submitter: Andrew Koenig  Date: 29 Jul 1998

+

69. Must elements of a vector be contiguous?

Section: 23.2.4 [lib.vector]  Status: TC  Submitter: Andrew Koenig  Date: 29 Jul 1998

The issue is this: Must the elements of a vector be in contiguous memory?

(Please note that this is entirely separate from the question of @@ -2359,7 +2361,7 @@ 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)

Proposed resolution:

-

Add the following text to the end of 23.2.4 [lib.vector], +

Add the following text to the end of 23.2.4 [lib.vector], paragraph 1.

@@ -2376,15 +2378,15 @@ directly defined in the standard. Discussion included:


-

70. Uncaught_exception() missing throw() specification

Section: 18.6 [lib.support.exception], 18.6.4 [lib.uncaught]  Status: TC  Submitter: Steve Clamage  Date: Unknown

+

70. Uncaught_exception() missing throw() specification

Section: 18.6 [lib.support.exception], 18.6.4 [lib.uncaught]  Status: TC  Submitter: Steve Clamage  Date: Unknown

In article 3E04@pratique.fr, Valentin Bonnard writes:

uncaught_exception() doesn't have a throw specification.

@@ -2395,29 +2397,29 @@ handle exceptions thrown from uncaught_exception() ?

uncaught_exception() is called in exception handling contexts where exception safety is very important.

Proposed resolution:

-

In 15.5.3 [except.uncaught], paragraph 1, 18.6 [lib.support.exception], and 18.6.4 [lib.uncaught], add "throw()" to uncaught_exception().

+

In 15.5.3 [except.uncaught], paragraph 1, 18.6 [lib.support.exception], and 18.6.4 [lib.uncaught], add "throw()" to uncaught_exception().


-

71. Do_get_monthname synopsis missing argument

Section: 22.2.5.1 [lib.locale.time.get]  Status: TC  Submitter: Nathan Myers  Date: 13 Aug 1998

+

71. Do_get_monthname synopsis missing argument

Section: 22.2.5.1 [lib.locale.time.get]  Status: TC  Submitter: Nathan Myers  Date: 13 Aug 1998

The locale facet member time_get<>::do_get_monthname -is described in 22.2.5.1.2 [lib.locale.time.get.virtuals] with five arguments, +is described in 22.2.5.1.2 [lib.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.

Proposed resolution:

-

In 22.2.5.1 [lib.locale.time.get], add an "end" argument to +

In 22.2.5.1 [lib.locale.time.get], add an "end" argument to the declaration of member do_monthname as follows:

  virtual iter_type do_get_monthname(iter_type s, iter_type end, ios_base&,
                                      ios_base::iostate& err, tm* t) const;

74. Garbled text for codecvt::do_max_length -

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: TC  Submitter: Matt Austern  Date: 8 Sep 1998

+

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: TC  Submitter: Matt Austern  Date: 8 Sep 1998

The text of codecvt::do_max_length's "Returns" clause (22.2.1.5.2, paragraph 11) is garbled. It has unbalanced parentheses and a spurious n.

Proposed resolution:

-

Replace 22.2.1.5.2 [lib.locale.codecvt.virtuals] paragraph 11 with the +

Replace 22.2.1.5.2 [lib.locale.codecvt.virtuals] paragraph 11 with the following:

@@ -2428,7 +2430,7 @@ following:

mbstate_t>::do_max_length() returns 1.

-

75. Contradiction in codecvt::length's argument types

Section: 22.2.1.5 [lib.locale.codecvt]  Status: TC  Submitter:  Matt +

75. Contradiction in codecvt::length's argument types

Section: 22.2.1.5 [lib.locale.codecvt]  Status: TC  Submitter:  Matt Austern  Date:  18 Sep 1998

The class synopses for classes codecvt<> (22.2.1.5) and codecvt_byname<> (22.2.1.6) say that the first @@ -2442,7 +2444,7 @@ synopsis or the summary must be changed.

then we must also add text saying how do_length changes its stateT argument.

Proposed resolution:

-

In 22.2.1.5 [lib.locale.codecvt], and also in 22.2.1.6 [lib.locale.codecvt.byname], +

In 22.2.1.5 [lib.locale.codecvt], and also in 22.2.1.6 [lib.locale.codecvt.byname], change the stateT argument type on both member length() and member do_length() from

@@ -2456,7 +2458,7 @@ change the stateT argument type on both member

stateT&

-

In 22.2.1.5.2 [lib.locale.codecvt.virtuals], add to the definition for member +

In 22.2.1.5.2 [lib.locale.codecvt.virtuals], add to the definition for member do_length a paragraph:

@@ -2466,7 +2468,7 @@ change the stateT argument type on both member max elements.


-

76. Can a codecvt facet always convert one internal character at a time?

Section: 22.2.1.5 [lib.locale.codecvt]  Status: WP  Submitter: Matt Austern  Date: 25 Sep 1998

+

76. Can a codecvt facet always convert one internal character at a time?

Section: 22.2.1.5 [lib.locale.codecvt]  Status: WP  Submitter: Matt Austern  Date: 25 Sep 1998

This issue concerns the requirements on classes derived from codecvt, including user-defined classes. What are the restrictions on the conversion from external characters @@ -2501,8 +2503,8 @@ sequence of M external characters that maps to a sequence of subsequence that maps to N-1 internal characters.)

Some of the wording in the standard, such as the description of -codecvt::do_max_length (22.2.1.5.2 [lib.locale.codecvt.virtuals], -paragraph 11) and basic_filebuf::underflow (27.8.1.4 [lib.filebuf.virtuals], paragraph 3) suggests that it must always be +codecvt::do_max_length (22.2.1.5.2 [lib.locale.codecvt.virtuals], +paragraph 11) and basic_filebuf::underflow (27.8.1.4 [lib.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.

@@ -2515,25 +2517,21 @@ be aware of the assumptions that the library makes. This issue affects positioning operations on basic_filebuf, unbuffered input, and several of codecvt's member functions.

Proposed resolution:

-

Add the following text as a new paragraph, following 22.2.1.5.2 [lib.locale.codecvt.virtuals] paragraph 2:

+

Add the following text as a new paragraph, following 22.2.1.5.2 [lib.locale.codecvt.virtuals] paragraph 2:

A codecvt facet that is used by basic_filebuf -(27.8 [lib.file.streams]) must have the property that if

-
-    do_out(state, from, from_end, from_next, to, to_lim, to_next)
+(27.8  [lib.file.streams]) must have the property that if

+
    do_out(state, from, from_end, from_next, to, to_lim, to_next)
 
would return ok, where from != from_end, then -
-    do_out(state, from, from + 1, from_next, to, to_end, to_next)
+
    do_out(state, from, from + 1, from_next, to, to_end, to_next)
 
must also return ok, and that if -
-    do_in(state, from, from_end, from_next, to, to_lim, to_next)
+
    do_in(state, from, from_end, from_next, to, to_lim, to_next)
 
would return ok, where to != to_lim, then -
-    do_in(state, from, from_end, from_next, to, to + 1, to_next)
+
    do_in(state, from, from_end, from_next, to, to + 1, to_next)
 

must also return ok. [Footnote: Informally, this means that basic_filebuf assumes that the mapping from @@ -2578,34 +2576,34 @@ return value.]

does not expect basic_filebuf to be able to use it.


-

78. Typo: event_call_back

Section: 27.4.2 [lib.ios.base]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

78. Typo: event_call_back

Section: 27.4.2 [lib.ios.base]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

typo: event_call_back should be event_callback  

Proposed resolution:

-

In the 27.4.2 [lib.ios.base] synopsis change +

In the 27.4.2 [lib.ios.base] synopsis change "event_call_back" to "event_callback".


-

79. Inconsistent declaration of polar()

Section: 26.2.1 [lib.complex.synopsis], 26.2.7 [lib.complex.value.ops]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

-

In 26.2.1 [lib.complex.synopsis] polar is declared as follows:

+

79. Inconsistent declaration of polar()

Section: 26.2.1 [lib.complex.synopsis], 26.2.7 [lib.complex.value.ops]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

In 26.2.1 [lib.complex.synopsis] polar is declared as follows:

   template<class T> complex<T> polar(const T&, const T&); 
-

In 26.2.7 [lib.complex.value.ops] it is declared as follows:

+

In 26.2.7 [lib.complex.value.ops] it is declared as follows:

   template<class T> complex<T> polar(const T& rho, const T& theta = 0); 

Thus whether the second parameter is optional is not clear.

Proposed resolution:

-

In 26.2.1 [lib.complex.synopsis] change:

+

In 26.2.1 [lib.complex.synopsis] change:

   template<class T> complex<T> polar(const T&, const T&);

to:

   template<class T> complex<T> polar(const T& rho, const T& theta = 0); 

-

80. Global Operators of complex declared twice

Section: 26.2.1 [lib.complex.synopsis], 26.2.2 [lib.complex]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

80. Global Operators of complex declared twice

Section: 26.2.1 [lib.complex.synopsis], 26.2.2 [lib.complex]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

Both 26.2.1 and 26.2.2 contain declarations of global operators for class complex. This redundancy should be removed.

Proposed resolution:

Reduce redundancy according to the general style of the standard.


-

83. String::npos vs. string::max_size()

Section: 21.3 [lib.basic.string]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

83. String::npos vs. string::max_size()

Section: 21.3 [lib.basic.string]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

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 @@ -2613,7 +2611,7 @@ 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.

Proposed resolution:

-

After 21.3 [lib.basic.string] paragraph 4 ("The functions +

After 21.3 [lib.basic.string] paragraph 4 ("The functions described in this clause...") add a new paragraph:

@@ -2624,7 +2622,7 @@ described in this clause...") add a new paragraph:

Rationale:

The LWG believes length_error is the correct exception to throw.


-

86. String constructors don't describe exceptions

Section: 21.3.1 [lib.string.cons]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

86. String constructors don't describe exceptions

Section: 21.3.1 [lib.string.cons]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

The constructor from a range:

template<class InputIterator> 
@@ -2635,15 +2633,15 @@ described in this clause...") add a new paragraph:

according to the other constructors if the numbers of characters in the range equals npos (or exceeds max_size(), see above).

Proposed resolution:

-

In 21.3.1 [lib.string.cons], Strike throws paragraphs for +

In 21.3.1 [lib.string.cons], Strike throws paragraphs for constructors which say "Throws: length_error if n == npos."

Rationale:

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 83.

+resolution for issue 83.


-

90. Incorrect description of operator >> for strings

Section: 21.3.7.9 [lib.string.io]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

90. Incorrect description of operator >> for strings

Section: 21.3.7.9 [lib.string.io]  Status: TC  Submitter: Nico Josuttis  Date: 29 Sep 1998

The effect of operator >> for strings contain the following item:

    isspace(c,getloc()) is true for the next available input @@ -2651,7 +2649,7 @@ character c.

Here getloc() has to be replaced by is.getloc().

Proposed resolution:

-

In 21.3.7.9 [lib.string.io] paragraph 1 Effects clause replace:

+

In 21.3.7.9 [lib.string.io] paragraph 1 Effects clause replace:

isspace(c,getloc()) is true for the next available input character c.

@@ -2663,13 +2661,13 @@ character c.

isspace(c,is.getloc()) is true for the next available input character c.


-

91. Description of operator>> and getline() for string<> might cause endless loop

Section: 21.3.7.9 [lib.string.io]  Status: WP  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

91. Description of operator>> and getline() for string<> might cause endless loop

Section: 21.3.7.9 [lib.string.io]  Status: WP  Submitter: Nico Josuttis  Date: 29 Sep 1998

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() ?

Proposed resolution:

-

In 21.3.7.9 [lib.string.io], paragraph 1, replace:

+

In 21.3.7.9 [lib.string.io], paragraph 1, replace:

Effects: Begins by constructing a sentry object k as if k were constructed by typename basic_istream<charT,traits>::sentry k( is). If @@ -2681,7 +2679,7 @@ extracted and appended until any of the following occurs:

with:

-Effects: Behaves as a formatted input function (27.6.1.2.1 [lib.istream.formatted.reqmts]). After constructing a sentry object, if the +Effects: Behaves as a formatted input function (27.6.1.2.1 [lib.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 @@ -2690,7 +2688,7 @@ str.max_size(). Characters are extracted and appended until any of the following occurs:
-

In 21.3.7.9 [lib.string.io], paragraph 6, replace

+

In 21.3.7.9 [lib.string.io], paragraph 6, replace

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, @@ -2700,7 +2698,7 @@ following occurs:

with:

-Effects: Behaves as an unformatted input function (27.6.1.3 [lib.istream.unformatted]), except that it does not affect the value returned +Effects: Behaves as an unformatted input function (27.6.1.3 [lib.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 @@ -2714,7 +2712,7 @@ should be a formatted input function, not an unformatted input function. there is no mechanism for gcount to be set except by one of basic_istream's member functions.]

-

[Curaçao: Nico agrees with proposed resolution.]

+

[Curaçao: Nico agrees with proposed resolution.]

Rationale:

The real issue here is whether or not these string input functions @@ -2724,7 +2722,7 @@ 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.


-

92. Incomplete Algorithm Requirements

Section: 25 [lib.algorithms]  Status: WP  Submitter: Nico Josuttis  Date: 29 Sep 1998

+

92. Incomplete Algorithm Requirements

Section: 25 [lib.algorithms]  Status: WP  Submitter: Nico Josuttis  Date: 29 Sep 1998

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:

@@ -2773,7 +2771,7 @@ cost it could be avoided (just implement it directly instead of calling find_if()).

Proposed resolution:

-

Add a new paragraph following 25 [lib.algorithms] paragraph 8:

+

Add a new paragraph following 25 [lib.algorithms] paragraph 8:

[Note: Unless otherwise specified, algorithms that take function objects as arguments are permitted to copy those function objects @@ -2801,7 +2799,7 @@ library book for a detailed discussion.]

[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 [lib.algorithms] after paragraph 9.]

+25 [lib.algorithms] after paragraph 9.]

[Santa Cruz: The standard doesn't currently guarantee that functions object won't be copied, and what isn't forbidden is @@ -2816,8 +2814,8 @@ objects by algorithms is unspecified".  Consider placing in


-

98. Input iterator requirements are badly written

Section: 24.1.1 [lib.input.iterators]  Status: WP  Submitter: AFNOR  Date: 7 Oct 1998

-

Table 72 in 24.1.1 [lib.input.iterators] specifies semantics for +

98. Input iterator requirements are badly written

Section: 24.1.1 [lib.input.iterators]  Status: WP  Submitter: AFNOR  Date: 7 Oct 1998

+

Table 72 in 24.1.1 [lib.input.iterators] specifies semantics for *r++ of:

   { T tmp = *r; ++r; return tmp; }

@@ -2830,11 +2828,11 @@ This is too specific: we want to allow *r++ to return an lvalue.

suggests that the effects *r++ should precisely replicate the behavior of this code, including side effects. (Does this mean that *r++ should invoke the copy constructor exactly as many times as the sample -code above would?) See issue 334 for a similar +code above would?) See issue 334 for a similar problem.

Proposed resolution:

-In Table 72 in 24.1.1 [lib.input.iterators], change the return type +In Table 72 in 24.1.1 [lib.input.iterators], change the return type for *r++ from T to "convertible to T".

Rationale:

This issue has two parts: the return type, and the number of times @@ -2856,7 +2854,7 @@ for *r++ from T to "convertible to T". of input iterators, we can't impose any requirements in the Input Iterator requirements table that forward iterators don't satisfy.


-

103. set::iterator is required to be modifiable, but this allows modification of keys

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: AFNOR  Date: 7 Oct 1998

+

103. set::iterator is required to be modifiable, but this allows modification of keys

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: AFNOR  Date: 7 Oct 1998

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 @@ -2871,7 +2869,7 @@ const_iterator. Set, for example, has the following:

typedef implementation defined iterator;
       // See _lib.container.requirements_

-

23.1 [lib.container.requirements] actually requires that iterator type pointing +

23.1 [lib.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 @@ -2884,7 +2882,7 @@ goes in line with trusting user knows what he is doing.

Other Options Evaluated:

-

Option A.   In 23.1.2 [lib.associative.reqmts], paragraph 2, after +

Option A.   In 23.1.2 [lib.associative.reqmts], paragraph 2, after first sentence, and before "In addition,...", add one line:

@@ -2892,7 +2890,7 @@ first sentence, and before "In addition,...", add one line:

Modification of keys shall not change their strict weak ordering.

-

Option B. Add three new sentences to 23.1.2 [lib.associative.reqmts]:

+

Option B. Add three new sentences to 23.1.2 [lib.associative.reqmts]:

At the end of paragraph 5: "Keys in an associative container @@ -2904,7 +2902,7 @@ first sentence, and before "In addition,...", add one line: type."

-

Option C. To 23.1.2 [lib.associative.reqmts], paragraph 3, which +

Option C. To 23.1.2 [lib.associative.reqmts], paragraph 3, which currently reads:

@@ -2927,7 +2925,7 @@ currently reads:

different than it was the previous time k2 was in the container.]

Proposed resolution:

-

Add the following to 23.1.2 [lib.associative.reqmts] at +

Add the following to 23.1.2 [lib.associative.reqmts] at the indicated location:

@@ -2965,7 +2963,7 @@ conversion from iterator to const_iterator.

[Tokyo: The LWG crafted the proposed resolution and rationale.]


-

106. Numeric library private members are implementation defined

Section: 26.3.5 [lib.template.slice.array]  Status: TC  Submitter: AFNOR  Date: 7 Oct 1998

+

106. Numeric library private members are implementation defined

Section: 26.3.5 [lib.template.slice.array]  Status: TC  Submitter: AFNOR  Date: 7 Oct 1998

This is the only place in the whole standard where the implementation has to document something private.

Proposed resolution:

@@ -2974,23 +2972,23 @@ Remove the comment which says "// remainder implementation defined" from:


-

108. Lifetime of exception::what() return unspecified

Section: 18.6.1 [lib.exception]  Status: TC  Submitter: AFNOR  Date: 7 Oct 1998

+

108. Lifetime of exception::what() return unspecified

Section: 18.6.1 [lib.exception]  Status: TC  Submitter: AFNOR  Date: 7 Oct 1998

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.

Proposed resolution:

-

Add to 18.6.1 [lib.exception] paragraph 9 (exception::what notes +

Add to 18.6.1 [lib.exception] paragraph 9 (exception::what notes clause) the sentence:

@@ -3003,7 +3001,7 @@ to set internal state that should affect the contents of the string returned by what().


-

109. Missing binders for non-const sequence elements

Section: 20.3.6 [lib.binders]  Status: WP  Submitter: Bjarne Stroustrup  Date: 7 Oct 1998

+

109. Missing binders for non-const sequence elements

Section: 20.3.6 [lib.binders]  Status: WP  Submitter: Bjarne Stroustrup  Date: 7 Oct 1998

There are no versions of binders that apply to non-const elements of a sequence. This makes examples like for_each() using bind2nd() on @@ -3078,7 +3076,7 @@ public:

Howard believes there is a flaw in this resolution. See c++std-lib-9127. We may need to reopen this issue.

-

In 20.3.6.1 [lib.binder.1st] in the declaration of binder1st after:

+

In 20.3.6.1 [lib.binder.1st] in the declaration of binder1st after:

typename Operation::result_type
 operator()(const typename Operation::second_argument_type& x) const;

@@ -3088,7 +3086,7 @@ See c++std-lib-9127. We may need to reopen this issue.

typename Operation::result_type
 operator()(typename Operation::second_argument_type& x) const;

-

In 20.3.6.3 [lib.binder.2nd] in the declaration of binder2nd after:

+

In 20.3.6.3 [lib.binder.2nd] in the declaration of binder2nd after:

typename Operation::result_type
 operator()(const typename Operation::first_argument_type& x) const;

@@ -3109,12 +3107,12 @@ Strap poll: NAD - 0. Accept proposed resolution - 10. Leave open - 1.]


-

110. istreambuf_iterator::equal not const

Section: 24.5.3 [lib.istreambuf.iterator], 24.5.3.5 [lib.istreambuf.iterator::equal]  Status: TC  Submitter: Nathan Myers  Date: 15 Oct 1998

+

110. istreambuf_iterator::equal not const

Section: 24.5.3 [lib.istreambuf.iterator], 24.5.3.5 [lib.istreambuf.iterator::equal]  Status: TC  Submitter: Nathan Myers  Date: 15 Oct 1998

Member istreambuf_iterator<>::equal is not declared -"const", yet 24.5.3.6 [lib.istreambuf.iterator::op==] says that operator==, +"const", yet 24.5.3.6 [lib.istreambuf.iterator::op==] says that operator==, which is const, calls it. This is contradictory.

Proposed resolution:

-

In 24.5.3 [lib.istreambuf.iterator] and also in 24.5.3.5 [lib.istreambuf.iterator::equal], +

In 24.5.3 [lib.istreambuf.iterator] and also in 24.5.3.5 [lib.istreambuf.iterator::equal], replace:

@@ -3127,13 +3125,13 @@ replace:

bool equal(const istreambuf_iterator& b) const;

-

112. Minor typo in ostreambuf_iterator constructor

Section: 24.5.4.1 [lib.ostreambuf.iter.cons]  Status: TC  Submitter: Matt Austern  Date: 20 Oct 1998

+

112. Minor typo in ostreambuf_iterator constructor

Section: 24.5.4.1 [lib.ostreambuf.iter.cons]  Status: TC  Submitter: Matt Austern  Date: 20 Oct 1998

The requires clause for ostreambuf_iterator's constructor from an ostream_type (24.5.4.1, paragraph 1) reads "s is not null". However, s is a reference, and references can't be null.

Proposed resolution:

-

In 24.5.4.1 [lib.ostreambuf.iter.cons]:

+

In 24.5.4.1 [lib.ostreambuf.iter.cons]:

Move the current paragraph 1, which reads "Requires: s is not null.", from the first constructor to the second constructor.

@@ -3145,7 +3143,7 @@ reading:

Requires: s.rdbuf() is not null.


-

114. Placement forms example in error twice

Section: 18.4.1.3 [lib.new.delete.placement]  Status: TC  Submitter: Steve Clamage  Date: 28 Oct 1998

+

114. Placement forms example in error twice

Section: 18.4.1.3 [lib.new.delete.placement]  Status: TC  Submitter: Steve Clamage  Date: 28 Oct 1998

Section 18.4.1.3 contains the following example:

[Example: This can be useful for constructing an object at a known address:
@@ -3163,14 +3161,14 @@ believes the () are correct.]

likely to fail.

Proposed resolution:

Replace the first line of code in the example in -18.4.1.3 [lib.new.delete.placement] with: +18.4.1.3 [lib.new.delete.placement] with:

void* place = operator new(sizeof(Something));

-

115. Typo in strstream constructors

Section: D.7.4.1 [depr.strstream.cons]  Status: TC  Submitter: Steve Clamage  Date: 2 Nov 1998

+

115. Typo in strstream constructors

Section: D.7.4.1 [depr.strstream.cons]  Status: TC  Submitter: Steve Clamage  Date: 2 Nov 1998

D.7.4.1 strstream constructors paragraph 2 says:

@@ -3187,11 +3185,11 @@ likely to fail.

should be "If mode&app==app", or "mode&app!=0", meaning that the append bit is set.

Proposed resolution:

-

In D.7.3.1 [depr.ostrstream.cons] paragraph 2 and D.7.4.1 [depr.strstream.cons] +

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 (mode&app)==0 and the second condition to (mode&app)!=0.


-

117. basic_ostream uses nonexistent num_put member functions

Section: 27.6.2.5.2 [lib.ostream.inserters.arithmetic]  Status: WP  Submitter: Matt Austern  Date: 20 Nov 1998

+

117. basic_ostream uses nonexistent num_put member functions

Section: 27.6.2.5.2 [lib.ostream.inserters.arithmetic]  Status: WP  Submitter: Matt Austern  Date: 20 Nov 1998

The effects clause for numeric inserters says that insertion of a value x, whose type is either bool, short, unsigned short, int, unsigned @@ -3220,7 +3218,7 @@ functions that are actually there. I prefer the latter.

-The classes num_get<> and num_put<> handle locale­dependent 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 @@ -3228,8 +3226,7 @@ formatting conversion occurs as if it performed the following code fragment:

-
-bool failed = use_facet<
+
bool failed = use_facet<
    num_put<charT,ostreambuf_iterator<charT,traits> >
    >(getloc()).put(*this, *this, fill(), val). failed();
 
@@ -3239,8 +3236,7 @@ When val is of type short the formatting conversion occurs as if it performed the following code fragment:

-
-ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
+
ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
 bool failed = use_facet<
    num_put<charT,ostreambuf_iterator<charT,traits> >
    >(getloc()).put(*this, *this, fill(),
@@ -3254,8 +3250,7 @@ When val is of type int the formatting conversion occurs as if it performed
 the following code fragment:
 

-
-ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
+
ios_base::fmtflags baseflags = ios_base::flags() & ios_base::basefield;
 bool failed = use_facet<
    num_put<charT,ostreambuf_iterator<charT,traits> >
    >(getloc()).put(*this, *this, fill(),
@@ -3269,8 +3264,7 @@ When val is of type unsigned short or unsigned int the formatting conversion
 occurs as if it performed the following code fragment:
 

-
-bool failed = use_facet<
+
bool failed = use_facet<
    num_put<charT,ostreambuf_iterator<charT,traits> >
    >(getloc()).put(*this, *this, fill(), static_cast<unsigned long>(val)).
 failed();
@@ -3281,8 +3275,7 @@ When val is of type float the formatting conversion occurs as if it
 performed the following code fragment:
 

-
-bool failed = use_facet<
+
bool failed = use_facet<
    num_put<charT,ostreambuf_iterator<charT,traits> >
    >(getloc()).put(*this, *this, fill(), static_cast<double>(val)).
 failed();
@@ -3302,7 +3295,7 @@ 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.)


-

118. basic_istream uses nonexistent num_get member functions

Section: 27.6.1.2.2 [lib.istream.formatted.arithmetic]  Status: WP  Submitter: Matt Austern  Date: 20 Nov 1998

+

118. basic_istream uses nonexistent num_get member functions

Section: 27.6.1.2.2 [lib.istream.formatted.arithmetic]  Status: WP  Submitter: Matt Austern  Date: 20 Nov 1998

Formatted input is defined for the types short, unsigned short, int, unsigned int, long, unsigned long, float, double, long double, bool, and void*. According to section 27.6.1.2.2, @@ -3313,7 +3306,7 @@ iostate err = 0; use_facet< numget >(loc).get(*this, 0, *this, err, val); setstate(err);

-

According to section 22.2.2.1.1 [lib.facet.num.get.members], however, +

According to section 22.2.2.1.1 [lib.facet.num.get.members], however, num_get<>::get() is only overloaded for the types bool, long, unsigned short, unsigned int, unsigned long, unsigned long, @@ -3322,7 +3315,7 @@ int, unsigned long, unsigned long, that 27.6.1.2.2 is using a nonexistent function for types short and int.

Proposed resolution:

-

In 27.6.1.2.2 [lib.istream.formatted.arithmetic] Arithmetic Extractors, remove the +

In 27.6.1.2.2 [lib.istream.formatted.arithmetic] Arithmetic Extractors, remove the two lines (1st and 3rd) which read:

operator>>(short& val);
@@ -3359,8 +3352,8 @@ operator>>(int& val);

[Post-Tokyo: PJP provided the above wording.]


-

119. Should virtual functions be allowed to strengthen the exception specification?

Section: 17.4.4.8 [lib.res.on.exception.handling]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

-

Section 17.4.4.8 [lib.res.on.exception.handling] states:

+

119. Should virtual functions be allowed to strengthen the exception specification?

Section: 17.4.4.8 [lib.res.on.exception.handling]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

+

Section 17.4.4.8 [lib.res.on.exception.handling] states:

"An implementation may strengthen the exception-specification for a function by removing listed exceptions."

@@ -3382,7 +3375,7 @@ public: // overridden virtual function ios_base::failure::~failure() };

Proposed resolution:

-

Change Section 17.4.4.8 [lib.res.on.exception.handling] from:

+

Change Section 17.4.4.8 [lib.res.on.exception.handling] from:

     "may strengthen the exception-specification for a function"

@@ -3392,7 +3385,7 @@ exception-specification for a function"

     "may strengthen the exception-specification for a non-virtual function".


-

120. Can an implementor add specializations?

Section: 17.4.3.1 [lib.reserved.names]  Status: WP  Submitter: Judy Ward  Date: 15 Dec 1998

+

120. Can an implementor add specializations?

Section: 17.4.3.1 [lib.reserved.names]  Status: WP  Submitter: Judy Ward  Date: 15 Dec 1998

The original issue asked whether a library implementor could specialize standard library templates for built-in types. (This was @@ -3437,7 +3430,7 @@ special: the "undefined behavior" that results from having two different explicit instantiations might be harmless.

Proposed resolution:

-

Append to 17.4.3.1 [lib.reserved.names] paragraph 1:

+

Append to 17.4.3.1 [lib.reserved.names] paragraph 1:

A program may explicitly instantiate any templates in the standard library only if the declaration depends on the name of a user-defined @@ -3453,7 +3446,7 @@ different explicit instantiations might be harmless.

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 [lib.reserved.names] paragraph 1:

+ note to the end of 17.4.3.1 [lib.reserved.names] paragraph 1:

[Note: A program may explicitly instantiate standard library templates, even when an explicit instantiation does not depend on @@ -3492,7 +3485,7 @@ different explicit instantiations might be harmless.

linking. If there are such changes in the future, it may be appropriate to revisit this issue later.


-

122. streambuf/wstreambuf description should not say they are specializations

Section: 27.5.2 [lib.streambuf]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

+

122. streambuf/wstreambuf description should not say they are specializations

Section: 27.5.2 [lib.streambuf]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

Section 27.5.2 describes the streambuf classes this way:

@@ -3509,95 +3502,85 @@ specialized for the type wchar_t.

It doesn't seem this was intended, since Section 27.5 has them declared as typedefs.

Proposed resolution:

-

Remove 27.5.2 [lib.streambuf] paragraphs 2 and 3 (the above two +

Remove 27.5.2 [lib.streambuf] paragraphs 2 and 3 (the above two sentences).

Rationale:

The streambuf synopsis already has a declaration for the typedefs and that is sufficient.


-

123. Should valarray helper arrays fill functions be const?

Section: 26.3.5.4 [lib.slice.arr.fill], 26.3.7.4 [lib.gslice.array.fill], 26.3.8.4 [lib.mask.array.fill], 26.3.9.4 [lib.indirect.array.fill]  Status: WP  Submitter: Judy Ward  Date: 15 Dec 1998

+

123. Should valarray helper arrays fill functions be const?

Section: 26.3.5.4 [lib.slice.arr.fill], 26.3.7.4 [lib.gslice.array.fill], 26.3.8.4 [lib.mask.array.fill], 26.3.9.4 [lib.indirect.array.fill]  Status: WP  Submitter: Judy Ward  Date: 15 Dec 1998

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.3.5.2 [lib.slice.arr.assign] is const:

+26.3.5.2 [lib.slice.arr.assign] is const:

    void operator=(const valarray<T>&) const;

-

but this one in Section 26.3.5.4 [lib.slice.arr.fill] is not:

+

but this one in Section 26.3.5.4 [lib.slice.arr.fill] is not:

    void operator=(const T&);

The description of the semantics for these two functions is similar.

Proposed resolution:

-

26.3.5 [lib.template.slice.array] Template class slice_array

+

26.3.5 [lib.template.slice.array] Template class slice_array

In the class template definition for slice_array, replace the member function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

with

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.5.4 [lib.slice.arr.fill] slice_array fill function

+

26.3.5.4 [lib.slice.arr.fill] slice_array fill function

Change the function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

to

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.7 [lib.template.gslice.array] Template class gslice_array

+

26.3.7 [lib.template.gslice.array] Template class gslice_array

In the class template definition for gslice_array, replace the member function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

with

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.7.4 [lib.gslice.array.fill] gslice_array fill function

+

26.3.7.4 [lib.gslice.array.fill] gslice_array fill function

Change the function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

to

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.8 [lib.template.mask.array] Template class mask_array

+

26.3.8 [lib.template.mask.array] Template class mask_array

In the class template definition for mask_array, replace the member function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

with

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.8.4 [lib.mask.array.fill] mask_array fill function

+

26.3.8.4 [lib.mask.array.fill] mask_array fill function

Change the function declaration

@@ -3605,35 +3588,30 @@ is not. For example, look at slice_array. This operator= in Section void operator=(const T&);

to

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.9 [lib.template.indirect.array] Template class indirect_array

+

26.3.9 [lib.template.indirect.array] Template class indirect_array

In the class template definition for indirect_array, replace the member function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

with

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
-

26.3.9.4 [lib.indirect.array.fill] indirect_array fill function

+

26.3.9.4 [lib.indirect.array.fill] indirect_array fill function

Change the function declaration

-
-      void operator=(const T&);
+    
      void operator=(const T&);
     

to

-
-      void operator=(const T&) const;
+    
      void operator=(const T&) const;
     
@@ -3642,32 +3620,32 @@ is not. For example, look at slice_array. This operator= in Section

Rationale:

There's no good reason for one version of operator= being const and -another one not. Because of issue 253, this now +another one not. Because of issue 253, this now matters: these functions are now callable in more circumstances. In many existing implementations, both versions are already const.


-

124. ctype_byname<charT>::do_scan_is & do_scan_not return type should be const charT*

Section: 22.2.1.2 [lib.locale.ctype.byname]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

-

In Section 22.2.1.2 [lib.locale.ctype.byname] +

124. ctype_byname<charT>::do_scan_is & do_scan_not return type should be const charT*

Section: 22.2.1.2 [lib.locale.ctype.byname]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

+

In Section 22.2.1.2 [lib.locale.ctype.byname] ctype_byname<charT>::do_scan_is() and do_scan_not() are declared to return a const char* not a const charT*.

Proposed resolution:

-

Change Section 22.2.1.2 [lib.locale.ctype.byname] do_scan_is() and +

Change Section 22.2.1.2 [lib.locale.ctype.byname] do_scan_is() and do_scan_not() to return a const charT*.


-

125. valarray<T>::operator!() return type is inconsistent

Section: 26.3.2 [lib.template.valarray]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

-

In Section 26.3.2 [lib.template.valarray] valarray<T>::operator!() is -declared to return a valarray<T>, but in Section 26.3.2.5 [lib.valarray.unary] it is declared to return a valarray<bool>. The +

125. valarray<T>::operator!() return type is inconsistent

Section: 26.3.2 [lib.template.valarray]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

+

In Section 26.3.2 [lib.template.valarray] valarray<T>::operator!() is +declared to return a valarray<T>, but in Section 26.3.2.5 [lib.valarray.unary] it is declared to return a valarray<bool>. The latter appears to be correct.

Proposed resolution:

-

Change in Section 26.3.2 [lib.template.valarray] the declaration of +

Change in Section 26.3.2 [lib.template.valarray] the declaration of operator!() so that the return type is valarray<bool>.


-

126. typos in Effects clause of ctype::do_narrow()

Section: 22.2.1.1.2 [lib.locale.ctype.virtuals]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

+

126. typos in Effects clause of ctype::do_narrow()

Section: 22.2.1.1.2 [lib.locale.ctype.virtuals]  Status: TC  Submitter: Judy Ward  Date: 15 Dec 1998

Typos in 22.2.1.1.2 need to be fixed.

Proposed resolution:

-

In Section 22.2.1.1.2 [lib.locale.ctype.virtuals] change:

+

In Section 22.2.1.1.2 [lib.locale.ctype.virtuals] change:

   do_widen(do_narrow(c),0) == c
@@ -3683,7 +3661,7 @@ latter appears to be correct.

   (is(M,c) || !ctc.is(M, do_narrow(c,dfault)) )

-

127. auto_ptr<> conversion issues

Section: 20.4.5 [lib.auto.ptr]  Status: TC  Submitter: Greg Colvin  Date: 17 Feb 1999

+

127. auto_ptr<> conversion issues

Section: 20.4.5 [lib.auto.ptr]  Status: TC  Submitter: Greg Colvin  Date: 17 Feb 1999

There are two problems with the current auto_ptr wording in the standard:

@@ -3720,23 +3698,23 @@ object parameter may be bound to an rvalue [13.3.3.1.4/3]

Tokyo: The LWG removed the following from the proposed resolution:

-

In 20.4.5 [lib.auto.ptr], paragraph 2, and 20.4.5.3 [lib.auto.ptr.conv], +

In 20.4.5 [lib.auto.ptr], paragraph 2, and 20.4.5.3 [lib.auto.ptr.conv], paragraph 2, make the conversion to auto_ptr_ref const:

template<class Y> operator auto_ptr_ref<Y>() const throw();

Proposed resolution:

-

In 20.4.5 [lib.auto.ptr], paragraph 2, move +

In 20.4.5 [lib.auto.ptr], paragraph 2, move the auto_ptr_ref definition to namespace scope.

-

In 20.4.5 [lib.auto.ptr], paragraph 2, add +

In 20.4.5 [lib.auto.ptr], paragraph 2, add a public assignment operator to the auto_ptr definition:

auto_ptr& operator=(auto_ptr_ref<X> r) throw();
-

Also add the assignment operator to 20.4.5.3 [lib.auto.ptr.conv]:

+

Also add the assignment operator to 20.4.5.3 [lib.auto.ptr.conv]:

auto_ptr& operator=(auto_ptr_ref<X> r) throw()
@@ -3747,7 +3725,7 @@ a public assignment operator to the auto_ptr definition:


-

129. Need error indication from seekp() and seekg()

Section: 27.6.1.3 [lib.istream.unformatted], 27.6.2.4 [lib.ostream.seeks]  Status: TC  Submitter: Angelika Langer  Date: 22 Feb 1999

+

129. Need error indication from seekp() and seekg()

Section: 27.6.1.3 [lib.istream.unformatted], 27.6.2.4 [lib.ostream.seeks]  Status: TC  Submitter: Angelika Langer  Date: 22 Feb 1999

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 @@ -3760,8 +3738,8 @@ stream must perform a state-dependent code conversion, etc.

stream state in case of failure.

Proposed resolution:

Add to the Effects: clause of  seekg() in -27.6.1.3 [lib.istream.unformatted] and to the Effects: clause of seekp() in -27.6.2.4 [lib.ostream.seeks]:

+27.6.1.3 [lib.istream.unformatted] and to the Effects: clause of seekp() in +27.6.2.4 [lib.ostream.seeks]:

In case of failure, the function calls setstate(failbit) (which may throw ios_base::failure). @@ -3770,7 +3748,7 @@ stream state in case of failure.

Rationale:

Setting failbit is the usual error reporting mechanism for streams


-

132. list::resize description uses random access iterators

Section: 23.2.2.2 [lib.list.capacity]  Status: TC  Submitter: Howard Hinnant  Date: 6 Mar 1999

+

132. list::resize description uses random access iterators

Section: 23.2.2.2 [lib.list.capacity]  Status: TC  Submitter: Howard Hinnant  Date: 6 Mar 1999

The description reads:

-1- Effects:

@@ -3801,22 +3779,22 @@ stream state in case of failure.

with David Abrahams. They had a discussion and believe there is no issue of exception safety with the proposed resolution.]


-

133. map missing get_allocator()

Section: 23.3.1 [lib.map]  Status: TC  Submitter: Howard Hinnant  Date: 6 Mar 1999

+

133. map missing get_allocator()

Section: 23.3.1 [lib.map]  Status: TC  Submitter: Howard Hinnant  Date: 6 Mar 1999

The title says it all.

Proposed resolution:

-

Insert in 23.3.1 [lib.map], paragraph 2, +

Insert in 23.3.1 [lib.map], paragraph 2, after operator= in the map declaration:

    allocator_type get_allocator() const;

-

134. vector constructors over specified

Section: 23.2.4.1 [lib.vector.cons]  Status: TC  Submitter: Howard Hinnant  Date: 6 Mar 1999

+

134. vector constructors over specified

Section: 23.2.4.1 [lib.vector.cons]  Status: TC  Submitter: Howard Hinnant  Date: 6 Mar 1999

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 ...".

This appears to be overly restrictive, dictating the precise memory/performance tradeoff for the implementor.

Proposed resolution:

-

Change 23.2.4.1 [lib.vector.cons], paragraph 1 to:

+

Change 23.2.4.1 [lib.vector.cons], paragraph 1 to:

-1- Complexity: The constructor template <class InputIterator> vector(InputIterator first, InputIterator last) @@ -3831,7 +3809,7 @@ order logN reallocations if they are just input iterators. is greater than or equal to 2.


-

136. seekp, seekg setting wrong streams?

Section: 27.6.1.3 [lib.istream.unformatted]  Status: WP  Submitter: Howard Hinnant  Date: 6 Mar 1999

+

136. seekp, seekg setting wrong streams?

Section: 27.6.1.3 [lib.istream.unformatted]  Status: WP  Submitter: Howard Hinnant  Date: 6 Mar 1999

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 @@ -3873,7 +3851,7 @@ Effects: If fail() != true, executes rdbuf()->pubseekoff(off, dir, ios_base::

-4- Effects: If fail() != true, executes rdbuf()->pubseekoff(off, dir, ios_base::out). 
-

[Dublin: Dietmar Kühl thinks this is probably correct, but would +

[Dublin: Dietmar Kühl thinks this is probably correct, but would like the opinion of more iostream experts before taking action.]

[Tokyo: Reviewed by the LWG. PJP noted that although his docs are @@ -3892,8 +3870,8 @@ This requirement is a bit weird. There's no similar requirement for basic_streambuf<>::seekpos, or for basic_filebuf<>::seekoff or basic_filebuf<>::seekpos.]


-

137. Do use_facet and has_facet look in the global locale?

Section: 22.1.1 [lib.locale]  Status: TC  Submitter: Angelika Langer  Date: 17 Mar 1999

-

Section 22.1.1 [lib.locale] says:

+

137. Do use_facet and has_facet look in the global locale?

Section: 22.1.1 [lib.locale]  Status: TC  Submitter: Angelika Langer  Date: 17 Mar 1999

+

Section 22.1.1 [lib.locale] says:

-4- In the call to use_facet<Facet>(loc), the type argument chooses a facet, making available all members of the named type. If @@ -3903,7 +3881,7 @@ check if a locale implements a particular facet with the template function has_facet<Facet>().

This contradicts the specification given in section -22.1.2 [lib.locale.global.templates]: +22.1.2 [lib.locale.global.templates]:

template <class  Facet> const  Facet& use_facet(const locale&  loc);
@@ -3920,7 +3898,7 @@ from section 22.1.1.

Needed for consistency with the way locales are handled elsewhere in the standard.


-

139. Optional sequence operation table description unclear

Section: 23.1.1 [lib.sequence.reqmts]  Status: TC  Submitter: Andrew Koenig  Date: 30 Mar 1999

+

139. Optional sequence operation table description unclear

Section: 23.1.1 [lib.sequence.reqmts]  Status: TC  Submitter: Andrew Koenig  Date: 30 Mar 1999

The sentence introducing the Optional sequence operation table (23.1.1 paragraph 12) has two problems:

@@ -3943,11 +3921,11 @@ with:

amortized constant time.


-

141. basic_string::find_last_of, find_last_not_of say pos instead of xpos

Section: 21.3.6.4 [lib.string::find.last.of], 21.3.6.6 [lib.string::find.last.not.of]  Status: TC  Submitter: Arch Robison  Date: 28 Apr 1999

+

141. basic_string::find_last_of, find_last_not_of say pos instead of xpos

Section: 21.3.6.4 [lib.string::find.last.of], 21.3.6.6 [lib.string::find.last.not.of]  Status: TC  Submitter: Arch Robison  Date: 28 Apr 1999

Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1 surely have misprints where they say:

-— xpos <= pos and pos < size();

+— xpos <= pos and pos < size();

Surely the document meant to say ``xpos < size()'' in both places.

@@ -3956,13 +3934,13 @@ proposed resolution.]

Proposed resolution:

Change Sections 21.3.6.4 paragraph 1 and 21.3.6.6 paragraph 1, the line which says:

-— xpos <= pos and pos < size();
+— xpos <= pos and pos < size();

to:

-
xpos <= pos and xpos < size();

+xpos <= pos and xpos < size();


-

142. lexicographical_compare complexity wrong

Section: 25.3.8 [lib.alg.lex.comparison]  Status: TC  Submitter: Howard Hinnant  Date: 20 Jun 1999

+

142. lexicographical_compare complexity wrong

Section: 25.3.8 [lib.alg.lex.comparison]  Status: TC  Submitter: Howard Hinnant  Date: 20 Jun 1999

The lexicographical_compare complexity is specified as:

     "At most min((last1 - first1), (last2 - first2)) @@ -3975,7 +3953,7 @@ equality you have to check both < and >? Yes, IMO you are right! (and Matt states this complexity in his book)

Proposed resolution:

-

Change 25.3.8 [lib.alg.lex.comparison] complexity to:

+

Change 25.3.8 [lib.alg.lex.comparison] complexity to:

At most 2*min((last1 - first1), (last2 - first2)) applications of the corresponding comparison. @@ -3995,7 +3973,7 @@ right! (and Matt states this complexity in his book)

--end example]

-

144. Deque constructor complexity wrong

Section: 23.2.1.1 [lib.deque.cons]  Status: TC  Submitter: Herb Sutter  Date: 9 May 1999

+

144. Deque constructor complexity wrong

Section: 23.2.1.1 [lib.deque.cons]  Status: TC  Submitter: Herb Sutter  Date: 9 May 1999

In 23.2.1.1 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, @@ -4026,7 +4004,7 @@ typo):

Complexity: Makes last - first calls to the copy constructor of T.


-

146. complex<T> Inserter and Extractor need sentries

Section: 26.2.6 [lib.complex.ops]  Status: TC  Submitter: Angelika Langer  Date: 12 May 1999

+

146. complex<T> Inserter and Extractor need sentries

Section: 26.2.6 [lib.complex.ops]  Status: TC  Submitter: Angelika Langer  Date: 12 May 1999

The extractor for complex numbers is specified as: 

@@ -4083,7 +4061,7 @@ 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. 

Proposed resolution:

-

After 26.2.6 [lib.complex.ops] paragraph 14 (operator>>), add a +

After 26.2.6 [lib.complex.ops] paragraph 14 (operator>>), add a Notes clause:

@@ -4100,7 +4078,7 @@ follows an "all-or-none" rule.

For inserters, the LWG believes there is no defect; the standard is correct as written.


-

147. Library Intro refers to global functions that aren't global

Section: 17.4.4.3 [lib.global.functions]  Status: TC  Submitter: Lois Goldthwaite  Date: 4 Jun 1999

+

147. Library Intro refers to global functions that aren't global

Section: 17.4.4.3 [lib.global.functions]  Status: TC  Submitter: Lois Goldthwaite  Date: 4 Jun 1999

The library had many global functions until 17.4.1.1 [lib.contents] paragraph 2 was added:

@@ -4163,22 +4141,22 @@ Because operator new and delete are global, the proposed resolution was changed from "non-member" to "global or non-member.


-

148. Functions in the example facet BoolNames should be const

Section: 22.2.8 [lib.facets.examples]  Status: TC  Submitter: Jeremy Siek  Date: 3 Jun 1999

-

In 22.2.8 [lib.facets.examples] paragraph 13, the do_truename() and +

148. Functions in the example facet BoolNames should be const

Section: 22.2.8 [lib.facets.examples]  Status: TC  Submitter: Jeremy Siek  Date: 3 Jun 1999

+

In 22.2.8 [lib.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.

Proposed resolution:

-

In 22.2.8 [lib.facets.examples] paragraph 13, insert "const" in +

In 22.2.8 [lib.facets.examples] paragraph 13, insert "const" in two places:

string do_truename() const { return "Oui Oui!"; }
string do_falsename() const { return "Mais Non!"; }


-

150. Find_first_of says integer instead of iterator

Section: 25.1.4 [lib.alg.find.first.of]  Status: TC  Submitter: Matt McClure  Date: 30 Jun 1999

+

150. Find_first_of says integer instead of iterator

Section: 25.1.4 [lib.alg.find.first.of]  Status: TC  Submitter: Matt McClure  Date: 30 Jun 1999

Proposed resolution:

-

Change 25.1.4 [lib.alg.find.first.of] paragraph 2 from:

+

Change 25.1.4 [lib.alg.find.first.of] paragraph 2 from:

Returns: The first iterator i in the range [first1, last1) such @@ -4192,7 +4170,7 @@ that for some integer j in the range [first2, last2) ...

that for some iterator j in the range [first2, last2) ...


-

151. Can't currently clear() empty container

Section: 23.1.1 [lib.sequence.reqmts]  Status: TC  Submitter: Ed Brey  Date: 21 Jun 1999

+

151. Can't currently clear() empty container

Section: 23.1.1 [lib.sequence.reqmts]  Status: TC  Submitter: Ed Brey  Date: 21 Jun 1999

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 @@ -4228,13 +4206,13 @@ iterators or certain kinds of iterators is unnecessary. into a


-

152. Typo in scan_is() semantics

Section: 22.2.1.1.2 [lib.locale.ctype.virtuals]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

152. Typo in scan_is() semantics

Section: 22.2.1.1.2 [lib.locale.ctype.virtuals]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The semantics of scan_is() (paragraphs 4 and 6) is not exactly described because there is no function is() which only takes a character as argument. Also, in the effects clause (paragraph 3), the semantic is also kept vague.

Proposed resolution:

-

In 22.2.1.1.2 [lib.locale.ctype.virtuals] paragraphs 4 and 6, change the returns +

In 22.2.1.1.2 [lib.locale.ctype.virtuals] paragraphs 4 and 6, change the returns clause from:

"... such that is(*p) @@ -4243,7 +4221,7 @@ would..."

to:  "... such that is(m, *p) would...."


-

153. Typo in narrow() semantics

Section: 22.2.1.3.2 [lib.facet.ctype.char.members]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

153. Typo in narrow() semantics

Section: 22.2.1.3.2 [lib.facet.ctype.char.members]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The description of the array version of narrow() (in paragraph 11) is flawed: There is no member do_narrow() which takes only three arguments because in addition to the range a default @@ -4254,7 +4232,7 @@ two signatures followed by a Returns clause that only addresses one of them.

Proposed resolution:

-

Change the returns clause in 22.2.1.3.2 [lib.facet.ctype.char.members] +

Change the returns clause in 22.2.1.3.2 [lib.facet.ctype.char.members] paragraph 10 from:

    Returns: do_widen(low, high, to).

@@ -4262,7 +4240,7 @@ paragraph 10 from:

    Returns: do_widen(c) or do_widen(low, high, to), respectively.

-

Change 22.2.1.3.2 [lib.facet.ctype.char.members] paragraph 10 and 11 from:

+

Change 22.2.1.3.2 [lib.facet.ctype.char.members] paragraph 10 and 11 from:

        char        narrow(char c, char /*dfault*/) const;
         const char* narrow(const char* low, const char* high,
                            char /*dfault*/, char* to) const;
@@ -4284,48 +4262,48 @@ version..." comment above. Perhaps it was a circuitous way of saying "dfault" needed to be uncommented?]

[Post-Toronto: the issues list maintainer has merged in the -proposed resolution from issue 207, which addresses the +proposed resolution from issue 207, which addresses the same paragraphs.]


154. Missing double specifier for do_get() -

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The table in paragraph 7 for the length modifier does not list the length modifier l to be applied if the type is double. Thus, the standard asks the implementation to do undefined things when using scanf() (the missing length modifier for scanf() when scanning doubles is actually a problem I found quite often in production code, too).

Proposed resolution:

-

In 22.2.2.1.2 [lib.facet.num.get.virtuals], paragraph 7, add a row in the Length +

In 22.2.2.1.2 [lib.facet.num.get.virtuals], paragraph 7, add a row in the Length Modifier table to say that for double a length modifier l is to be used.

Rationale:

The standard makes an embarrassing beginner's mistake.


155. Typo in naming the class defining the class Init -

Section: 27.3 [lib.iostream.objects]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Section: 27.3 [lib.iostream.objects]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

There are conflicting statements about where the class -Init is defined. According to 27.3 [lib.iostream.objects] paragraph 2 -it is defined as basic_ios::Init, according to 27.4.2 [lib.ios.base] it is defined as ios_base::Init.

+Init is defined. According to 27.3 [lib.iostream.objects] paragraph 2 +it is defined as basic_ios::Init, according to 27.4.2 [lib.ios.base] it is defined as ios_base::Init.

Proposed resolution:

-

Change 27.3 [lib.iostream.objects] paragraph 2 from +

Change 27.3 [lib.iostream.objects] paragraph 2 from "basic_ios::Init" to "ios_base::Init".

Rationale:

Although not strictly wrong, the standard was misleading enough to warrant the change.


-

156. Typo in imbue() description

Section: 27.4.2.3 [lib.ios.base.locales]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

156. Typo in imbue() description

Section: 27.4.2.3 [lib.ios.base.locales]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

There is a small discrepancy between the declarations of -imbue(): in 27.4.2 [lib.ios.base] the argument is passed as -locale const& (correct), in 27.4.2.3 [lib.ios.base.locales] it +imbue(): in 27.4.2 [lib.ios.base] the argument is passed as +locale const& (correct), in 27.4.2.3 [lib.ios.base.locales] it is passed as locale const (wrong).

Proposed resolution:

-

In 27.4.2.3 [lib.ios.base.locales] change the imbue argument +

In 27.4.2.3 [lib.ios.base.locales] change the imbue argument from "locale const" to "locale const&".


158. Underspecified semantics for setbuf() -

Section: 27.5.2.4.2 [lib.streambuf.virt.buffer]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Section: 27.5.2.4.2 [lib.streambuf.virt.buffer]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The default behavior of setbuf() is described only for the situation that gptr() != 0 && gptr() != egptr(): namely to do nothing. What has to be done in other situations  @@ -4337,11 +4315,11 @@ buffer management of derived classes unless these classes do it themselves, the default behavior of setbuf() should always be to do nothing.

Proposed resolution:

-

Change 27.5.2.4.2 [lib.streambuf.virt.buffer], paragraph 3, Default behavior, +

Change 27.5.2.4.2 [lib.streambuf.virt.buffer], paragraph 3, Default behavior, to: "Default behavior: Does nothing. Returns this."


-

159. Strange use of underflow() -

Section: 27.5.2.4.3 [lib.streambuf.virt.get]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

159. Strange use of underflow() +

Section: 27.5.2.4.3 [lib.streambuf.virt.get]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The description of the meaning of the result of showmanyc() seems to be rather strange: It uses calls to underflow(). Using underflow() is strange because @@ -4349,19 +4327,19 @@ this function only reads the current character but does not extract it, uflow() would extract the current character. This should be fixed to use sbumpc() instead.

Proposed resolution:

-

Change 27.5.2.4.3 [lib.streambuf.virt.get] paragraph 1, +

Change 27.5.2.4.3 [lib.streambuf.virt.get] paragraph 1, showmanyc()returns clause, by replacing the word "supplied" with the words "extracted from the stream".


160. Typo: Use of non-existing function exception() -

Section: 27.6.1.1 [lib.istream]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Section: 27.6.1.1 [lib.istream]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The paragraph 4 refers to the function exception() which is not defined. Probably, the referred function is basic_ios<>::exceptions().

Proposed resolution:

-

In 27.6.1.1 [lib.istream], 27.6.1.3 [lib.istream.unformatted], paragraph 1, -27.6.2.1 [lib.ostream], paragraph 3, and 27.6.2.5.1 [lib.ostream.formatted.reqmts], +

In 27.6.1.1 [lib.istream], 27.6.1.3 [lib.istream.unformatted], paragraph 1, +27.6.2.1 [lib.ostream], paragraph 3, and 27.6.2.5.1 [lib.ostream.formatted.reqmts], paragraph 1, change "exception()" to "exceptions()".

@@ -4369,12 +4347,12 @@ paragraph 1, change "exception()" to is the correct spelling.]


161. Typo: istream_iterator vs. istreambuf_iterator -

Section: 27.6.1.2.2 [lib.istream.formatted.arithmetic]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Section: 27.6.1.2.2 [lib.istream.formatted.arithmetic]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The note in the second paragraph pretends that the first argument is an object of type istream_iterator. This is wrong: It is an object of type istreambuf_iterator.

Proposed resolution:

-

Change 27.6.1.2.2 [lib.istream.formatted.arithmetic] from:

+

Change 27.6.1.2.2 [lib.istream.formatted.arithmetic] from:

The first argument provides an object of the istream_iterator class...

@@ -4383,8 +4361,8 @@ an object of type istreambuf_iterator.

The first argument provides an object of the istreambuf_iterator class...


-

164. do_put() has apparently unused fill argument

Section: 22.2.5.3.2 [lib.locale.time.put.virtuals]  Status: TC  Submitter: Angelika Langer  Date: 23 Jul 1999

-

In 22.2.5.3.2 [lib.locale.time.put.virtuals] the do_put() function is specified +

164. do_put() has apparently unused fill argument

Section: 22.2.5.3.2 [lib.locale.time.put.virtuals]  Status: TC  Submitter: Angelika Langer  Date: 23 Jul 1999

+

In 22.2.5.3.2 [lib.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 @@ -4394,7 +4372,7 @@ character in any way? In any case, the specification of time_put.do_put() looks inconsistent to me.

Is the signature of do_put() wrong, or is the effects clause incomplete?

Proposed resolution:

-

Add the following note after 22.2.5.3.2 [lib.locale.time.put.virtuals] +

Add the following note after 22.2.5.3.2 [lib.locale.time.put.virtuals] paragraph 2:

[Note: the fill argument may be used in the implementation-defined formats, or by derivations. A space character is a reasonable default @@ -4405,7 +4383,7 @@ paragraph 2:

users need some guidance on what to pass for the fill argument since the standard doesn't say how it's used.


-

165. xsputn(), pubsync() never called by basic_ostream members?

Section: 27.6.2.1 [lib.ostream]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

165. xsputn(), pubsync() never called by basic_ostream members?

Section: 27.6.2.1 [lib.ostream]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

Paragraph 2 explicitly states that none of the basic_ostream functions falling into one of the groups "formatted output functions" and "unformatted output functions" calls any stream buffer function @@ -4452,7 +4430,7 @@ called from what functions and eg to state specifically that flush() is allowed to call sync() while other functions are not.]


167. Improper use of traits_type::length() -

Section: 27.6.2.5.4 [lib.ostream.inserters.character]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Section: 27.6.2.5.4 [lib.ostream.inserters.character]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

Paragraph 4 states that the length is determined using traits::length(s). Unfortunately, this function is not defined for example if the character type is wchar_t and the @@ -4461,7 +4439,7 @@ the character type is char and the type of s is either signed char const* or unsigned char const*.

Proposed resolution:

-

Change 27.6.2.5.4 [lib.ostream.inserters.character] paragraph 4 from:

+

Change 27.6.2.5.4 [lib.ostream.inserters.character] paragraph 4 from:

Effects: Behaves like an formatted inserter (as described in lib.ostream.formatted.reqmts) of out. After a sentry object is @@ -4516,12 +4494,12 @@ 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>


-

168. Typo: formatted vs. unformatted

Section: 27.6.2.6 [lib.ostream.unformatted]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

168. Typo: formatted vs. unformatted

Section: 27.6.2.6 [lib.ostream.unformatted]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

The first paragraph begins with a descriptions what has to be done in formatted output functions. Probably this is a typo and the paragraph really want to describe unformatted output functions...

Proposed resolution:

-

In 27.6.2.6 [lib.ostream.unformatted] paragraph 1, the first and last +

In 27.6.2.6 [lib.ostream.unformatted] paragraph 1, the first and last sentences, change the word "formatted" to "unformatted":

@@ -4530,18 +4508,18 @@ sentences, change the word "formatted" to function."


-

169. Bad efficiency of overflow() mandated

Section: 27.7.1.3 [lib.stringbuf.virtuals]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

169. Bad efficiency of overflow() mandated

Section: 27.7.1.3 [lib.stringbuf.virtuals]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

Paragraph 8, Notes, of this section seems to mandate an extremely inefficient way of buffer handling for basic_stringbuf, especially in view of the restriction that basic_ostream -member functions are not allowed to use xsputn() (see 27.6.2.1 [lib.ostream]): For each character to be inserted, a new buffer +member functions are not allowed to use xsputn() (see 27.6.2.1 [lib.ostream]): For each character to be inserted, a new buffer is to be created.

Of course, the resolution below requires some handling of simultaneous input and output since it is no longer possible to update egptr() whenever epptr() is changed. A possible solution is to handle this in underflow().

Proposed resolution:

-

In 27.7.1.3 [lib.stringbuf.virtuals] paragraph 8, Notes, insert the words +

In 27.7.1.3 [lib.stringbuf.virtuals] paragraph 8, Notes, insert the words "at least" as in the following:

To make a write position available, the function reallocates (or initially @@ -4551,23 +4529,23 @@ solution is to handle this in underflow().


170. Inconsistent definition of traits_type -

Section: 27.7.4 [lib.stringstream]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

-

The classes basic_stringstream (27.7.4 [lib.stringstream]), -basic_istringstream (27.7.2 [lib.istringstream]), and -basic_ostringstream (27.7.3 [lib.ostringstream]) are inconsistent +

Section: 27.7.4 [lib.stringstream]  Status: TC  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

The classes basic_stringstream (27.7.4 [lib.stringstream]), +basic_istringstream (27.7.2 [lib.istringstream]), and +basic_ostringstream (27.7.3 [lib.ostringstream]) are inconsistent in their definition of the type traits_type: For istringstream, this type is defined, for the other two it is not. This should be consistent.

Proposed resolution:

Proposed resolution:

To the declarations of -basic_ostringstream (27.7.3 [lib.ostringstream]) and -basic_stringstream (27.7.4 [lib.stringstream]) add:

+basic_ostringstream (27.7.3 [lib.ostringstream]) and +basic_stringstream (27.7.4 [lib.stringstream]) add:

typedef traits traits_type;

-

171. Strange seekpos() semantics due to joint position

Section: 27.8.1.4 [lib.filebuf.virtuals]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

-

Overridden virtual functions, seekpos()

In 27.8.1.1 [lib.filebuf] paragraph 3, it is stated that a joint input and +

171. Strange seekpos() semantics due to joint position

Section: 27.8.1.4 [lib.filebuf.virtuals]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Jul 1999

+

Overridden virtual functions, seekpos()

In 27.8.1.1 [lib.filebuf] paragraph 3, it is stated that a joint input and output position is maintained by basic_filebuf. Still, the description of seekpos() seems to talk about different file positions. In particular, it is unclear (at least to me) what is @@ -4619,17 +4597,17 @@ paragraph 14 from:

[Post-Tokyo: Dietmar supplied the above wording.]


172. Inconsistent types for basic_istream::ignore() -

Section: 27.6.1.3 [lib.istream.unformatted]  Status: TC  Submitter: Greg Comeau, Dietmar Kühl  Date: 23 Jul 1999

-

In 27.6.1.1 [lib.istream] the function +

Section: 27.6.1.3 [lib.istream.unformatted]  Status: TC  Submitter: Greg Comeau, Dietmar Kühl  Date: 23 Jul 1999

+

In 27.6.1.1 [lib.istream] the function ignore() gets an object of type streamsize as first -argument. However, in 27.6.1.3 [lib.istream.unformatted] +argument. However, in 27.6.1.3 [lib.istream.unformatted] paragraph 23 the first argument is of type int.

As far as I can see this is not really a contradiction because everything is consistent if streamsize is typedef to be int. However, this is almost certainly not what was intended. The same thing happened to basic_filebuf::setbuf(), -as described in issue 173.

+as described in issue 173.

Darin Adler also submitted this issue, commenting: Either 27.6.1.1 should be modified @@ -4637,17 +4615,17 @@ 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.

Proposed resolution:

-

In 27.6.1.3 [lib.istream.unformatted] paragraph 23 and 24, change both uses +

In 27.6.1.3 [lib.istream.unformatted] paragraph 23 and 24, change both uses of int in the description of ignore() to streamsize.


173. Inconsistent types for basic_filebuf::setbuf() -

Section: 27.8.1.4 [lib.filebuf.virtuals]  Status: TC  Submitter: Greg Comeau, Dietmar Kühl  Date: 23 Jul 1999

+

Section: 27.8.1.4 [lib.filebuf.virtuals]  Status: TC  Submitter: Greg Comeau, Dietmar Kühl  Date: 23 Jul 1999

-In 27.8.1.1 [lib.filebuf] the function setbuf() gets an +In 27.8.1.1 [lib.filebuf] the function setbuf() gets an object of type streamsize as second argument. However, in -27.8.1.4 [lib.filebuf.virtuals] paragraph 9 the second argument is of type +27.8.1.4 [lib.filebuf.virtuals] paragraph 9 the second argument is of type int.

@@ -4656,25 +4634,25 @@ As far as I can see this is not really a contradiction because everything is consistent if streamsize is typedef to be int. However, this is almost certainly not what was intended. The same thing happened to basic_istream::ignore(), -as described in issue 172. +as described in issue 172.

Proposed resolution:

-

In 27.8.1.4 [lib.filebuf.virtuals] paragraph 9, change all uses of +

In 27.8.1.4 [lib.filebuf.virtuals] paragraph 9, change all uses of int in the description of setbuf() to streamsize.


174. Typo: OFF_T vs. POS_T -

Section: D.6 [depr.ios.members]  Status: TC  Submitter: Dietmar Kühl  Date: 23 Jul 1999

+

Section: D.6 [depr.ios.members]  Status: TC  Submitter: Dietmar Kühl  Date: 23 Jul 1999

According to paragraph 1 of this section, streampos is the type OFF_T, the same type as streamoff. However, in paragraph 6 the streampos gets the type POS_T

Proposed resolution:

-

Change D.6 [depr.ios.members] paragraph 1 from "typedef +

Change D.6 [depr.ios.members] paragraph 1 from "typedef OFF_T streampos;" to "typedef POS_T streampos;"


-

175. Ambiguity for basic_streambuf::pubseekpos() and a few other functions.

Section: D.6 [depr.ios.members]  Status: TC  Submitter: Dietmar Kühl  Date: 23 Jul 1999

+

175. Ambiguity for basic_streambuf::pubseekpos() and a few other functions.

Section: D.6 [depr.ios.members]  Status: TC  Submitter: Dietmar Kühl  Date: 23 Jul 1999

According to paragraph 8 of this section, the methods basic_streambuf::pubseekpos(), basic_ifstream::open(), and basic_ofstream::open @@ -4687,23 +4665,23 @@ 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.

Proposed resolution:

-

In D.6 [depr.ios.members] paragraph 8, remove the default arguments for +

In D.6 [depr.ios.members] paragraph 8, remove the default arguments for basic_streambuf::pubseekpos(), basic_ifstream::open(), and basic_ofstream::open().


-

176. exceptions() in ios_base...?

Section: D.6 [depr.ios.members]  Status: TC  Submitter: Dietmar Kühl  Date: 23 Jul 1999

+

176. exceptions() in ios_base...?

Section: D.6 [depr.ios.members]  Status: TC  Submitter: Dietmar Kühl  Date: 23 Jul 1999

The "overload" for the function exceptions() in paragraph 8 gives the impression that there is another function of this function defined in class ios_base. 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 [lib.input.output]."

+in clause 27 [lib.input.output]."

Proposed resolution:

-

In D.6 [depr.ios.members] paragraph 8, move the declaration of the +

In D.6 [depr.ios.members] paragraph 8, move the declaration of the function exceptions()into class basic_ios.


-

179. Comparison of const_iterators to iterators doesn't work

Section: 23.1 [lib.container.requirements]  Status: WP  Submitter: Judy Ward  Date: 2 Jul 1998

+

179. Comparison of const_iterators to iterators doesn't work

Section: 23.1 [lib.container.requirements]  Status: WP  Submitter: Judy Ward  Date: 2 Jul 1998

Currently the following will not compile on two well-known standard library implementations:

@@ -4755,8 +4733,7 @@ return i == ci; The fix is to make the comparison operators templated on two types.

-
-    template <class Iterator1, class Iterator2>
+    
    template <class Iterator1, class Iterator2>
     bool operator== (reverse_iterator<Iterator1> const& x,
                      reverse_iterator<Iterator2> const& y);
     
@@ -4777,11 +4754,10 @@ return i == ci;

Proposed resolution:

-

Insert this paragraph after 23.1 [lib.container.requirements] paragraph 7:

+

Insert this paragraph after 23.1 [lib.container.requirements] paragraph 7:

In the expressions

-
-    i == j
+  
    i == j
     i != j
     i < j
     i <= j
@@ -4809,10 +4785,10 @@ the nested types X::iterator and X::const_iterator,
 where X is a container.  There is no requirement that
 X::reverse_iterator and X::const_reverse_iterator
 can be mixed.  If mixing them is considered important, that's a
-separate issue.  (Issue 280.)
+separate issue.  (Issue 280.)
 


-

181. make_pair() unintended behavior

Section: 20.2.2 [lib.pairs]  Status: TC  Submitter: Andrew Koenig  Date: 3 Aug 1999

+

181. make_pair() unintended behavior

Section: 20.2.2 [lib.pairs]  Status: TC  Submitter: Andrew Koenig  Date: 3 Aug 1999

The claim has surfaced in Usenet that expressions such as

       make_pair("abc", 3)
@@ -4823,7 +4799,7 @@ parameter to const char (&)[4], which type is uncopyable.
I doubt anyone intended that behavior...

Proposed resolution:

-

In 20.2 [lib.utility], paragraph 1 change the following +

In 20.2 [lib.utility], paragraph 1 change the following declaration of make_pair():

template <class T1, class T2> pair<T1,T2> make_pair(const T1&, const T2&);
@@ -4832,7 +4808,7 @@ declaration of make_pair():

template <class T1, class T2> pair<T1,T2> make_pair(T1, T2);
-

In 20.2.2 [lib.pairs] paragraph 7 and the line before, change:

+

In 20.2.2 [lib.pairs] paragraph 7 and the line before, change:

template <class T1, class T2>
 pair<T1, T2> make_pair(const T1& x, const T2& y);
@@ -4850,7 +4826,7 @@ pair<T1, T2> make_pair(T1 x, T2 y);

Rationale:

Two potential fixes were suggested by Matt Austern and Dietmar -Kühl, respectively, 1) overloading with array arguments, and 2) use of +Kühl, respectively, 1) overloading with array arguments, and 2) use of a reference_traits class with a specialization for arrays. Andy Koenig suggested changing to pass by value. In discussion, it appeared that this was a much smaller change to the standard that the other two @@ -4858,18 +4834,18 @@ 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.


-

182. Ambiguous references to size_t

Section: 17 [lib.library]  Status: WP  Submitter: Al Stevens  Date: 15 Aug 1999

+

182. Ambiguous references to size_t

Section: 17 [lib.library]  Status: WP  Submitter: Al Stevens  Date: 15 Aug 1999

Many references to size_t throughout the document omit the std:: namespace qualification.

For -example, 17.4.3.4 [lib.replacement.functions] paragraph 2:

+example, 17.4.3.4 [lib.replacement.functions] paragraph 2:

-
— operator new(size_t)
-— operator new(size_t, const std::nothrow_t&)
-— operator new[](size_t)
-— operator new[](size_t, const std::nothrow_t&)
+
— operator new(size_t)
+— operator new(size_t, const std::nothrow_t&)
+— operator new[](size_t)
+— operator new[](size_t, const std::nothrow_t&)

Proposed resolution:

-

In 17.4.3.4 [lib.replacement.functions] paragraph 2: replace:

+

In 17.4.3.4 [lib.replacement.functions] paragraph 2: replace:

- operator new(size_t)
- operator new(size_t, const std::nothrow_t&)
@@ -4932,7 +4908,8 @@ X::length(p): "size_t" by "std::size_t".

    typedef ptrdiff_t difference_type;
by:
    typedef std::ptrdiff_t difference_type;

-

In [lib.locale.ctype] 22.2.1.1 put namespace std { ...} around the declaration of template <class charT> class ctype.
+

In [lib.locale.ctype] 22.2.1.1 put namespace std { ...} around the +declaration of template <class charT> class ctype.

In [lib.iterator.traits] 24.3.1, paragraph 2 put namespace std { ...} around the declaration of:

@@ -4943,7 +4920,7 @@ X::length(p): "size_t" by "std::size_t".

The LWG believes correcting names like size_t and ptrdiff_t to std::size_t and std::ptrdiff_t 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 [lib.extern.types],

+ptrdiff_t meant anyway because, according to 17.4.3.1.4 [lib.extern.types],

For each type T from the Standard C library, the types ::T and std::T @@ -4957,7 +4934,7 @@ Editor's authority to make this change.

[Post-Tokyo: Nico Josuttis provided the above wording at the request of the LWG.]

-

[Toronto: This is tangentially related to issue 229, but only tangentially: the intent of this issue is to +

[Toronto: This is tangentially related to issue 229, but only tangentially: the intent of this issue is to address use of the name size_t in contexts outside of namespace std, such as in the description of ::operator new. The proposed changes should be reviewed to make sure they are @@ -4967,8 +4944,8 @@ correct.]

them to be correct.]


-

183. I/O stream manipulators don't work for wide character streams

Section: 27.6.3 [lib.std.manip]  Status: WP  Submitter: Andy Sawyer  Date: 7 Jul 1999

-

27.6.3 [lib.std.manip] paragraph 3 says (clause numbering added for +

183. I/O stream manipulators don't work for wide character streams

Section: 27.6.3 [lib.std.manip]  Status: WP  Submitter: Andy Sawyer  Date: 7 Jul 1999

+

27.6.3 [lib.std.manip] paragraph 3 says (clause numbering added for exposition):

Returns: An object s of unspecified type such that if [1] out is an (instance @@ -4996,21 +4973,31 @@ ostreams.

that the value of the expression is "the same specialization of basic_ostream as out"&

Proposed resolution:

-

Replace section 27.6.3 [lib.std.manip] except paragraph 1 with the +

Replace section 27.6.3 [lib.std.manip] except paragraph 1 with the following:

-

2- The type designated smanip in each of the following function descriptions is implementation-specified and may be different for each +

2- The type designated smanip in each of the following function +descriptions is implementation-specified and may be different for each function.

smanip resetiosflags(ios_base::fmtflags mask);

--3- Returns: An object s of unspecified type such that if out is an instance of basic_ostream<charT,traits> then the expression out<<s behaves -as if f(s, mask) were called, or if in is an instance of basic_istream<charT,traits> then the expression in>>s behaves as if +-3- Returns: An object s of unspecified type such that if out is an +instance of basic_ostream<charT,traits> then the expression +out<<s behaves +as if f(s, mask) were called, or if in is an instance of +basic_istream<charT,traits> then the expression in>>s +behaves as if f(s, mask) were called. The function f can be defined as:*

-[Footnote: The expression cin >> resetiosflags(ios_base::skipws) clears ios_base::skipws in the format flags stored in the -basic_istream<charT,traits> object cin (the same as cin >> noskipws), and the expression cout << resetiosflags(ios_base::showbase) clears -ios_base::showbase in the format flags stored in the basic_ostream<charT,traits> object cout (the same as cout << +[Footnote: The expression cin >> resetiosflags(ios_base::skipws) +clears ios_base::skipws in the format flags stored in the +basic_istream<charT,traits> object cin (the same as cin >> +noskipws), and the expression cout << +resetiosflags(ios_base::showbase) clears +ios_base::showbase in the format flags stored in the +basic_ostream<charT,traits> object cout (the same as cout +<< noshowbase). --- end footnote]

     ios_base& f(ios_base& str, ios_base::fmtflags mask)
@@ -5025,8 +5012,12 @@ The expression in>>s has type basic_istream<charT,traits>& and v
 smanip setiosflags(ios_base::fmtflags mask);

--4- Returns: An object s of unspecified type such that if out is an instance of basic_ostream<charT,traits> then the expression out<<s behaves -as if f(s, mask) were called, or if in is an instance of basic_istream<charT,traits> then the expression in>>s behaves as if f(s, +-4- Returns: An object s of unspecified type such that if out is an +instance of basic_ostream<charT,traits> then the expression +out<<s behaves +as if f(s, mask) were called, or if in is an instance of +basic_istream<charT,traits> then the expression in>>s +behaves as if f(s, mask) were called. The function f can be defined as:

     ios_base& f(ios_base& str, ios_base::fmtflags mask)
@@ -5041,8 +5032,12 @@ The expression in>>s has type basic_istream<charT,traits>& and v
smanip setbase(int base);

--5- Returns: An object s of unspecified type such that if out is an instance of basic_ostream<charT,traits> then the expression out<<s behaves -as if f(s, base) were called, or if in is an instance of basic_istream<charT,traits> then the expression in>>s behaves as if f(s, +-5- Returns: An object s of unspecified type such that if out is an +instance of basic_ostream<charT,traits> then the expression +out<<s behaves +as if f(s, base) were called, or if in is an instance of +basic_istream<charT,traits> then the expression in>>s +behaves as if f(s, base) were called. The function f can be defined as:

     ios_base& f(ios_base& str, int base)
@@ -5060,8 +5055,11 @@ The expression in>>s has type basic_istream<charT,traits>& and v
smanip setfill(char_type c);

--6- Returns: An object s of unspecified type such that if out is (or is derived from) basic_ostream<charT,traits> and c has type charT then the -expression out<<s behaves as if f(s, c) were called. The function f can be +-6- Returns: An object s of unspecified type such that if out is (or is +derived from) basic_ostream<charT,traits> and c has type charT +then the +expression out<<s behaves as if f(s, c) were called. The function +f can be defined as:

      template<class charT, class traits>
@@ -5076,8 +5074,12 @@ The expression out<<s has type basic_ostream<charT,traits>& and
smanip setprecision(int n);

--7- Returns: An object s of unspecified type such that if out is an instance of basic_ostream<charT,traits> then the expression out<<s behaves -as if f(s, n) were called, or if in is an instance of basic_istream<charT,traits> then the expression in>>s behaves as if f(s, n) +-7- Returns: An object s of unspecified type such that if out is an +instance of basic_ostream<charT,traits> then the expression +out<<s behaves +as if f(s, n) were called, or if in is an instance of +basic_istream<charT,traits> then the expression in>>s +behaves as if f(s, n) were called. The function f can be defined as:

      ios_base& f(ios_base& str, int n)
@@ -5092,8 +5094,12 @@ The expression in>>s has type basic_istream<charT,traits>& and v .
smanip setw(int n);

--8- Returns: An object s of unspecified type such that if out is an instance of basic_ostream<charT,traits> then the expression out<<s behaves -as if f(s, n) were called, or if in is an instance of basic_istream<charT,traits> then the expression in>>s behaves as if f(s, n) +-8- Returns: An object s of unspecified type such that if out is an +instance of basic_ostream<charT,traits> then the expression +out<<s behaves +as if f(s, n) were called, or if in is an instance of +basic_istream<charT,traits> then the expression in>>s +behaves as if f(s, n) were called. The function f can be defined as:

      ios_base& f(ios_base& str, int n)
@@ -5113,19 +5119,19 @@ in.

[Kona: Andy Sawyer and Beman Dawes will work to improve the wording of the proposed resolution.]

-

[Tokyo - The LWG noted that issue 216 involves +

[Tokyo - The LWG noted that issue 216 involves the same paragraphs.]

[Post-Tokyo: The issues list maintainer combined the proposed -resolution of this issue with the proposed resolution for issue 216 as they both involved the same paragraphs, and were so +resolution of this issue with the proposed resolution for issue 216 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.]


-

184. numeric_limits<bool> wording problems

Section: 18.2.1.5 [lib.numeric.special]  Status: WP  Submitter: Gabriel Dos Reis  Date: 21 Jul 1999

+

184. numeric_limits<bool> wording problems

Section: 18.2.1.5 [lib.numeric.special]  Status: WP  Submitter: Gabriel Dos Reis  Date: 21 Jul 1999

bools are defined by the standard to be of integer types, as per -3.9.1 [basic.fundamental] 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.

@@ -5163,7 +5169,7 @@ types with base representation other than 2.

Furthermore, numeric_limits<bool>::is_modulo and numeric_limits<bool>::is_signed have similar problems.

Proposed resolution:

-

Append to the end of 18.2.1.5 [lib.numeric.special]:

+

Append to the end of 18.2.1.5 [lib.numeric.special]:

The specialization for bool shall be provided as follows:

    namespace std {
@@ -5215,8 +5221,8 @@ resolution.]

[Post-Tokyo:  At the request of the LWG in Tokyo, Nico Josuttis provided the above wording.]


-

185. Questionable use of term "inline"

Section: 20.3 [lib.function.objects]  Status: WP  Submitter: UK Panel  Date: 26 Jul 1999

-

Paragraph 4 of 20.3 [lib.function.objects] says:

+

185. Questionable use of term "inline"

Section: 20.3 [lib.function.objects]  Status: WP  Submitter: UK Panel  Date: 26 Jul 1999

+

Paragraph 4 of 20.3 [lib.function.objects] says:

 [Example: To negate every element of a: transform(a.begin(), a.end(), a.begin(), negate<double>()); The corresponding functions will inline @@ -5241,17 +5247,17 @@ any "inlining" will take place in this case.

Thus the example "mandates" behavior that is explicitly not required elsewhere.

Proposed resolution:

-

In 20.3 [lib.function.objects] paragraph 1, remove the sentence:

+

In 20.3 [lib.function.objects] paragraph 1, remove the sentence:

They are important for the effective use of the library.

-

Remove 20.3 [lib.function.objects] paragraph 2, which reads:

+

Remove 20.3 [lib.function.objects] paragraph 2, which reads:

Using function objects together with function templates increases the expressive power of the library as well as making the resulting code much more efficient.

-

In 20.3 [lib.function.objects] paragraph 4, remove the sentence:

+

In 20.3 [lib.function.objects] paragraph 4, remove the sentence:

The corresponding functions will inline the addition and the negation.

@@ -5260,8 +5266,8 @@ not required elsewhere.

[Kona: The LWG agreed there was a defect.]

[Tokyo: The LWG crafted the proposed resolution.]


-

186. bitset::set() second parameter should be bool

Section: 23.3.5.2 [lib.bitset.members]  Status: WP  Submitter: Darin Adler  Date: 13 Aug 1999

-

In section 23.3.5.2 [lib.bitset.members], paragraph 13 defines the +

186. bitset::set() second parameter should be bool

Section: 23.3.5.2 [lib.bitset.members]  Status: WP  Submitter: Darin Adler  Date: 13 Aug 1999

+

In section 23.3.5.2 [lib.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 @@ -5271,7 +5277,7 @@ 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.

Proposed resolution:

-

In 23.3.5 [lib.template.bitset] Para 1 Replace:

+

In 23.3.5 [lib.template.bitset] Para 1 Replace:

bitset<N>& set(size_t pos, int val = true ); 
@@ -5279,7 +5285,7 @@ translating 0 to false and any non-zero value to true.

bitset<N>& set(size_t pos, bool val = true );
-

In 23.3.5.2 [lib.bitset.members] Para 12(.5) Replace:

+

In 23.3.5.2 [lib.bitset.members] Para 12(.5) Replace:

bitset<N>& set(size_t pos, int val = 1 );
@@ -5298,7 +5304,7 @@ usually implemented as inline, 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.


-

187. iter_swap underspecified

Section: 25.2.2 [lib.alg.swap]  Status: WP  Submitter: Andrew Koenig  Date: 14 Aug 1999

+

187. iter_swap underspecified

Section: 25.2.2 [lib.alg.swap]  Status: WP  Submitter: Andrew Koenig  Date: 14 Aug 1999

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.

What it doesn't say is whether it does so using swap @@ -5354,7 +5360,7 @@ 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.


-

189. setprecision() not specified correctly

Section: 27.4.2.2 [lib.fmtflags.state]  Status: TC  Submitter: Andrew Koenig  Date: 25 Aug 1999

+

189. setprecision() not specified correctly

Section: 27.4.2.2 [lib.fmtflags.state]  Status: TC  Submitter: Andrew Koenig  Date: 25 Aug 1999

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.
@@ -5367,10 +5373,10 @@ point.
I would like the committee to look at the definition carefully and correct the statement in 27.4.2.2

Proposed resolution:

-

Remove from 27.4.2.2 [lib.fmtflags.state], paragraph 9, the text +

Remove from 27.4.2.2 [lib.fmtflags.state], paragraph 9, the text "(number of digits after the decimal point)".


-

193. Heap operations description incorrect

Section: 25.3.6 [lib.alg.heap.operations]  Status: TC  Submitter: Markus Mauhart  Date: 24 Sep 1999

+

193. Heap operations description incorrect

Section: 25.3.6 [lib.alg.heap.operations]  Status: TC  Submitter: Markus Mauhart  Date: 24 Sep 1999

25.3.6 [lib.alg.heap.operations] states two key properties of a heap [a,b), the first of them is

@@ -5382,11 +5388,14 @@ resolution.

A-"part of largest equivalence class" instead of "largest", cause 25.3 [lib.alg.sorting] asserts "strict weak ordering" for all its sub clauses.

-

B-Take 'an oldest' from that equivalence class, otherwise the heap functions 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).

+

B-Take +'an oldest' from that equivalence class, otherwise the heap functions +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).

Proposed resolution:

-

Change 25.3.6 [lib.alg.heap.operations] property (1) from:

+

Change 25.3.6 [lib.alg.heap.operations] property (1) from:

(1) *a is the largest element

@@ -5395,16 +5404,16 @@ resolution.

(1) There is no element greater than *a


-

195. Should basic_istream::sentry's constructor ever set eofbit?

Section: 27.6.1.1.2 [lib.istream::sentry]  Status: TC  Submitter: Matt Austern  Date: 13 Oct 1999

+

195. Should basic_istream::sentry's constructor ever set eofbit?

Section: 27.6.1.1.2 [lib.istream::sentry]  Status: TC  Submitter: Matt Austern  Date: 13 Oct 1999

Suppose that is.flags() & ios_base::skipws is nonzero. What should basic_istream<>::sentry'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.

-

On the one hand, nothing in 27.6.1.1.2 [lib.istream::sentry] says that +

On the one hand, nothing in 27.6.1.1.2 [lib.istream::sentry] says that basic_istream<>::sentry should ever set eofbit. On the -other hand, 27.6.1.1 [lib.istream] paragraph 4 says that if +other hand, 27.6.1.1 [lib.istream] paragraph 4 says that if extraction from a streambuf "returns traits::eof(), then the input function, except as explicitly noted otherwise, completes its actions and does @@ -5443,7 +5452,7 @@ returns traits::eof(), the function calls


-

198. Validity of pointers and references unspecified after iterator destruction

Section: 24.1 [lib.iterator.requirements]  Status: WP  Submitter: Beman Dawes  Date: 3 Nov 1999

+

198. Validity of pointers and references unspecified after iterator destruction

Section: 24.1 [lib.iterator.requirements]  Status: WP  Submitter: Beman Dawes  Date: 3 Nov 1999

Is a pointer or reference obtained from an iterator still valid after destruction of the iterator? @@ -5453,8 +5462,7 @@ Is a pointer or reference obtained from an iterator still valid after the value of the iterator changes?

-
-#include <iostream>
+
#include <iostream>
 #include <vector>
 #include <iterator>
 
@@ -5491,14 +5499,14 @@ elements of containers.

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 [lib.reverse.iter.op.star], which returns a reference, defines +change. The definition of reverse_iterator::operator*(), 24.4.1.3.3 [lib.reverse.iter.op.star], which returns a reference, defines effects:

Iterator tmp = current;
 return *--tmp;
-

The definition of reverse_iterator::operator->(), 24.4.1.3.4 [lib.reverse.iter.opref], which returns a pointer, defines effects:

+

The definition of reverse_iterator::operator->(), 24.4.1.3.4 [lib.reverse.iter.opref], which returns a pointer, defines effects:

return &(operator*());
@@ -5509,18 +5517,17 @@ explicitly. This will also reduce the chance of user code breaking unexpectedly when porting to a different standard library implementation.

Proposed resolution:

-

Add a new paragraph to 24.1 [lib.iterator.requirements]:

+

Add a new paragraph to 24.1 [lib.iterator.requirements]:

Destruction of an iterator may invalidate pointers and references previously obtained from that iterator.
-

Replace paragraph 1 of 24.4.1.3.3 [lib.reverse.iter.op.star] with:

+

Replace paragraph 1 of 24.4.1.3.3 [lib.reverse.iter.op.star] with:

Effects:

-
-  this->tmp = current;
+
  this->tmp = current;
   --this->tmp;
   return *this->tmp;
 
@@ -5529,7 +5536,7 @@ previously obtained from that iterator. [Note: 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 [lib.iterator.requirements].) The name of this member variable is shown for +24.1 [lib.iterator.requirements].) The name of this member variable is shown for exposition only. --end note]

@@ -5545,7 +5552,7 @@ reformulated yet again to reflect this reality.]

assumes its underlying iterator has persistent pointers and references. Andy Koenig pointed out that it is possible to rewrite reverse_iterator so that it no longer makes such an assupmption. -However, this issue is related to issue 299. If we +However, this issue is related to issue 299. If we decide it is intentional that p[n] may return by value instead of reference when p is a Random Access Iterator, other changes in reverse_iterator will be necessary.]

@@ -5568,7 +5575,7 @@ Clause 23 should be reviewed to make sure that guarantees for predefined iterators are as strong as users expect.


-

199. What does allocate(0) return?

Section: 20.1.5 [lib.allocator.requirements]  Status: TC  Submitter: Matt Austern  Date: 19 Nov 1999

+

199. What does allocate(0) return?

Section: 20.1.5 [lib.allocator.requirements]  Status: TC  Submitter: Matt Austern  Date: 19 Nov 1999

Suppose that A is a class that conforms to the Allocator requirements of Table 32, and a is an @@ -5590,7 +5597,7 @@ representation. Since this already implies special case code, it would be over-specification to mandate the return value.


-

200. Forward iterator requirements don't allow constant iterators

Section: 24.1.3 [lib.forward.iterators]  Status: WP  Submitter: Matt Austern  Date: 19 Nov 1999

+

200. Forward iterator requirements don't allow constant iterators

Section: 24.1.3 [lib.forward.iterators]  Status: WP  Submitter: Matt Austern  Date: 19 Nov 1999

In table 74, the return type of the expression *a is given as T&, where T is the iterator's value type. @@ -5612,7 +5619,7 @@ otherwise const U&".

[Tokyo: The LWG believes this is the tip of a larger iceberg; there are multiple const problems with the STL portion of the library and that these should be addressed as a single package.  Note -that issue 180 has already been declared NAD Future for +that issue 180 has already been declared NAD Future for that very reason.]

[Redmond: the LWG thinks this is separable from other constness @@ -5622,7 +5629,7 @@ modified: the original version only discussed *a. It was pointed out that we also need to worry about *r++ and a->m.]


-

202. unique() effects unclear when predicate not an equivalence relation

Section: 25.2.8 [lib.alg.unique]  Status: WP  Submitter: Andrew Koenig  Date: 13 Jan 2000

+

202. unique() effects unclear when predicate not an equivalence relation

Section: 25.2.8 [lib.alg.unique]  Status: WP  Submitter: Andrew Koenig  Date: 13 Jan 2000

What should unique() do if you give it a predicate that is not an equivalence relation? There are at least two plausible answers: @@ -5689,7 +5696,7 @@ In fact, the SGI implementation of unique() does neither: It yields 1, 3, 7.

Proposed resolution:

-

Change 25.2.8 [lib.alg.unique] paragraph 1 to:

+

Change 25.2.8 [lib.alg.unique] paragraph 1 to:

For a nonempty range, eliminates all but the first element from every consecutive group of equivalent elements referred to by the iterator @@ -5713,14 +5720,14 @@ 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.]

-

[Curaçao: The LWG changed "... the range (first, +

[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.]

Rationale:

The LWG also considered an alternative resolution: change -25.2.8 [lib.alg.unique] paragraph 1 to:

+25.2.8 [lib.alg.unique] paragraph 1 to:

For a nonempty range, eliminates all but the first element from every @@ -5743,7 +5750,7 @@ that the behavior of unique() for a non-equivalence relation is specified. Both resolutions are consistent with the behavior of existing implementations.


-

208. Unnecessary restriction on past-the-end iterators

Section: 24.1 [lib.iterator.requirements]  Status: TC  Submitter: Stephen Cleary  Date: 02 Feb 2000

+

208. Unnecessary restriction on past-the-end iterators

Section: 24.1 [lib.iterator.requirements]  Status: TC  Submitter: Stephen Cleary  Date: 02 Feb 2000

In 24.1 paragraph 5, it is stated ". . . Dereferenceable and past-the-end values are always non-singular."

This places an unnecessary restriction on past-the-end iterators for @@ -5755,7 +5762,7 @@ without a "footer" node.

This would have an impact on existing code that expects past-the-end iterators obtained from different (generic) containers being not equal.

Proposed resolution:

-

Change 24.1 [lib.iterator.requirements] paragraph 5, the last sentence, from:

+

Change 24.1 [lib.iterator.requirements] paragraph 5, the last sentence, from:

Dereferenceable and past-the-end values are always non-singular.

@@ -5769,8 +5776,8 @@ zero-length vectors, null pointers are perfectly reasonable past-the-end iterators. Null pointers are singular.


-

209. basic_string declarations inconsistent

Section: 21.3 [lib.basic.string]  Status: TC  Submitter: Igor Stauder  Date: 11 Feb 2000

-

In Section 21.3 [lib.basic.string] the basic_string member function +

209. basic_string declarations inconsistent

Section: 21.3 [lib.basic.string]  Status: TC  Submitter: Igor Stauder  Date: 11 Feb 2000

+

In Section 21.3 [lib.basic.string] the basic_string member function declarations use a consistent style except for the following functions:

void push_back(const charT);
@@ -5783,7 +5790,7 @@ not by reference - should be charT or const charT& )
- swap: redundant use of template parameters in argument basic_string<charT,traits,Allocator>&

Proposed resolution:

-

In Section 21.3 [lib.basic.string] change the basic_string member +

In Section 21.3 [lib.basic.string] change the basic_string member function declarations push_back, assign, and swap to:

void push_back(charT c); 
@@ -5798,8 +5805,8 @@ above.  The LWG felt that this was sufficient reason to merit the
 change.
 


-

210. distance first and last confused

Section: 25 [lib.algorithms]  Status: TC  Submitter: Lisa Lippincott  Date: 15 Feb 2000

-

In paragraph 9 of section 25 [lib.algorithms], it is written:

+

210. distance first and last confused

Section: 25 [lib.algorithms]  Status: TC  Submitter: Lisa Lippincott  Date: 15 Feb 2000

+

In paragraph 9 of section 25 [lib.algorithms], it is written:

In the description of the algorithms operators + and - are used for some of the iterator categories for which they do not have to @@ -5809,14 +5816,14 @@ change.      return distance(a, b);

Proposed resolution:

-

On the last line of paragraph 9 of section 25 [lib.algorithms] change +

On the last line of paragraph 9 of section 25 [lib.algorithms] change "a-b" to "b-a".

Rationale:

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.


-

211. operator>>(istream&, string&) doesn't set failbit

Section: 21.3.7.9 [lib.string.io]  Status: TC  Submitter: Scott Snyder  Date: 4 Feb 2000

+

211. operator>>(istream&, string&) doesn't set failbit

Section: 21.3.7.9 [lib.string.io]  Status: TC  Submitter: Scott Snyder  Date: 4 Feb 2000

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 @@ -5830,12 +5837,12 @@ while (is >> str) ... ;

(which tests failbit) is not required to terminate at EOF.

Furthermore, this is inconsistent with other extraction operators, -which do include this requirement. (See sections 27.6.1.2 [lib.istream.formatted] and 27.6.1.3 [lib.istream.unformatted]), where this +which do include this requirement. (See sections 27.6.1.2 [lib.istream.formatted] and 27.6.1.3 [lib.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 [lib.string.io] paragraph 8.)

+of getline (istream&, string&, charT) in section 21.3.7.9 [lib.string.io] paragraph 8.)

Proposed resolution:

-

Insert new paragraph after paragraph 2 in section 21.3.7.9 [lib.string.io]:

+

Insert new paragraph after paragraph 2 in section 21.3.7.9 [lib.string.io]:

If the function extracts no characters, it calls @@ -5843,13 +5850,13 @@ is.setstate(ios::failbit) which may throw ios_base::failure (27.4.4.3).


-

212. Empty range behavior unclear for several algorithms

Section: 25.3.7 [lib.alg.min.max]  Status: TC  Submitter: Nico Josuttis  Date: 26 Feb 2000

+

212. Empty range behavior unclear for several algorithms

Section: 25.3.7 [lib.alg.min.max]  Status: TC  Submitter: Nico Josuttis  Date: 26 Feb 2000

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().

Proposed resolution:

-

In 25.3.7 [lib.alg.min.max] - Minimum and maximum, paragraphs 7 and +

In 25.3.7 [lib.alg.min.max] - Minimum and maximum, paragraphs 7 and 9, append: Returns last if first==last.

Rationale:

The LWG looked in some detail at all of the above mentioned @@ -5857,7 +5864,7 @@ algorithms, but believes that except for min_element() and max_element() it is already clear that last is returned if first == last.


-

214. set::find() missing const overload

Section: 23.3.3 [lib.set], 23.3.4 [lib.multiset]  Status: WP  Submitter: Judy Ward  Date: 28 Feb 2000

+

214. set::find() missing const overload

Section: 23.3.3 [lib.set], 23.3.4 [lib.multiset]  Status: WP  Submitter: Judy Ward  Date: 28 Feb 2000

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 @@ -5868,7 +5875,7 @@ and multiset do not, all they have is:

Proposed resolution:

Change the prototypes for find(), lower_bound(), upper_bound(), and -equal_range() in section 23.3.3 [lib.set] and section 23.3.4 [lib.multiset] to each have two overloads:

+equal_range() in section 23.3.3 [lib.set] and section 23.3.4 [lib.multiset] to each have two overloads:

iterator find(const key_type & x);
 const_iterator find(const key_type & x) const;
@@ -5884,7 +5891,7 @@ pair<const_iterator, const_iterator> equal_range(const key_type & x) c extending the proposed resolution to lower_bound, upper_bound, and equal_range.]


-

217. Facets example (Classifying Japanese characters) contains errors

Section: 22.2.8 [lib.facets.examples]  Status: TC  Submitter: Martin Sebor  Date: 29 Feb 2000

+

217. Facets example (Classifying Japanese characters) contains errors

Section: 22.2.8 [lib.facets.examples]  Status: TC  Submitter: Martin Sebor  Date: 29 Feb 2000

The example in 22.2.8, paragraph 11 contains the following errors:

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 @@ -5927,7 +5934,7 @@ declared above.

return 0; }

-

220. ~ios_base() usage valid?

Section: 27.4.2.7 [lib.ios.base.cons]  Status: TC  Submitter: Jonathan Schilling, Howard Hinnant  Date: 13 Mar 2000

+

220. ~ios_base() usage valid?

Section: 27.4.2.7 [lib.ios.base.cons]  Status: TC  Submitter: Jonathan Schilling, Howard Hinnant  Date: 13 Mar 2000

The pre-conditions for the ios_base destructor are described in 27.4.2.7 paragraph 2:

@@ -5963,12 +5970,13 @@ behavior.

to

-

Effects: Each ios_base member has an indeterminate 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.

+

Effects: Each ios_base member has an indeterminate +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.


-

221. num_get<>::do_get stage 2 processing broken

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: WP  Submitter: Matt Austern  Date: 14 Mar 2000

+

221. num_get<>::do_get stage 2 processing broken

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: WP  Submitter: Matt Austern  Date: 14 Mar 2000

Stage 2 processing of numeric conversion is broken.

Table 55 in 22.2.2.1.2 says that when basefield is 0 the integral @@ -6001,7 +6009,7 @@ 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.


-

222. Are throw clauses necessary if a throw is already implied by the effects clause?

Section: 17.3.1.3 [lib.structure.specifications]  Status: TC  Submitter: Judy Ward  Date: 17 Mar 2000

+

222. Are throw clauses necessary if a throw is already implied by the effects clause?

Section: 17.3.1.3 [lib.structure.specifications]  Status: TC  Submitter: Judy Ward  Date: 17 Mar 2000

Section 21.3.6.8 describes the basic_string::compare function this way:

21.3.6.8 - basic_string::compare [lib.string::compare]
@@ -6017,7 +6025,7 @@ int compare(size_type pos1, size_type n1,
 

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 [lib.string.cons] paragraph 4.

+section 21.3.1 [lib.string.cons] paragraph 4.

On the other hand, the compare function descriptions themselves don't have "Throws: " clauses and according to 17.3.1.3, paragraph 3, elements @@ -6026,7 +6034,7 @@ that do not apply to a function are omitted.

"Effects" clauses correct, or are the "Throws" clauses missing?

Proposed resolution:

-

In 17.3.1.3 [lib.structure.specifications] paragraph 3, the footnote 148 attached to +

In 17.3.1.3 [lib.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:

@@ -6042,10 +6050,10 @@ throw. The inconsistent wording is in a footnote, and thus non-normative. The proposed resolution from the LWG clarifies the footnote.


-

223. reverse algorithm should use iter_swap rather than swap

Section: 25.2.9 [lib.alg.reverse]  Status: TC  Submitter: Dave Abrahams  Date: 21 Mar 2000

+

223. reverse algorithm should use iter_swap rather than swap

Section: 25.2.9 [lib.alg.reverse]  Status: TC  Submitter: Dave Abrahams  Date: 21 Mar 2000

Shouldn't the effects say "applies iter_swap to all pairs..."?

Proposed resolution:

-

In 25.2.9 [lib.alg.reverse], replace:

+

In 25.2.9 [lib.alg.reverse], replace:

Effects: For each non-negative integer i <= (last - first)/2, applies swap to all pairs of iterators first + i, (last - i) - 1. @@ -6056,7 +6064,7 @@ footnote.

applies iter_swap to all pairs of iterators first + i, (last - i) - 1.

-

224. clear() complexity for associative containers refers to undefined N

Section: 23.1.2 [lib.associative.reqmts]  Status: TC  Submitter: Ed Brey  Date: 23 Mar 2000

+

224. clear() complexity for associative containers refers to undefined N

Section: 23.1.2 [lib.associative.reqmts]  Status: TC  Submitter: Ed Brey  Date: 23 Mar 2000

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.

@@ -6070,7 +6078,7 @@ error: there's no difference between O(N) and O(N + log(N)). The text in the standard is probably an incorrect cut-and-paste from the range version of erase.


-

225. std:: algorithms use of other unqualified algorithms

Section: 17.4.4.3 [lib.global.functions]  Status: WP  Submitter: Dave Abrahams  Date: 01 Apr 2000

+

225. std:: algorithms use of other unqualified algorithms

Section: 17.4.4.3 [lib.global.functions]  Status: WP  Submitter: Dave Abrahams  Date: 01 Apr 2000

Are algorithms in std:: allowed to use other algorithms without qualification, so functions in user namespaces might be found through Koenig lookup?

For example, a popular standard library implementation includes this @@ -6131,12 +6139,12 @@ leading "::" qualification is not required because any namespace qualification is sufficient to suppress Koenig lookup.]

Proposed resolution:

Add a paragraph and a note at the end of -17.4.4.3 [lib.global.functions]:

+17.4.4.3 [lib.global.functions]:

Unless otherwise specified, no global or non-member function in the standard library shall use a function from another namespace which is -found through argument-dependent name lookup (3.4.2 [basic.lookup.koenig]).

+found through argument-dependent name lookup (3.4.2 [basic.lookup.koenig]).

[Note: the phrase "unless otherwise specified" is intended to allow Koenig lookup in cases like that of ostream_iterators:
@@ -6155,9 +6163,9 @@ allow Koenig lookup in cases like that of ostream_iterators:
is as yet unsure if the proposed resolution is the best solution. Furthermore, the LWG believes that the same problem of unqualified library names applies to wording in the standard itself, -and has opened issue 229 accordingly. Any resolution of -issue 225 should be coordinated with the resolution of -issue 229.]

+and has opened issue 229 accordingly. Any resolution of +issue 225 should be coordinated with the resolution of +issue 229.]

[Toronto: The LWG is not sure if this is a defect in the standard. Most LWG members believe that an implementation of @@ -6167,7 +6175,7 @@ those specified in the standard. The standard's description of unique does not say that overloading adjacent_find should have any effect.]

-

[Curaçao: An LWG-subgroup spent an afternoon working on issues +

[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 EWG portion (Dave will write a proposal). The LWG and EWG had @@ -6182,10 +6190,10 @@ resolution for this issue is in accordance with Howard's paper.]

other namespace. However, this is at worst a clarification. It is surely right that algorithsm shouldn't pick up random names, that user-defined names should have no effect unless otherwise specified. - Issue 226 deals with the question of when it is + Issue 226 deals with the question of when it is appropriate for the standard to explicitly specify otherwise.


-

226. User supplied specializations or overloads of namespace std function templates

Section: 17.4.3.1 [lib.reserved.names]  Status: WP  Submitter: Dave Abrahams  Date: 01 Apr 2000

+

226. User supplied specializations or overloads of namespace std function templates

Section: 17.4.3.1 [lib.reserved.names]  Status: WP  Submitter: Dave Abrahams  Date: 01 Apr 2000

The issues are: 

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? 

@@ -6228,7 +6236,7 @@ eventually be used with lib2. This may seem innocuous at first when applied to names like swap, but consider more ambiguous names like unique_copy() instead. It is easy to imagine the user wanting to define these names differently in his own namespace. A definition with semantics incompatible with the standard -library could cause serious problems (see issue 225).

+library could cause serious problems (see issue 225).

Why, you may ask, can't we just partially specialize std::swap()? It's because the language doesn't allow for partial specialization of function templates. If you write:

@@ -6329,7 +6337,7 @@ unqualified call of swap. (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.]

-

[Curaçao: An LWG-subgroup spent an afternoon working on issues +

[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 EWG portion (Dave will write a proposal). The LWG and EWG had @@ -6351,10 +6359,10 @@ resolution is the one proposed by Howard.]

(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 swap. Also, in 26.3.3.3 [lib.valarray.transcend] paragraph 1, + to swap. Also, in 26.3.3.3 [lib.valarray.transcend] paragraph 1, state that the valarray transcendentals use unqualified lookup.


-

227. std::swap() should require CopyConstructible or DefaultConstructible arguments

Section: 25.2.2 [lib.alg.swap]  Status: TC  Submitter: Dave Abrahams  Date: 09 Apr 2000

+

227. std::swap() should require CopyConstructible or DefaultConstructible arguments

Section: 25.2.2 [lib.alg.swap]  Status: TC  Submitter: Dave Abrahams  Date: 09 Apr 2000

25.2.2 reads:

template<class T> void swap(T& a, T& b);
@@ -6395,9 +6403,9 @@ resolution is the one proposed by Howard.]

Requires: Type T is CopyConstructible (20.1.3) and Assignable (23.1)


-

228. Incorrect specification of "..._byname" facets

Section: 22.2 [lib.locale.categories]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Apr 2000

-

The sections 22.2.1.2 [lib.locale.ctype.byname], 22.2.1.4 [lib.locale.ctype.byname.special], -22.2.1.6 [lib.locale.codecvt.byname], 22.2.3.2 [lib.locale.numpunct.byname], 22.2.4.2 [lib.locale.collate.byname], 22.2.5.4 [lib.locale.time.put.byname], 22.2.6.4 [lib.locale.moneypunct.byname], and 22.2.7.2 [lib.locale.messages.byname] overspecify the +

228. Incorrect specification of "..._byname" facets

Section: 22.2 [lib.locale.categories]  Status: WP  Submitter: Dietmar Kühl  Date: 20 Apr 2000

+

The sections 22.2.1.2 [lib.locale.ctype.byname], 22.2.1.4 [lib.locale.ctype.byname.special], +22.2.1.6 [lib.locale.codecvt.byname], 22.2.3.2 [lib.locale.numpunct.byname], 22.2.4.2 [lib.locale.collate.byname], 22.2.5.4 [lib.locale.time.put.byname], 22.2.6.4 [lib.locale.moneypunct.byname], and 22.2.7.2 [lib.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 @@ -6516,18 +6524,18 @@ specialization it is not virtual.

~messages_byname(); // virtual }; }
-

Remove section 22.2.1.4 [lib.locale.ctype.byname.special] completely (because in +

Remove section 22.2.1.4 [lib.locale.ctype.byname.special] completely (because in this case only those members are defined to be virtual which are defined to be virtual in 'ctype<cT>'.)

-

[Post-Tokyo: Dietmar Kühl submitted this issue at the request of -the LWG to solve the underlying problems raised by issue 138.]

+

[Post-Tokyo: Dietmar Kühl submitted this issue at the request of +the LWG to solve the underlying problems raised by issue 138.]

[Copenhagen: proposed resolution was revised slightly, to remove three last virtual functions from messages_byname.]


-

229. Unqualified references of other library entities

Section: 17.4.1.1 [lib.contents]  Status: WP  Submitter: Steve Clamage  Date: 19 Apr 2000

+

229. Unqualified references of other library entities

Section: 17.4.1.1 [lib.contents]  Status: WP  Submitter: Steve Clamage  Date: 19 Apr 2000

Throughout the library chapters, the descriptions of library entities refer to other library entities without necessarily qualifying the names.

@@ -6541,7 +6549,7 @@ override any ::std::swap function when Koenig lookup applies.

"::std::" throughout, too many lines in the standard would have to be adjusted to make that change in a Technical Corrigendum.

-

Issue 182, which addresses qualification of +

Issue 182, which addresses qualification of size_t, is a special case of this.

Proposed resolution:

@@ -6555,7 +6563,7 @@ adjusted to make that change in a Technical Corrigendum.

[Post-Tokyo: Steve Clamage submitted this issue at the request of the LWG to solve a problem in the standard itself similar to the -problem within implementations of library identified by issue 225. Any resolution of issue 225 should be +problem within implementations of library identified by issue 225. Any resolution of issue 225 should be coordinated with the resolution of this issue.]

[post-Toronto: Howard is undecided about whether it is @@ -6569,7 +6577,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".]

-

[Curaçao: An LWG-subgroup spent an afternoon working on issues +

[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 EWG portion (Dave will write a proposal). The LWG and EWG had @@ -6578,8 +6586,8 @@ issues 225 and 226. In light of that resolution, the proposed resolution for the current issue makes sense.]


-

230. Assignable specified without also specifying CopyConstructible

Section: 17 [lib.library]  Status: WP  Submitter: Beman Dawes  Date: 26 Apr 2000

-

Issue 227 identified an instance (std::swap) where +

230. Assignable specified without also specifying CopyConstructible

Section: 17 [lib.library]  Status: WP  Submitter: Beman Dawes  Date: 26 Apr 2000

+

Issue 227 identified an instance (std::swap) where Assignable was specified without also specifying CopyConstructible. The LWG asked that the standard be searched to determine if the same defect existed elsewhere.

@@ -6587,19 +6595,19 @@ determine if the same defect existed elsewhere.

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 [lib.accumulate].

+specified. For example, 26.4.1 [lib.accumulate].

Proposed resolution:

-

In 23.1 [lib.container.requirements] table 65 for value_type: +

In 23.1 [lib.container.requirements] table 65 for value_type: change "T is Assignable" to "T is CopyConstructible and Assignable"

-

In 23.1.2 [lib.associative.reqmts] table 69 X::key_type; change +

In 23.1.2 [lib.associative.reqmts] table 69 X::key_type; change "Key is Assignable" to "Key is CopyConstructible and Assignable"

-

In 24.1.2 [lib.output.iterators] paragraph 1, change: +

In 24.1.2 [lib.output.iterators] paragraph 1, change:

A class or a built-in type X satisfies the requirements of an @@ -6618,12 +6626,12 @@ Table 73:

[Post-Tokyo: Beman Dawes submitted this issue at the request of -the LWG. He asks that the 25.2.4 [lib.alg.replace] and 25.2.5 [lib.alg.fill] changes be studied carefully, as it is not clear that +the LWG. He asks that the 25.2.4 [lib.alg.replace] and 25.2.5 [lib.alg.fill] changes be studied carefully, as it is not clear that CopyConstructible is really a requirement and may be overspecification.]

[Portions of the resolution for issue 230 have been superceded by -the resolution of issue 276.]

+the resolution of issue 276.]

Rationale:

The original proposed resolution also included changes to input @@ -6633,7 +6641,7 @@ 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.


-

231. Precision in iostream?

Section: 22.2.2.2.2 [lib.facet.num.put.virtuals]  Status: WP  Submitter: James Kanze, Stephen Clamage  Date:  25 Apr 2000

+

231. Precision in iostream?

Section: 22.2.2.2.2 [lib.facet.num.put.virtuals]  Status: WP  Submitter: James Kanze, Stephen Clamage  Date:  25 Apr 2000

What is the following program supposed to output?

#include <iostream>
 
@@ -6674,7 +6682,7 @@ etc. Plus, of course, if precision == 0 and flags & floatfield ==
 of the anomalies of printf:-).

Proposed resolution:

-Replace 22.2.2.2.2 [lib.facet.num.put.virtuals], paragraph 11, with the following +Replace 22.2.2.2.2 [lib.facet.num.put.virtuals], paragraph 11, with the following sentence:

@@ -6697,11 +6705,11 @@ turned into 1. There's no need to call it out as a special case.

The output of the above program will be "1e+00".

-

[Post-Curaçao: Howard provided improved wording covering the case +

[Post-Curaçao: Howard provided improved wording covering the case where precision is 0 and mode is %g.]


-

232. "depends" poorly defined in 17.4.3.1

Section: 17.4.3.1 [lib.reserved.names]  Status: WP  Submitter: Peter Dimov  Date: 18 Apr 2000

+

232. "depends" poorly defined in 17.4.3.1

Section: 17.4.3.1 [lib.reserved.names]  Status: WP  Submitter: Peter Dimov  Date: 18 Apr 2000

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."

@@ -6733,24 +6741,24 @@ possible way for a user to come up with a specialization for bitset, for example, that might not have already been specialized by the implementor?

-

[Toronto: this may be related to issue 120.]

+

[Toronto: this may be related to issue 120.]

[post-Toronto: Judy provided the above proposed resolution and rationale.]


-

234. Typos in allocator definition

Section: 20.4.1.1 [lib.allocator.members]  Status: WP  Submitter: Dietmar Kühl  Date: 24 Apr 2000

+

234. Typos in allocator definition

Section: 20.4.1.1 [lib.allocator.members]  Status: WP  Submitter: Dietmar Kühl  Date: 24 Apr 2000

In paragraphs 12 and 13 the effects of construct() and destruct() are described as returns but the functions actually return void.

Proposed resolution:

Substitute "Returns" by "Effect".


-

235. No specification of default ctor for reverse_iterator

Section: 24.4.1.1 [lib.reverse.iterator]  Status: WP  Submitter: Dietmar Kühl  Date: 24 Apr 2000

+

235. No specification of default ctor for reverse_iterator

Section: 24.4.1.1 [lib.reverse.iterator]  Status: WP  Submitter: Dietmar Kühl  Date: 24 Apr 2000

The declaration of reverse_iterator lists a default constructor. However, no specification is given what this constructor should do.

Proposed resolution:

-

In section 24.4.1.3.1 [lib.reverse.iter.cons] add the following +

In section 24.4.1.3.1 [lib.reverse.iter.cons] add the following paragraph:

reverse_iterator()

@@ -6763,7 +6771,7 @@ should do.

[pre-Copenhagen: Dietmar provide wording for proposed resolution.]


-

237. Undefined expression in complexity specification

Section: 23.2.2.1 [lib.list.cons]  Status: WP  Submitter: Dietmar Kühl  Date: 24 Apr 2000

+

237. Undefined expression in complexity specification

Section: 23.2.2.1 [lib.list.cons]  Status: WP  Submitter: Dietmar Kühl  Date: 24 Apr 2000

The complexity specification in paragraph 6 says that the complexity is linear in first - last. Even if operator-() is defined on iterators this term is in general undefined because it @@ -6774,13 +6782,12 @@ would have to be last - first.

to become

Linear in distance(first, last).

-

238. Contradictory results of stringbuf initialization.

Section: 27.7.1.1 [lib.stringbuf.cons]  Status: WP  Submitter: Dietmar Kühl  Date: 11 May 2000

+

238. Contradictory results of stringbuf initialization.

Section: 27.7.1.1 [lib.stringbuf.cons]  Status: WP  Submitter: Dietmar Kühl  Date: 11 May 2000

In 27.7.1.1 paragraph 4 the results of calling the constructor of 'basic_stringbuf' are said to be str() == str. This is fine that far but consider this code:

-
-  std::basic_stringbuf<char> sbuf("hello, world", std::ios_base::openmode(0));
+
  std::basic_stringbuf<char> sbuf("hello, world", std::ios_base::openmode(0));
   std::cout << "'" << sbuf.str() << "'\n";
 
@@ -6800,7 +6807,7 @@ defined to be basic_string<cT>().

we fixed it, it would say just the same thing as text that's already in the standard.


-

239. Complexity of unique() and/or unique_copy incorrect

Section: 25.2.8 [lib.alg.unique]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

+

239. Complexity of unique() and/or unique_copy incorrect

Section: 25.2.8 [lib.alg.unique]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

The complexity of unique and unique_copy are inconsistent with each other and inconsistent with the implementations.  The standard specifies:

@@ -6827,18 +6834,17 @@ applying the predicate last-first times, especially since it is not specified to which pair in the sequence the predicate is applied twice.

Proposed resolution:

-

Change both complexity sections in 25.2.8 [lib.alg.unique] to:

+

Change both complexity sections in 25.2.8 [lib.alg.unique] to:

Complexity: For nonempty ranges, exactly last - first - 1 applications of the corresponding predicate.

-

240. Complexity of adjacent_find() is meaningless

Section: 25.1.5 [lib.alg.adjacent.find]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

+

240. Complexity of adjacent_find() is meaningless

Section: 25.1.5 [lib.alg.adjacent.find]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

The complexity section of adjacent_find is defective:

-
-template <class ForwardIterator>
+
template <class ForwardIterator>
 ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last
                               BinaryPredicate pred);
 
@@ -6869,7 +6875,7 @@ 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.

Proposed resolution:

-

Change the complexity section in 25.1.5 [lib.alg.adjacent.find] to:

+

Change the complexity section in 25.1.5 [lib.alg.adjacent.find] to:

For a nonempty range, exactly min((i - first) + 1, (last - first) - 1) applications of the @@ -6881,7 +6887,7 @@ return value. bound. The LWG preferred an exact count.]


-

241. Does unique_copy() require CopyConstructible and Assignable?

Section: 25.2.8 [lib.alg.unique]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

+

241. Does unique_copy() require CopyConstructible and Assignable?

Section: 25.2.8 [lib.alg.unique]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

Some popular implementations of unique_copy() create temporary copies of values in the input sequence, at least if the input iterator @@ -6892,7 +6898,7 @@ the value type is CopyConstructible and Assignable.

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 [lib.accumulate].

+is accumulate(), 26.4.1 [lib.accumulate].

Since the specifications of unique() and unique_copy() do not require CopyConstructible and Assignable of the InputIterator's value @@ -6928,19 +6934,19 @@ requiring assignability, although current implementations do impose that requirement. Howard provided new wording.]

[ -Curaçao: The LWG changed the PR editorially to specify +Curaçao: The LWG changed the PR editorially to specify "neither...nor...meet..." as clearer than "both...and...do not meet...". Change believed to be so minor as not to require re-review. ]


-

242. Side effects of function objects

Section: 25.2.3 [lib.alg.transform], 26.4 [lib.numeric.ops]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

+

242. Side effects of function objects

Section: 25.2.3 [lib.alg.transform], 26.4 [lib.numeric.ops]  Status: WP  Submitter: Angelika Langer  Date: May 15 2000

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.

-

The standard defines a side effect in 1.9 [intro.execution] as:

+

The standard defines a side effect in 1.9 [intro.execution] as:

-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 @@ -7113,7 +7119,7 @@ added footnotes pointing out that the use of closed ranges was intentional.]


-

243. get and getline when sentry reports failure

Section: 27.6.1.3 [lib.istream.unformatted]  Status: WP  Submitter: Martin Sebor  Date: May 15 2000

+

243. get and getline when sentry reports failure

Section: 27.6.1.3 [lib.istream.unformatted]  Status: WP  Submitter: Martin Sebor  Date: May 15 2000

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.

@@ -7160,7 +7166,7 @@ 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.


-

248. time_get fails to set eofbit

Section: 22.2.5 [lib.category.time]  Status: WP  Submitter: Martin Sebor  Date: 22 June 2000

+

248. time_get fails to set eofbit

Section: 22.2.5 [lib.category.time]  Status: WP  Submitter: Martin Sebor  Date: 22 June 2000

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 @@ -7178,12 +7184,11 @@ member functions, the member sets ios_base::eofbit in err. because it was more consistent with the way eof is described for other input facets.


-

250. splicing invalidates iterators

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: Brian Parker   Date: 14 Jul 2000

+

250. splicing invalidates iterators

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: Brian Parker   Date: 14 Jul 2000

Section 23.2.2.4 [lib.list.ops] states that

-
-  void splice(iterator position, list<T, Allocator>& x);
+
  void splice(iterator position, list<T, Allocator>& x);
 

invalidates all iterators and references to list x. @@ -7196,14 +7201,14 @@ after splice.

Proposed resolution:

-

Add a footnote to 23.2.2.4 [lib.list.ops], paragraph 1:

+

Add a footnote to 23.2.2.4 [lib.list.ops], paragraph 1:

-[Footnote: As specified in 20.1.5 [lib.allocator.requirements], paragraphs +[Footnote: As specified in 20.1.5 [lib.allocator.requirements], paragraphs 4-5, the semantics described in this clause applies only to the case where allocators compare equal. --end footnote]
-

In 23.2.2.4 [lib.list.ops], replace paragraph 4 with:

+

In 23.2.2.4 [lib.list.ops], replace paragraph 4 with:

Effects: Inserts the contents of x before position and x becomes empty. Pointers and references to the moved elements of x now refer to @@ -7212,7 +7217,7 @@ moved elements will continue to refer to their elements, but they now behave as iterators into *this, not into x.
-

In 23.2.2.4 [lib.list.ops], replace paragraph 7 with:

+

In 23.2.2.4 [lib.list.ops], replace paragraph 7 with:

Effects: Inserts an element pointed to by i from list x before position and removes the element from x. The result is unchanged if @@ -7222,7 +7227,7 @@ to refer to this same element but as a member of *this. Iterators to *i behave as iterators into *this, not into x.
-

In 23.2.2.4 [lib.list.ops], replace paragraph 12 with:

+

In 23.2.2.4 [lib.list.ops], replace paragraph 12 with:

Requires: [first, last) is a valid range in x. The result is undefined if position is an iterator in the range [first, last). @@ -7237,10 +7242,10 @@ iterators into *this, not into x.

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 [lib.allocator.requirements] paragraph 4, the behavior of list when +>From 20.1.5 [lib.allocator.requirements] paragraph 4, the behavior of list when allocators compare nonequal is outside the scope of the standard.


-

251. basic_stringbuf missing allocator_type

Section: 27.7.1 [lib.stringbuf]  Status: WP  Submitter: Martin Sebor  Date: 28 Jul 2000

+

251. basic_stringbuf missing allocator_type

Section: 27.7.1 [lib.stringbuf]  Status: WP  Submitter: Martin Sebor  Date: 28 Jul 2000

The synopsis for the template class basic_stringbuf doesn't list a typedef for the template parameter Allocator. This makes it impossible to determine the type of @@ -7251,11 +7256,10 @@ template classes in the library that do provide a typedef for the

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:

-
-  typedef Allocator allocator_type;
+
  typedef Allocator allocator_type;
 

-

252. missing casts/C-style casts used in iostreams

Section: 27.7 [lib.string.streams]  Status: WP  Submitter: Martin Sebor  Date: 28 Jul 2000

+

252. missing casts/C-style casts used in iostreams

Section: 27.7 [lib.string.streams]  Status: WP  Submitter: Martin Sebor  Date: 28 Jul 2000

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 @@ -7290,15 +7294,14 @@ issue is stylistic rather than a matter of correctness.

with

  -2- Returns: const_cast<strstreambuf*>(&sb).

-

253. valarray helper functions are almost entirely useless

Section: 26.3.2.1 [lib.valarray.cons], 26.3.2.2 [lib.valarray.assign]  Status: WP  Submitter: Robert Klarer  Date: 31 Jul 2000

+

253. valarray helper functions are almost entirely useless

Section: 26.3.2.1 [lib.valarray.cons], 26.3.2.2 [lib.valarray.assign]  Status: WP  Submitter: Robert Klarer  Date: 31 Jul 2000

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.

These valarray constructors can never be called:

-
-   template <class T>
+
   template <class T>
          valarray<T>::valarray(const slice_array<T> &);
    template <class T>
          valarray<T>::valarray(const gslice_array<T> &);
@@ -7311,8 +7314,7 @@ that the problem described below is NAD.

Similarly, these valarray assignment operators cannot be called:

-
-     template <class T>
+
     template <class T>
      valarray<T> valarray<T>::operator=(const slice_array<T> &);
      template <class T>
      valarray<T> valarray<T>::operator=(const gslice_array<T> &);
@@ -7324,8 +7326,7 @@ called:

Please consider the following example:

-
-   #include <valarray>
+
   #include <valarray>
    using namespace std;
 
    int main()
@@ -7342,8 +7343,7 @@ std::slice_array<double>.  This slice_array rvalue is then used to
 construct va2.  The constructor that is used to construct va2 is
 declared like this:

-
-     template <class T>
+
     template <class T>
      valarray<T>::valarray(const slice_array<T> &);
 
@@ -7369,66 +7369,66 @@ classes are almost entirely useless.

slice_array:

gslice_array:

mask_array:

indirect_array:

[Proposed resolution was modified in Santa Cruz: explicitly make copy constructor and copy assignment operators public, instead of @@ -7445,7 +7445,7 @@ believed we should make the assignment operators public, in addition to the copy constructors, for reasons of symmetry and user expectation.


-

256. typo in 27.4.4.2, p17: copy_event does not exist

Section: 27.4.4.2 [lib.basic.ios.members]  Status: WP  Submitter: Martin Sebor  Date: 21 Aug 2000

+

256. typo in 27.4.4.2, p17: copy_event does not exist

Section: 27.4.4.2 [lib.basic.ios.members]  Status: WP  Submitter: Martin Sebor  Date: 21 Aug 2000

27.4.4.2, p17 says

@@ -7464,7 +7464,7 @@ copyfmt_event.

Proposed resolution:

Replace copy_event with copyfmt_event in the named paragraph.


-

259. basic_string::operator[] and const correctness

Section: 21.3.4 [lib.string.access]  Status: WP  Submitter: Chris Newton   Date: 27 Aug 2000

+

259. basic_string::operator[] and const correctness

Section: 21.3.4 [lib.string.access]  Status: WP  Submitter: Chris Newton   Date: 27 Aug 2000

Paraphrased from a message that Chris Newton posted to comp.std.c++:

@@ -7488,7 +7488,7 @@ In section 21.3.4, paragraph 1, change


260. Inconsistent return type of istream_iterator::operator++(int) -

Section: 24.5.1.2 [lib.istream.iterator.ops]  Status: WP  Submitter: Martin Sebor  Date: 27 Aug 2000

+

Section: 24.5.1.2 [lib.istream.iterator.ops]  Status: WP  Submitter: Martin Sebor  Date: 27 Aug 2000

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 @@ -7496,23 +7496,20 @@ given the Effects clause below (since a temporary is returned). The `&' is probably just a typo.

Proposed resolution:

Change the declaration in 24.5.1.2, p5 from

-
- istream_iterator<T,charT,traits,Distance>& operator++(int);
+ 
 istream_iterator<T,charT,traits,Distance>& operator++(int);
  

to

-
- istream_iterator<T,charT,traits,Distance> operator++(int);
+ 
 istream_iterator<T,charT,traits,Distance> operator++(int);
  

(that is, remove the `&').


261. Missing description of istream_iterator::operator!= -

Section: 24.5.1.2 [lib.istream.iterator.ops]  Status: WP  Submitter: Martin Sebor  Date: 27 Aug 2000

+

Section: 24.5.1.2 [lib.istream.iterator.ops]  Status: WP  Submitter: Martin Sebor  Date: 27 Aug 2000

24.5.1, p3 lists the synopsis for

-
-   template <class T, class charT, class traits, class Distance>
+
   template <class T, class charT, class traits, class Distance>
         bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
                         const istream_iterator<T,charT,traits,Distance>& y);
 
@@ -7526,15 +7523,14 @@ or Returns clause) in 24.5.1.2. Add paragraph 7 to the end of section 24.5.1.2 with the following text:

-
-   template <class T, class charT, class traits, class Distance>
+
   template <class T, class charT, class traits, class Distance>
         bool operator!=(const istream_iterator<T,charT,traits,Distance>& x,
                         const istream_iterator<T,charT,traits,Distance>& y);
 

-7- Returns: !(x == y).


-

262. Bitmask operator ~ specified incorrectly

Section: 17.3.2.1.2 [lib.bitmask.types]  Status: WP  Submitter: Beman Dawes  Date: 03 Sep 2000

+

262. Bitmask operator ~ specified incorrectly

Section: 17.3.2.1.2 [lib.bitmask.types]  Status: WP  Submitter: Beman Dawes  Date: 03 Sep 2000

The ~ operation should be applied after the cast to int_type.

@@ -7543,8 +7539,7 @@ The ~ operation should be applied after the cast to int_type. Change 17.3.2.1.2 [lib.bitmask.types] operator~ from:

-
-   bitmask operator~ ( bitmask X )
+
   bitmask operator~ ( bitmask X )
      { return static_cast< bitmask>(static_cast<int_type>(~ X)); }
 
@@ -7552,12 +7547,11 @@ Change 17.3.2.1.2 [lib.bitmask.types] operator~ from: to:

-
-   bitmask operator~ ( bitmask X )
+
   bitmask operator~ ( bitmask X )
      { return static_cast< bitmask>(~static_cast<int_type>(X)); }
 

-

263. Severe restriction on basic_string reference counting

Section: 21.3 [lib.basic.string]  Status: WP  Submitter: Kevlin Henney  Date: 04 Sep 2000

+

263. Severe restriction on basic_string reference counting

Section: 21.3 [lib.basic.string]  Status: WP  Submitter: Kevlin Henney  Date: 04 Sep 2000

The note in paragraph 6 suggests that the invalidation rules for references, pointers, and iterators in paragraph 5 permit a reference- @@ -7571,8 +7565,7 @@ implementation unviable. In the following example none of the conditions for iterator invalidation are satisfied:

-
-    // first example: "*******************" should be printed twice
+
    // first example: "*******************" should be printed twice
     string original = "some arbitrary text", copy = original;
     const string & alias = original;
 
@@ -7589,8 +7582,7 @@ conditions for iterator invalidation are satisfied:
 Similarly, in the following example:
 

-
-    // second example: "some arbitrary text" should be printed out
+
    // second example: "some arbitrary text" should be printed out
     string original = "some arbitrary text", copy = original;
     const string & alias = original;
 
@@ -7629,14 +7621,14 @@ Change the following sentence in 21.3 paragraph 5 from
     or rend().
 

-

264. Associative container insert(i, j) complexity requirements are not feasible.

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: John Potter  Date: 07 Sep 2000

+

264. Associative container insert(i, j) complexity requirements are not feasible.

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: John Potter  Date: 07 Sep 2000

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 integers in the same range.

-

Related issue: 102

+

Related issue: 102

Proposed resolution:

In Table 69, in section 23.1.2, change the complexity clause for @@ -7668,7 +7660,7 @@ inserted is sorted, it's more trouble than it's worth to say that it's linear in some special cases.


-

265. std::pair::pair() effects overly restrictive

Section: 20.2.2 [lib.pairs]  Status: WP  Submitter: Martin Sebor  Date: 11 Sep 2000

+

265. std::pair::pair() effects overly restrictive

Section: 20.2.2 [lib.pairs]  Status: WP  Submitter: Martin Sebor  Date: 11 Sep 2000

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 @@ -7705,7 +7697,7 @@ 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.


-

266. bad_exception::~bad_exception() missing Effects clause

Section: 18.6.2.1 [lib.bad.exception]  Status: WP  Submitter: Martin Sebor  Date: 24 Sep 2000

+

266. bad_exception::~bad_exception() missing Effects clause

Section: 18.6.2.1 [lib.bad.exception]  Status: WP  Submitter: Martin Sebor  Date: 24 Sep 2000

The synopsis for std::bad_exception lists the function ~bad_exception() but there is no description of what the function does (the Effects @@ -7714,10 +7706,10 @@ clause is missing).

Proposed resolution:

Remove the destructor from the class synopses of -bad_alloc (18.4.2.1 [lib.bad.alloc]), -bad_cast (18.5.2 [lib.bad.cast]), -bad_typeid (18.5.3 [lib.bad.typeid]), -and bad_exception (18.6.2.1 [lib.bad.exception]). +bad_alloc (18.4.2.1 [lib.bad.alloc]), +bad_cast (18.5.2 [lib.bad.cast]), +bad_typeid (18.5.3 [lib.bad.typeid]), +and bad_exception (18.6.2.1 [lib.bad.exception]).

Rationale:

@@ -7728,7 +7720,7 @@ removing them is more consistent with how exception classes are described in clause 19.


-

268. Typo in locale synopsis

Section: 22.1.1 [lib.locale]  Status: WP  Submitter: Martin Sebor  Date: 5 Oct 2000

+

268. Typo in locale synopsis

Section: 22.1.1 [lib.locale]  Status: WP  Submitter: Martin Sebor  Date: 5 Oct 2000

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&) @@ -7736,21 +7728,19 @@ are missing.

Proposed resolution:

Add the missing semicolons, i.e., change

-
-    //  construct/copy/destroy:
+
    //  construct/copy/destroy:
         locale() throw()
         locale(const locale& other) throw()
 

in the synopsis in 22.1.1 to

-
-    //  construct/copy/destroy:
+
    //  construct/copy/destroy:
         locale() throw();
         locale(const locale& other) throw();
 

-

270. Binary search requirements overly strict

Section: 25.3.3 [lib.alg.binary.search]  Status: WP  Submitter: Matt Austern  Date: 18 Oct 2000

+

270. Binary search requirements overly strict

Section: 25.3.3 [lib.alg.binary.search]  Status: WP  Submitter: Matt Austern  Date: 18 Oct 2000

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 @@ -7765,8 +7755,7 @@ large record with an integer key. We might reasonably want to look up a record by key, in which case we would want to write something like this:

-
-    struct key_comp {
+
    struct key_comp {
       bool operator()(const X& x, int n) const {
         return x.key() < n;
       }
@@ -7959,8 +7948,7 @@ The proposed resolution is based on that alternative formulation.
 
 

to:

-
-   -2- Returns: 
+
   -2- Returns: 
          make_pair(lower_bound(first, last, value),
                    upper_bound(first, last, value))
        or
@@ -8002,7 +7990,7 @@ 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.


-

271. basic_iostream missing typedefs

Section: 27.6.1.5 [lib.iostreamclass]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

+

271. basic_iostream missing typedefs

Section: 27.6.1.5 [lib.iostreamclass]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

Class template basic_iostream has no typedefs. The typedefs it inherits from its base classes can't be used, since (for example) @@ -8011,10 +7999,9 @@ basic_iostream<T>::traits_type is ambiguous.

Proposed resolution:

Add the following to basic_iostream's class synopsis in -27.6.1.5 [lib.iostreamclass], immediately after public:

+27.6.1.5 [lib.iostreamclass], immediately after public:

-
-  // types:
+
  // types:
   typedef charT                     char_type;
   typedef typename traits::int_type int_type;
   typedef typename traits::pos_type pos_type;
@@ -8022,7 +8009,7 @@ basic_iostream<T>::traits_type is ambiguous.
   typedef traits                    traits_type;
 

-

272. Missing parentheses around subexpression

Section: 27.4.4.3 [lib.iostate.flags]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

+

272. Missing parentheses around subexpression

Section: 27.4.4.3 [lib.iostate.flags]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

27.4.4.3, p4 says about the postcondition of the function: If rdbuf()!=0 then state == rdstate(); otherwise @@ -8039,7 +8026,7 @@ anything but non-zero. Add parentheses like so: rdstate()==(state|ios_base::badbit).


-

273. Missing ios_base qualification on members of a dependent class

Section: 27 [lib.input.output]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

+

273. Missing ios_base qualification on members of a dependent class

Section: 27 [lib.input.output]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

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 @@ -8048,7 +8035,7 @@ class (14.6.2 [temp.dep]) and thus not visible.

Qualify the names with the name of the class of which they are members, i.e., ios_base.


-

274. a missing/impossible allocator requirement

Section: 20.1.5 [lib.allocator.requirements]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

+

274. a missing/impossible allocator requirement

Section: 20.1.5 [lib.allocator.requirements]  Status: WP  Submitter: Martin Sebor  Date: 02 Nov 2000

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 @@ -8099,11 +8086,11 @@ The original text for proposed resolution 2 was modified so that it also forbids volatile types and reference types.

-

[Curaçao: LWG double checked and believes volatile is correctly +

[Curaçao: LWG double checked and believes volatile is correctly excluded from the PR.]


-

275. Wrong type in num_get::get() overloads

Section: 22.2.2.1.1 [lib.facet.num.get.members]  Status: WP  Submitter: Matt Austern  Date: 02 Nov 2000

+

275. Wrong type in num_get::get() overloads

Section: 22.2.2.1.1 [lib.facet.num.get.members]  Status: WP  Submitter: Matt Austern  Date: 02 Nov 2000

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 @@ -8142,21 +8129,19 @@ These two lists are not identical. They should be, since the arguments it was given.

Proposed resolution:

-

In 22.2.2.1.1 [lib.facet.num.get.members], change

-
-  iter_type get(iter_type in, iter_type end, ios_base& str,
+

In 22.2.2.1.1 [lib.facet.num.get.members], change

+
  iter_type get(iter_type in, iter_type end, ios_base& str,
                 ios_base::iostate& err, short& val) const;
 

to

-
-  iter_type get(iter_type in, iter_type end, ios_base& str,
+
  iter_type get(iter_type in, iter_type end, ios_base& str,
                 ios_base::iostate& err, float& val) const;
 

-

276. Assignable requirement for container value type overly strict

Section: 23.1 [lib.container.requirements]  Status: WP  Submitter: Peter Dimov  Date: 07 Nov 2000

+

276. Assignable requirement for container value type overly strict

Section: 23.1 [lib.container.requirements]  Status: WP  Submitter: Peter Dimov  Date: 07 Nov 2000

23.1/3 states that the objects stored in a container must be -Assignable. 23.3.1 [lib.map], paragraph 2, +Assignable. 23.3.1 [lib.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. @@ -8180,14 +8165,14 @@ general.

For example, the proposed resolution of active library issue -103 is to make set::iterator a constant iterator; this +103 is to make set::iterator a constant iterator; this means that no set operations can exploit the fact that the stored objects are Assignable.

This is related to, but slightly broader than, closed issue -140. +140.

Proposed resolution:

23.1/3: Strike the trailing part of the sentence:

@@ -8247,8 +8232,7 @@ following methods are instantiated: [Footnote: Implementors are permitted but not required to take advantage of T's Assignable properties for these methods. -- end foonote]

-
-     list<T,Allocator>& operator=(const list<T,Allocator>&  x );
+
     list<T,Allocator>& operator=(const list<T,Allocator>&  x );
      template <class InputIterator>
        void assign(InputIterator first, InputIterator last);
      void assign(size_type n, const T& t);
@@ -8284,7 +8268,7 @@ to forbid such implementations.

Note that the type stored in a standard container must still satisfy the requirements of the container's allocator; this rules out, for -example, such types as "const int". See issue 274 +example, such types as "const int". See issue 274 for more details.

@@ -8296,12 +8280,11 @@ implement vector::push_back in terms of vector::insert.


-

278. What does iterator validity mean?

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: P.J. Plauger  Date: 27 Nov 2000

+

278. What does iterator validity mean?

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: P.J. Plauger  Date: 27 Nov 2000

Section 23.2.2.4 [lib.list.ops] states that

-
-  void splice(iterator position, list<T, Allocator>& x);
+
  void splice(iterator position, list<T, Allocator>& x);
 

invalidates all iterators and references to list x. @@ -8316,7 +8299,7 @@ validity.

-If we accept the proposed resolution to issue 250, +If we accept the proposed resolution to issue 250, then we'd better clarify that a "valid" iterator need no longer designate an element within the same container as it once did. We then have to clarify what we mean by invalidating a past-the-end @@ -8325,7 +8308,7 @@ such an iterator has a different kind of validity. Perhaps we should introduce separate terms for the two kinds of "validity."

Proposed resolution:

-

Add the following text to the end of section 24.1 [lib.iterator.requirements], +

Add the following text to the end of section 24.1 [lib.iterator.requirements], after paragraph 5:

An invalid iterator is an iterator that may be @@ -8351,10 +8334,10 @@ the wording. Dave provided new wording.]

all iterators pointing into the vector. That doesn't necessarily mean they all become singular.


-

281. std::min() and max() requirements overly restrictive

Section: 25.3.7 [lib.alg.min.max]  Status: WP  Submitter: Martin Sebor  Date: 02 Dec 2000

+

281. std::min() and max() requirements overly restrictive

Section: 25.3.7 [lib.alg.min.max]  Status: WP  Submitter: Martin Sebor  Date: 02 Dec 2000

The requirements in 25.3.7, p1 and 4 call for T to satisfy the -requirements of LessThanComparable (20.1.2 [lib.lessthancomparable]) -and CopyConstructible (20.1.3 [lib.copyconstructible]). +requirements of LessThanComparable (20.1.2 [lib.lessthancomparable]) +and CopyConstructible (20.1.3 [lib.copyconstructible]). Since the functions take and return their arguments and result by const reference, I believe the CopyConstructible requirement is unnecessary. @@ -8363,14 +8346,14 @@ is unnecessary.

Remove the CopyConstructible requirement. Specifically, replace 25.3.7, p1 with

-1- Requires: Type T is LessThanComparable -(20.1.2 [lib.lessthancomparable]). +(20.1.2 [lib.lessthancomparable]).

and replace 25.3.7, p4 with

-4- Requires: Type T is LessThanComparable -(20.1.2 [lib.lessthancomparable]). +(20.1.2 [lib.lessthancomparable]).


-

282. What types does numpunct grouping refer to?

Section: 22.2.2.2.2 [lib.facet.num.put.virtuals]  Status: WP  Submitter: Howard Hinnant  Date: 5 Dec 2000

+

282. What types does numpunct grouping refer to?

Section: 22.2.2.2.2 [lib.facet.num.put.virtuals]  Status: WP  Submitter: Howard Hinnant  Date: 5 Dec 2000

Paragraph 16 mistakenly singles out integral types for inserting thousands_sep() characters. This conflicts with the syntax for floating @@ -8382,7 +8365,7 @@ point numbers described under 22.2.3.1/2.

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 [lib.facet.numpunct.virtuals]. +using the method described in 22.2.3.1.2 [lib.facet.numpunct.virtuals].

To:

@@ -8390,7 +8373,7 @@ using the method described in 22.2.3.1.2 [lib.facet.numpunct.virtuals]. +using the method described in 22.2.3.1.2 [lib.facet.numpunct.virtuals].

[ @@ -8410,11 +8393,11 @@ floating-point input even though this is unambiguously required by the standard. ]

-

[Post-Curaçao: the above proposed resolution is the consensus of +

[Post-Curaçao: the above proposed resolution is the consensus of Howard, Bill, Pete, Benjamin, Nathan, Dietmar, Boris, and Martin.]


-

283. std::replace() requirement incorrect/insufficient

Section: 25.2.4 [lib.alg.replace]  Status: WP  Submitter: Martin Sebor  Date: 15 Dec 2000

+

283. std::replace() requirement incorrect/insufficient

Section: 25.2.4 [lib.alg.replace]  Status: WP  Submitter: Martin Sebor  Date: 15 Dec 2000

(revision of the further discussion) There are a number of problems with the requires clauses for the @@ -8561,22 +8544,21 @@ imposing a greater restriction that what the standard currently says (which is convertible to bool).


-

284. unportable example in 20.3.7, p6

Section: 20.3.7 [lib.function.pointer.adaptors]  Status: WP  Submitter: Martin Sebor  Date: 26 Dec 2000

-

The example in 20.3.7 [lib.function.pointer.adaptors], p6 shows how to use the C +

284. unportable example in 20.3.7, p6

Section: 20.3.7 [lib.function.pointer.adaptors]  Status: WP  Submitter: Martin Sebor  Date: 26 Dec 2000

+

The example in 20.3.7 [lib.function.pointer.adaptors], p6 shows how to use the C library function strcmp() with the function pointer adapter ptr_fun(). But since it's unspecified whether the C library functions have extern "C" or extern -"C++" linkage [17.4.2.2 [lib.using.linkage]], and since +"C++" linkage [17.4.2.2 [lib.using.linkage]], and since function pointers with different the language linkage specifications -(7.5 [dcl.link]) are incompatible, whether this example is +(7.5 [dcl.link]) are incompatible, whether this example is well-formed is unspecified.

Proposed resolution:

-

Change 20.3.7 [lib.function.pointer.adaptors] paragraph 6 from:

+

Change 20.3.7 [lib.function.pointer.adaptors] paragraph 6 from:

[Example:

-
-    replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(strcmp), "C")), "C++");
+  
    replace_if(v.begin(), v.end(), not1(bind2nd(ptr_fun(strcmp), "C")), "C++");
   

replaces each C with C++ in sequence v.

@@ -8585,8 +8567,7 @@ well-formed is unspecified.

to:

[Example:

-
-    int compare(const char*, const char*);
+  
    int compare(const char*, const char*);
     replace_if(v.begin(), v.end(),
                not1(bind2nd(ptr_fun(compare), "abc")), "def");
   
@@ -8606,9 +8587,9 @@ aren't normative), and changed the sentence after the footnote so that it corresponds to the new code fragment.]


-

285. minor editorial errors in fstream ctors

Section: 27.8.1.6 [lib.ifstream.cons]  Status: WP  Submitter: Martin Sebor  Date: 31 Dec 2000

-

27.8.1.6 [lib.ifstream.cons], p2, 27.8.1.9 [lib.ofstream.cons], p2, and -27.8.1.12 [lib.fstream.cons], p2 say about the effects of each constructor: +

285. minor editorial errors in fstream ctors

Section: 27.8.1.6 [lib.ifstream.cons]  Status: WP  Submitter: Martin Sebor  Date: 31 Dec 2000

+

27.8.1.6 [lib.ifstream.cons], p2, 27.8.1.9 [lib.ofstream.cons], p2, and +27.8.1.12 [lib.fstream.cons], p2 say about the effects of each constructor:

... If that function returns a null pointer, calls @@ -8616,7 +8597,7 @@ it corresponds to the new code fragment.]

The parenthetical note doesn't apply since the ctors cannot throw an -exception due to the requirement in 27.4.4.1 [lib.basic.ios.cons], p3 +exception due to the requirement in 27.4.4.1 [lib.basic.ios.cons], p3 that exceptions() be initialized to ios_base::goodbit.

Proposed resolution:

@@ -8625,7 +8606,7 @@ Strike the parenthetical note from the Effects clause in each of the paragraphs mentioned above.


-

286. <cstdlib> requirements missing size_t typedef

Section: 25.4 [lib.alg.c.library]  Status: WP  Submitter: Judy Ward  Date: 30 Dec 2000

+

286. <cstdlib> requirements missing size_t typedef

Section: 25.4 [lib.alg.c.library]  Status: WP  Submitter: Judy Ward  Date: 30 Dec 2000

The <cstdlib> header file contains prototypes for bsearch and qsort (C++ Standard section 25.4 paragraphs 3 and 4) and other @@ -8641,7 +8622,7 @@ the type size_t <cstdlib> to Table 97 (section C.2).

Rationale:

Since size_t is in <stdlib.h>, it must also be in <cstdlib>.


-

288. <cerrno> requirements missing macro EILSEQ

Section: 19.3 [lib.errno]  Status: WP  Submitter: Judy Ward  Date: 30 Dec 2000

+

288. <cerrno> requirements missing macro EILSEQ

Section: 19.3 [lib.errno]  Status: WP  Submitter: Judy Ward  Date: 30 Dec 2000

ISO/IEC 9899:1990/Amendment1:1994 Section 4.3 States: "The list of macros defined in <errno.h> is adjusted to include a new @@ -8659,7 +8640,7 @@ Update Table 26 (section 19.3) "Header <cerrno> synopsis" and Table 95 (section C.2) "Standard Macros" to include EILSEQ.


-

291. Underspecification of set algorithms

Section: 25.3.5 [lib.alg.set.operations]  Status: WP  Submitter: Matt Austern  Date: 03 Jan 2001

+

291. Underspecification of set algorithms

Section: 25.3.5 [lib.alg.set.operations]  Status: WP  Submitter: Matt Austern  Date: 03 Jan 2001

The standard library contains four algorithms that compute set operations on sorted ranges: set_union, set_intersection, @@ -8710,7 +8691,7 @@ same way.

Proposed resolution:

-

Add the following to the end of 25.3.5.2 [lib.set.union] paragraph 5:

+

Add the following to the end of 25.3.5.2 [lib.set.union] paragraph 5:

If [first1, last1) contains m elements that are equivalent to each other and [first2, last2) contains n elements that are @@ -8720,7 +8701,7 @@ from [first1, last1), and the last max(n-m, 0) of them from [first2, last2), in that order.
-

Add the following to the end of 25.3.5.3 [lib.set.intersection] paragraph 5:

+

Add the following to the end of 25.3.5.3 [lib.set.intersection] paragraph 5:

If [first1, last1) contains m elements that are equivalent to each other and [first2, last2) contains n elements that are @@ -8728,7 +8709,7 @@ equivalent to them, the first min(m, n) of those elements from [first1, last1) are copied to the output range.
-

Add a new paragraph, Notes, after 25.3.5.4 [lib.set.difference] +

Add a new paragraph, Notes, after 25.3.5.4 [lib.set.difference] paragraph 4:

If [first1, last1) contains m elements that are equivalent to each @@ -8737,7 +8718,7 @@ equivalent to them, the last max(m-n, 0) elements from [first1, last1) are copied to the output range.
-

Add a new paragraph, Notes, after 25.3.5.5 [lib.set.symmetric.difference] +

Add a new paragraph, Notes, after 25.3.5.5 [lib.set.symmetric.difference] paragraph 4:

If [first1, last1) contains m elements that are equivalent to @@ -8760,7 +8741,7 @@ m of these elements from [first2, last2) if m < n. already in the Standard. For more complicated cases, they describe the behavior of existing implementations.


-

292. effects of a.copyfmt (a)

Section: 27.4.4.2 [lib.basic.ios.members]  Status: WP  Submitter: Martin Sebor  Date: 05 Jan 2001

+

292. effects of a.copyfmt (a)

Section: 27.4.4.2 [lib.basic.ios.members]  Status: WP  Submitter: Martin Sebor  Date: 05 Jan 2001

The Effects clause of the member function copyfmt() 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 @@ -8788,7 +8769,7 @@ assigns to the member objects of *this the corresponding member objects of rhs, except that...


-

295. Is abs defined in <cmath>?

Section: 26.5 [lib.c.math]  Status: WP  Submitter: Jens Maurer  Date: 12 Jan 2001

+

295. Is abs defined in <cmath>?

Section: 26.5 [lib.c.math]  Status: WP  Submitter: Jens Maurer  Date: 12 Jan 2001

Table 80 lists the contents of the <cmath> header. It does not list abs(). However, 26.5, paragraph 6, which lists added @@ -8798,7 +8779,7 @@ of abs() should be defined in <cmath>.

Proposed resolution:

Add abs to Table 80. Also, remove the parenthetical list -of functions "(abs(), div(), rand(), srand())" from 26.5 [lib.c.math], +of functions "(abs(), div(), rand(), srand())" from 26.5 [lib.c.math], paragraph 1.

@@ -8809,9 +8790,9 @@ rid of that vestigial list of functions in paragraph 1.]

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 323.

+putting in <cstdlib>. That's issue 323.


-

297. const_mem_fun_t<>::argument_type should be const T*

Section: 20.3.8 [lib.member.pointer.adaptors]  Status: WP  Submitter: Martin Sebor  Date: 6 Jan 2001

+

297. const_mem_fun_t<>::argument_type should be const T*

Section: 20.3.8 [lib.member.pointer.adaptors]  Status: WP  Submitter: Martin Sebor  Date: 6 Jan 2001

The class templates const_mem_fun_t in 20.3.8, p8 and const_mem_fun1_t in 20.3.8, p9 derive from unary_function<T*, S>, and @@ -8881,7 +8862,7 @@ binary_function<const T*, A, S> {

This is simply a contradiction: the argument_type typedef, and the argument type itself, are not the same.


-

298. ::operator delete[] requirement incorrect/insufficient

Section: 18.4.1.2 [lib.new.delete.array]  Status: WP  Submitter: John A. Pedretti  Date: 10 Jan 2001

+

298. ::operator delete[] requirement incorrect/insufficient

Section: 18.4.1.2 [lib.new.delete.array]  Status: WP  Submitter: John A. Pedretti  Date: 10 Jan 2001

The default behavior of operator delete[] described in 18.4.1.2, p12 - namely that for non-null value of ptr, the operator reclaims storage @@ -8904,7 +8885,7 @@ For a null value of ptr , does nothing. Any other value of ptr shall be a value returned earlier by a call to the default operator new[](std::size_t). [Footnote: The value must not have been invalidated by an intervening -call to operator delete[](void*) (17.4.3.7 [lib.res.on.arguments]). +call to operator delete[](void*) (17.4.3.7 [lib.res.on.arguments]). --- end footnote] For such a non-null value of ptr , reclaims storage allocated by the earlier call to the default operator new[]. @@ -8921,7 +8902,7 @@ or operator delete(ptr, std::nothrow) respectively.

and expunge paragraph 13.


-

300. list::merge() specification incomplete

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: John Pedretti  Date: 23 Jan 2001

+

300. list::merge() specification incomplete

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: John Pedretti  Date: 23 Jan 2001

The "Effects" clause for list::merge() (23.2.2.4, p23) appears to be incomplete: it doesn't cover the case where the argument @@ -8930,7 +8911,7 @@ note in p24 (below) is that x be empty after the merge which is surely unintended in this case.

Proposed resolution:

-

In 23.2.2.4 [lib.list.ops], replace paragraps 23-25 with:

+

In 23.2.2.4 [lib.list.ops], replace paragraps 23-25 with:

23 Effects: if (&x == this) does nothing; otherwise, merges the two @@ -8959,16 +8940,16 @@ effects.

[Copenhagen: The original proposed resolution did not fix all of -the problems in 23.2.2.4 [lib.list.ops], p22-25. Three different +the problems in 23.2.2.4 [lib.list.ops], p22-25. Three different paragraphs (23, 24, 25) describe the effects of merge. Changing p23, without changing the other two, appears to introduce contradictions. Additionally, "merges the argument list into the list" is excessively vague.]

-

[Post-Curaçao: Robert Klarer provided new wording.]

+

[Post-Curaçao: Robert Klarer provided new wording.]


-

301. basic_string template ctor effects clause omits allocator argument

Section: 21.3.1 [lib.string.cons]  Status: WP  Submitter: Martin Sebor  Date: 27 Jan 2001

+

301. basic_string template ctor effects clause omits allocator argument

Section: 21.3.1 [lib.string.cons]  Status: WP  Submitter: Martin Sebor  Date: 27 Jan 2001

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 @@ -8995,7 +8976,7 @@ a mistake. static_cast<value_type>(end), a)


-

303. Bitset input operator underspecified

Section: 23.3.5.3 [lib.bitset.operators]  Status: WP  Submitter: Matt Austern  Date: 5 Feb 2001

+

303. Bitset input operator underspecified

Section: 23.3.5.3 [lib.bitset.operators]  Status: WP  Submitter: Matt Austern  Date: 5 Feb 2001

In 23.3.5.3, we are told that bitset's input operator "Extracts up to N (single-byte) characters from @@ -9100,7 +9081,7 @@ input. Using widen does mean that alternative digit representations will not be recognized, but this was a known consequence of the design choice.


-

305. Default behavior of codecvt<wchar_t, char, mbstate_t>::length()

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: WP  Submitter: Howard Hinnant  Date: 24 Jan 2001

+

305. Default behavior of codecvt<wchar_t, char, mbstate_t>::length()

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: WP  Submitter: Howard Hinnant  Date: 24 Jan 2001

22.2.1.5/3 introduces codecvt in part with:

@@ -9208,11 +9189,11 @@ single external character), but this would rule out important encodings that are in common use: it would rule out JIS, for example, and it would rule out a fixed-width encoding of UCS-4.

-

[Curaçao: fixed rationale typo at the request of Ichiro Koshida; +

[Curaçao: fixed rationale typo at the request of Ichiro Koshida; "shift-JIS" changed to "JIS".]


-

306. offsetof macro and non-POD types

Section: 18.1 [lib.support.types]  Status: WP  Submitter: Steve Clamage  Date: 21 Feb 2001

+

306. offsetof macro and non-POD types

Section: 18.1 [lib.support.types]  Status: WP  Submitter: Steve Clamage  Date: 21 Feb 2001

Spliced together from reflector messages c++std-lib-8294 and -8295:

18.1, paragraph 5, reads: "The macro offsetof @@ -9223,7 +9204,7 @@ that is a static data member or a function member is undefined."

For the POD requirement, it doesn't say "no diagnostic -required" or "undefined behavior". I read 1.4 [intro.compliance], 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. @@ -9238,13 +9219,13 @@ members thought that diagnostics should be required whenever possible.]


-

307. Lack of reference typedefs in container adaptors

Section: 23.2.3 [lib.container.adaptors]  Status: WP  Submitter: Howard Hinnant  Date: 13 Mar 2001

+

307. Lack of reference typedefs in container adaptors

Section: 23.2.3 [lib.container.adaptors]  Status: WP  Submitter: Howard Hinnant  Date: 13 Mar 2001

From reflector message c++std-lib-8330. See also lib-8317.

-The standard is currently inconsistent in 23.2.3.2 [lib.priority.queue] -paragraph 1 and 23.2.3.3 [lib.stack] paragraph 1. +The standard is currently inconsistent in 23.2.3.2 [lib.priority.queue] +paragraph 1 and 23.2.3.3 [lib.stack] paragraph 1. 23.2.3.3/1, for example, says:

@@ -9270,7 +9251,7 @@ container's reference type.

I propose 3. This does not preclude option 2 if we choose to do it -later (see issue 96); the issues are independent. Option +later (see issue 96); the issues are independent. Option 3 offers a small step towards support for proxied containers. This small step fixes a current contradiction, is easy for vendors to implement, is already implemented in at least one popular lib, and @@ -9285,8 +9266,7 @@ priority_queue and stack. Change return types of "value_type&" to

Change 23.2.3.1/1 from:

-
-  namespace std {
+
  namespace std {
     template <class T, class Container = deque<T> >
     class queue {
     public:
@@ -9312,8 +9292,7 @@ priority_queue and stack.  Change return types of "value_type&" to
 
 

to:

-
-  namespace std {
+
  namespace std {
     template <class T, class Container = deque<T> >
     class queue {
     public:
@@ -9342,8 +9321,7 @@ priority_queue and stack.  Change return types of "value_type&" to
 
 

Change 23.2.3.2/1 from:

-
-  namespace std {
+
  namespace std {
     template <class T, class Container = vector<T>,
               class Compare = less<typename Container::value_type> >
     class priority_queue {
@@ -9375,8 +9353,7 @@ priority_queue and stack.  Change return types of "value_type&" to
 
 

to:

-
-  namespace std {
+
  namespace std {
     template <class T, class Container = vector<T>,
               class Compare = less<typename Container::value_type> >
     class priority_queue {
@@ -9410,8 +9387,7 @@ priority_queue and stack.  Change return types of "value_type&" to
 
 

And change 23.2.3.3/1 from:

-
-  namespace std {
+
  namespace std {
     template <class T, class Container = deque<T> >
     class stack {
     public:
@@ -9455,8 +9431,7 @@ priority_queue and stack.  Change return types of "value_type&" to
 
 

to:

-
-  namespace std {
+
  namespace std {
     template <class T, class Container = deque<T> >
     class stack {
     public:
@@ -9505,14 +9480,14 @@ and it was deliberately not adopted.  Nevertheless, the LWG believes
 (straw poll: 10-2) that it is a genuine defect.]


-

308. Table 82 mentions unrelated headers

Section: 27 [lib.input.output]  Status: WP  Submitter: Martin Sebor  Date: 15 Mar 2001

+

308. Table 82 mentions unrelated headers

Section: 27 [lib.input.output]  Status: WP  Submitter: Martin Sebor  Date: 15 Mar 2001

Table 82 in section 27 mentions the header <cstdlib> for String -streams (27.7 [lib.string.streams]) and the headers <cstdio> and -<cwchar> for File streams (27.8 [lib.file.streams]). It's not clear +streams (27.7 [lib.string.streams]) and the headers <cstdio> and +<cwchar> for File streams (27.8 [lib.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 [lib.contents], only such headers +subclauses. According to 17.4.1.1 [lib.contents], only such headers are to be listed in the summary.

Proposed resolution:

@@ -9522,10 +9497,10 @@ Table 82.

[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 [lib.file.streams], including 27.8.2 [lib.c.files].]

+section 27.8 [lib.file.streams], including 27.8.2 [lib.c.files].]


-

310. Is errno a macro?

Section: 17.4.1.2 [lib.headers], 19.3 [lib.errno]  Status: WP  Submitter: Steve Clamage  Date: 21 Mar 2001

+

310. Is errno a macro?

Section: 17.4.1.2 [lib.headers], 19.3 [lib.errno]  Status: WP  Submitter: Steve Clamage  Date: 21 Mar 2001

Exactly how should errno be declared in a conforming C++ header?

@@ -9609,15 +9584,14 @@ not a name is a macro; it must explicitly specify exactly which names are required to be macros. The only one that really works is for it to be a macro.

-

[Curaçao: additional rationale added.]

+

[Curaçao: additional rationale added.]


-

311. Incorrect wording in basic_ostream class synopsis

Section: 27.6.2.1 [lib.ostream]  Status: WP  Submitter: Andy Sawyer  Date: 21 Mar 2001

+

311. Incorrect wording in basic_ostream class synopsis

Section: 27.6.2.1 [lib.ostream]  Status: WP  Submitter: Andy Sawyer  Date: 21 Mar 2001

-

In 27.6.2.1 [lib.ostream], the synopsis of class basic_ostream says:

+

In 27.6.2.1 [lib.ostream], the synopsis of class basic_ostream says:

-
-  // partial specializationss
+
  // partial specializationss
   template<class traits>
     basic_ostream<char,traits>& operator<<( basic_ostream<char,traits>&,
                                             const char * );
@@ -9630,29 +9604,29 @@ to be a macro.

Proposed resolution:

-

In the synopsis in 27.6.2.1 [lib.ostream], remove the +

In the synopsis in 27.6.2.1 [lib.ostream], remove the // partial specializationss comment. Also remove the same comment (correctly spelled, but still incorrect) from the synopsis in -27.6.2.5.4 [lib.ostream.inserters.character]. +27.6.2.5.4 [lib.ostream.inserters.character].

[ -Pre-Redmond: added 27.6.2.5.4 [lib.ostream.inserters.character] because of Martin's +Pre-Redmond: added 27.6.2.5.4 [lib.ostream.inserters.character] because of Martin's comment in c++std-lib-8939. ]


-

312. Table 27 is missing headers

Section: 20 [lib.utilities]  Status: WP  Submitter: Martin Sebor  Date: 29 Mar 2001

+

312. Table 27 is missing headers

Section: 20 [lib.utilities]  Status: WP  Submitter: Martin Sebor  Date: 29 Mar 2001

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 [lib.c.malloc].

+<cstdlib> and <cstring> that are discussed in 20.4.6 [lib.c.malloc].

Proposed resolution:

Add <cstdlib> and <cstring> to Table 27, in the same row as <memory>.


-

315. Bad "range" in list::unique complexity

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: Andy Sawyer  Date: 1 May 2001

+

315. Bad "range" in list::unique complexity

Section: 23.2.2.4 [lib.list.ops]  Status: WP  Submitter: Andy Sawyer  Date: 1 May 2001

-23.2.2.4 [lib.list.ops], Para 21 describes the complexity of +23.2.2.4 [lib.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)". @@ -9666,7 +9640,7 @@ otherwise no applications of the predicate)". Change the "range" from (last - first) to [first, last).


-

316. Vague text in Table 69

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: Martin Sebor  Date: 4 May 2001

+

316. Vague text in Table 69

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: Martin Sebor  Date: 4 May 2001

Table 69 says this about a_uniq.insert(t):

@@ -9686,7 +9660,7 @@ indicates whether the insertion takes place.

takes place...

-

317. Instantiation vs. specialization of facets

Section: 22 [lib.localization]  Status: WP  Submitter: Martin Sebor  Date: 4 May 2001

+

317. Instantiation vs. specialization of facets

Section: 22 [lib.localization]  Status: WP  Submitter: Martin Sebor  Date: 4 May 2001

The localization section of the standard refers to specializations of the facet templates as instantiations even though the required facets @@ -9735,12 +9709,11 @@ describe templates was clarified during the standardization process, but the wording in clause 22 was never updated to reflect that change.


-

318. Misleading comment in definition of numpunct_byname

Section: 22.2.3.2 [lib.locale.numpunct.byname]  Status: WP  Submitter: Martin Sebor  Date: 12 May 2001

+

318. Misleading comment in definition of numpunct_byname

Section: 22.2.3.2 [lib.locale.numpunct.byname]  Status: WP  Submitter: Martin Sebor  Date: 12 May 2001

The definition of the numpunct_byname template contains the following comment:

-
-    namespace std {
+
    namespace std {
         template <class charT>
         class numpunct_byname : public numpunct<charT> {
     // this class is specialized for char and wchar_t.
@@ -9752,14 +9725,14 @@ conceivable that an implementation will not explicitly specialize the
 template at all, but simply provide the primary template.

Proposed resolution:

Remove the comment from the text in 22.2.3.2 and from the proposed -resolution of library issue 228.

+resolution of library issue 228.


-

319. Storage allocation wording confuses "Required behavior", "Requires"

Section: 18.4.1.1 [lib.new.delete.single], 18.4.1.2 [lib.new.delete.array]  Status: WP  Submitter: Beman Dawes  Date: 15 May 2001

-

The standard specifies 17.3.1.3 [lib.structure.specifications] that "Required +

319. Storage allocation wording confuses "Required behavior", "Requires"

Section: 18.4.1.1 [lib.new.delete.single], 18.4.1.2 [lib.new.delete.array]  Status: WP  Submitter: Beman Dawes  Date: 15 May 2001

+

The standard specifies 17.3.1.3 [lib.structure.specifications] that "Required behavior" elements describe "the semantics of a function definition provided by either the implementation or a C++ program."

-

The standard specifies 17.3.1.3 [lib.structure.specifications] that "Requires" +

The standard specifies 17.3.1.3 [lib.structure.specifications] that "Requires" elements describe "the preconditions for calling the function."

In the sections noted below, the current wording specifies @@ -9768,7 +9741,7 @@ should be specified as "Requires".

Proposed resolution:

-

In 18.4.1.1 [lib.new.delete.single] Para 12 Change:

+

In 18.4.1.1 [lib.new.delete.single] Para 12 Change:

Required behavior: accept a value of ptr that is null or that was returned by an earlier call ...

@@ -9779,7 +9752,7 @@ should be specified as "Requires".

earlier call ...

-

In 18.4.1.2 [lib.new.delete.array] Para 11 Change:

+

In 18.4.1.2 [lib.new.delete.array] Para 11 Change:

Required behavior: accept a value of ptr that is null or that was returned by an earlier call ...

@@ -9791,7 +9764,7 @@ should be specified as "Requires".


-

320. list::assign overspecified

Section: 23.2.2.1 [lib.list.cons]  Status: WP  Submitter: Howard Hinnant  Date: 17 May 2001

+

320. list::assign overspecified

Section: 23.2.2.1 [lib.list.cons]  Status: WP  Submitter: Howard Hinnant  Date: 17 May 2001

Section 23.2.2.1, paragraphs 6-8 specify that list assign (both forms) have the "effects" of a call to erase followed by a call to insert. @@ -9822,8 +9795,7 @@ Metrowerks and SGI recycle nodes, Dinkumware and Rogue Wave don't.

Effects:

-
-   erase(begin(), end());
+
   erase(begin(), end());
    insert(begin(), first, last);
 
@@ -9834,10 +9806,9 @@ Metrowerks and SGI recycle nodes, Dinkumware and Rogue Wave don't.

Effects: Replaces the contents of the list with the range [first, last).

-

In 23.1.1 [lib.sequence.reqmts], in Table 67 (sequence requirements), +

In 23.1.1 [lib.sequence.reqmts], in Table 67 (sequence requirements), add two new rows:

-
-      a.assign(i,j)     void      pre: i,j are not iterators into a.
+
      a.assign(i,j)     void      pre: i,j are not iterators into a.
                                   Replaces elements in a with a copy
                                   of [i, j).
 
@@ -9850,8 +9821,7 @@ add two new rows:

Effects:

-
-   erase(begin(), end());
+
   erase(begin(), end());
    insert(begin(), n, t);
 
@@ -9871,13 +9841,13 @@ overspecification; it would effectively mandate that assignment use a temporary. Howard provided wording. ]

-

[Curaçao: Made editorial improvement in wording; changed +

[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.]


-

321. Typo in num_get

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: WP  Submitter: Kevin Djang  Date: 17 May 2001

+

321. Typo in num_get

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: WP  Submitter: Kevin Djang  Date: 17 May 2001

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." @@ -9892,7 +9862,7 @@ to be "A length modifier is added ..."

Rationale:

C uses the term "length modifier". We should be consistent.


-

322. iterator and const_iterator should have the same value type

Section: 23.1 [lib.container.requirements]  Status: WP  Submitter: Matt Austern  Date: 17 May 2001

+

322. iterator and const_iterator should have the same value type

Section: 23.1 [lib.container.requirements]  Status: WP  Submitter: Matt Austern  Date: 17 May 2001

It's widely assumed that, if X is a container, iterator_traits<X::iterator>::value_type and @@ -9904,7 +9874,7 @@ iterator_traits<X::const_iterator>::value_type should be "const X::value_type".

-

Related issue: 279.

+

Related issue: 279.

Proposed resolution:

In Table 65 ("Container Requirements"), change the return type for X::iterator to "iterator type whose value type is T". Change the @@ -9924,7 +9894,7 @@ the way that const pointers are handled: the standard already requires that iterator_traits<const int*>::value_type is int.


-

324. Do output iterators have value types?

Section: 24.1.2 [lib.output.iterators]  Status: WP  Submitter: Dave Abrahams  Date: 7 June 2001

+

324. Do output iterators have value types?

Section: 24.1.2 [lib.output.iterators]  Status: WP  Submitter: Dave Abrahams  Date: 7 June 2001

Table 73 suggests that output iterators have value types. It requires the expression "*a = t". Additionally, although Table 73 @@ -10003,32 +9973,28 @@ output iterator.

Table 73, change

-
-*a = t
+
*a = t
 

to

-
-*r = o
+
*r = o
 

and change

-
-*r++ = t
+
*r++ = t
 

to

-
-*r++ = o
+
*r++ = o
 
@@ -10046,7 +10012,7 @@ and any language suggesting otherwise is simply a mistake.

A future revision of the standard may wish to revisit this design decision.


-

325. Misleading text in moneypunct<>::do_grouping

Section: 22.2.6.3.2 [lib.locale.moneypunct.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 02 Jul 2001

+

325. Misleading text in moneypunct<>::do_grouping

Section: 22.2.6.3.2 [lib.locale.moneypunct.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 02 Jul 2001

The Returns clause in 22.2.6.3.2, p3 says about moneypunct<charT>::do_grouping()

@@ -10098,7 +10064,7 @@ locale. It is just a reminder that the values are interpreted as small integers, not ASCII characters.


-

327. Typo in time_get facet in table 52

Section: 22.1.1.1.1 [lib.locale.category]  Status: WP  Submitter: Tiki Wan  Date: 06 Jul 2001

+

327. Typo in time_get facet in table 52

Section: 22.1.1.1.1 [lib.locale.category]  Status: WP  Submitter: Tiki Wan  Date: 06 Jul 2001

The wchar_t versions of time_get and time_get_byname are listed incorrectly in table 52, required instantiations. In both cases the second template @@ -10107,14 +10073,12 @@ InputIterator, since these are input facets.

Proposed resolution:

In table 52, required instantiations, in -22.1.1.1.1 [lib.locale.category], change

-
-    time_get<wchar_t, OutputIterator>
+22.1.1.1.1  [lib.locale.category], change

+
    time_get<wchar_t, OutputIterator>
     time_get_byname<wchar_t, OutputIterator>
 

to

-
-    time_get<wchar_t, InputIterator>
+
    time_get<wchar_t, InputIterator>
     time_get_byname<wchar_t, InputIterator>
 
@@ -10122,7 +10086,7 @@ In table 52, required instantiations, in a typo, wchart instead of wchar_t.]


-

328. Bad sprintf format modifier in money_put<>::do_put()

Section: 22.2.6.2.2 [lib.locale.money.put.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 07 Jul 2001

+

328. Bad sprintf format modifier in money_put<>::do_put()

Section: 22.2.6.2.2 [lib.locale.money.put.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 07 Jul 2001

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 @@ -10135,11 +10099,11 @@ modifier.

Rationale:

Fixes an obvious typo


-

329. vector capacity, reserve and reallocation

Section: 23.2.4.2 [lib.vector.capacity], 23.2.4.3 [lib.vector.modifiers]  Status: WP  Submitter: Anthony Williams  Date: 13 Jul 2001

+

329. vector capacity, reserve and reallocation

Section: 23.2.4.2 [lib.vector.capacity], 23.2.4.3 [lib.vector.modifiers]  Status: WP  Submitter: Anthony Williams  Date: 13 Jul 2001

There is an apparent contradiction about which circumstances can cause -a reallocation of a vector in Section 23.2.4.2 [lib.vector.capacity] and -section 23.2.4.3 [lib.vector.modifiers]. +a reallocation of a vector in Section 23.2.4.2 [lib.vector.capacity] and +section 23.2.4.3 [lib.vector.modifiers].

23.2.4.2p5 says:

@@ -10153,8 +10117,7 @@ greater than the size specified in the most recent call to reserve().

Which implies if I do

-
-  std::vector<int> vec;
+
  std::vector<int> vec;
   vec.reserve(23);
   vec.reserve(0);
   vec.insert(vec.end(),1);
@@ -10192,7 +10155,7 @@ than the old capacity, I think the intent is clear.
 

Proposed resolution:

-

Change the wording of 23.2.4.2 [lib.vector.capacity] paragraph 5 to:

+

Change the wording of 23.2.4.2 [lib.vector.capacity] paragraph 5 to:

Notes: Reallocation invalidates all the references, pointers, and @@ -10216,16 +10179,15 @@ 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.


-

331. bad declaration of destructor for ios_base::failure

Section: 27.4.2.1.1 [lib.ios::failure]  Status: WP  Submitter: PremAnand M. Rao  Date: 23 Aug 2001

+

331. bad declaration of destructor for ios_base::failure

Section: 27.4.2.1.1 [lib.ios::failure]  Status: WP  Submitter: PremAnand M. Rao  Date: 23 Aug 2001

-With the change in 17.4.4.8 [lib.res.on.exception.handling] to state +With the change in 17.4.4.8 [lib.res.on.exception.handling] to state "An implementation may strengthen the exception-specification for a non-virtual function by removing listed exceptions." -(issue 119) +(issue 119) and the following declaration of ~failure() in ios_base::failure

-
-    namespace std {
+
    namespace std {
        class ios_base::failure : public exception {
        public:
            ...
@@ -10234,10 +10196,9 @@ and the following declaration of ~failure() in ios_base::failure
        };
      }
 
-

the class failure cannot be implemented since in 18.6.1 [lib.exception] the destructor of class exception has an empty +

the class failure cannot be implemented since in 18.6.1 [lib.exception] the destructor of class exception has an empty exception specification:

-
-    namespace std {
+
    namespace std {
        class exception {
        public:
          ...
@@ -10252,8 +10213,8 @@ exception specification:

The proposed resolution is consistent with the way that destructors of other classes derived from exception are handled.


-

333. does endl imply synchronization with the device?

Section: 27.6.2.7 [lib.ostream.manip]  Status: WP  Submitter: PremAnand M. Rao  Date: 27 Aug 2001

-

A footnote in 27.6.2.7 [lib.ostream.manip] states:

+

333. does endl imply synchronization with the device?

Section: 27.6.2.7 [lib.ostream.manip]  Status: WP  Submitter: PremAnand M. Rao  Date: 27 Aug 2001

+

A footnote in 27.6.2.7 [lib.ostream.manip] states:

[Footnote: The effect of executing cout << endl is to insert a newline character in the output sequence controlled by cout, then @@ -10278,7 +10239,7 @@ I could not find any other statement that explicitly defined the behavior one way or the other.

Proposed resolution:

-

Remove footnote 300 from section 27.6.2.7 [lib.ostream.manip].

+

Remove footnote 300 from section 27.6.2.7 [lib.ostream.manip].

Rationale:

We already have normative text saying what endl does: it inserts a newline character and calls flush. This footnote @@ -10286,7 +10247,7 @@ is at best redundant, at worst (as this issue says) misleading, because it appears to make promises about what flush does.


-

334. map::operator[] specification forces inefficient implementation

Section: 23.3.1.2 [lib.map.access]  Status: WP  Submitter: Andrea Griffini  Date: 02 Sep 2001

+

334. map::operator[] specification forces inefficient implementation

Section: 23.3.1.2 [lib.map.access]  Status: WP  Submitter: Andrea Griffini  Date: 02 Sep 2001

The current standard describes map::operator[] using a code example. That code example is however quite @@ -10298,8 +10259,7 @@ require all those temporary copies.

Currently map::operator[] behaviour is specified as:

-
-  Returns:
+
  Returns:
     (*((insert(make_pair(x, T()))).first)).second.
 
@@ -10326,8 +10286,7 @@ construction for each type).

A simple (half) solution would be replacing the description with:

-
-  Returns:
+
  Returns:
     (*((insert(value_type(x, T()))).first)).second.
 
@@ -10365,7 +10324,7 @@ non-conforming.

Proposed resolution:

-Replace 23.3.1.2 [lib.map.access] paragraph 1 with +Replace 23.3.1.2 [lib.map.access] paragraph 1 with

@@ -10384,7 +10343,7 @@ value_type(x, T()) into the map. wording. We may also wish to have a blanket statement somewhere in 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 98 for a similar problem.]

+made. See issue 98 for a similar problem.]

Rationale:

@@ -10396,13 +10355,12 @@ consistent with existing practice. we are no longer defining operator[] in terms of insert.


-

335. minor issue with char_traits, table 37

Section: 21.1.1 [lib.char.traits.require]  Status: WP  Submitter: Andy Sawyer  Date: 06 Sep 2001

+

335. minor issue with char_traits, table 37

Section: 21.1.1 [lib.char.traits.require]  Status: WP  Submitter: Andy Sawyer  Date: 06 Sep 2001

-Table 37, in 21.1.1 [lib.char.traits.require], descibes char_traits::assign +Table 37, in 21.1.1 [lib.char.traits.require], descibes char_traits::assign as:

-
-  X::assign(c,d)   assigns c = d.
+
  X::assign(c,d)   assigns c = d.
 

And para 1 says:

@@ -10419,8 +10377,7 @@ assign, at least), 'c' is intended to be a reference type.

I did a quick survey of the four implementations I happened to have lying around, and sure enough they all have signatures:

-
-    assign( charT&, const charT& );
+
    assign( charT&, const charT& );
 

(or the equivalent). It's also described this way in Nico's book. @@ -10434,14 +10391,13 @@ and char_traits<wchar_t> in 21.1.3.2...)

and change the description of assign in the table to:

-
-  X::assign(r,d)   assigns r = d
+
  X::assign(r,d)   assigns r = d
 

-

336. Clause 17 lack of references to deprecated headers

Section: 17 [lib.library]  Status: WP  Submitter: Detlef Vollmann  Date: 05 Sep 2001

+

336. Clause 17 lack of references to deprecated headers

Section: 17 [lib.library]  Status: WP  Submitter: Detlef Vollmann  Date: 05 Sep 2001

From c++std-edit-873:

-

17.4.1.2 [lib.headers], Table 11. In this table, the header +

17.4.1.2 [lib.headers], Table 11. In this table, the header <strstream> is missing.

This shows a general problem: The whole clause 17 refers quite @@ -10450,47 +10406,47 @@ library (though a deprecated one).

Proposed resolution:

-

To 17.4.1.2 [lib.headers] Table 11, C++ Library Headers, add +

To 17.4.1.2 [lib.headers] Table 11, C++ Library Headers, add "<strstream>".

In the following places, change "clauses 17 through 27" to "clauses 17 through 27 and Annex D":


-

337. replace_copy_if's template parameter should be InputIterator

Section: 25.2.4 [lib.alg.replace]  Status: WP  Submitter: Detlef Vollmann  Date: 07 Sep 2001

+

337. replace_copy_if's template parameter should be InputIterator

Section: 25.2.4 [lib.alg.replace]  Status: WP  Submitter: Detlef Vollmann  Date: 07 Sep 2001

From c++std-edit-876:

-In section 25.2.4 [lib.alg.replace] before p4: The name of the first +In section 25.2.4 [lib.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 [lib.type.descriptions] p1 the +instead of "Iterator". According to 17.3.2.1 [lib.type.descriptions] p1 the parameter name conveys real normative meaning.

Proposed resolution:

Change Iterator to InputIterator.


-

338.  is whitespace allowed between `-' and a digit?

Section: 22.2 [lib.locale.categories]  Status: WP  Submitter: Martin Sebor  Date: 17 Sep 2001

+

338.  is whitespace allowed between `-' and a digit?

Section: 22.2 [lib.locale.categories]  Status: WP  Submitter: Martin Sebor  Date: 17 Sep 2001

-From Stage 2 processing in 22.2.2.1.2 [lib.facet.num.get.virtuals], p8 and 9 (the +>From Stage 2 processing in 22.2.2.1.2 [lib.facet.num.get.virtuals], p8 and 9 (the original text or the text corrected by the proposed resolution of -issue 221) it seems clear that no whitespace is allowed -within a number, but 22.2.3.1 [lib.locale.numpunct], p2, which gives the +issue 221) it seems clear that no whitespace is allowed +within a number, but 22.2.3.1 [lib.locale.numpunct], p2, which gives the format for integer and floating point values, says that whitespace is optional between a plusminus and a sign.

@@ -10500,10 +10456,10 @@ 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 [lex.icon], that of floating-point-literals in 2.13.3 [lex.fcon] 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).

Proposed resolution:

-

Change the first part of 22.2.3.1 [lib.locale.numpunct] paragraph 2 from:

+

Change the first part of 22.2.3.1 [lib.locale.numpunct] paragraph 2 from:

The syntax for number formats is as follows, where digit @@ -10514,8 +10470,7 @@ value, whitespace is as determined by the facet numpunct<charT> members. Integer values have the format:

-
-  integer   ::= [sign] units
+
  integer   ::= [sign] units
   sign      ::= plusminus [whitespace]
   plusminus ::= '+' | '-'
   units     ::= digits [thousands-sep units]
@@ -10531,8 +10486,7 @@ value, and thousands-sep and decimal-point are the
 results of corresponding numpunct<charT> members.
 Integer values have the format:
 

-
-  integer   ::= [sign] units
+
  integer   ::= [sign] units
   sign      ::= plusminus
   plusminus ::= '+' | '-'
   units     ::= digits [thousands-sep units]
@@ -10540,16 +10494,16 @@ Integer values have the format:
 

Rationale:

-

It's not clear whether the format described in 22.2.3.1 [lib.locale.numpunct] paragraph 2 has any normative weight: nothing in the +

It's not clear whether the format described in 22.2.3.1 [lib.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 [lib.facet.num.get.virtuals]. The proposed +numeric processing in 22.2.2.1.2 [lib.facet.num.get.virtuals]. The proposed resolution removes all mention of "whitespace" from that format.


-

339. definition of bitmask type restricted to clause 27

Section: 22.2.1 [lib.category.ctype], 17.3.2.1.2 [lib.bitmask.types]  Status: WP  Submitter: Martin Sebor  Date: 17 September 2001

+

339. definition of bitmask type restricted to clause 27

Section: 22.2.1 [lib.category.ctype], 17.3.2.1.2 [lib.bitmask.types]  Status: WP  Submitter: Martin Sebor  Date: 17 September 2001

-The ctype_category::mask type is declared to be an enum in 22.2.1 [lib.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 [lib.bitmask.types], p1. However, the said definition only applies to +The ctype_category::mask type is declared to be an enum in 22.2.1 [lib.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 [lib.bitmask.types], p1. However, the said definition only applies to clause 27, making the reference in 22.2.1 somewhat dubious.

Proposed resolution:

@@ -10557,7 +10511,7 @@ clause 27, making the reference in 22.2.1 somewhat dubious.
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 [lib.template.bitset]). + as an integer type, or as a bitset (23.3.5 [lib.template.bitset]).

to read

@@ -10576,8 +10530,7 @@ following (note, in particluar, the cross-reference to 17.3.2.1.2 in

22.2.1 The ctype category [lib.category.ctype]

-
-namespace std {
+
namespace std {
     class ctype_base {
     public:
         typedef T mask;
@@ -10598,15 +10551,15 @@ namespace std {
 }
 
-

The type mask is a bitmask type (17.3.2.1.2 [lib.bitmask.types]).

+

The type mask is a bitmask type (17.3.2.1.2 [lib.bitmask.types]).

-

[Curaçao: The LWG notes that T above should be bold-italics to be +

[Curaçao: The LWG notes that T above should be bold-italics to be consistent with the rest of the standard.]


340. interpretation of has_facet<Facet>(loc) -

Section: 22.1.1.1.1 [lib.locale.category]  Status: WP  Submitter: Martin Sebor  Date: 18 Sep 2001

+

Section: 22.1.1.1.1 [lib.locale.category]  Status: WP  Submitter: Martin Sebor  Date: 18 Sep 2001

It's unclear whether 22.1.1.1.1, p3 says that has_facet<Facet>(loc) returns true for any Facet @@ -10653,7 +10606,7 @@ to hold only for specializations of Facet from Table 52 on }.

Proposed resolution:

-

In 22.1.1.1.1 [lib.locale.category], paragraph 3, change +

In 22.1.1.1.1 [lib.locale.category], paragraph 3, change "that is a member of a standard category" to "shown in Table 51".

Rationale:

The facets in Table 52 are an unbounded set. Locales should not be @@ -10663,26 +10616,25 @@ required to contain an infinite number of facets.

OutputIterator must be supported. Table 51 already contains a complete list of the ones we need.


-

341. Vector reallocation and swap

Section: 23.2.4.2 [lib.vector.capacity]  Status: WP  Submitter: Anthony Williams  Date: 27 Sep 2001

+

341. Vector reallocation and swap

Section: 23.2.4.2 [lib.vector.capacity]  Status: WP  Submitter: Anthony Williams  Date: 27 Sep 2001

It is a common idiom to reduce the capacity of a vector by swapping it with an empty one:

-
-  std::vector<SomeType> vec;
+
  std::vector<SomeType> vec;
   // fill vec with data
   std::vector<SomeType>().swap(vec);
   // vec is now empty, with minimal capacity
 
-

However, the wording of 23.2.4.2 [lib.vector.capacity]paragraph 5 prevents +

However, the wording of 23.2.4.2 [lib.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 329 does not affect this. Consequently, the example above +from reducing the capacity. The proposed wording for issue 329 does not affect this. Consequently, the example above requires the temporary to be expanded to cater for the contents of vec, and the contents be copied across. This is a linear-time operation.

However, the container requirements state that swap must have constant -complexity (23.1 [lib.container.requirements] note to table 65).

+complexity (23.1 [lib.container.requirements] note to table 65).

This is an important issue, as reallocation affects the validity of references and iterators.

@@ -10704,10 +10656,9 @@ pointing to the same element. Consequently iterators and references that referred to one vector now refer to the other, and vice-versa.

Proposed resolution:

-

Add a new paragraph after 23.2.4.2 [lib.vector.capacity] paragraph 5:

+

Add a new paragraph after 23.2.4.2 [lib.vector.capacity] paragraph 5:

-
-  void swap(vector<T,Allocator>& x);
+
  void swap(vector<T,Allocator>& x);
 

Effects: Exchanges the contents and capacity() of *this with that of x.

@@ -10725,16 +10676,16 @@ do pointer twiddling, and that it should exchange all properties of the two vectors, including their reallocation guarantees.


-

345. type tm in <cwchar>

Section: 21.4 [lib.c.strings]  Status: WP  Submitter: Clark Nelson  Date: 19 Oct 2001

+

345. type tm in <cwchar>

Section: 21.4 [lib.c.strings]  Status: WP  Submitter: Clark Nelson  Date: 19 Oct 2001

C99, and presumably amendment 1 to C90, specify that <wchar.h> -declares struct tm as an incomplete type. However, table 48 in 21.4 [lib.c.strings] does not mention the type tm as being declared in +declares struct tm as an incomplete type. However, table 48 in 21.4 [lib.c.strings] does not mention the type tm as being declared in <cwchar>. Is this omission intentional or accidental?

Proposed resolution:

-

In section 21.4 [lib.c.strings], add "tm" to table 48.

+

In section 21.4 [lib.c.strings], add "tm" to table 48.


-

346. Some iterator member functions should be const

Section: 24.1 [lib.iterator.requirements]  Status: WP  Submitter: Jeremy Siek  Date: 20 Oct 2001

+

346. Some iterator member functions should be const

Section: 24.1 [lib.iterator.requirements]  Status: WP  Submitter: Jeremy Siek  Date: 20 Oct 2001

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 @@ -10746,43 +10697,39 @@ are suggested to make this explicit.

for non-const and a,b for const iterators. The following changes make this more explicit and also fix a couple problems.

Proposed resolution:

-

In 24.1 [lib.iterator.requirements] Change the first section of p9 from +

In 24.1 [lib.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...".

In Table 73, change

-
-    a->m   U&         ...
+
    a->m   U&         ...
 

to

-
-    a->m   const U&   ...
+
    a->m   const U&   ...
     r->m   U&         ...
 

In Table 73 expression column, change

-
-    *a = t
+
    *a = t
 

to

-
-    *r = t
+
    *r = t
 

[Redmond: The container requirements should be reviewed to see if the same problem appears there.]


-

347. locale::category and bitmask requirements

Section: 22.1.1.1.1 [lib.locale.category]  Status: WP  Submitter: P.J. Plauger, Nathan Myers  Date: 23 Oct 2001

+

347. locale::category and bitmask requirements

Section: 22.1.1.1.1 [lib.locale.category]  Status: WP  Submitter: P.J. Plauger, Nathan Myers  Date: 23 Oct 2001

-In 22.1.1.1.1 [lib.locale.category] paragraph 1, the category members +In 22.1.1.1.1 [lib.locale.category] paragraph 1, the category members are described as bitmask elements. In fact, the bitmask requirements -in 17.3.2.1.2 [lib.bitmask.types] don't seem quite right: none +in 17.3.2.1.2 [lib.bitmask.types] don't seem quite right: none and all are bitmask constants, not bitmask elements.

In particular, the requirements for none interact poorly @@ -10801,10 +10748,9 @@ re-expresses the status quo more clearly, without introducing any changes beyond resolving the DR.

Proposed resolution:

-

Replace the first two paragraphs of 22.1.1.1 [lib.locale.types] with:

+

Replace the first two paragraphs of 22.1.1.1 [lib.locale.types] with:

-
-    typedef int category;
+
    typedef int category;
 

Valid category values include the locale member bitmask @@ -10814,8 +10760,7 @@ represents a single locale category. In addition, locale member bitmask constant none is defined as zero and represents no category. And locale member bitmask constant all is defined such that the expression

-
-    (collate | ctype | monetary | numeric | time | messages | all) == all
+
    (collate | ctype | monetary | numeric | time | messages | all) == all
 

is true, and represents the union of all categories. Further @@ -10833,7 +10778,7 @@ in turn, identifies a set of locale facets, including at least those shown in Table 51:

-

[Curaçao: need input from locale experts.]

+

[Curaçao: need input from locale experts.]

Rationale:

@@ -10847,7 +10792,7 @@ shown in Table 51:

Option 2:
-Replace the first paragraph of 22.1.1.1 [lib.locale.types] with:

+Replace the first paragraph of 22.1.1.1 [lib.locale.types] with:

Valid category values include the enumerated values. In addition, the @@ -10868,10 +10813,9 @@ of the other enumerated values; implementations may add extra categories.]


-

349. Minor typographical error in ostream_iterator

Section: 24.5.2 [lib.ostream.iterator]  Status: WP  Submitter: Andy Sawyer  Date: 24 Oct 2001

+

349. Minor typographical error in ostream_iterator

Section: 24.5.2 [lib.ostream.iterator]  Status: WP  Submitter: Andy Sawyer  Date: 24 Oct 2001

24.5.2 [lib.ostream.iterator] states:

-
-    [...]
+
    [...]
 
     private:
     // basic_ostream<charT,traits>* out_stream; exposition only
@@ -10882,11 +10826,11 @@ of the other enumerated values; implementations may add extra categories.]
 should be of type 'const charT*'.

Proposed resolution:

-In 24.5.2 [lib.ostream.iterator], replace const char* delim with +In 24.5.2 [lib.ostream.iterator], replace const char* delim with const charT* delim.


-

352. missing fpos requirements

Section: 21.1.2 [lib.char.traits.typedefs]  Status: WP  Submitter: Martin Sebor  Date: 2 Dec 2001

+

352. missing fpos requirements

Section: 21.1.2 [lib.char.traits.typedefs]  Status: WP  Submitter: Martin Sebor  Date: 2 Dec 2001

(1) There are no requirements on the stateT template parameter of @@ -10929,7 +10873,7 @@ 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.


-

354. Associative container lower/upper bound requirements

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: Hans Aberg  Date: 17 Dec 2001

+

354. Associative container lower/upper bound requirements

Section: 23.1.2 [lib.associative.reqmts]  Status: WP  Submitter: Hans Aberg  Date: 17 Dec 2001

Discussions in the thread "Associative container lower/upper bound requirements" on comp.std.c++ suggests that there is a defect in the @@ -10963,7 +10907,7 @@ the intention (and not possible with the "const" versions).

Proposed resolution:

-

Change Table 69 of section 23.1.2 [lib.associative.reqmts] indicated entries +

Change Table 69 of section 23.1.2 [lib.associative.reqmts] indicated entries to:

@@ -10978,10 +10922,10 @@ key greater than k, or a.end() if such an element is not found.

-

[Curaçao: LWG reviewed PR.]

+

[Curaçao: LWG reviewed PR.]


-

355. Operational semantics for a.back()

Section: 23.1.1 [lib.sequence.reqmts]  Status: WP  Submitter: Yaroslav Mironov  Date: 23 Jan 2002

+

355. Operational semantics for a.back()

Section: 23.1.1 [lib.sequence.reqmts]  Status: WP  Submitter: Yaroslav Mironov  Date: 23 Jan 2002

Table 68 "Optional Sequence Operations" in 23.1.1/12 specifies operational semantics for "a.back()" as @@ -11022,7 +10966,7 @@ a.erase(--a.end()) { iterator tmp = a.end(); --tmp; a.erase(tmp); }

-

[Curaçao: LWG changed PR from "{ X::iterator tmp = +

[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())".]

@@ -11051,7 +10995,7 @@ LWG would like a new issue opened.]


358. interpreting thousands_sep after a decimal_point -

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 12 Mar 2002

+

Section: 22.2.2.1.2 [lib.facet.num.get.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 12 Mar 2002

I don't think thousands_sep is being treated correctly after decimal_point has been seen. Since grouping applies only to the @@ -11097,11 +11041,10 @@ Change the first sentence of 22.2.2.1.2, p9 from support for such conventions, we need to do so explicitly.


-

359. num_put<>::do_put (..., bool) undocumented

Section: 22.2.2.2.1 [lib.facet.num.put.members]  Status: WP  Submitter: Martin Sebor  Date: 12 Mar 2002

+

359. num_put<>::do_put (..., bool) undocumented

Section: 22.2.2.2.1 [lib.facet.num.put.members]  Status: WP  Submitter: Martin Sebor  Date: 12 Mar 2002

22.2.2.2.1, p1:

-
-    iter_type put (iter_type out, ios_base& str, char_type fill,
+    
    iter_type put (iter_type out, ios_base& str, char_type fill,
                    bool val) const;
     ...
 
@@ -11112,8 +11055,7 @@ Change the first sentence of 22.2.2.1.2, p9 from
 however, 22.2.2.2.2, p23:

-
-iter_type put (iter_type out, ios_base& str, char_type fill,
+
iter_type put (iter_type out, ios_base& str, char_type fill,
                bool val) const;
 
@@ -11121,8 +11063,7 @@ iter_type put (iter_type out, ios_base& str, char_type fill, Effects: If (str.flags() & ios_base::boolalpha) == 0 then do out = do_put(out, str, fill, (int)val) Otherwise do -
-             string_type s =
+
             string_type s =
                  val ? use_facet<ctype<charT> >(loc).truename()
                      : use_facet<ctype<charT> >(loc).falsename();
 
@@ -11146,11 +11087,11 @@ I think the least invasive change to fix it would be something like the following:

Proposed resolution:

-

In 22.2.2.2.2 [lib.facet.num.put.virtuals], just above paragraph 1, remove +

In 22.2.2.2.2 [lib.facet.num.put.virtuals], just above paragraph 1, remove the bool overload.

-In 22.2.2.2.2 [lib.facet.num.put.virtuals], p23, make the following changes +In 22.2.2.2.2 [lib.facet.num.put.virtuals], p23, make the following changes

@@ -11170,8 +11111,7 @@ In 22.2.2.2.2 [lib.facet. ios_base::boolalpha) == 0 then do_put (out, str, fill, (long)val) Otherwise the function obtains a string s as if by -
-             string_type s =
+
             string_type s =
                 val ? use_facet<ctype<charT> >(loc).truename()
                     : use_facet<ctype<charT> >(loc).falsename();
 
@@ -11186,7 +11126,7 @@ This fixes a couple of obvious typos, and also fixes what appears to be a requirement of gratuitous inefficiency.


-

360. locale mandates inefficient implementation

Section: 22.1.1 [lib.locale]  Status: WP  Submitter: Martin Sebor  Date: 12 Mar 2002

+

360. locale mandates inefficient implementation

Section: 22.1.1 [lib.locale]  Status: WP  Submitter: Martin Sebor  Date: 12 Mar 2002

22.1.1, p7 (copied below) allows iostream formatters and extractors to make assumptions about the values returned from facet members. @@ -11222,7 +11162,7 @@ prevents locale from being implemented efficiently.

This change is reasonable becuase it clarifies the intent of this part of the standard.


-

363. Missing exception specification in 27.4.2.1.1

Section: 27.4.2.1.1 [lib.ios::failure]  Status: WP  Submitter: Walter Brown and Marc Paterno  Date: 20 May 2002

+

363. Missing exception specification in 27.4.2.1.1

Section: 27.4.2.1.1 [lib.ios::failure]  Status: WP  Submitter: Walter Brown and Marc Paterno  Date: 20 May 2002

The destructor of ios_base::failure should have an empty throw specification, because the destructor of its base class, exception, is @@ -11230,15 +11170,14 @@ declared in this way.

Proposed resolution:

Change the destructor to

-
-  virtual ~failure() throw();
+
  virtual ~failure() throw();
 

Rationale:

Fixes an obvious glitch. This is almost editorial.


-

364. Inconsistent wording in 27.5.2.4.2

Section: 27.5.2.4.2 [lib.streambuf.virt.buffer]  Status: WP  Submitter: Walter Brown, Marc Paterno  Date: 10 May 2002

+

364. Inconsistent wording in 27.5.2.4.2

Section: 27.5.2.4.2 [lib.streambuf.virt.buffer]  Status: WP  Submitter: Walter Brown, Marc Paterno  Date: 10 May 2002

-27.5.2.4.2 [lib.streambuf.virt.buffer] paragraph 1 is inconsistent with the Effects +27.5.2.4.2 [lib.streambuf.virt.buffer] paragraph 1 is inconsistent with the Effects clause for seekoff.

Proposed resolution:

@@ -11268,7 +11207,7 @@ for each class derived from basic_streambuf in this clause the existing wording and what's in the proposed resolution, but the change may make the intent clearer.


-

365. Lack of const-qualification in clause 27

Section: 27 [lib.input.output]  Status: WP  Submitter: Walter Brown, Marc Paterno  Date: 10 May 2002

+

365. Lack of const-qualification in clause 27

Section: 27 [lib.input.output]  Status: WP  Submitter: Walter Brown, Marc Paterno  Date: 10 May 2002

Some stream and streambuf member functions are declared non-const, even thought they appear only to report information rather than to @@ -11279,22 +11218,20 @@ document N1360 for details and rationale.

The list of member functions under discussion: in_avail, showmanyc, tellg, tellp, is_open.

-

Related issue: 73

+

Related issue: 73

Proposed resolution:

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

Replace

-
-  bool is_open();
+
  bool is_open();
 

with

-
-  bool is_open() const;
+
  bool is_open() const;
 

Rationale:

Of the changes proposed in N1360, the only one that is safe is changing the filestreams' is_open to const. The LWG believed that -this was NAD the first time it considered this issue (issue 73), but now thinks otherwise. The corresponding streambuf +this was NAD the first time it considered this issue (issue 73), but now thinks otherwise. The corresponding streambuf member function, after all,is already const.

The other proposed changes are less safe, because some streambuf @@ -11309,12 +11246,11 @@ state exposed by the public interface is unchanged.

way by providing both overloads; this would be a conforming extension.


-

370. Minor error in basic_istream::get

Section: 27.6.1.3 [lib.istream.unformatted]  Status: WP  Submitter: Ray Lischner  Date: 15 Jul 2002

-

Defect report for description of basic_istream::get (section 27.6.1.3 [lib.istream.unformatted]), paragraph 15. The description for the get function +

370. Minor error in basic_istream::get

Section: 27.6.1.3 [lib.istream.unformatted]  Status: WP  Submitter: Ray Lischner  Date: 15 Jul 2002

+

Defect report for description of basic_istream::get (section 27.6.1.3 [lib.istream.unformatted]), paragraph 15. The description for the get function with the following signature:

-
-  basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>&
+
  basic_istream<charT,traits>& get(basic_streambuf<char_type,traits>&
   sb);
 
@@ -11341,26 +11277,26 @@ with the following signature:

Rationale:

Fixes an obvious typo.


-

373. Are basic_istream and basic_ostream to use (exceptions()&badbit) != 0 ?

Section: 27.6.1.2.1 [lib.istream.formatted.reqmts], 27.6.2.5.1 [lib.ostream.formatted.reqmts]  Status: WP  Submitter: Keith Baker  Date: 23 Jul 2002

+

373. Are basic_istream and basic_ostream to use (exceptions()&badbit) != 0 ?

Section: 27.6.1.2.1 [lib.istream.formatted.reqmts], 27.6.2.5.1 [lib.ostream.formatted.reqmts]  Status: WP  Submitter: Keith Baker  Date: 23 Jul 2002

-In 27.6.1.2.1 [lib.istream.formatted.reqmts] and 27.6.2.5.1 [lib.ostream.formatted.reqmts] +In 27.6.1.2.1 [lib.istream.formatted.reqmts] and 27.6.2.5.1 [lib.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 [lib.exception] that has no return type. Should member function -exceptions() found in 27.4.4 [lib.ios] be used instead? +exception() is the constructor to class std::exception in 18.6.1 [lib.exception] that has no return type. Should member function +exceptions() found in 27.4.4 [lib.ios] be used instead?

Proposed resolution:

-In 27.6.1.2.1 [lib.istream.formatted.reqmts] and 27.6.2.5.1 [lib.ostream.formatted.reqmts], change +In 27.6.1.2.1 [lib.istream.formatted.reqmts] and 27.6.2.5.1 [lib.ostream.formatted.reqmts], change "(exception()&badbit) != 0" to "(exceptions()&badbit) != 0".

Rationale:

Fixes an obvious typo.


-

375. basic_ios should be ios_base in 27.7.1.3

Section: 27.7.1.3 [lib.stringbuf.virtuals]  Status: WP  Submitter: Ray Lischner  Date: 14 Aug 2002

+

375. basic_ios should be ios_base in 27.7.1.3

Section: 27.7.1.3 [lib.stringbuf.virtuals]  Status: WP  Submitter: Ray Lischner  Date: 14 Aug 2002

-In Section 27.7.1.3 [lib.stringbuf.virtuals]: Table 90, Table 91, and paragraph +In Section 27.7.1.3 [lib.stringbuf.virtuals]: Table 90, Table 91, and paragraph 14 all contain references to "basic_ios::" which should be "ios_base::".

@@ -11372,12 +11308,11 @@ paragraph 14 to "ios_base".

Rationale:

Fixes an obvious typo.


-

379. nonsensical ctype::do_widen() requirement

Section: 22.2.1.1.2 [lib.locale.ctype.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 6 Sep 2002

+

379. nonsensical ctype::do_widen() requirement

Section: 22.2.1.1.2 [lib.locale.ctype.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 6 Sep 2002

The last sentence in 22.2.1.1.2, p11 below doesn't seem to make sense.

-
-  charT do_widen (char c) const;
+
  charT do_widen (char c) const;
 
   -11- Effects: Applies the simplest reasonable transformation from
        a char value or sequence of char values to the corresponding
@@ -11390,8 +11325,7 @@ The last sentence in 22.2.1.1.2, p11 below doesn't seem to make sense.
 

Shouldn't the last sentence instead read

-
-       For any named ctype category with a ctype<char> facet ctc
+
       For any named ctype category with a ctype<char> facet ctc
        and valid ctype_base::mask value M
        (ctc.is(M, c) || !is(M, do_widen(c))) is true.
 
@@ -11402,11 +11336,10 @@ footnote 224.)

Proposed resolution:

-Replace the last sentence of 22.2.1.1.2 [lib.locale.ctype.virtuals], p11 with the +Replace the last sentence of 22.2.1.1.2 [lib.locale.ctype.virtuals], p11 with the following text:

-
-       For any named ctype category with a ctype<char> facet ctc
+
       For any named ctype category with a ctype<char> facet ctc
        and valid ctype_base::mask value M,
        (ctc.is(M, c) || !is(M, do_widen(c))) is true.
 
@@ -11416,9 +11349,9 @@ following text:

Rationale:

The LWG believes this is just a typo, and that this is the correct fix.


-

380. typos in codecvt tables 53 and 54

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 6 Sep 2002

+

380. typos in codecvt tables 53 and 54

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 6 Sep 2002

-Tables 53 and 54 in 22.2.1.5.2 [lib.locale.codecvt.virtuals] are both titled "convert +Tables 53 and 54 in 22.2.1.5.2 [lib.locale.codecvt.virtuals] 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. @@ -11443,7 +11376,7 @@ heading Meaning, to "space for more than (to_limit - to) destination elements was needed to terminate a sequence given the value of state."


-

381. detection of invalid mbstate_t in codecvt

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 6 Sep 2002

+

381. detection of invalid mbstate_t in codecvt

Section: 22.2.1.5.2 [lib.locale.codecvt.virtuals]  Status: WP  Submitter: Martin Sebor  Date: 6 Sep 2002

All but one codecvt member functions that take a state_type argument list as one of their preconditions that the state_type argument have @@ -11464,15 +11397,13 @@ cases, I propose the following: Add a new paragraph before 22.2.1.5.2, p5, and after the function declaration below

-
-    result do_unshift(stateT& state,
+
    result do_unshift(stateT& state,
     externT* to, externT* to_limit, externT*& to_next) const;
 

as follows:

-
-    Requires: (to <= to_end) well defined and true; state initialized,
+
    Requires: (to <= to_end) well defined and true; state initialized,
     if at the beginning of a sequence, or else equal to the result of
     converting the preceding characters in the sequence.
 
@@ -11480,14 +11411,12 @@ as follows: and change the text in Table 54, row 4, the error row, under the heading Meaning, from

-
-    state has invalid value
+
    state has invalid value
 

to

-
-    an unspecified error has occurred
+
    an unspecified error has occurred
 

Rationale:

The intent is that implementations should not be required to detect @@ -11497,7 +11426,7 @@ behavior. Implementations that do choose to detect invalid state values, or that choose to detect any other kind of error, may return error as an indication.


-

383. Bidirectional iterator assertion typo

Section: 24.1.4 [lib.bidirectional.iterators]  Status: WP  Submitter: ysapir (submitted via comp.std.c++)  Date: 17 Oct 2002

+

383. Bidirectional iterator assertion typo

Section: 24.1.4 [lib.bidirectional.iterators]  Status: WP  Submitter: ysapir (submitted via comp.std.c++)  Date: 17 Oct 2002

Following a discussion on the boost list regarding end iterators and the possibility of performing operator--() on them, it seems to me @@ -11509,8 +11438,8 @@ with that discussion. I have checked this newsgroup, as well as attempted a search of the Active/Defect/Closed Issues List on the site for the words "s is derefer" so I believe this has not been proposed before. Furthermore, -the "Lists by Index" mentions only DR 299 on section -24.1.4, and DR 299 is not related to this issue. +the "Lists by Index" mentions only DR 299 on section +24.1.4, and DR 299 is not related to this issue.

@@ -11518,8 +11447,7 @@ The standard makes the following assertion on bidirectional iterators, in section 24.1.4 [lib.bidirectional.iterators], Table 75:

-
-                         operational  assertion/note
+
                         operational  assertion/note
 expression  return type   semantics    pre/post-condition
 
 --r          X&                        pre: there exists s such
@@ -11555,10 +11483,9 @@ Change the guarantee to "postcondition: r is dereferenceable."
 

Rationale:

Fixes an obvious typo


-

389. Const overload of valarray::operator[] returns by value

Section: 26.3.2 [lib.template.valarray]  Status: WP  Submitter: Gabriel Dos Reis  Date: 8 Nov 2002

+

389. Const overload of valarray::operator[] returns by value

Section: 26.3.2 [lib.template.valarray]  Status: WP  Submitter: Gabriel Dos Reis  Date: 8 Nov 2002

Consider the following program:

-
-    #include <iostream>
+
    #include <iostream>
     #include <ostream>
     #include <vector>
     #include <valarray>
@@ -11596,14 +11523,12 @@ 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&.

Proposed resolution:

-

In the class synopsis in 26.3.2 [lib.template.valarray], and in -26.3.2.3 [lib.valarray.access] just above paragraph 1, change

-
-  T operator[](size_t const);
+

In the class synopsis in 26.3.2 [lib.template.valarray], and in +26.3.2.3 [lib.valarray.access] just above paragraph 1, change

+
  T operator[](size_t const);
 

to

-
-  const T& operator[](size_t const);
+
  const T& operator[](size_t const);
 

[Kona: fixed a minor typo: put semicolon at the end of the line @@ -11616,28 +11541,28 @@ 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.


-

391. non-member functions specified as const

Section: 22.1.3.2 [lib.conversions]  Status: WP  Submitter: James Kanze  Date: 10 Dec 2002

+

391. non-member functions specified as const

Section: 22.1.3.2 [lib.conversions]  Status: WP  Submitter: James Kanze  Date: 10 Dec 2002

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 [lib.locales]. +const in the header file synopsis in section 22.1 [lib.locales].

Proposed resolution:

-

In 22.1.3.2 [lib.conversions], remove const from the function +

In 22.1.3.2 [lib.conversions], remove const from the function declarations of std::toupper and std::tolower

Rationale:

Fixes an obvious typo


-

395. inconsistencies in the definitions of rand() and random_shuffle()

Section: 26.5 [lib.c.math]  Status: WP  Submitter: James Kanze  Date: 3 Jan 2003

+

395. inconsistencies in the definitions of rand() and random_shuffle()

Section: 26.5 [lib.c.math]  Status: WP  Submitter: James Kanze  Date: 3 Jan 2003

-In 26.5 [lib.c.math], the C++ standard refers to the C standard for the +In 26.5 [lib.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."

-In 25.2.11 [lib.alg.random.shuffle], there is no specification as to +In 25.2.11 [lib.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 @@ -11668,14 +11593,13 @@ implementation is permitted to use rand.] problem if the number of elements in the sequence is greater than RAND_MAX.


-

400. redundant type cast in lib.allocator.members

Section: 20.4.1.1 [lib.allocator.members]  Status: WP  Submitter: Markus Mauhart  Date: 27 Feb 2003

+

400. redundant type cast in lib.allocator.members

Section: 20.4.1.1 [lib.allocator.members]  Status: WP  Submitter: Markus Mauhart  Date: 27 Feb 2003

-20.4.1.1 [lib.allocator.members] allocator members, contains +20.4.1.1 [lib.allocator.members] allocator members, contains the following 3 lines:

-
-  12 Returns: new((void *) p) T( val)
+
  12 Returns: new((void *) p) T( val)
      void destroy(pointer p);
   13 Returns: ((T*) p)->~T()
 
@@ -11691,27 +11615,25 @@ Replace "((T*) p)" with "p".

Rationale:

Just a typo, this is really editorial.


-

402. wrong new expression in [some_]allocator::construct

Section: 20.1.5 [lib.allocator.requirements], 20.4.1.1 [lib.allocator.members],   Status: WP  Submitter: Markus Mauhart  Date: 27 Feb 2003

+

402. wrong new expression in [some_]allocator::construct

Section: 20.1.5 [lib.allocator.requirements], 20.4.1.1 [lib.allocator.members],   Status: WP  Submitter: Markus Mauhart  Date: 27 Feb 2003

This applies to the new expression that is contained in both par12 of -20.4.1.1 [lib.allocator.members] and in par2 (table 32) of 20.1.5 [lib.allocator.requirements]. +20.4.1.1 [lib.allocator.members] and in par2 (table 32) of 20.1.5 [lib.allocator.requirements]. I think this new expression is wrong, involving unintended side effects.

-

20.4.1.1 [lib.allocator.members] contains the following 3 lines:

+

20.4.1.1 [lib.allocator.members] contains the following 3 lines:

-
-  11 Returns: the largest value N for which the call allocate(N,0) might succeed.
+
  11 Returns: the largest value N for which the call allocate(N,0) might succeed.
      void construct(pointer p, const_reference val);
   12 Returns: new((void *) p) T( val)
 
-

20.1.5 [lib.allocator.requirements] in table 32 has the following line:

-
-  a.construct(p,t)   Effect: new((void*)p) T(t)
+

20.1.5 [lib.allocator.requirements] in table 32 has the following line:

+
  a.construct(p,t)   Effect: new((void*)p) T(t)
 

@@ -11719,8 +11641,7 @@ effects. especially from table 31:

-
-  alloc<T>             a     ;// an allocator for T
+
  alloc<T>             a     ;// an allocator for T
   alloc<T>::pointer    p     ;// random access iterator
                               // (may be different from T*)
   alloc<T>::reference  r = *p;// T&
@@ -11746,34 +11667,34 @@ probably must think about it.
 Replace "new" with "::new" in both cases.
 


-

403. basic_string::swap should not throw exceptions

Section: 21.3.5.8 [lib.string::swap]  Status: WP  Submitter: Beman Dawes  Date: 25 Mar 2003

+

403. basic_string::swap should not throw exceptions

Section: 21.3.5.8 [lib.string::swap]  Status: WP  Submitter: Beman Dawes  Date: 25 Mar 2003

-std::basic_string, 21.3 [lib.basic.string] paragraph 2 says that +std::basic_string, 21.3 [lib.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.

-Section 23.1 [lib.container.requirements] paragraph 10 does limit conditions under +Section 23.1 [lib.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.

-Eric Niebler points out that 21.3 [lib.basic.string] paragraph 5 explicitly +Eric Niebler points out that 21.3 [lib.basic.string] paragraph 5 explicitly permits basic_string::swap to invalidates iterators, which is -disallowed by 23.1 [lib.container.requirements] paragraph 10. Thus the standard would +disallowed by 23.1 [lib.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 [lib.container.requirements] paragraph 10 requirements. +basic_string meet 23.1 [lib.container.requirements] paragraph 10 requirements.

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 [lib.container.requirements] paragraph 10, and that the standard is +specified by 23.1 [lib.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 @@ -11783,7 +11704,7 @@ exception-safe code.

Note: There remains long standing concern over whether or not it is -possible to reasonably meet the 23.1 [lib.container.requirements] paragraph 10 swap +possible to reasonably meet the 23.1 [lib.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. @@ -11795,14 +11716,14 @@ address, prejudice, or otherwise impact that concern.

Proposed resolution:

-In 21.3.5.8 [lib.string::swap], add a throws clause: +In 21.3.5.8 [lib.string::swap], add a throws clause:

Throws: Shall not throw exceptions.


-

404. May a replacement allocation function be declared inline?

Section: 17.4.3.4 [lib.replacement.functions], 18.4.1 [lib.new.delete]  Status: WP  Submitter: Matt Austern  Date: 24 Apr 2003

+

404. May a replacement allocation function be declared inline?

Section: 17.4.3.4 [lib.replacement.functions], 18.4.1 [lib.new.delete]  Status: WP  Submitter: Matt Austern  Date: 24 Apr 2003

The eight basic dynamic memory allocation functions (single-object and array versions of ::operator new and ::operator delete, in the @@ -11813,15 +11734,15 @@ in preference to the implementation's definition.

Three different parts of the standard mention requirements on -replacement functions: 17.4.3.4 [lib.replacement.functions], 18.4.1.1 [lib.new.delete.single] -and 18.4.1.2 [lib.new.delete.array], and 3.7.3 [basic.stc.dynamic]. +replacement functions: 17.4.3.4 [lib.replacement.functions], 18.4.1.1 [lib.new.delete.single] +and 18.4.1.2 [lib.new.delete.array], and 3.7.3 [basic.stc.dynamic].

None of these three places say whether a replacement function may - be declared inline. 18.4.1.1 [lib.new.delete.single] paragraph 2 specifies a + be declared inline. 18.4.1.1 [lib.new.delete.single] paragraph 2 specifies a signature for the replacement function, but that's not enough: the inline specifier is not part of a function's signature. - One might also reason from 7.1.2 [dcl.fct.spec] 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 @@ -11829,7 +11750,7 @@ and 18.4.1.2 [lib.new.delete.ar functions.

Proposed resolution:

-Add a new sentence to the end of 17.4.3.4 [lib.replacement.functions] paragraph 3: +Add a new sentence to the end of 17.4.3.4 [lib.replacement.functions] paragraph 3: "The program's definitions shall not be specified as inline. No diagnostic is required."

@@ -11845,9 +11766,28 @@ Providing this functionality would be difficult in some cases, and is believed to be of limited value.


-

407. Can singular iterators be destroyed?

Section: 24.1 [lib.iterator.requirements]  Status: WP  Submitter: Nathan Myers  Date: 3 June 2003

+

405. qsort and POD

Section: 25.4 [lib.alg.c.library]  Status: DR  Submitter: Ray Lischner  Date: 08 Apr 2003

-Clause 24.1 [lib.iterator.requirements], paragraph 5, says that the only expression +Section 25.4 [lib.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. +

+

Proposed resolution:

+

+In 25.4 [lib.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 base are of POD +type." +

+ +

[Something along these lines is clearly necessary. Matt + provided wording.]

+
+

407. Can singular iterators be destroyed?

Section: 24.1 [lib.iterator.requirements]  Status: WP  Submitter: Nathan Myers  Date: 3 June 2003

+

+Clause 24.1 [lib.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 @@ -11861,9 +11801,78 @@ destroying an iterator that holds a singular value, or the assignment of a non-singular value to an iterator that holds a singular value."


-

411. Wrong names of set member functions

Section: 25.3.5 [lib.alg.set.operations]  Status: WP  Submitter: Daniel Frey  Date: 9 Jul 2003

+

410. Missing semantics for stack and queue comparison operators

Section: 23.2.3.1 [lib.queue], 23.2.3.3 [lib.stack]  Status: DR  Submitter: Hans Bos  Date: 7 Jun 2003

-25.3.5 [lib.alg.set.operations] paragraph 1 reads: +Sections 23.2.3.1 [lib.queue] and 23.2.3.3 [lib.stack] list +comparison operators (==, !=, <, <=, >, =>) for queue and +stack. Only the semantics for queue::operator== (23.2.3.1 [lib.queue] par2) and queue::operator< (23.2.3.1 [lib.queue] +par3) are defined. +

+

Proposed resolution:

+ +

Add the following new paragraphs after 23.2.3.1 [lib.queue] + paragraph 3:

+ +
+ +
  operator!=
+
+

Returns: x.c != y.c

+ +
  operator>
+
+

Returns: x.c > y.c

+ +
  operator<=
+
+

Returns: x.c <= y.c

+ +
  operator>=
+
+

Returns: x.c >= y.c

+ +
+ +

Add the following paragraphs at the end of 23.2.3.3 [lib.stack]:

+ +
+ +
  operator==
+
+

Returns: x.c == y.c

+ +
  operator<
+
+

Returns: x.c < y.c

+ +
  operator!=
+
+

Returns: x.c != y.c

+ +
  operator>
+
+

Returns: x.c > y.c

+ +
  operator<=
+
+

Returns: x.c <= y.c

+ +
  operator>=
+
+

Returns: x.c >= y.c

+ +
+ + +

[Kona: Matt provided wording.]

+ +

Rationale:

+There isn't any real doubt about what these operators are +supposed to do, but we ought to spell it out. +
+

411. Wrong names of set member functions

Section: 25.3.5 [lib.alg.set.operations]  Status: WP  Submitter: Daniel Frey  Date: 9 Jul 2003

+

+25.3.5 [lib.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 @@ -11877,13 +11886,34 @@ set_intersection(), not union() and intersection().

Proposed resolution:

Change that sentence to use the correct names.


-

414. Which iterators are invalidated by v.erase()?

Section: 23.2.4.3 [lib.vector.modifiers]  Status: WP  Submitter: Matt Austern  Date: 19 Aug 2003

+

412. Typo in 27.4.4.3

Section: 27.4.4.3 [lib.iostate.flags]  Status: DR  Submitter: Martin Sebor  Date: 10 Jul 2003

+

+The Effects clause in 27.4.4.3 [lib.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 (state & +exceptions()) == 0, returns. ..." +

+

Proposed resolution:

+

+In 27.4.4.3 [lib.iostate.flags] paragraph 5, replace "If (rdstate() & +exceptions()) == 0" with "If ((state | (rdbuf() ? goodbit : badbit)) +& exceptions()) == 0". +

+ +

[Kona: the original proposed resolution wasn't quite right. We + really do mean rdstate(); the ambiguity is that the wording in the + standard doesn't make it clear whether we mean rdstate() before + setting the new state, or rdsate() after setting it. We intend the + latter, of course. Post-Kona: Martin provided wording.]

+ +
+

414. Which iterators are invalidated by v.erase()?

Section: 23.2.4.3 [lib.vector.modifiers]  Status: WP  Submitter: Matt Austern  Date: 19 Aug 2003

Consider the following code fragment:

-
-int A[8] = { 1,3,5,7,9,8,4,2 };
+
int A[8] = { 1,3,5,7,9,8,4,2 };
 std::vector<int> v(A, A+8);
 
 std::vector<int>::iterator i1 = v.begin() + 3;
@@ -11927,7 +11957,7 @@ techniques.)
 

Proposed resolution:

-In 23.2.4.3 [lib.vector.modifiers] paragraph 3, change "Invalidates all the +In 23.2.4.3 [lib.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". @@ -11939,7 +11969,35 @@ erase". and references in parallel, and it would seem counterintuitive to say that a reference to an erased value remains valid.


-

420. is std::FILE a complete type?

Section: 27.8.1 [lib.fstreams]  Status: WP  Submitter: Martin Sebor  Date: 18 Sep 2003

+

415. behavior of std::ws

Section: 27.6.1.4 [lib.istream.manip]  Status: DR  Submitter: Martin Sebor  Date: 18 Sep 2003

+

+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 +text in 27.6.1, p1 through 4 that describes the exception policy for +istream member functions does not apply. That seems inconsistent with +the rest of extractors and all the other input functions (i.e., ws will +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). +

+

Proposed resolution:

+

+Add to 27.6.1.4 [lib.istream.manip], immediately before the first sentence +of paragraph 1, the following text: +

+ +
+ 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... +
+ +

[Post-Kona: Martin provided wording]

+ +
+

420. is std::FILE a complete type?

Section: 27.8.1 [lib.fstreams]  Status: WP  Submitter: Martin Sebor  Date: 18 Sep 2003

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 @@ -11952,14 +12010,96 @@ it really the intent that FILE be a complete type or is an implementation allowed to just declare it without providing a full definition?

Proposed resolution:

-

In the first sentence of 27.8.1 [lib.fstreams] paragraph 2, change +

In the first sentence of 27.8.1 [lib.fstreams] paragraph 2, change "defined" to "declared".

Rationale:

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.


-

428. string::erase(iterator) validity

Section: 21.3.5.5 [lib.string::erase]  Status: WP  Submitter: Martin Sebor  Date: 18 Sep 2003

+

425. return value of std::get_temporary_buffer

Section: 20.4.3 [lib.temporary.buffer]  Status: DR  Submitter: Martin Sebor  Date: 18 Sep 2003

+

+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 +the call should return a distinct pointer each time it is called (like +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. +

+

Proposed resolution:

+

Change 20.4.3 [lib.temporary.buffer] 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 n <= 0."

+

[Kona: Matt provided wording]

+
+

426. search_n(), fill_n(), and generate_n() with negative n

Section: 25.1.9 [lib.alg.search], 25.2.5 [lib.alg.fill], 25.2.6 [lib.alg.generate]  Status: DR  Submitter: Martin Sebor  Date: 18 Sep 2003

+

+The complexity requirements for these function templates are incorrect +(or don't even make sense) for negative n:

+ +

25.1.9, p7 (search_n): +
+Complexity: At most (last1 - first1) * count applications +of the corresponding predicate.

+ +

25.2.5, p3 (fill_n): +
+Complexity: Exactly last - first (or n) assignments.

+
+ +

25.2.6, p3 (generate_n): +
+Complexity: Exactly last - first (or n) assignments.

+ +

+In addition, the Requirements or the Effects clauses for the latter two +templates don't say anything about the behavior when n is negative. +

+

Proposed resolution:

+

Change 25.1.9, p7 to

+ +
+Complexity: At most (last1 - first1) * count applications +of the corresponding predicate if count is positive, +or 0 otherwise. +
+ +

Change 25.2.5, p2 to

+
+Effects: Assigns value through all the iterators in the range [first, +last), or [first, first + n) if n is positive, none otherwise. +
+ +

Change 25.2.5, p3 to:

+
+Complexity: Exactly last - first (or n if n is positive, +or 0 otherwise) assignments. +
+ +

+Change 25.2.6, p1 +to (notice the correction for the misspelled "through"): +

+
+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. +
+ +

Change 25.2.6, p3 to:

+
+Complexity: Exactly last - first (or n if n is positive, +or 0 otherwise) assignments. +
+

Rationale:

+

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.

+
+

428. string::erase(iterator) validity

Section: 21.3.5.5 [lib.string::erase]  Status: WP  Submitter: Martin Sebor  Date: 18 Sep 2003

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. @@ -11975,7 +12115,7 @@ This may be interepreted as a relaxation of the general requirement, which is most likely not the intent.

Proposed resolution:

-

Remove 21.3.5.5 [lib.string::erase] paragraph 5.

+

Remove 21.3.5.5 [lib.string::erase] paragraph 5.

Rationale:

The LWG considered two options: changing the string requirements to match the general container requirements, or just removing the @@ -11983,7 +12123,328 @@ which is most likely not the intent. option, on the grounds that duplicating text always risks the possibility that it might be duplicated incorrectly.


-

436. are cv-qualified facet types valid facets?

Section: 22.1.1.1.2 [lib.locale.facet]  Status: WP  Submitter: Martin Sebor  Date: 15 Oct 2003

+

432. stringbuf::overflow() makes only one write position available

Section: 27.7.1.3 [lib.stringbuf.virtuals]  Status: DR  Submitter: Christian W Brock  Date: 24 Sep 2003

+

27.7.1.3 par 8 says:

+
+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 + array object with a sufficient number of elements to hold the + current array object (if any), plus one additional write position. + 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()). +
+ +

+The sentences "plus one additional write position." and especially + "(as does the write end pointer epptr())" COULD by interpreted + (and is interpreted by at least my library vendor) as: +

+ +
+ post-condition: epptr() == pptr()+1 +
+ +

+This WOULD force sputc() to call the virtual overflow() each time. +

+ +

The proposed change also affects Defect Report 169.

+ +

Proposed resolution:

+

27.7.1.1/2 Change:

+ +
+2- Notes: The function allocates no array object. +
+ +

+to: +

+ +
+2- Postcondition: str() == "". +
+ +

+27.7.1.1/3 Change: +

+ +
+

+-3- Effects: Constructs an object of class basic_stringbuf, +initializing the base class with basic_streambuf() +(lib.streambuf.cons), and initializing mode with which . Then copies +the content of str into the basic_stringbuf underlying character +sequence and initializes the input and output sequences according to +which. If which & ios_base::out is true, initializes the output +sequence with the underlying sequence. If which & ios_base::in is +true, initializes the input sequence with the underlying sequence. +

+
+ +

to:

+ +
+

+-3- Effects: Constructs an object of class basic_stringbuf, +initializing the base class with basic_streambuf() +(lib.streambuf.cons), and initializing mode with which. Then copies +the content of str into the basic_stringbuf underlying character +sequence. If which & ios_base::out is true, initializes the output +sequence such that pbase() points to the first underlying character, +epptr() points one past the last underlying character, and if (which & +ios_base::ate) is true, pptr() is set equal to +epptr() else pptr() is set equal to pbase(). If which & ios_base::in +is true, initializes the input sequence such that eback() and gptr() +point to the first underlying character and egptr() points one past +the last underlying character. +

+
+ +

27.7.1.2/1 Change:

+ +
+

+-1- Returns: A basic_string object whose content is equal to the +basic_stringbuf underlying character sequence. If the buffer is only +created in input mode, the underlying character sequence is equal to +the input sequence; otherwise, it is equal to the output sequence. In +case of an empty underlying character sequence, the function returns +basic_string<charT,traits,Allocator>(). +

+
+ +

to:

+ +
+

+-1- Returns: A basic_string object whose content is equal to the +basic_stringbuf underlying character sequence. If the basic_stringbuf +was created only in input mode, the resultant basic_string contains +the character sequence in the range [eback(), egptr()). If the +basic_stringbuf was created with (which & ios_base::out) being true +then the resultant basic_string contains the character sequence in the +range [pbase(), high_mark) where high_mark represents the position one +past the highest initialized character in the buffer. Characters can +be initialized either through writing to the stream, or by +constructing the basic_stringbuf with a basic_string, or by calling +the str(basic_string) member function. In the case of calling the +str(basic_string) member function, all characters initialized prior to +the call are now considered uninitialized (except for those +characters re-initialized by the new basic_string). Otherwise the +basic_stringbuf has been created in neither input nor output mode and +a zero length basic_string is returned. +

+
+ +

+27.7.1.2/2 Change: +

+ +
+

+-2- Effects: If the basic_stringbuf's underlying character sequence is +not empty, deallocates it. Then copies the content of s into the +basic_stringbuf underlying character sequence and initializes the +input and output sequences according to the mode stored when creating +the basic_stringbuf object. If (mode&ios_base::out) is true, then +initializes the output sequence with the underlying sequence. If +(mode&ios_base::in) is true, then initializes the input sequence with +the underlying sequence. +

+
+ +

to:

+ +
+

+-2- Effects: Copies the content of s into the basic_stringbuf +underlying character sequence. If mode & ios_base::out is true, +initializes the output sequence such that pbase() points to the first +underlying character, epptr() points one past the last underlying +character, and if (mode & ios_base::ate) is true, +pptr() is set equal to epptr() else pptr() is set equal to pbase(). If +mode & ios_base::in is true, initializes the input sequence such that +eback() and gptr() point to the first underlying character and egptr() +points one past the last underlying character. +

+
+ +

Remove 27.2.1.2/3. (Same rationale as issue 238: incorrect and unnecessary.)

+ +

27.7.1.3/1 Change:

+ +
+

+1- Returns: If the input sequence has a read position available, +returns traits::to_int_type(*gptr()). Otherwise, returns +traits::eof(). +

+
+ +

to:

+ +
+

+1- Returns: If the input sequence has a read position available, +returns traits::to_int_type(*gptr()). Otherwise, returns +traits::eof(). Any character in the underlying buffer which has been +initialized is considered to be part of the input sequence. +

+
+ +

27.7.1.3/9 Change:

+ +
+

+-9- 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 array object with a +sufficient number of elements to hold the current array object (if +any), plus one additional write position. 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()). +

+
+ +

to:

+ +
+

+-9- 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 array object with a sufficient +number of elements to hold the current array object (if any), plus one +additional write position. If ( mode & ios_base::in) != 0, the +function alters the read end pointer egptr() to point just past the +new write position. +

+
+ +

27.7.1.3/12 Change:

+ +
+

+-12- _ If (newoff + off) < 0, or (xend - xbeg) < (newoff + off), the +positioning operation fails. Otherwise, the function assigns xbeg + +newoff + off to the next pointer xnext . +

+
+ +

to:

+ +
+

+-12- _ If (newoff + off) < 0, or if (newoff + off) refers to an +uninitialized character (as defined in 27.7.1.2 [lib.stringbuf.members] +paragraph 1), the positioning operation fails. Otherwise, the function +assigns xbeg + newoff + off to the next pointer xnext . +

+
+ +

[post-Kona: Howard provided wording. At Kona the LWG agreed that + something along these lines was a good idea, but the original + proposed resolution didn't say enough about the effect of various + member functions on the underlying character sequences.]

+ +

Rationale:

+

The current basic_stringbuf description is over-constrained in such +a way as to prohibit vendors from making this the high-performance +in-memory stream it was meant to be. The fundamental problem is that +the pointers: eback(), gptr(), egptr(), pbase(), pptr(), epptr() are +observable from a derived client, and the current description +restricts the range [pbase(), epptr()) from being grown geometrically. +This change allows, but does not require, geometric growth of this +range.

+ +

Backwards compatibility issues: These changes will break code that +derives from basic_stringbuf, observes epptr(), and depends upon +[pbase(), epptr()) growing by one character on each call to overflow() +(i.e. test suites). Otherwise there are no backwards compatibility +issues.

+ +

27.7.1.1/2: The non-normative note is non-binding, and if it were +binding, would be over specification. The recommended change focuses +on the important observable fact.

+ +

27.7.1.1/3: This change does two things: 1. It describes exactly +what must happen in terms of the sequences. The terms "input +sequence" and "output sequence" are not well defined. 2. It +introduces a common extension: open with app or ate mode. I concur +with issue 238 that paragraph 4 is both wrong and unnecessary.

+ +

27.7.1.2/1: This change is the crux of the efficiency issue. The +resultant basic_string is not dependent upon epptr(), and thus +implementors are free to grow the underlying buffer geometrically +during overflow() *and* place epptr() at the end of that buffer.

+ +

27.7.1.2/2: Made consistent with the proposed 27.7.1.1/3.

+ +

27.7.1.3/1: Clarifies that characters written to the stream beyond +the initially specified string are available for reading in an i/o +basic_streambuf.

+ +

27.7.1.3/9: Made normative by removing "Notes:", and removed the +trailing parenthetical comment concerning epptr().

+ +

27.7.1.3/12: Restricting the positioning to [xbeg, xend) is no +longer allowable since [pbase(), epptr()) may now contain +uninitialized characters. Positioning is only allowable over the +initialized range.

+
+

435. bug in DR 25

Section: 21.3.7.9 [lib.string.io]  Status: DR  Submitter: Martin Sebor  Date: 15 Oct 2003

+ +

+It has been pointed out that the proposed resolution in DR 25 may not be +quite up to snuff:
+http://gcc.gnu.org/ml/libstdc++/2003-09/msg00147.html +http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#25
+

+ +

+It looks like Petur is right. The complete corrected text is copied below. +I think we may have have been confused by the reference to 22.2.2.2.2 and +the subsequent description of `n' which actually talks about the second +argument to sputn(), not about the number of fill characters to pad with. +

+ +

+So the question is: was the original text correct? If the intent was to +follow classic iostreams then it most likely wasn't, since setting width() +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). +

+

Proposed resolution:

+

Change the text in 21.3.7.9, p4 from

+
+ 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(); +
+

to

+
+ If bool(k) is true, determines padding as described in + lib.facet.num.put.virtuals, and then inserts the resulting + sequence of characters seq as if by calling + os.rdbuf()->sputn(seq, n), where n is the larger of + os.width() and str.size(); +
+ +

[Kona: it appears that neither the original wording, DR25, nor the + proposed resolution, is quite what we want. We want to say that + the string will be output, padded to os.width() if necessary. We + don't want to duplicate the padding rules in clause 22, because + they're complicated, but we need to be careful because they weren't + quite written with quite this case in mind. We need to say what + the character sequence is, and then defer to clause 22. Post-Kona: + Benjamin provided wording.]

+ +
+

436. are cv-qualified facet types valid facets?

Section: 22.1.1.1.2 [lib.locale.facet]  Status: WP  Submitter: Martin Sebor  Date: 15 Oct 2003

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 @@ -12005,6 +12466,82 @@ template parameter.

[Kona: changed the last sentence from a footnote to normative text.]

+
+

441. Is fpos::state const?

Section: 27.4.3 [lib.fpos]  Status: DR  Submitter: Vincent Leloup  Date: 17 Nov 2003

+

+In section 27.4.3.1 [lib.fpos.members] fpos<stateT>::state() is declared +non const, but in section 27.4.3 [lib.fpos] it is declared const. +

+

Proposed resolution:

+

+In section 27.4.3.1 [lib.fpos.members], change the declaration of +fpos<stateT>::state() to const. +

+
+

442. sentry::operator bool() inconsistent signature

Section: 27.6.2.3 [lib.ostream::sentry]  Status: DR  Submitter: Vincent Leloup  Date: 18 Nov 2003

+

+In section 27.6.2.3 [lib.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. +

+

Proposed resolution:

+

+In section 27.6.2.3 [lib.ostream::sentry] paragraph 4, change the declaration +of sentry::operator bool() to const. +

+
+

443. filebuf::close() inconsistent use of EOF

Section: 27.8.1.3 [lib.filebuf.members]  Status: DR  Submitter: Vincent Leloup  Date: 20 Nov 2003

+

+In section 27.8.1.3 [lib.filebuf.members] par6, in effects description of +basic_filebuf<charT, traits>::close(), overflow(EOF) is used twice; +should be overflow(traits::eof()). +

+

Proposed resolution:

+

+Change overflow(EOF) to overflow(traits::eof()). +

+
+

448. Random Access Iterators over abstract classes

Section: 24.1.5 [lib.random.access.iterators]  Status: DR  Submitter: Dave Abrahams  Date: 7 Jan 2004

+

+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? +

+

Proposed resolution:

+

+Change the return type to "convertible to T const&". +

+
+

449. Library Issue 306 Goes Too Far

Section: 18.1 [lib.support.types]  Status: DR  Submitter: Pete Becker  Date: 15 Jan 2004

+

Original text:

+
+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." +
+ +

Revised text:

+
+"If type is not a POD structure or a POD union the results are undefined." +
+ +

+Looks to me like the revised text should have replaced only the second +sentence. It doesn't make sense standing alone. +

+ +

Proposed resolution:

+

Change 18.1, paragraph 5, to:

+ +
+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." +

----- End of document -----

- - + \ No newline at end of file