compiler warning (level 1) C4482
warning description:
使用了非标准扩展: 限定名中使用了枚举“enum”
当引用类型内的枚举时,无需指定枚举的名称。
文件范围的枚举定义相当于常量,也不需要限定名。
example: C4482(MS Visual Studio)
// C4482.cpp
// compile with: /c /W1
struct S {
enum E { a };
};
int i = S::E::a; // C4482
int j = S::a; // OK
评论