Discussion:
[Boost-users] [Boost.DateTime] How to bypass checks in boost::gregorian::date constructor
d***@gmail.com
2016-11-28 09:04:32 UTC
Permalink
From the docs I see:

"date(greg_year, greg_month, greg_day)
Construct from parts of date. Throws bad_year, bad_day_of_month, or
bad_day_month (derivatives of std::out_of_range) if the year, month or day
are out of range."

In my use case, I know for sure that the year, month and date are all in
the valid range of values, so all the validity checks done by the library
become redundant.

Is it possible to somehow bypass those checks?

Loading...