Somehow using enum results in wrong comparison being done when using gcc 5.3 (the test run when using this compiler fails because the RHS value is "true" and not the numeric value of the enum element), so add a cast to make this work.
Somehow using enum results in wrong comparison being done when using gcc 5.3 (the test run when using this compiler fails because the RHS value is "true" and not the numeric value of the enum element), so add a cast to make this work.