I have a 4D multi_array and I define a 3D view on it. I can assign the
view to a 3D multi array but I can't pass it directly to a constructor
that takes a 3D multi_array. Isn't a 3d view on anything a model of a
3d multi_array? (for the sake of this discussion, element is always
double).
Code:
#include
using namespace boost;
class moviva {
public:
moviva(multi_array m) {}
};
main(){
typedef multi_array array_type;
typedef array_type::index_range range;
multi_array ta4;
multi_array ta3;
ta3 = ta4[indices[range()][range()][range()][1]];
moviva ma(ta3); // compiles
moviva ma1 (ta4[indices[range()][range()][range()][1]]); //does not, line 20
}
Compilation
view_test.cpp: In function `int main()':
view_test.cpp:20: error: no matching function for call to `moviva::moviva(
boost::detail::multi_array::multi_array_view)'
view_test.cpp:5: error: candidates are: moviva::moviva(const moviva&)
view_test.cpp:7: error:
moviva::moviva(boost::multi_array)
Thanks
Antonio