域枚举,也叫强枚举,或者枚举类 scoped enumeration ,strong enumeration or enumeration class 防止隐藏转换为int 在作用域外调用枚举成员只能通过域的方式调用:enumScopedStrongClass::one 可定义默认枚举类型int外的其它类型
enum class enumScopedStrongClass : char {
one,
two,
three
};
域枚举,也叫强枚举,或者枚举类 scoped enumeration ,strong enumeration or enumeration class 防止隐藏转换为int 在作用域外调用枚举成员只能通过域的方式调用:enumScopedStrongClass::one 可定义默认枚举类型int外的其它类型
enum class enumScopedStrongClass : char {
one,
two,
three
};