Skip to content
This repository was archived by the owner on Apr 6, 2019. It is now read-only.

Commit a74b206

Browse files
committed
ensure compatibility for client_kill for g++ 4.8
1 parent d6a3473 commit a74b206

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

includes/cpp_redis/future_client.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,13 @@ class future_client {
310310
template <typename T, typename... Ts>
311311
future_client::future
312312
future_client::client_kill(const T& arg, const Ts&... args) {
313-
return exec_cmd([=](const rcb_t& cb) -> rc& { return m_client.client_kill(arg, args..., cb); });
313+
314+
/** gcc 4.8 doesn't handle variadic template capture arguments (appears in 4.9), so std::bind should capture all arguments
315+
* because of the compiler
316+
*/
317+
return exec_cmd(std::bind([this](const T& arg, const Ts&... args, const rcb_t& cb) {
318+
return m_client.client_kill(arg, args..., cb);
319+
}, arg, args...));
314320
}
315321

316322
} //! cpp_redis

0 commit comments

Comments
 (0)