Skip to content

Simplify logical_xor()

What does this implement/fix?

For a and b of type bool we can simplify (a || b) && !(a && b) to a != b.

Maybe we could even consider using != right away in the code for clarity instead of invoking the function logical_xor(). @rmlarsen1 @ngc92 What do you think?

Reference issue

See also my comment on commit c20e908e.

Edited by Kolja Brix

Merge request reports

Loading