On 8/8/23 00:16, Tom Tromey wrote: > Simon> When we encounter things like this, should we add some greppable > Simon> TODO comment to record an actionable item for when we switch to a > Simon> more recent C++ version? > > FWIW I know of one other instance of this, in gdb_demangle: > > std::string copy = name; > run_on_main_thread ([=] () > { > report_failed_demangle (copy.c_str (), core_dump_allowed, > > Here, the name is copied twice, but with move captures there could be > just a single copy. Like so? Thanks, - Tom