From 3d56b970529c000a7bfa6b2df68c7d9e7260fb68 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Wed, 5 Apr 2017 21:02:03 +0100 Subject: [PATCH] Make unique_ref constructor explicit --- src/cpp-utils/pointer/unique_ref.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp-utils/pointer/unique_ref.h b/src/cpp-utils/pointer/unique_ref.h index 7e3a4f40..d219ecdd 100644 --- a/src/cpp-utils/pointer/unique_ref.h +++ b/src/cpp-utils/pointer/unique_ref.h @@ -98,7 +98,7 @@ public: } private: - unique_ref(std::unique_ptr target) noexcept: _target(std::move(target)) {} + explicit unique_ref(std::unique_ptr target) noexcept: _target(std::move(target)) {} template friend unique_ref make_unique_ref(Args&&... args); template friend boost::optional> nullcheck(std::unique_ptr ptr) noexcept; template friend class unique_ref;