错误:: make_unique不是'std'的成员
我正在尝试编译代码审查中发布的以下线程池程序以对其进行测试。 /codereview/55100/platform-independant-thread-pool-v4 但是我得到了错误 threadpool.hpp: In member function ‘std::future<decltype (task((forward<Args>)(args)...))> threadpool::enqueue_task(Func&&, Args&& ...)’: threadpool.hpp:94:28: error: ‘make_unique’ was not declared in this scope auto package_ptr = make_unique<task_package_impl<R, decltype(bound_task)>> (std::move(bound_task), std::move(promise)); ^ threadpool.hpp:94:81: error: expected primary-expression before ‘>’ token auto package_ptr = make_unique<task_package_impl<R, decltype(bound_task)>>(std::move(bound_task), std::move(promise)); ^ main.cpp: In function ‘int main()’: main.cpp:9:17: error: …