]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-kvstore-tool: define a noexcept non-default ctor for Deleter 39711/head
authorKefu Chai <kchai@redhat.com>
Fri, 26 Feb 2021 01:38:26 +0000 (09:38 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Mar 2021 10:26:23 +0000 (18:26 +0800)
commitb12efe267b566a37862ed2b916f0e4218ff89bc6
treef223106e7492a5b66ee91a4ace76a6103f325d73
parentb011958c9f6146587c45bb1c9476e8c3abf46bb2
ceph-kvstore-tool: define a noexcept non-default ctor for Deleter

the deleter of a unique_ptr<> should be value-initialized if we use
`unique_ptr()` for constructing the unique_ptr, but somehow, `Deleter`
does have a user-defined constructor which prevents the compiler from
creating a default constructor which could have made Deleter default
constructible.

in this change, a constructor accepts no arguments is explictly defined
to satisfy the requirements for creating `db` using `unique_ptr<>()`.

this change is not cherry-picked from master, as we don't define a
constructor at all for Deleter, so it is *always* value-initialized.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/ceph_kvstore_tool.cc