| 989 | // && std::is_move_assignable<T>::value |
| 990 | ) |
| 991 | operator=(optional &&other) noexcept { |
| 992 | if ((has_value() == true) && (other.has_value() == false)) { |
| 993 | reset(); |
| 994 | } else if ((has_value() == false) && (other.has_value() == true)) { |
| 995 | initialize(std::move(*other)); |
| 996 | } else if ((has_value() == true) && (other.has_value() == true)) { |
| 997 | contained.value() = std::move(*other); |
| 998 | } |
| 999 | return *this; |
| 1000 | } |
| 1001 | |
| 1002 | // 4 (C++11) - move-assign from value |
| 1003 | template <typename U = T> |
nothing calls this directly
no test coverage detected