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));
69 operator&(CanError lhs, CanError rhs) {
70 return static_cast<CanError
>(
static_cast<int>(lhs) &
static_cast<int>(rhs));
74 operator^(CanError lhs, CanError rhs) {
75 return static_cast<CanError>(
static_cast<int>(lhs) ^
static_cast<int>(rhs));
79 operator|(CanError lhs, CanError rhs) {
80 return static_cast<CanError>(
static_cast<int>(lhs) |
static_cast<int>(rhs));
84 operator&=(CanError& lhs, CanError rhs) {
85 return lhs = lhs & rhs;
89 operator^=(CanError& lhs, CanError rhs) {
90 return lhs = lhs ^ rhs;
94 operator|=(CanError& lhs, CanError rhs) {
95 return lhs = lhs | rhs;
101 #endif // !LELY_IO2_CAN_ERR_HPP_