! \brief equal comparison */
| 110 | } |
| 111 | /*! \brief equal comparison */ |
| 112 | bool operator==(const optional<T>& other) const { |
| 113 | return this->is_none == other.is_none && |
| 114 | (this->is_none == true || this->value() == other.value()); |
| 115 | } |
| 116 | /*! \brief return the holded value. |
| 117 | * throws std::logic_error if holding no value |
| 118 | */ |