Solved: 03 - Operators

This commit is contained in:
David Gil de Gómez Pérez
2026-08-11 18:41:26 +03:00
parent 35afea97c0
commit 2d25dd503a
@@ -20,10 +20,12 @@ auto count_set_bits(const std::uint8_t value) -> int {
}
auto logical_and(const bool lhs, const bool rhs) -> bool {
// NOTE: && can't be used
return (lhs & rhs) == 1;
}
auto logical_or(const bool lhs, const bool rhs) -> bool {
// NOTE: || can't be used
return (lhs | rhs) == 1;
}