Code AnalysisIntermediate 60s
Attempting to copy a unique_ptr
Why does this fail to compile?
Starter code
#include <memory>
void f(std::unique_ptr<int> a) {}
int main() {
std::unique_ptr<int> p = std::make_unique<int>(5);
f(p);
}Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.