Hej Joerg! Your changes are very welcome! The new code does require far less local variables and is much more compact on the user side. Correct me if I am wrong (I did not dig into the internals of ublas), but does not swap() rather change the matrix itself and not the matrix_row representations? If this is the case, then the whole topic of "not changing temporaries in not-const references" is of course true, but does not reflect the situation, since not the temporaries, but the matrix, on which the temporaries rely, is changed. Then the new signatures do reflect the situation much better. Best regards and thanks for your great work! Stephan ----------------------------------------------------------- Stephan Puchegger Email: Stephan.Puchegger@ap.univie.ac.at -----------------------------------------------------------