Title
basic_ios::copyfmt() overly loosely specified
Status
nad editorial
Section
[basic.ios.members]
Submitter
Martin Sebor

Created on 2008-05-17.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

I propose to tighten things up by adding a Postcondition clause to the function like so:

Postconditions:

copyfmt() postconditions
Element Value
rdbuf() unchanged
tie() rhs.tie()
rdstate() unchanged
exceptions() rhs.exceptions()
flags() rhs.flags()
width() rhs.width()
precision() rhs.precision()
fill() rhs.fill()
getloc() rhs.getloc()

The format of the table follows Table 117 (as of N2588): basic_ios::init() effects.

The intent of the new table is not to impose any new requirements or change existing ones, just to be more explicit about what I believe is already there.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree with the proposed resolution. Move to NAD Editorial.

Date: 2008-05-17.00:00:00

The basic_ios::copyfmt() member function is specified in [basic.ios.members] to have the following effects:

Effects: If (this == &rhs) does nothing. Otherwise assigns to the member objects of *this the corresponding member objects of rhs, except that

  • rdstate() and rdbuf() are left unchanged;
  • exceptions() is altered last by calling exceptions(rhs.except)
  • the contents of arrays pointed at by pword and iword are copied not the pointers themselves

Since the rest of the text doesn't specify what the member objects of basic_ios are this seems a little too loose.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg4004
2010-10-21 18:28:33adminsetmessages: + msg4003
2008-05-17 00:00:00admincreate