]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os: capture local bindings using capture variable list 37890/head
authorKefu Chai <kchai@redhat.com>
Thu, 29 Oct 2020 08:24:45 +0000 (16:24 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 29 Oct 2020 08:32:26 +0000 (16:32 +0800)
commit7736aaf32f3b368b54e5e71391c910719bad09bd
treefae048be4e4121dbd272208f63e37fe4a72a6a63
parente29f6e84d733b9131c886b49c3df8fd096e32d59
crimson/os: capture local bindings using capture variable list

structured binding does not define variables, and the implicit
capture-by-copy `=` does not help in this case, we have to define a
capture with an initializer to create a *variable* enclosed by
the closure explicitly.

this address the error like:

src/crimson/os/seastore/segment_cleaner.cc:315:5: error: reference to local binding 'addr' declared in enclosing lambda expression
                  addr);
                  ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/seastore/segment_cleaner.cc