| 200 | |
| 201 | template <class T, class U> |
| 202 | inline bool operator==(const optional<T>& lhs, const optional<U>& rhs) { |
| 203 | if (!lhs.has_value() && !rhs.has_value()) { |
| 204 | return true; |
| 205 | } |
| 206 | if (!lhs.has_value() || !rhs.has_value()) { |
| 207 | return false; |
| 208 | } |
| 209 | return lhs.value() == rhs.value(); |
| 210 | } |
| 211 | |
| 212 | template <class T, class U> |
| 213 | inline bool operator!=(const optional<T>& lhs, const optional<U>& rhs) { |