xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

Add rvalue qualified xstrided_view_base::storage

Open AntoinePrv opened this issue 4 years ago • 1 comments

Checklist

  • [ ] The title and commit message(s) are descriptive.
  • [ ] Small commits made to fix your PR have been squashed to avoid history pollution.
  • [ ] Tests have been added for new features or bug fixes.
  • [ ] API of new functions and classes are documented.

Description

Fixes #2401

AntoinePrv avatar Jul 13 '21 19:07 AntoinePrv

@JohanMabille , I haven't been able to figure out this build error:

.../include/xtensor/xstrided_view_base.hpp:316:11: error: rvalue reference to type
'xt::xstrided_view_base<... >::storage_type' (aka 'xt::uvector<int, std::allocator<int> >')
cannot bind to lvalue of type 'xt::uvector<int, std::allocator<int> >'

I (sort of) understand rvalue references cannot bind to lvalue, but I don't understand why this is happening.

AntoinePrv avatar Jul 13 '21 20:07 AntoinePrv