I’m trying to use an array such as int myarray[2][3] to initialize an array_view object. I’ve tried array_view<int, 2> a(2,3, myarray); However that does not work. I would also like to be able to do the same thing with a vector. Any ideas?
I’m trying to use an array such as int myarray[2][3] to initialize an array_view
Share
Try
array_view<int, 2> a(2, 3, *myarray);EDIT :
A vector of (fixed-size) vectors can’t be used directly to init an array_view object.
However you could do something like that: