From 6016ae0f462fdf9338b9d544b1f6e53c2c5f6d64 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Wed, 7 Apr 2021 08:42:02 +0300 Subject: [PATCH] rgw: fix lambda capture of a non-variable One cannot just capture a structured binding "non-variable". Signed-off-by: Ronen Friedman --- src/rgw/rgw_log_backing.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_log_backing.cc b/src/rgw/rgw_log_backing.cc index c3037e13048b..8ed52e8849c9 100644 --- a/src/rgw/rgw_log_backing.cc +++ b/src/rgw/rgw_log_backing.cc @@ -665,7 +665,7 @@ bs::error_code logback_generations::remove_empty(optional_yield y) noexcept { for (const auto& [gen_id, e] : es) { ceph_assert(e.pruned); auto ec = log_remove(ioctx, shards, - [this, gen_id](int shard) { + [this, gen_id=gen_id](int shard) { return this->get_oid(gen_id, shard); }, (gen_id == 0), y); if (ec) { -- 2.47.3