The template swap() implementation does not compile with gcc-4.9.4, but fortunately it is not yet used anywhere in the code, thus just rip it out. --- src/lib/util/vecstream.h 2016-08-31 03:47:01.000000000 +0200 +++ src/lib/util/vecstream.h 2016-08-31 08:46:11.374477157 +0200 @@ -107,15 +107,6 @@ setup(); } - void swap(basic_vectorbuf &that) - { - using std::swap; - std::basic_streambuf::swap(that); - swap(m_mode, that.m_mode); - swap(m_storage, that.m_storage); - swap(m_threshold, that.m_threshold); - } - void reserve(typename vector_type::size_type size) { if ((m_mode & std::ios_base::out) && (m_storage.capacity() < size)) @@ -327,8 +318,6 @@ void vec(const vector_type &content) { rdbuf()->vec(content); } void vec(vector_type &&content) { rdbuf()->vec(std::move(content)); } - void swap(basic_ivectorstream &that) { std::basic_istream::swap(that); rdbuf()->swap(*that.rdbuf()); } - private: basic_vectorbuf m_rdbuf; }; @@ -350,8 +339,6 @@ void vec(vector_type &&content) { rdbuf()->vec(std::move(content)); } basic_ovectorstream &reserve(typename vector_type::size_type size) { rdbuf()->reserve(size); return *this; } - void swap(basic_ovectorstream &that) { std::basic_ostream::swap(that); rdbuf()->swap(*that.rdbuf()); } - private: basic_vectorbuf m_rdbuf; }; @@ -373,8 +360,6 @@ void vec(vector_type &&content) { rdbuf()->vec(std::move(content)); } basic_vectorstream &reserve(typename vector_type::size_type size) { rdbuf()->reserve(size); return *this; } - void swap(basic_vectorstream &that) { std::basic_iostream::swap(that); rdbuf()->swap(*that.rdbuf()); } - private: basic_vectorbuf m_rdbuf; }; @@ -386,16 +371,6 @@ typedef basic_vectorstream vectorstream; typedef basic_vectorstream wvectorstream; -template -void swap(basic_vectorbuf &a, basic_vectorbuf &b) { a.swap(b); } - -template -void swap(basic_ivectorstream &a, basic_ivectorstream &b) { a.swap(b); } -template -void swap(basic_ovectorstream &a, basic_ovectorstream &b) { a.swap(b); } -template -void swap(basic_vectorstream &a, basic_vectorstream &b) { a.swap(b); } - extern template class basic_ivectorstream; extern template class basic_ivectorstream; extern template class basic_ovectorstream;