summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-27 14:56:18 +0100
committerMax Kellermann <max@duempel.org>2014-01-27 14:59:15 +0100
commit5273900b0e20e75c07b8df098af96fa7f0c6d238 (patch)
treea0a9c1fe41112ffbd4db97bb29349312679637b5
parent145134422125d62d7c58326518862aff9a854b97 (diff)
neighbor/smbclient: add splice_after() fallback for gcc 4.6
-rw-r--r--src/neighbor/plugins/SmbclientNeighborPlugin.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
index f7085c03d..ea3a6c2fd 100644
--- a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+++ b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx
@@ -215,7 +215,14 @@ SmbclientNeighborExplorer::Run()
prev = i;
} else {
/* can't see it anymore: move to "lost" */
+#if defined(__clang__) || GCC_CHECK_VERSION(4,7)
lost.splice_after(lost.before_begin(), list, prev);
+#else
+ /* the forward_list::splice_after() lvalue
+ reference overload is missing in gcc 4.6 */
+ lost.emplace_front(std::move(*i));
+ list.erase_after(prev);
+#endif
}
}