Geo*_*off 6 c++ enums portability
namespace ValueType {
enum Enum {
Boolean = 0,
Float = 1,
Double,
SInt = 8,
SLong,
UInt = SInt + (1 <<4),
ULong = SLong + (1 << 4)
};
}
Run Code Online (Sandbox Code Playgroud)
Jer*_*fin 12
是的 - 要求是它是一个完整的常量表达式.C++标准包括以下示例:
enum { d, e, f=e+2 };
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
179 次 |
| 最近记录: |