diff options
author | Yang Gao <yangg@google.com> | 2017-12-12 09:57:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 09:57:01 -0800 |
commit | 8cfaf4ec4fd2aa5197487664aea3a586f1217bad (patch) | |
tree | 424a47c49b9813446fb5cf45a43985fa1c5a4714 | |
parent | de110af820a912ae926a1a9659a385b6a972f84d (diff) | |
parent | 9c5d8267cd17c16306e83b678b6fe4cf50aa7125 (diff) |
Merge pull request #13713 from yang-g/delete
Add dummy operator delete to make VS2015 not complain.
-rw-r--r-- | include/grpc++/impl/codegen/async_unary_call.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index b9ea5fd19c..fb573004cb 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 + // 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_); started_ = true; |