MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / assign

Function assign

include/win/boost/optional/optional.hpp:330–343  ·  view source on GitHub ↗

Assigns from another optional (deep-copies the rhs value)

Source from the content-addressed store, hash-verified

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)

Callers 1

resetFunction · 0.70

Calls 8

is_initializedFunction · 0.85
get_implMethod · 0.80
assign_valueFunction · 0.70
destroyFunction · 0.70
constructFunction · 0.70
moveFunction · 0.50
is_initializedMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected