From 3c59903420538a53f170cd919576adaf79662b03 Mon Sep 17 00:00:00 2001
From: Thomas Goyne <plorkyeran@aegisub.org>
Date: Sun, 2 Feb 2014 09:14:33 -0800
Subject: [PATCH] Work around an incorrect assertion in older versions of
 boost. Closes #1702.

---
 aegisub/src/video_provider_cache.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/aegisub/src/video_provider_cache.cpp b/aegisub/src/video_provider_cache.cpp
index 14b8ac5e0..5779b4a2d 100644
--- a/aegisub/src/video_provider_cache.cpp
+++ b/aegisub/src/video_provider_cache.cpp
@@ -60,7 +60,15 @@ std::shared_ptr<VideoFrame> VideoProviderCache::GetFrame(int n) {
 
 	for (auto cur = cache.begin(); cur != cache.end(); ++cur) {
 		if (cur->frame_number == n) {
+#if BOOST_VERSION <= 105200
+			// Until boost 1.52, boost::container::list incorrectly asserted
+			// that this != &other, so do an extra splice through an empty list
+			decltype(cache) temp;
+			temp.splice(temp.begin(), cache, cur);
+			cache.splice(cache.begin(), temp, temp.begin());
+#else
 			cache.splice(cache.begin(), cache, cur); // Move to front
+#endif
 			return std::make_shared<VideoFrame>(cache.front());
 		}
 
-- 
GitLab