So, is either of these not standard-compliant? I Looked at <a href="https://en.cppreference.com/w/cpp/memory/unique_ptr" rel="nofollow">https://en.cppreference.com/w/cpp/memory/unique_ptr</a> (yes, I know that’s not the standard, but _I_ trust it to follow it close enough), and couldn’t find evidence for it.<p>I suspect, however, that the standards committee, knowing of this discrepancy, would go with libc++. They explicitly said that <i>reset</i> has to update the pointer before deleting the old object (<a href="https://en.cppreference.com/w/cpp/memory/unique_ptr/reset" rel="nofollow">https://en.cppreference.com/w/cpp/memory/unique_ptr/reset</a>), so one would think they don’t want <i>get()</i> to return the pointer while the unique_pointer destructor is running.<p>On the other hand, none of that matters in the case if multiple threads or out-of-order CPUs (or do I read <a href="https://en.cppreference.com/w/cpp/memory/unique_ptr/reset" rel="nofollow">https://en.cppreference.com/w/cpp/memory/unique_ptr/reset</a> incorrectly, and is some sort of fence implied there?)