Hi Joerg, hi Stephan,
question is the following: Is it intentional, that it is not possible to compile:
#include
#include int main () { using namespace boost::numeric::ublas; matrix<double> m (4, 4); for (unsigned int i = 0; i < m.size1 (); ++ i) for (unsigned int j = 0; j < m.size2 (); ++ j) m(i, j) = 4*i+j;
std::cout << m << std::endl;
swap(row(m,0), row(m,2));
std::cout << m << std::endl; }
No. This one compiles with ICC 7.0 and fails with GCC 3.2.1.
It also fails with como. As it should. This is the old problem of binding references to temporaries: parameters of `swap()' are *non-const* references, and they cannot be bound to temporaries returned by `row()'. It seems that `project()' raises its ugly head again :o( fres