
15 Oct
2010
15 Oct
'10
7:35 p.m.
The following loop iterates over strings in result (which comes from boost::split). Is there a way to include the integer enumerator 'col' into the FOREACH loop?
In python that would be spelled for col,s in enumerate (result): ...
int col = 0; BOOST_FOREACH (std::string s, result) { H(row, col) = boost::lexical_cast<int> (s); ++col; }
See this thread http://thread.gmane.org/gmane.comp.lib.boost.user/54162 And the resulting Trac ticket: https://svn.boost.org/trac/boost/ticket/3469 for a essentially negative answer.