From f3eb6ba55aed6267f5674e6fdee8fe70ade55eef Mon Sep 17 00:00:00 2001 From: mutouyun Date: Mon, 7 Oct 2019 11:51:37 +0000 Subject: [PATCH] fix: attempting to reference a deleted function --- src/memory/allocator_wrapper.h | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/memory/allocator_wrapper.h b/src/memory/allocator_wrapper.h index 9f392ae..d31b815 100755 --- a/src/memory/allocator_wrapper.h +++ b/src/memory/allocator_wrapper.h @@ -51,31 +51,15 @@ private: public: allocator_wrapper() noexcept {} - allocator_wrapper(const allocator_wrapper& rhs) noexcept - : alloc_(rhs.alloc_) - {} - + // no copy + allocator_wrapper(const allocator_wrapper& rhs) noexcept {} template - allocator_wrapper(const allocator_wrapper& rhs) noexcept - : alloc_(rhs.alloc_) - {} - - allocator_wrapper(allocator_wrapper&& rhs) noexcept - : alloc_(std::move(rhs.alloc_)) - {} + allocator_wrapper(const allocator_wrapper& rhs) noexcept {} + allocator_wrapper(allocator_wrapper && rhs) noexcept : alloc_(std::move(rhs.alloc_)) {} template - allocator_wrapper(allocator_wrapper&& rhs) noexcept - : alloc_(std::move(rhs.alloc_)) - {} - - allocator_wrapper(const AllocP& rhs) noexcept - : alloc_(rhs) - {} - - allocator_wrapper(AllocP&& rhs) noexcept - : alloc_(std::move(rhs)) - {} + allocator_wrapper(allocator_wrapper && rhs) noexcept : alloc_(std::move(rhs.alloc_)) {} + allocator_wrapper(alloc_policy && rhs) noexcept : alloc_(std::move(rhs)) {} public: // the other type of std_allocator