--- a/src/list.h Thu Jul 24 16:54:45 2014 +0300 +++ b/src/list.h Thu Jul 24 17:01:23 2014 +0300 @@ -184,8 +184,9 @@ template<typename T> void List<T>::merge (const List<T>& other) { + int oldsize = size(); resize (size() + other.size()); - std::copy (other.begin(), other.end(), begin() + other.size()); + std::copy (other.begin(), other.end(), begin() + oldsize); } template<typename T>