Is there a way to achieve the same effect as this,
std::list<int> l(10);
std::iota(l.begin(), l.end(), -4);
With a regular int a[]
?
Or, is the following the only way around:
for (iterator itr = begin; itr != end; ++itr)
/* ... visit *itr here ... */
C++11 added
std::begin
andstd::end
. Since then there is no difference: