diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-11 17:03:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-10-11 17:03:27 +0100 |
commit | f16c34d109a107dccbc8ad0165c7a7e4730547a1 (patch) | |
tree | ae3f72d54a1c4d31f100dbf914da93e5d70ac79f /src | |
parent | e85c9f3639b1e3ac1de9f395b7c162bd3823ba22 (diff) | |
download | rspamd-f16c34d109a107dccbc8ad0165c7a7e4730547a1.tar.gz rspamd-f16c34d109a107dccbc8ad0165c7a7e4730547a1.zip |
[Minor] Try to fix compiler specific issue
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/cxx/local_shared_ptr.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/cxx/local_shared_ptr.hxx b/src/libutil/cxx/local_shared_ptr.hxx index cf0875813..ac069f764 100644 --- a/src/libutil/cxx/local_shared_ptr.hxx +++ b/src/libutil/cxx/local_shared_ptr.hxx @@ -100,7 +100,7 @@ private: ptr = nullptr; } public: - explicit ptr_and_refcnt(T *_ptr, D d = std::default_delete<T>()) : ptr(_ptr), + explicit ptr_and_refcnt(T *_ptr, D &&d = std::default_delete<T>()) : ptr(_ptr), deleter(std::move(d)) {} virtual ~ptr_and_refcnt() = default; }; @@ -128,7 +128,7 @@ public: // custom deleter template<class Y, class D, typename std::enable_if< std::is_convertible<Y*, element_type*>::value, bool>::type = true> - explicit local_shared_ptr(Y* p, D d) : px(p), cnt(new detail::ptr_and_refcnt(p, std::move(d))) + explicit local_shared_ptr(Y* p, D &&d) : px(p), cnt(new detail::ptr_and_refcnt(p, std::forward<D>(d))) { } |