Assigns from another optional (deep-copies the rhs value)
| 328 | |
| 329 | // Assigns from another optional<T> (deep-copies the rhs value) |
| 330 | void assign ( optional_base const& rhs ) |
| 331 | { |
| 332 | if (is_initialized()) |
| 333 | { |
| 334 | if ( rhs.is_initialized() ) |
| 335 | assign_value(rhs.get_impl(), is_reference_predicate() ); |
| 336 | else destroy(); |
| 337 | } |
| 338 | else |
| 339 | { |
| 340 | if ( rhs.is_initialized() ) |
| 341 | construct(rhs.get_impl()); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES |
| 346 | // Assigns from another optional<T> (deep-moves the rhs value) |
no test coverage detected