unique_ptr
プロジェクトに次のコードがありますが、行が間違っているというエラー C2059, syntax error "new" が表示されます。
#include <memory>
class Nothing {
public:
Nothing() { };
};
class IWriter
{
public:
IWriter() {
}
~IWriter() {
}
private:
std::unique_ptr<Nothing> test(new Nothing());
};
ここで何が起きてるの?