262. Bitmask operator ~ specified incorrectly

Section: 20.4.2.1.4 [bitmask.types] Status: CD1 Submitter: Beman Dawes Opened: 2000-09-03 Last modified: 2016-02-10

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)); }