Assigns from another optional (deep-copies the rhs value)
| 264 | |
| 265 | // Assigns from another optional<T> (deep-copies the rhs value) |
| 266 | void assign ( optional_base const& rhs ) |
| 267 | { |
| 268 | if (is_initialized()) |
| 269 | { |
| 270 | if ( rhs.is_initialized() ) |
| 271 | assign_value(rhs.get_impl()); |
| 272 | else destroy(); |
| 273 | } |
| 274 | else |
| 275 | { |
| 276 | if ( rhs.is_initialized() ) |
| 277 | construct(rhs.get_impl()); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES |
| 282 | // Assigns from another optional<T> (deep-moves the rhs value) |
no test coverage detected