【发布时间】:2018-12-12 19:35:47
【问题描述】:
你能告诉我这里发生了什么吗?为什么会这样?
std::make_unique<int>(1) = std::make_unique<int>(1);
我以为make_unique 返回了一个右值...
编辑: 你能提供一些关于这种结构的有用例子吗?
【问题讨论】:
-
@Jarod42 我知道,因为我检查了那个问题,同时我得到了这段代码。
标签: c++ c++14 unique-ptr