Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

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

v1.0 (example)
open
nobody
None
5
2014-01-28
2014-01-28
Sylwester Arabas
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;

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)
^


Discussion