| 81 | explicit operator bool() const FL_NOEXCEPT { return !empty(); } |
| 82 | |
| 83 | bool operator==(const Optional &other) const FL_NOEXCEPT { |
| 84 | if (empty() && other.empty()) { |
| 85 | return true; |
| 86 | } |
| 87 | if (empty() || other.empty()) { |
| 88 | return false; |
| 89 | } |
| 90 | return *ptr() == *other.ptr(); |
| 91 | } |
| 92 | |
| 93 | bool operator!=(const Optional &other) const FL_NOEXCEPT { return !(*this == other); } |
| 94 |