mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 16:40:48 +08:00
fix for gcc c++17
This commit is contained in:
@@ -177,7 +177,7 @@ namespace rest_rpc {
|
||||
#if __cplusplus > 201402L
|
||||
template<size_t TIMEOUT, typename T = void, typename... Args>
|
||||
auto call(const std::string& rpc_name, Args&& ... args) {
|
||||
std::future<req_result> future = async_call(rpc_name, std::forward<Args>(args)...);
|
||||
std::future<req_result> future = async_call<FUTURE>(rpc_name, std::forward<Args>(args)...);
|
||||
auto status = future.wait_for(std::chrono::milliseconds(TIMEOUT));
|
||||
if (status == std::future_status::timeout || status == std::future_status::deferred) {
|
||||
throw std::out_of_range("timeout or deferred");
|
||||
|
||||
Reference in New Issue
Block a user