Why use the Bitwise-Shift operator for values in a C enum definition?

前端 未结 8 1310
眼角桃花
眼角桃花 2020-12-02 10:42

Apple sometimes uses the Bitwise-Shift operator in their enum definitions. For example, in the CGDirectDisplay.h file which is part of Core

8条回答
  •  误落风尘
    2020-12-02 11:21

    using #define is more understandable. but enum could group these value togater.

提交回复
热议问题