Initializers in lambda captures were introduced in C++14, and
conditionally used in gdb/cp-support.c and gdb/dwarf2/cooked-index.c.
Since C++17 is now required by GDB, use this feature unconditionally.
Change-Id: I87a3d567941e5c71217538fa75c952e4d421fa1d
Approved-By: Tom Tromey <tom@tromey.com>
Approved-By: Pedro Alves <pedro@palves.net>
we might be in a background thread. Instead, arrange for
the reporting to happen on the main thread. */
std::string copy = name;
- run_on_main_thread ([
-#if __cplusplus >= 201402L
- =, copy = std::move (copy)
-#else
- =
-#endif
- ] ()
+ run_on_main_thread ([=, copy = std::move (copy)] ()
{
report_failed_demangle (copy.c_str (), core_dump_allowed,
crash_signal);
started, because it may call 'wait'. */
m_write_future
= gdb::thread_pool::g_thread_pool->post_task ([this, per_bfd,
-#if __cplusplus >= 201402L
- ctx = std::move (ctx)
-#else
- ctx
-#endif
- ] ()
+ ctx = std::move (ctx)] ()
{
maybe_write_index (per_bfd, ctx);
});