diff --git a/changelog.txt b/changelog.txt index 42ecd3e4..b8ebe8ce 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,12 +1,25 @@ Version 1.1.0 +------------------------------------------------------------------------------- + +08 Apr. 2014 Nasos Iliopoulos + + * Bugfix: + Introduced an additional swap implementation for index_pair_array and + index_triple_array to allow proper compilation of sparse containers + with g++>4.8 (4.7 also?) in C++11 mode. + 02 Apr. 2014 Nasos Iliopoulos * Added changelog - * Corrected a big number of warnings coming from stray typedefs. Other - issues may be present that are not triggered by the unit tests + * Bugfix: + Corrected a big number of warnings coming from stray typedefs. Other + similar issues may be present that are not triggered by the unit tests - * Corrected the banded matrix bug + * Bugfix: + Corrected the banded matrix bug (https://svn.boost.org/trac/boost/ticket/7549) and updated appropriate unit tests. To enable the old (incorrect though) behaviour one should define BOOST_UBLAS_LEGACY_BANDED. + + diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index 5f3f05cb..d43c1ab8 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -1727,6 +1727,13 @@ namespace boost { namespace numeric { namespace ublas { std::swap(lhs().data2_[i1], rhs().data2_[i2]); } + // This refers to index_pair<>&, but [gcc4.8, C++11] can't deduce the type to correctly dispatch the swap + // Fixme: find a more elegant solution + BOOST_UBLAS_INLINE + friend void swap( typename iterator::reference lhs, typename iterator::reference rhs) { // This referes to index_pair<>&, but gcc4.8 can't deduce the type to correctly dispatch the swap + lhs.swap(rhs); + } + private: size_type size_; V1& data1_; @@ -1903,6 +1910,13 @@ namespace boost { namespace numeric { namespace ublas { std::swap(lhs().data3_[i1], rhs().data3_[i2]); } + // This refers to index_pair<>&, but [gcc4.8, C++11] can't deduce the type to correctly dispatch the swap + // Fixme: find a more elegant solution + BOOST_UBLAS_INLINE + friend void swap( typename iterator::reference lhs, typename iterator::reference rhs) { + lhs.swap(rhs); + } + private: size_type size_; V1& data1_;