On 8/7/23 16:35, Simon Marchi wrote: > > > On August 6, 2023 7:59:15 p.m. EDT, Tom de Vries via Gdb-patches wrote: >> When building with -std=c++11 I run into: >> ... >> gdb/dwarf2/cooked-index.c: In member function \ >> ‘void cooked_index::start_writing_index(dwarf2_per_bfd*)’: >> gdb/dwarf2/cooked-index.c:469:10: error: lambda capture initializers only \ >> available with -std=c++14 or -std=gnu++14 [-Werror] >> ctx = std::move (ctx)] () >> ^~~ >> ... >> >> Fix this by capturing a copy instead: >> ... >> = gdb::thread_pool::g_thread_pool->post_task ([this, per_bfd, ctx] () >> ... >> >> Tested on x86_64-linux. >> >> Reported-By: Tom Tromey > > When we encounter things like this, should we add some greppable TODO comment to record an actionable item for when we switch to a more recent C++ version? Hi Simon, thanks for the review. Fine by me, added comment. Thanks, - Tom