Menu

#58 indirection example in section 6.1 of the manual does not compile

v1.0 (example)
closed
nobody
None
5
2018-09-21
2014-01-28
No

The manual includes the following code in section 6.1:

Array<int,1> A(5), B(5);
A = 0;
B = 1, 2, 3, 4, 5;
vector<int> I;
I.push_back(2);
I.push_back(4);
I.push_back(1);
A[I] = B;</int></int,1>

It fails to compile with current Blitz with the following error:

/usr/include/blitz/array/indirect.h:95:10: error: no matching member function for call to 'moveTo'
expr.moveTo(subdomain);
~~~~~^~~~~~
/usr/include/blitz/array/indirect.h:79:9: note: in instantiation of function template specialization
'blitz::applyOverSubdomain<blitz::array\<int, 1="">, blitz::FastArrayIterator\<int, 1="">, int, blitz::_bz_ArrayExpr\<blitz::fastarrayiterator\<int, 1=""> > >' requested here
applyOverSubdomain(array_, arrayIter, subdomain, expr);
^
aqq.cpp:17:6: note: in instantiation of function template specialization 'blitz::IndirectArray<blitz::array\<int, 1="">, std::vector\<int, std::allocator\<int=""> > >::operator=<blitz::array\<int, 1=""> >' requested here
A[I] = B;
^
/usr/include/blitz/array/expr.h:285:10: note: candidate template ignored: could not match 'TinyVector<int, n_rank="">' against 'int'
void moveTo(const TinyVector<int, n="">& i)
^</int,></int,></blitz::array\<int,></int,></blitz::array\<int,></blitz::fastarrayiterator\<int,></int,></blitz::array\<int,>

Discussion

  • Sylwester Arabas

    • status: open --> closed
     
  • Sylwester Arabas

     

Log in to post a comment.