如果我使用相同的unique_ptr两次调用std :: move会发生什么?
unique_ptr<int> foo(new int(5)); unique_ptr<int> bar = move(foo); unique_ptr<int> baz = move(foo);
从unique_ptr移动将其保留为空。因此,baz也将最终为null。
unique_ptr
baz