DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
HLSL enum types do not conform to intended C++ behavior
The unscoped enum type has differences in behavior in HLSL from the C++ behavior that should be rectified. The primary difference is that it preserves the enum type for binary operator expression results rather than converting to int first and resulting in an int type for the expression.
Additionally, enum struct has unintended differences in behavior from enum class because, other than scoping, it's treated the same way as the unscoped enum type, allowing operations without casting that should require explicit casting.