Skip to content

Commit

Permalink
Type hints for old compilers' benefit
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jul 23, 2024
1 parent 0c22ab4 commit e115e9a
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/LoadStoreChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ namespace core
-> auxiliary::DeferredFuture<std::shared_ptr<T>>
{
auto res = m_rc.loadChunkAllocate_impl<T>(storeChunkConfig());
return auxiliary::DeferredFuture(std::packaged_task(
[res_lambda = std::move(res), rc = m_rc]() mutable {
rc.seriesFlush();
return res_lambda;
}));
return auxiliary::DeferredFuture<std::shared_ptr<T>>(
std::packaged_task<std::shared_ptr<T>()>(
[res_lambda = std::move(res), rc = m_rc]() mutable {
rc.seriesFlush();
return res_lambda;
}));
}

template <typename T>
Expand All @@ -147,12 +148,15 @@ namespace core
auxiliary::detail::shared_ptr_dataset_types>
{
auto res = rc.loadChunkAllocate_impl<T>(std::move(cfg));
return auxiliary::DeferredFuture(std::packaged_task(
[res_lambda = std::move(res), rc_lambda = rc]() mutable
-> auxiliary::detail::shared_ptr_dataset_types {
rc_lambda.seriesFlush();
return res_lambda;
}));
return auxiliary::DeferredFuture<
auxiliary::detail::shared_ptr_dataset_types>(
std::packaged_task<
auxiliary::detail::shared_ptr_dataset_types()>(
[res_lambda = std::move(res), rc_lambda = rc]() mutable
-> auxiliary::detail::shared_ptr_dataset_types {
rc_lambda.seriesFlush();
return res_lambda;
}));
}
};

Expand Down Expand Up @@ -210,7 +214,7 @@ namespace core
asWriteBuffer(std::move(m_buffer)),
determineDatatype<auxiliary::IsPointer_t<Ptr_Type>>(),
storeChunkConfig());
return auxiliary::DeferredFuture(std::packaged_task(
return auxiliary::DeferredFuture<void>(std::packaged_task<void()>(
[rc_lambda = m_rc]() mutable -> void { rc_lambda.seriesFlush(); }));
}

Expand Down

0 comments on commit e115e9a

Please sign in to comment.