std::move and unique_ptr transfer
What is the value of p1 after this code executes?
#include <memory>
auto p1 = std::make_unique<int>(42);
auto p2 = std::move(p1);
Sign in to answer questions and track your progress
Sign InWhat is the value of p1 after this code executes?
#include <memory>
auto p1 = std::make_unique<int>(42);
auto p2 = std::move(p1);
Sign in to answer questions and track your progress
Sign In