From: Kefu Chai Date: Sat, 11 Jan 2020 08:37:17 +0000 (+0800) Subject: crimson: avoid creating temporary with protected dtor X-Git-Tag: v15.1.0~234^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9d3a704c9d893b47a1f83b9428d0c3a4feef9a7c;p=ceph.git 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 --- diff --git a/src/crimson/os/cyanstore/cyan_collection.cc b/src/crimson/os/cyanstore/cyan_collection.cc index 206e902bb3a..f44234e845a 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)