Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision 120a28c324be16903293aacaf7b99c7f3b9c6f84)
+++ src/Common/utility.h	(revision f5edcb4c93956c68e84e9954b263cfbe73599cc4)
@@ -16,4 +16,5 @@
 #pragma once
 
+#include <cassert>
 #include <cctype>
 #include <algorithm>
@@ -27,6 +28,5 @@
 #include <type_traits>
 #include <utility>
-
-#include <cassert>
+#include <vector>
 
 #include "Common/Indenter.h"
@@ -145,4 +145,19 @@
 		return ret;
 	} // switch
+}
+
+/// Splice src onto the end of dst, clearing src
+template< typename T >
+void splice( std::vector< T > & dst, std::vector< T > & src ) {
+	dst.reserve( dst.size() + src.size() );
+	for ( T & x : src ) { dst.emplace_back( std::move( x ) ); }
+	src.clear();
+}
+
+/// Splice src onto the begining of dst, clearing src
+template< typename T >
+void spliceBegin( std::vector< T > & dst, std::vector< T > & src ) {
+	splice( src, dst );
+	dst.swap( src );
 }
 
