From 9d3a704c9d893b47a1f83b9428d0c3a4feef9a7c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 11 Jan 2020 16:37:17 +0800 Subject: [PATCH] crimson: avoid creating temporary with protected dtor to address the compiler error from clang 9.0.1: ../src/crimson/os/cyanstore/cyan_collection.cc:16:34: error: temporary of type 'boost::intrusive_ref_counter' has protected destructor return new crimson::os::Object{}; ^ /opt/ceph/include/boost/smart_ptr/intrusive_ref_counter.hpp:157:30: note: declared protected here BOOST_DEFAULTED_FUNCTION(~intrusive_ref_counter(), {}) ^ Signed-off-by: Kefu Chai --- src/crimson/os/cyanstore/cyan_collection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/os/cyanstore/cyan_collection.cc b/src/crimson/os/cyanstore/cyan_collection.cc index 206e902bb3a8c..f44234e845a00 100644 --- a/src/crimson/os/cyanstore/cyan_collection.cc +++ b/src/crimson/os/cyanstore/cyan_collection.cc @@ -13,7 +13,7 @@ Collection::~Collection() = default; Collection::ObjectRef Collection::create_object() const { - return new crimson::os::Object{}; + return new crimson::os::Object; } Collection::ObjectRef Collection::get_object(ghobject_t oid) -- 2.39.5