Skip to content

Commit

Permalink
Add static_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu committed Mar 7, 2022
1 parent 714dbf6 commit 631a7b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/meta/processors/admin/AdminClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ void AdminClient::getResponseFromLeader(std::vector<HostAddr> hosts,
int32_t retry,
folly::Promise<Status> pro,
int32_t retryLimit) {
static_assert(
folly::isSemiFuture<
typename std::result_of<RemoteFunc(std::shared_ptr<ClientType>, Request)>::type>::value);

auto* evb = ioThreadPool_->getEventBase();
CHECK_GE(index, 0);
CHECK_LT(index, hosts.size());
Expand Down

0 comments on commit 631a7b3

Please sign in to comment.