Zak
Zak

Reputation: 12653

What is the boost equivalent of std::vector<T>::iterator?

What is the boost equivalent of

std::vector<T> v;  // Assume this was initialized properly
std::vector<T>::iterator it, e = v.end();
for ( it = v.begin() ; it != e ; ++it ) {
    // do something with 'v' via *it
}

I'm using a boost vector

boost::numeric::ublas::vector<T> v;

Can someone give match the above example using proper boost syntax?

Upvotes: 2

Views: 1781

Answers (1)

stanwise
stanwise

Reputation: 2412

It is:

typename boost::numeric::ublas::vector<T>::iterator

See documentation: http://www.boost.org/doc/libs/release/libs/numeric/ublas/doc/vector.htm

Upvotes: 7

Related Questions