|
Boost Users : |
From: Dan Bloomquist (boost_at_[hidden])
Date: 2019-07-10 16:48:35
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net