xtensor-stack / xtensor

C++ tensors with broadcasting and lazy computing
BSD 3-Clause "New" or "Revised" License
3.33k stars 398 forks source link

Cannot take view of const xtensor to new xtensor #31

Closed anntzer closed 7 years ago

anntzer commented 7 years ago

As of master,

xt::xtensor<double, 3> const arr {{1, 2, 3}};
xt::xtensor<double, 2> arr2 {{2, 3}};
arr2 = xt::make_xview(arr, 0);

fails to compile even though constness of arr is not violated (as a copy is being made).

JohanMabille commented 7 years ago

@anntzer Looking into it.

Thank you for your intensive testing of xtensor!

anntzer commented 7 years ago

Thank you for this awesome project :-)