aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2018-09-05 15:24:16 -0700
committerGravatar GitHub <noreply@github.com>2018-09-05 15:24:16 -0700
commit608188c680961b8506847c135b5170b41a9081e8 (patch)
tree310afe77d1b5fc44681a82b4eb03ace207207599
parent11622c0648f8b4181b46ad8272d48a34acb2d593 (diff)
parent605a42d90a01bc9cc7d34f53de39c25d59c09269 (diff)
Merge pull request #16544 from jtattermusch/fix_13939
Fix async_stream.h warning on Visual Studio
-rw-r--r--include/grpcpp/impl/codegen/async_stream.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/grpcpp/impl/codegen/async_stream.h b/include/grpcpp/impl/codegen/async_stream.h
index b2134590c3..b306cd3604 100644
--- a/include/grpcpp/impl/codegen/async_stream.h
+++ b/include/grpcpp/impl/codegen/async_stream.h
@@ -195,6 +195,13 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
assert(size == sizeof(ClientAsyncReader));
}
+ // 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(void* tag) override {
assert(!started_);
started_ = true;
@@ -336,6 +343,13 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
assert(size == sizeof(ClientAsyncWriter));
}
+ // 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(void* tag) override {
assert(!started_);
started_ = true;
@@ -496,6 +510,13 @@ class ClientAsyncReaderWriter final
assert(size == sizeof(ClientAsyncReaderWriter));
}
+ // 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(void* tag) override {
assert(!started_);
started_ = true;