error::make_unique is not a member of ‘std’

解决这个问题  需要

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