Reputation: 12653
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
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