I was trying to write a function taking in any eigen _expression_ which has direct memory access. That is I am looking for the _expression_ type which has access to a memory location and associated size and stride information. I think the correct type for this should be Eigen::DenseCoeffsBase<Derived, Eigen::DirectWriteAccess>. Am I right in assuming so? Unfortunately casting an derived type into this _expression_ is resulting dangling references, see e.g
https://godbolt.org/z/KPdcoG. Can someone point me out what I am doing wrong?