Skip to content

Commit bcf36db

Browse files
Rob Lyerlymeta-codesync[bot]
authored andcommitted
Add movable concept to CoroFiberAdapter
Summary: Use the `std::movable` concept to constrain the return type for `onWorkerThread()` Just some syntactic sugar, functionally a no-op Reviewed By: pbhandar2 Differential Revision: D90687553 fbshipit-source-id: 4179f4b22d723dba1f124dd03702af8a75b57e73
1 parent 5d0caf7 commit bcf36db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cachelib/interface/utils/CoroFiberAdapter.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include <folly/coro/Promise.h>
2020
#include <folly/coro/Task.h>
2121

22+
#include <concepts>
23+
2224
#include "cachelib/navy/common/NavyThread.h"
2325
#include "cachelib/navy/common/Types.h"
2426

@@ -47,7 +49,7 @@ using DefaultCleanupT = decltype([](auto&&) {});
4749
*/
4850
template <typename FuncT,
4951
typename CleanupFuncT = detail::DefaultCleanupT,
50-
typename ReturnT = std::invoke_result_t<FuncT>>
52+
std::movable ReturnT = std::invoke_result_t<FuncT>>
5153
folly::coro::Task<ReturnT> onWorkerThread(
5254
navy::NavyThread& thread,
5355
FuncT&& func,

0 commit comments

Comments
 (0)