From 1c32292c7be078303f4bb59e635319773c5012c2 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 11 Sep 2017 09:05:59 -0700 Subject: [PATCH] Address reviewer comments --- include/grpc++/impl/codegen/call.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index bbd277f288f..0bf33cb88f1 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -303,14 +303,18 @@ class CallOpSendMessage { WriteOptions write_options_; }; +namespace internal { +template +T Example(); +} // namespace internal + template class CallOpSendMessage::MessageSerializer< M, typename std::enable_if::Serialize( - static_cast(*(static_cast(nullptr))), - static_cast(nullptr), - static_cast(nullptr)))>::value>::type> { + ::grpc::Status, decltype(SerializationTraits::Serialize( + internal::Example(), + internal::Example(), + internal::Example()))>::value>::type> { public: static Status SendMessageInternal(const M& message, ByteBuffer* bbuf, bool* own_buf) { @@ -322,11 +326,10 @@ class CallOpSendMessage::MessageSerializer< template class CallOpSendMessage::MessageSerializer< M, typename std::enable_if::Serialize( - static_cast(*(static_cast(nullptr))), - static_cast<::grpc::ByteBuffer*>(nullptr), - static_cast(nullptr)))>::value>::type> { + ::grpc::Status, decltype(SerializationTraits::Serialize( + internal::Example(), + internal::Example<::grpc::ByteBuffer*>(), + internal::Example()))>::value>::type> { public: static Status SendMessageInternal(const M& message, ByteBuffer* bbuf, bool* own_buf) {