| 76 | } |
| 77 | |
| 78 | std::string error_condition::what() const { |
| 79 | if (!*this) { |
| 80 | return "No error condition"; |
| 81 | } else { |
| 82 | std::string s(name_); |
| 83 | if (!description_.empty()) { |
| 84 | s += ": "; |
| 85 | s += description_; |
| 86 | } |
| 87 | return s; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | bool operator==(const error_condition& x, const error_condition& y) { |
| 92 | return x.name() == y.name() && x.description() == y.description() |