10 Jul
2019
10 Jul
'19
4:48 p.m.
Bill Moo via Boost-users wrote:
I can’t understand what, if indeed anything, I am doing wrong here.
The following is the code I am using to iterate the date_period:
for(boost::gregorian::week_iterator wi = dp.begin(); wi != dp.end(); ++wi) { items.push_back(formatParams(pi, (*wi))) ; }
Hi Bill, The problem is that you are looking for a match with 'wi != dp.end()'. You are not getting a match so you are blowing right though the end. Use: wi < dp.end() For your comparison and it will stop properly. Best, Dan.