Contrary to the documentation, the type "year_iterator" does not appear to be defined in the file "gregorian_types.hpp". Or did I miss something?
Contrary to the documentation, the type "year_iterator" does not appear to be defined in the file "gregorian_types.hpp". Or did I miss something?
No, but apparently I did... Until the typedef gets put into the library you can create it as follows: namespace boost { namespace gregorian { typedef date_time::date_itr<date_time::year_functor<date>, date> year_iterator; } } Jeff
Thanks! What I did myself was to find the code defining month_iterator, copied it, and changed "month" to "year". It seemed to work. I'm now having a strange problem, where my code using the Boost Date-Time Library compiled with VC6 runs fine in debug mode but throws an exception, saying that the year is out of range, in release mode. I don't suppose you have any idea why this might be happening? --- In Boost-Users@y..., "Jeff Garland" <jeff@c...> wrote:
Contrary to the documentation, the type "year_iterator" does not appear to be defined in the file "gregorian_types.hpp". Or did I miss something?
No, but apparently I did...
Until the typedef gets put into the library you can create it as follows:
namespace boost { namespace gregorian {
typedef date_time::date_itr<date_time::year_functor<date>, date> year_iterator;
} }
Jeff
Thanks! What I did myself was to find the code defining month_iterator, copied it, and changed "month" to "year". It seemed to work.
Good :-)
I'm now having a strange problem, where my code using the Boost Date-Time Library compiled with VC6 runs fine in debug mode but throws an exception, saying that the year is out of range, in release mode. I don't suppose you have any idea why this might be happening?
Not sure, unless there is some sort of template instantiation problem with the constrained_value stuff in gregorian/greg_year.hpp Have you run the date tests using release mode? It would be interesting to see if there is a problem there... Jeff
I'll try running the tests, but my assumption is that if there were a problem with using the date-time library in release mode with the VC6 compiler, you would have already gotten a lot of grief from millions of irate users. So I figured it had to be something in my code that caused the problem. If I find the time, I'll try figure it out. For the moment I have my own date class, and I was able to use debug mode and the boost test library to test my date class against yours. They seem to agree on everything, so I'm happy for the moment. Thanks again for your help. --- In Boost-Users@y..., "Jeff Garland" <jeff@c...> wrote:
I'm now having a strange problem, where my code using the Boost Date-Time Library compiled with VC6 runs fine in debug mode but throws an exception, saying that the year is out of range, in release
mode.
I don't suppose you have any idea why this might be happening?
Not sure, unless there is some sort of template instantiation problem with the constrained_value stuff in gregorian/greg_year.hpp Have you run the date tests using release mode? It would be interesting to see if there is a problem there...
Jeff
participants (2)
-
deane_yang
-
Jeff Garland