error::make_unique is not a member of ‘std’
时间:2021-01-08 18:22:44
收藏:0
阅读:286
解决这个问题 需要
c++14 支持。
如果不支持。
可以自己写一个。
~~~
template <typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
~~~
原文:https://www.cnblogs.com/swing07/p/14252621.html
评论(0)