From 69aec175625b131ae2305280589cfc87644f9fae Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 11 Dec 2017 15:52:50 -0800 Subject: [PATCH 1/2] Add dummy operator delete to make VS2015 not complain. --- include/grpc++/impl/codegen/async_unary_call.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index b9ea5fd19c2..2bbbb875032 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -103,6 +103,13 @@ class ClientAsyncResponseReader final assert(size == sizeof(ClientAsyncResponseReader)); } + // This operator should never be called as the memory should be freed as part + // of the arena destruction. It only exists to provide a matching operator + // delete to the operator new so that some compilers will not complain (see + // Issue# 11301). Note at the time of adding this there is no tests catching + // the compiler warning. + static void operator delete(void*, void*) {} + void StartCall() override { assert(!started_); started_ = true; From 9c5d8267cd17c16306e83b678b6fe4cf50aa7125 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 11 Dec 2017 16:51:06 -0800 Subject: [PATCH 2/2] resolve comments --- include/grpc++/impl/codegen/async_unary_call.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index 2bbbb875032..fb573004cbc 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -106,9 +106,9 @@ class ClientAsyncResponseReader final // This operator should never be called as the memory should be freed as part // of the arena destruction. It only exists to provide a matching operator // delete to the operator new so that some compilers will not complain (see - // Issue# 11301). Note at the time of adding this there is no tests catching - // the compiler warning. - static void operator delete(void*, void*) {} + // https://github.com/grpc/grpc/issues/11301) Note at the time of adding this + // there are no tests catching the compiler warning. + static void operator delete(void*, void*) { assert(0); } void StartCall() override { assert(!started_);