I can live with InputIterator, but having RandomAccess (or, at least, Bidirectional) will simplify life significantly. Is there any chance you will consider this feature request for future development?
Sure, I'll put it on the list, but I expect it will be awhile. Of course, I'm willing to consult if you want to take a shot at doing this :-).
So bottom line for this problem is: I was wrong talking about inefficiency -- there is a way to move few month at a time. The real problem though that I can't move iterator backward.
Ok, thanks for clarifying.
One more thing: it is quite inconvinient that it is prohibited to create a vector of dates. Do you have plans to make it vector compliant? Default constructor could initialize it to not_a_date for instance.
How about this: class yourdate : public boost::gregorian::date { //your default constructor here //copy the constructors you need from the base... }; The base classes don't have virtual destructors, but you will be safe as long as you just create constructors. I've been loath to create a default constructor since it is unclear what would be the correct policy for this: not_a_date, negative_infinity, etc. Interestingly, you are the first person to ask about this....
Another little issue: there are few typos on the boost web site. Example "Print a month" looks garbled (probably transformation from source code to html failed). For instance:
int std::cin >> year;
and
int eom_day = gregorian_calendar::end_of_month_day( date endOfMonth(year,month,eom_day);
look odd. Don't know about other examples; did not have chance to study them carefully.
Thanks, these have been reported and are already fixed in CVS.
Also under "Build & Compiler information" there is a typo: /boost/date_time/gregoran -- gregorian calendar system header files
should be /boost/date_time/gregorIan
Thanks, will fix. Jeff