Short example :
double * a = mat.data(); // OK
double * b = mat.diagonal().data(); // The method data() does not exist
If it is the diagonal of a direct access type, this should be solved directly by solving bug 58. (And for non direct access the data() function would not make sense.)
As a first workaround, one could Matrix<...>::diagonal() return a strided map.