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.

### 1168. Odd wording for bitset equality operators

Section: 20.9.2.3 [bitset.members] Status: NAD Editorial Submitter: Alisdair Meredith Opened: 2009-07-02 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [bitset.members].

View all issues with NAD Editorial status.

Discussion:

The following wording seems a little unusual to me:

p42/43 20.9.2.3 [bitset.members]

>     bool operator==(const bitset<N>& rhs) const;

> > -42- Returns: A nonzero value if the value of each bit in `*this` equals the value of the corresponding bit in `rhs`.

>     bool operator!=(const bitset<N>& rhs) const;

> > -43- Returns: A nonzero value if `!(*this == rhs)`.

"A nonzero value" may be well defined as equivalent to the literal '`true`' for Booleans, but the wording is clumsy. I suggest replacing "A nonzero value" with the literal '`true`' (in appropriate font) in each case.

[ 2009-07-24 Alisdair recommends NAD Editorial. ]

[ 2009-07-27 Pete adds: ]

> It's obviously editorial. There's no need for further discussion.

[ 2009-07-27 Howard sets to NAD Editorial. ]

Proposed resolution:

Change 20.9.2.3 [bitset.members] p42-43:

>     bool operator==(const bitset<N>& rhs) const;

> > -42- Returns: A nonzero value `true` if the value of each bit in `*this` equals the value of the corresponding bit in `rhs`.

>     bool operator!=(const bitset<N>& rhs) const;

> > -43- Returns: A nonzero value `true` if `!(*this == rhs)`.