Title
Misleading sentence in vector<bool>::flip
Status
c++11
Section
[vector.bool]
Submitter
Christopher Jefferson

Created on 2009-11-01.00:00:00 last changed 154 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Strike second sentence from the definition of vector<bool>::flip(), [vector.bool], paragraph 5.

Effects: Replaces each element in the container with its complement. It is unspecified whether the function has any effect on allocated but unused bits.

Date: 2009-11-14.00:00:00

[ 2009-11-14 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]

Date: 2009-11-01.00:00:00

The effects of vector<bool>::flip has the line:

It is unspecified whether the function has any effect on allocated but unused bits.

While this is technically true, it is misleading, as any member function in any standard container may change unused but allocated memory. Users can never observe such changes as it would also be undefined behaviour to read such memory.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg1331
2010-10-21 18:28:33adminsetmessages: + msg1330
2009-11-01 00:00:00admincreate