diff options
Diffstat (limited to 'src/murmur_grpcwrapper_protoc_plugin/main.cpp')
-rw-r--r-- | src/murmur_grpcwrapper_protoc_plugin/main.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/murmur_grpcwrapper_protoc_plugin/main.cpp b/src/murmur_grpcwrapper_protoc_plugin/main.cpp index 3c832f05f..9d172524c 100644 --- a/src/murmur_grpcwrapper_protoc_plugin/main.cpp +++ b/src/murmur_grpcwrapper_protoc_plugin/main.cpp @@ -13,6 +13,7 @@ #include <google/protobuf/io/printer.h> #include <boost/algorithm/string/replace.hpp> +#include <boost/bind/bind.hpp> using namespace std; @@ -38,7 +39,7 @@ public: static void create(MurmurRPCImpl *rpc, ::$ns$::$service$::AsyncService *service) { auto call = new $service$_$method$(rpc, service); - auto fn = ::boost::bind(&$service$_$method$::handle, call, _1); + auto fn = ::boost::bind(&$service$_$method$::handle, call, boost::placeholders::_1); auto fn_ptr = new ::boost::function<void(bool)>(fn); service->Request$method$(&call->context, &call->request, &call->stream, rpc->m_completionQueue.get(), rpc->m_completionQueue.get(), fn_ptr); } @@ -57,7 +58,7 @@ public: void done(bool ok); ::boost::function<void(bool)> *callback(::boost::function<void($service$_$method$ *, bool)> cb) { - auto fn = ::boost::bind(&$service$_$method$::callbackAction, this, cb, _1); + auto fn = ::boost::bind(&$service$_$method$::callbackAction, this, cb, boost::placeholders::_1); return new ::boost::function<void(bool)>(fn); } @@ -74,10 +75,10 @@ public: static void create(MurmurRPCImpl *rpc, ::$ns$::$service$::AsyncService *service) { auto call = new $service$_$method$(rpc, service); - auto done_fn = ::boost::bind(&$service$_$method$::handleDone, call, _1); + auto done_fn = ::boost::bind(&$service$_$method$::handleDone, call, boost::placeholders::_1); auto done_fn_ptr = new ::boost::function<void(bool)>(done_fn); call->context.AsyncNotifyWhenDone(done_fn_ptr); - auto fn = ::boost::bind(&$service$_$method$::handle, call, _1); + auto fn = ::boost::bind(&$service$_$method$::handle, call, boost::placeholders::_1); auto fn_ptr = new ::boost::function<void(bool)>(fn); service->Request$method$(&call->context, &call->request, &call->stream, rpc->m_completionQueue.get(), rpc->m_completionQueue.get(), fn_ptr); } @@ -115,7 +116,7 @@ public: static void create(MurmurRPCImpl *rpc, ::$ns$::$service$::AsyncService *service) { auto call = new $service$_$method$(rpc, service); - auto fn = ::boost::bind(&$service$_$method$::handle, call, _1); + auto fn = ::boost::bind(&$service$_$method$::handle, call, boost::placeholders::_1); auto fn_ptr = new ::boost::function<void(bool)>(fn); service->Request$method$(&call->context, &call->stream, rpc->m_completionQueue.get(), rpc->m_completionQueue.get(), fn_ptr); } @@ -166,7 +167,7 @@ public: } ::boost::function<void(bool)> *callback(::boost::function<void($service$_$method$ *, bool)> cb) { - auto fn = ::boost::bind(&$service$_$method$::callbackAction, this, cb, _1); + auto fn = ::boost::bind(&$service$_$method$::callbackAction, this, cb, boost::placeholders::_1); return new ::boost::function<void(bool)>(fn); } @@ -183,10 +184,10 @@ public: static void create(MurmurRPCImpl *rpc, ::$ns$::$service$::AsyncService *service) { auto call = new $service$_$method$(rpc, service); - auto done_fn = ::boost::bind(&$service$_$method$::handleDone, call, _1); + auto done_fn = ::boost::bind(&$service$_$method$::handleDone, call, boost::placeholders::_1); auto done_fn_ptr = new ::boost::function<void(bool)>(done_fn); call->context.AsyncNotifyWhenDone(done_fn_ptr); - auto fn = ::boost::bind(&$service$_$method$::handle, call, _1); + auto fn = ::boost::bind(&$service$_$method$::handle, call, boost::placeholders::_1); auto fn_ptr = new ::boost::function<void(bool)>(fn); service->Request$method$(&call->context, &call->stream, rpc->m_completionQueue.get(), rpc->m_completionQueue.get(), fn_ptr); } |