24 #ifndef LELY_IO2_CAN_ERR_HPP_
25 #define LELY_IO2_CAN_ERR_HPP_
64 operator~(CanError rhs) {
65 return static_cast<CanError
>(~static_cast<int>(rhs));
68 constexpr CanError operator&(CanError lhs, CanError rhs) {
69 return static_cast<CanError
>(
static_cast<int>(lhs) &
static_cast<int>(rhs));
73 operator^(CanError lhs, CanError rhs) {
74 return static_cast<CanError>(
static_cast<int>(lhs) ^
static_cast<int>(rhs));
78 operator|(CanError lhs, CanError rhs) {
79 return static_cast<CanError>(
static_cast<int>(lhs) |
static_cast<int>(rhs));
83 operator&=(CanError& lhs, CanError rhs) {
84 return lhs = lhs & rhs;
88 operator^=(CanError& lhs, CanError rhs) {
89 return lhs = lhs ^ rhs;
93 operator|=(CanError& lhs, CanError rhs) {
94 return lhs = lhs | rhs;
100 #endif // !LELY_IO2_CAN_ERR_HPP_