This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.

### 262. Bitmask operator ~ specified incorrectly

Section: 16.3.3.3.4 [bitmask.types] Status: CD1 Submitter: Beman Dawes Opened: 2000-09-03 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [bitmask.types].

View all issues with CD1 status.

Discussion:

The ~ operation should be applied after the cast to int_type.

Proposed resolution:

Change 17.3.2.1.2 [lib.bitmask.types] operator~ from:

       bitmask operator~ ( bitmask X )
         { return static_cast< bitmask>(static_cast<int_type>(~ X)); }

to:

       bitmask operator~ ( bitmask X )
         { return static_cast< bitmask>(~static_cast<int_type>(X)); }