0_0_34767538_21474.cpp: In function 'std::string sformat(const string&, Args ...)':
0_0_34767538_21474.cpp:11:172: error: 'make_unique' was not declared in this scope
template <typename... Args> string sformat(const string& format, Args... args) { size_t size = snprintf(nullptr, 0, format.c_str(), args...) + 1; unique_ptr<char[]> buf = make_unique<char[]>(size); snprintf(buf.get(), size, format.c_str(), args...); return string(buf.get(), buf.get() + size - 1); }
^
0_0_34767538_21474.cpp:11:184: error: expected primary-expression before 'char'
template <typename... Args> string sformat(const string& format, Args... args) { size_t size = snprintf(nullptr, 0, format.c_str(), args...) + 1; unique_ptr<char[]> buf = make_unique<char[]>(size); snprintf(buf.get(), size, format.c_str(), args...); return string(buf.get(), buf.get() + size - 1); }
^
|