Moving a unique_ptr vs. using get()?

后端 未结 0 2031
谎友^
谎友^ 2020-12-09 13:44
std::unique_ptr p{...};
f(p.get()); // is this better
f(std::move(p)); // or this?

Semantically, I know that the first case is if <

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