xeval

Defined in xtensor/xeval.hpp

template <class T>
auto xt::eval(T &&t)

Force evaluation of xexpression.

xarray<double> a = {1,2,3,4};
auto&& b = xt::eval(a); // b is a reference to a, no copy!
auto&& c = xt::eval(a + b); // c is xarray<double>, not an xexpression
Return
xarray or xtensor depending on shape type