ar1*_*r1a 5 c++ c++11 c++14
我看过很多 CppCon 讲座,我注意到 Bjarne 和 Herb 都初始化了这样的东西, std::unique_ptr<foo>{bar}而不是std::unique_ptr<foo>(bar).
std::unique_ptr<foo>{bar}
std::unique_ptr<foo>(bar)
他们之间有什么区别可以让他们更喜欢前者吗?
归档时间:
9 年,6 月 前
查看次数:
401 次
最近记录: