diff options
author | Craig Tiller <ctiller@google.com> | 2017-04-02 10:03:19 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-04-02 10:03:19 -0700 |
commit | 7cbb4feff91ca0e8cee86688c5a613d217e3ac21 (patch) | |
tree | 0a9a3dbe71bc929e7843af72a047486bf60c9a71 /src | |
parent | b3d70102a59d02e238417f2d8fc4eaea66bad028 (diff) |
Allow custom deletion policies on grpc_core::UniquePtr<>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/support/memory.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/support/memory.h b/src/core/lib/support/memory.h index 3e00fb2011..bd56ca3939 100644 --- a/src/core/lib/support/memory.h +++ b/src/core/lib/support/memory.h @@ -61,8 +61,8 @@ class DefaultDelete { void operator()(T* p) { Delete(p); } }; -template <typename T> -using UniquePtr = std::unique_ptr<T, DefaultDelete<T>>; +template <typename T, typename Deleter = DefaultDelete<T>> +using UniquePtr = std::unique_ptr<T, Deleter>; template <typename T, typename... Args> inline UniquePtr<T> MakeUnique(Args&&... args) { |