Florian Xaver on Nostr: npub1w5z27…8rl8t Roughly, std::move cast to rvalue reference. Then, instead of a ...
npub1w5z27503latnjqrh3r8y7cuyqva6ljjux4fcmd29x5hxfvfkd6lq88rl8t (npub1w5z…rl8t) Roughly, std::move cast to rvalue reference. Then, instead of a copy constructor*, a move constructor* is used, which often does what is called "shadowed copying" in C. The copy constructor of a unique_ptr is deleted.
Moved-from objects are valid objects, but everything else is undefined and depends on implementation and optimization of the compiler. So, a smart pointer like unique_ptr could wrap a nullptr in theory, but most probably does not.
* or assignment operator
Moved-from objects are valid objects, but everything else is undefined and depends on implementation and optimization of the compiler. So, a smart pointer like unique_ptr could wrap a nullptr in theory, but most probably does not.
* or assignment operator