aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/cp-support.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 2fb9d9e..0300727 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1656,7 +1656,13 @@ gdb_demangle (const char *name, int options)
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 ([=] ()
+ run_on_main_thread ([
+#if __cplusplus >= 201402L
+ =, copy = std::move (copy)
+#else
+ =
+#endif
+ ] ()
{
report_failed_demangle (copy.c_str (), core_dump_allowed,
crash_signal);