This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.
basic_ios::copyfmt()
overly loosely specified
Section: 31.5.4.3 [basic.ios.members] Status: NAD Editorial Submitter: Martin Sebor Opened: 2008-05-17 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [basic.ios.members].
View all issues with NAD Editorial status.
Discussion:
The basic_ios::copyfmt()
member function is specified in 31.5.4.3 [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 ofrhs
, except that
rdstate()
andrdbuf()
are left unchanged;exceptions()
is altered last by callingexceptions(rhs.except)
- the contents of arrays pointed at by
pword
andiword
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.
[ Batavia (2009-05): ]
We agree with the proposed resolution. Move to NAD Editorial.
Proposed resolution:
I propose to tighten things up by adding a Postcondition clause to the function like so:
Postconditions:
copyfmt()
postconditionsElement 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.