summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/regex_executor.tcc6
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index eb23bed260f..55ccdfaa2b5 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,10 @@
2014-06-03 Jonathan Wakely <jwakely@redhat.com>
+ * include/bits/regex_executor.tcc (_Executor<>::_M_main): Move instead
+ of copying.
+
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
+
Backport from mainline
2014-04-15 Jonathan Wakely <jwakely@redhat.com>
diff --git a/libstdc++-v3/include/bits/regex_executor.tcc b/libstdc++-v3/include/bits/regex_executor.tcc
index 68a5e0490f9..052302b91f7 100644
--- a/libstdc++-v3/include/bits/regex_executor.tcc
+++ b/libstdc++-v3/include/bits/regex_executor.tcc
@@ -120,10 +120,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (_M_match_queue->empty())
break;
_M_visited->assign(_M_visited->size(), false);
- auto _M_old_queue = std::move(*_M_match_queue);
- for (auto __task : _M_old_queue)
+ auto __old_queue = std::move(*_M_match_queue);
+ for (auto& __task : __old_queue)
{
- _M_cur_results = __task.second;
+ _M_cur_results = std::move(__task.second);
_M_dfs<__match_mode>(__task.first);
}
if (!__match_mode)
OpenPOWER on IntegriCloud