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>
#ifdef HAVE_LIBAIO
struct Deleter {
BlueStore *bluestore;
- Deleter(BlueStore *store = nullptr)
- : bluestore(store)
+ Deleter()
+ : bluestore(nullptr)
+ {}
+ Deleter(BlueStore *store)
+ : bluestore(store)
{}
void operator()(KeyValueDB *db) {
if (bluestore) {