mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 23:16:27 -05:00
Misc fixes, mostly for FreeBSD
This commit is contained in:
parent
7a9c3b7eb2
commit
17d807462b
27 changed files with 146 additions and 140 deletions
|
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
template<typename FuncType>
|
||||
[[nodiscard]]
|
||||
std::future<typename std::result_of<FuncType()>::type>
|
||||
std::future<std::invoke_result_t<FuncType>>
|
||||
enqueue_task(FuncType&& func_);
|
||||
|
||||
public:
|
||||
|
|
@ -340,10 +340,10 @@ ThreadPool::enqueue_work(FuncType &&func_)
|
|||
template<typename FuncType>
|
||||
[[nodiscard]]
|
||||
inline
|
||||
std::future<typename std::result_of<FuncType()>::type>
|
||||
std::future<std::invoke_result_t<FuncType>>
|
||||
ThreadPool::enqueue_task(FuncType&& func_)
|
||||
{
|
||||
using TaskReturnType = typename std::result_of<FuncType()>::type;
|
||||
using TaskReturnType = std::invoke_result_t<FuncType>;
|
||||
using Promise = std::promise<TaskReturnType>;
|
||||
|
||||
Promise promise;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue