Remove DeserializationError == bool and DeserializationError != bool

This commit is contained in:
Benoit Blanchon
2021-10-23 16:12:58 +02:00
parent a7873389c6
commit 943a902a0b
3 changed files with 18 additions and 39 deletions

View File

@ -57,18 +57,6 @@ class DeserializationError : public SafeBoolIdom<DeserializationError> {
operator bool_type() const {
return _code != Ok ? safe_true() : safe_false();
}
friend bool operator==(bool value, const DeserializationError& err) {
return static_cast<bool>(err) == value;
}
friend bool operator==(const DeserializationError& err, bool value) {
return static_cast<bool>(err) == value;
}
friend bool operator!=(bool value, const DeserializationError& err) {
return static_cast<bool>(err) != value;
}
friend bool operator!=(const DeserializationError& err, bool value) {
return static_cast<bool>(err) != value;
}
// Returns internal enum, useful for switch statement
Code code() const {