What is Nostr?
Florian Xaver /
npub15vp…8k3y
2024-03-09 13:56:19
in reply to nevent1q…y57m

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
Author Public Key
npub15vpp8azctmz068rgel4ns228k38jjzhe5zznss4yj7m7tmezgt5sk48k3y