diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 98f61b18e15..eef0e90cc99 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -98,9 +98,7 @@ class CallOpSendMessage { CallOpSendMessage() : send_buf_(nullptr), own_buf_(false) {} template - bool SendMessage(const M& message) GRPC_MUST_USE_RESULT { - return SerializationTraits::Serialize(message, &send_buf_, &own_buf_); - } + bool SendMessage(const M& message) GRPC_MUST_USE_RESULT; protected: void AddOp(grpc_op* ops, size_t* nops) { @@ -118,6 +116,11 @@ class CallOpSendMessage { bool own_buf_; }; +template +bool CallOpSendMessage::SendMessage(const M& message) { + return SerializationTraits::Serialize(message, &send_buf_, &own_buf_); +} + template class CallOpRecvMessage { public: