<分区>
我在项目中有以下代码,它给我一个错误 C2059,unique_ptr
行错误的语法错误"new"。
#include <memory>
class Nothing {
public:
Nothing() { };
};
class IWriter
{
public:
IWriter() {
}
~IWriter() {
}
private:
std::unique_ptr<Nothing> test(new Nothing());
};
这里发生了什么?