20 Sep
2012
20 Sep
'12
6:01 p.m.
I suspect, without having looked at the code itself, that multi_array_ref was never designed to be coerced from array_view, but I don't understand why.
Me neither. I'd be interested in hearing if it was a design oversight or a design decision.
Is there a solution to my foo_ref problem that doesn't involve moving all such functions to headers and templating them?
Short of changing your example to be void foo_ref(array_3d::array_view<2>::type& ma) { ma[0][1] = 1.0; } I'm unaware of another non-templated solution. I expect that I'm wrong, however, and that something prettier should be possible. - Rhys