Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2007-05-31 12:12:57


Andrew Webber wrote:
> I recently set out to evaluate boost::date_time for use in a large
> commercial project. I was extremely impressed with the large
> feature-set and the obvious depth of thought put into the library.

Thx :-)

> However, I was a little upset about some small features missing from
> day_iterator, month_iterator, and year_iterator. Specifically, I
> wished for equality, inequality, post-increment and post-decrement
> operators. The inequality operator in particular would add the
> ability to use this group of iterators with many of the standard
> algorithms such as std::copy.

This has been on the todo list for way to long...

> I'm very new to the boost developers mailing list, so please forgive
> me and inform me if I'm breaking protocol in some way here.

Not at all.

> I went ahead and implemented the missing iterator operators.
> Interestingly, because the design of the iterators, the equality and
> inequality operators work between different types of iterators (day,
> month or year). I've also added some demo code to test out the new
> features. It's definitely not a unit test, but at least you can see
> that the operators are working. I've successfully compiled the new
> boost::date_time code and demo code under Visual Studio .NET 2003. If
> I have time, I will also test the code on gcc 3.4 and gcc 4.0.
>
>...snip details...
>
> Is this something that may be considered for inclusion in the date_time library?

Absolutely -- patches are always the best way to get something into the
library :-) I think there's actually a couple more things to get the
iterators up to full compliance, but I have no problem moving things along.
So I'll check your fixes into the head...probably be a month or so before I
get the cycles to do the work.

Thx!

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk