From: Tom de Vries Date: Sun, 23 Nov 2025 08:27:56 +0000 (+0100) Subject: [gdb/build, c++20] Fix deprecated implicit capture in cooked_index::set_contents X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=777079c67c81baa082a60b36bb75778300bdcaa3;p=thirdparty%2Fbinutils-gdb.git [gdb/build, c++20] Fix deprecated implicit capture in cooked_index::set_contents Fix deprecated implicit capture of this in cooked_index::set_contents, by removing the capture default, and explicitly listing all captures. Tested on x86_64-linux. --- diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c index 85e6cfcdf0f..c1b168d8923 100644 --- a/gdb/dwarf2/cooked-index.c +++ b/gdb/dwarf2/cooked-index.c @@ -90,7 +90,7 @@ cooked_index::set_contents () { auto this_shard = shard.get (); const parent_map_map *parent_maps = m_state->get_parent_map_map (); - finalizers.add_task ([=] () + finalizers.add_task ([this, this_shard, parent_maps] () { scoped_time_it time_it ("DWARF finalize worker", m_state->m_per_command_time);