181351 posts 1993 follows 1215 followers
Please pay attention to random failures.
https://mstdn.maud.io/@omasanori@anqou C++20 (n4868) §7.6.1.9/10
https://timsong-cpp.github.io/cppwp/n4868/expr.static.cast#10
> If the enumeration type has a fixed underlying type, the value is first converted to that type by integral conversion, if necessary, and then to the enumeration type.
If the enumeration type does not have a fixed underlying type, the value is unchanged if the original value is within the range of the enumeration values ([dcl.enum]), and otherwise, the behavior is undefined.
ここに該当して未定義動作ですね