aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_generator.cc
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-05-05 13:31:40 -0700
committerGravatar Yang Gao <yangg@google.com>2015-05-05 13:31:40 -0700
commit691ff71da5f4baf4a027b157cf8b6f64697e0a6f (patch)
treee498d21c00e7e2f8a2643100a15cf46fa8b50949 /src/compiler/cpp_generator.cc
parent196ade3e4d03fa550bf0adf3a114988061e3cf0f (diff)
parent97c5559040204dcff338df79b16390014fbc82c9 (diff)
Merge remote-tracking branch 'upstream/master' into mock
Diffstat (limited to 'src/compiler/cpp_generator.cc')
-rw-r--r--src/compiler/cpp_generator.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index 0e54ee4e79..a0c9d3d468 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -1065,9 +1065,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
" new ::grpc::RpcMethodHandler< $ns$$Service$::Service, "
"$Request$, "
"$Response$>(\n"
- " std::function< ::grpc::Status($ns$$Service$::Service*, "
- "::grpc::ServerContext*, const $Request$*, $Response$*)>("
- "&$ns$$Service$::Service::$Method$), this),\n"
+ " std::mem_fn(&$ns$$Service$::Service::$Method$), this),\n"
" new $Request$, new $Response$));\n");
} else if (ClientOnlyStreaming(method)) {
printer->Print(
@@ -1077,10 +1075,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
" ::grpc::RpcMethod::CLIENT_STREAMING,\n"
" new ::grpc::ClientStreamingHandler< "
"$ns$$Service$::Service, $Request$, $Response$>(\n"
- " std::function< ::grpc::Status($ns$$Service$::Service*, "
- "::grpc::ServerContext*, "
- "::grpc::ServerReader< $Request$>*, $Response$*)>("
- "&$ns$$Service$::Service::$Method$), this),\n"
+ " std::mem_fn(&$ns$$Service$::Service::$Method$), this),\n"
" new $Request$, new $Response$));\n");
} else if (ServerOnlyStreaming(method)) {
printer->Print(
@@ -1090,10 +1085,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
" ::grpc::RpcMethod::SERVER_STREAMING,\n"
" new ::grpc::ServerStreamingHandler< "
"$ns$$Service$::Service, $Request$, $Response$>(\n"
- " std::function< ::grpc::Status($ns$$Service$::Service*, "
- "::grpc::ServerContext*, "
- "const $Request$*, ::grpc::ServerWriter< $Response$>*)>("
- "&$ns$$Service$::Service::$Method$), this),\n"
+ " std::mem_fn(&$ns$$Service$::Service::$Method$), this),\n"
" new $Request$, new $Response$));\n");
} else if (BidiStreaming(method)) {
printer->Print(
@@ -1103,10 +1095,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
" ::grpc::RpcMethod::BIDI_STREAMING,\n"
" new ::grpc::BidiStreamingHandler< "
"$ns$$Service$::Service, $Request$, $Response$>(\n"
- " std::function< ::grpc::Status($ns$$Service$::Service*, "
- "::grpc::ServerContext*, "
- "::grpc::ServerReaderWriter< $Response$, $Request$>*)>("
- "&$ns$$Service$::Service::$Method$), this),\n"
+ " std::mem_fn(&$ns$$Service$::Service::$Method$), this),\n"
" new $Request$, new $Response$));\n");
}
}