From: Ronen Friedman Date: Wed, 7 Apr 2021 05:42:02 +0000 (+0300) Subject: rgw: fix lambda capture of a non-variable X-Git-Tag: v17.1.0~2338^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6016ae0f462fdf9338b9d544b1f6e53c2c5f6d64;p=ceph.git rgw: fix lambda capture of a non-variable One cannot just capture a structured binding "non-variable". Signed-off-by: Ronen Friedman --- diff --git a/src/rgw/rgw_log_backing.cc b/src/rgw/rgw_log_backing.cc index c3037e13048bb..8ed52e8849c99 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) {