diff --git a/src/common.h b/src/common.h index ffd071d11..536f56aa3 100644 --- a/src/common.h +++ b/src/common.h @@ -644,11 +644,15 @@ wcstring vformat_string(const wchar_t *format, va_list va_orig); void append_format(wcstring &str, const wchar_t *format, ...); void append_formatv(wcstring &str, const wchar_t *format, va_list ap); +#ifdef __cpp_lib_make_unique +using std::make_unique; +#else /// make_unique implementation template std::unique_ptr make_unique(Args&&... args) { return std::unique_ptr(new T(std::forward(args)...)); } +#endif /// This functions returns the end of the quoted substring beginning at \c in. The type of quoting /// character is detemrined by examining \c in. Returns 0 on error.