Solved: 03 - Operators
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user