不可能看懂,如果c++11引入的新东西没学过。。
大模型为速成开辟了新路径
【 在 buildtolast 的大作中提到: 】
: template <class F, class... Args>
: auto ThreadPool::Enqueue(F &&f, Args &&...args) -> std::future<typename std::result_of<F(Args...)>::type> {
: using return_type = typename std::result_of<F(Args...)>::type;
: auto task =
: std::make_shared<std::packaged_task<return_type()>>(std::bind(std::forward<F>(f), std::forward<Args>(args)...));
: 模板+变长参数+异步+右值引用+转发+智能推导。。。
--
FROM 123.125.11.*