vector iterators are missing operator[].
template<typename it_t="">
int adder (it_t in, int cnt) {
int sum = 0;
for (int i = 0; i < cnt; i++)
sum += in[i];
return sum;
}</typename>
int main() {
std::vector<int> a (10);
adder (a.begin(), 10); << this is OK</int>
boost::numeric::ublas::vector<int> b;
adder (b.begin(), 10); << error, why?
}</int>
Anonymous
Logged In: YES
user_id=556024
Originator: NO
Best way to fix this would be to use iterator base classes in all of uBLAS so this kind of thing can be fixed in one spot.