262. Bitmask operator ~ specified incorrectly

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

Priority: Not Prioritized

View other active issues in [bitmask.types].

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