Hi Niels,

thanks for your reply :-)
By now, I realise that what I'm trying to do is to use a "smart reference" instead of a normal reference. This is "forbidden" in the boost Ublas documentation. On the other hand, the smart reference type I created seems to work fine for my application. If we could use the reference type of the StorageType as the reference type of the matrix class (see below), then at least it would be possible to use the smart reference in cases where it does work.

In answer to your question, yes I would like to replace (in matrix.hpp)

  typedef const T &const_reference;
  typedef T &reference;

with

  typedef typename A::const_reference const_reference;
  typedef typename A::reference reference;

When I locally made the changes in matrix.hpp, so far it seems to work.

Best regards,
Maarten