Index: src/Common/utility.h
===================================================================
--- src/Common/utility.h	(revision fbecee54da078ee561a27cf4314fabc5a3252a5a)
+++ src/Common/utility.h	(revision 99614c25485a445fe8b29250bef7718bb7bb7883)
@@ -94,9 +94,9 @@
 template< typename SrcContainer, typename DestContainer >
 void cloneAll( const SrcContainer &src, DestContainer &dest ) {
-	typename SrcContainer::const_iterator in = src.begin();
-	std::back_insert_iterator< DestContainer > out( dest );
-	while ( in != src.end() ) {
-		*out++ = (*in++)->clone();
-	} // while
+	std::transform(src.begin(), src.end(), std::back_insert_iterator< DestContainer >( dest ),
+		[](const typename SrcContainer::value_type & t) -> typename DestContainer::value_type {
+			return t->clone();
+		}
+	);
 }
 
@@ -464,11 +464,11 @@
 
 // -----------------------------------------------------------------------------
-/// Reorders the input range in-place so that the minimal-value elements according to the 
-/// comparator are in front; 
+/// Reorders the input range in-place so that the minimal-value elements according to the
+/// comparator are in front;
 /// returns the iterator after the last minimal-value element.
 template<typename Iter, typename Compare>
 Iter sort_mins( Iter begin, Iter end, Compare& lt ) {
 	if ( begin == end ) return end;
-	
+
 	Iter min_pos = begin;
 	for ( Iter i = begin + 1; i != end; ++i ) {
