MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / Xor

Class Xor

src/include/function/boolean/boolean_functions.h:94–103  ·  view source on GitHub ↗

* XOR operator Truth table: * * left isLeftNull right isRightNull result * ------ ------------ ------- ------------- -------- * T F T F 0 * T F F F 1 * F F T F 1 * F F

Source from the content-addressed store, hash-verified

92 * - T - T 2
93 * */
94struct Xor {
95 static inline void operation(bool left, bool right, uint8_t& result, bool isLeftNull,
96 bool isRightNull) {
97 if (isLeftNull || isRightNull) {
98 result = NULL_BOOL;
99 } else {
100 result = left ^ right;
101 }
102 }
103};
104
105/**
106 * NOT operator Truth table:

Callers 3

TESTFunction · 0.85
operator^Function · 0.85
operator^Function · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68