Why is the copy constructor invoked in a lmabda while moving a `unique_ptr`?

前端 未结 0 1928
独厮守ぢ
独厮守ぢ 2021-02-18 22:12

Why does this code fail to compile?

#include 
#include 

int foo() {
    auto num = std::make_unique(1);
    auto func = [         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题