! \brief deconstructor */
| 68 | } |
| 69 | /*! \brief deconstructor */ |
| 70 | ~optional() { |
| 71 | if (!is_none) { |
| 72 | reinterpret_cast<T*>(&val)->~T(); |
| 73 | } |
| 74 | } |
| 75 | /*! \brief swap two optional */ |
| 76 | void swap(optional<T>& other) { |
| 77 | std::swap(val, other.val); |
nothing calls this directly
no outgoing calls
no test coverage detected