]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: hold reloader using unique_ptr 36644/head
authorKefu Chai <kchai@redhat.com>
Fri, 7 Aug 2020 16:26:21 +0000 (00:26 +0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 24 Aug 2020 13:47:00 +0000 (15:47 +0200)
commit1dc611fd8fa7dbcceceb40b36cccbf6bfb4f7a84
treefb227d48aac2e63ca9869cdf0e82a9af16581a51
parent884ca48cbe967f7b2b652ce079de2e285e197c28
rgw: hold reloader using unique_ptr

instead of using optional<> for holding reloader, use unique_ptr<>.
as `RGWRealmReloader` is neither
trivially_copy_{assignable,constructible} nor
is_trivially_move_{assignable, constructible}, because of the `Cond`
member variable. but Clang++ and libc++ still tries to rely on a
delgating copy constructor for constructing the
optional<RGWRealmReloader> instance even the optional object is
created `in_place`.

in this change, to workaround this issue, reloader is instead
constructed using make_unique<>

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 2494ddbef5ad20cdfccf59911fccadb6f9848da0)
src/rgw/rgw_main.cc