Merge pull request #19894 from AspirinSJL/public_ctor

Comment deprecated macros
reviewable/pr19394/r14
Juanli Shen 6 years ago committed by GitHub
commit b4504ea781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/lib/gprpp/memory.h

@ -30,6 +30,9 @@
// Add this to a class that want to use Delete(), but has a private or
// protected destructor.
// Should not be used in new code.
// TODO(juanlishen): Remove this macro, and instead comment that the public dtor
// should not be used directly.
#define GRPC_ALLOW_CLASS_TO_USE_NON_PUBLIC_DELETE \
template <typename _Delete_T, bool _Delete_can_be_null> \
friend void ::grpc_core::Delete(_Delete_T*); \
@ -38,6 +41,9 @@
// Add this to a class that want to use New(), but has a private or
// protected constructor.
// Should not be used in new code.
// TODO(juanlishen): Remove this macro, and instead comment that the public dtor
// should not be used directly.
#define GRPC_ALLOW_CLASS_TO_USE_NON_PUBLIC_NEW \
template <typename _New_T, typename... _New_Args> \
friend _New_T* grpc_core::New(_New_Args&&...);

Loading…
Cancel
Save