From 82f79c007700a6a065cd2f2c054f8a2f494085ec Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 28 Sep 2020 19:00:16 +0300 Subject: [PATCH] api: column_family: don't capture structured bindings in lambdas Clang does not yet implement p1091r3, which allows lambdas to capture structured bindings. To accomodate it, don't use structured bindings for variables that are later captured. --- api/column_family.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/column_family.cc b/api/column_family.cc index 005bce83b1..5df5347652 100644 --- a/api/column_family.cc +++ b/api/column_family.cc @@ -865,7 +865,9 @@ void set_column_family(http_context& ctx, routes& r) { }); cf::get_built_indexes.set(r, [&ctx](std::unique_ptr req) { - auto [ks, cf_name] = parse_fully_qualified_cf_name(req->param["name"]); + auto ks_cf = parse_fully_qualified_cf_name(req->param["name"]); + auto&& ks = std::get<0>(ks_cf); + auto&& cf_name = std::get<1>(ks_cf); return db::system_keyspace::load_view_build_progress().then([ks, cf_name, &ctx](const std::vector& vb) mutable { std::set vp; for (auto b : vb) {